]> git.openstreetmap.org Git - rails.git/commitdiff
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 db53cdb080c381c534f452876cea97ee171ce30c..1fbfe8c5601609ad9db2d47bb27ef8ebe2d9677a 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 ad857b8755e998d422c4c76f9dfee2e32ae989c1..4e61c16bfee79ee99b4bdc467688a49053b03505 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 c955897976777a8ecf0a9fbedddeb07a6d8ef3a3..e59180333b40d3f0687da0935ba9e24285bd0d37 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}}"