From: Ævar Arnfjörð Bjarmason Date: Fri, 7 Aug 2009 00:59:01 +0000 (+0000) Subject: Include the changeset comment in the of the Atom feeds if X-Git-Tag: live~6770 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/a6f190eabec4772cba2e94ef7372442058f49f2a?hp=6e6b44e494590088443eb6ea2eae16bf9ff69e73 Include the changeset comment in the <title> 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. --- 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}}"