From a6f190eabec4772cba2e94ef7372442058f49f2a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Fri, 7 Aug 2009 00:59:01 +0000 Subject: [PATCH 1/1] Include the changeset comment in the of the Atom feeds if there's a changeset comment. I'm not doing any snipping of the comment so they could run to 255 characters (the max size in the database), but from testing a few feed clients it looks like they do this pretty well at the client side. --- app/views/changeset/list.atom.builder | 6 +++++- config/locales/en.yml | 3 +++ config/locales/is.yml | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/views/changeset/list.atom.builder b/app/views/changeset/list.atom.builder index db53cdb08..1fbfe8c56 100644 --- a/app/views/changeset/list.atom.builder +++ b/app/views/changeset/list.atom.builder @@ -29,7 +29,11 @@ atom_feed(:language => I18n.locale, :schema_date => 2009, :href => changeset_download_url(changeset, :only_path => false), :type => "application/osmChange+xml" - entry.title t('browse.changeset.title') + " " + h(changeset.id) + if !changeset.tags.empty? and changeset.tags.has_key? "comment" + entry.title t('browse.changeset.feed.title_comment', :id => h(changeset.id), :comment => h(changeset.tags['comment'])) + else + entry.title t('browse.changeset.feed.title', :id => h(changeset.id)) + end if changeset.user.data_public? entry.author do |author| diff --git a/config/locales/en.yml b/config/locales/en.yml index ad857b875..4e61c16bf 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -87,6 +87,9 @@ en: download: "Download {{changeset_xml_link}} or {{osmchange_xml_link}}" changesetxml: "Changeset XML" osmchangexml: "osmChange XML" + feed: + title: "Changeset {{id}}" + title_comment: "Changeset {{id}} - {{comment}}" changeset_navigation: user: name_tooltip: "View edits by {{user}}" diff --git a/config/locales/is.yml b/config/locales/is.yml index c95589797..e59180333 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -87,6 +87,9 @@ is: download: "Niðurhala breytingunni á {{changeset_xml_link}} eða á {{osmchange_xml_link}}" changesetxml: "Breytingarsetts XML sniði" osmchangexml: "osmChange XML sniði" + feed: + title: "Breytingarsett {{id}}" + title_comment: "Breytingarsett {{id}} - {{comment}}" changeset_navigation: user: name_tooltip: "Skoða breytingarsett eftir {{user}}" -- 2.43.2