Include the changeset comment in the <title> of the Atom feeds if
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 7 Aug 2009 00:59:01 +0000 (00:59 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 7 Aug 2009 00:59:01 +0000 (00:59 +0000)
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
config/locales/en.yml
config/locales/is.yml

index db53cdb..1fbfe8c 100644 (file)
@@ -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|
index ad857b8..4e61c16 100644 (file)
@@ -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}}"
index c955897..e591803 100644 (file)
@@ -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}}"