From: Andy Allan Date: Wed, 7 Nov 2018 10:07:29 +0000 (+0100) Subject: Use relative translations for changeset comments X-Git-Tag: live~3325^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/5cd417f8e8b09712892f8da64ead32bd59eef5d1?hp=04afeeb32fae6ba52810db72d22449e548994de0 Use relative translations for changeset comments --- diff --git a/app/views/changeset_comments/_comment.html.erb b/app/views/changeset_comments/_comment.html.erb index 34b15ff88..32a4b9229 100644 --- a/app/views/changeset_comments/_comment.html.erb +++ b/app/views/changeset_comments/_comment.html.erb @@ -1,6 +1,6 @@ -

<%= t "changeset.rss.comment", :author => comment.author.display_name, +

<%= t ".comment", :author => comment.author.display_name, :changeset_id => comment.changeset.id.to_s %>

-
<%= t "changeset.rss.commented_at_by_html", :when => friendly_date(comment.created_at), :user => comment.author.display_name %>
+
<%= t ".commented_at_by_html", :when => friendly_date(comment.created_at), :user => comment.author.display_name %>
<%= comment.body %>
diff --git a/app/views/changeset_comments/_comments.rss.builder b/app/views/changeset_comments/_comments.rss.builder index 5c683c86d..8848b9a80 100644 --- a/app/views/changeset_comments/_comments.rss.builder +++ b/app/views/changeset_comments/_comments.rss.builder @@ -1,6 +1,6 @@ comments.each do |comment| xml.item do - xml.title t("changeset.rss.comment", :author => comment.author.display_name, :changeset_id => comment.changeset.id.to_s) + xml.title t(".comment", :author => comment.author.display_name, :changeset_id => comment.changeset.id.to_s) xml.link url_for(:controller => "browse", :action => "changeset", :id => comment.changeset.id, :anchor => "c#{comment.id}", :only_path => false) xml.guid url_for(:controller => "browse", :action => "changeset", :id => comment.changeset.id, :anchor => "c#{comment.id}", :only_path => false) diff --git a/app/views/changeset_comments/index.rss.builder b/app/views/changeset_comments/index.rss.builder index f6d304a4c..acaa54727 100644 --- a/app/views/changeset_comments/index.rss.builder +++ b/app/views/changeset_comments/index.rss.builder @@ -2,9 +2,9 @@ xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do xml.channel do if @changeset - xml.title t("changeset.rss.title_particular", :changeset_id => @changeset.id) + xml.title t(".title_particular", :changeset_id => @changeset.id) else - xml.title t("changeset.rss.title_all") + xml.title t(".title_all") end xml.link url_for(:controller => "site", :action => "index", :only_path => false) diff --git a/config/locales/en.yml b/config/locales/en.yml index a9370018a..6a496be1a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -242,13 +242,17 @@ en: load_more: "Load more" timeout: sorry: "Sorry, the list of changesets you requested took too long to retrieve." - rss: - title_all: OpenStreetMap changeset discussion - title_particular: "OpenStreetMap changeset #%{changeset_id} discussion" + changeset_comments: + comment: comment: "New comment on changeset #%{changeset_id} by %{author}" - commented_at_html: "Updated %{when} ago" commented_at_by_html: "Updated %{when} ago by %{user}" - full: Full discussion + comments: + comment: "New comment on changeset #%{changeset_id} by %{author}" + index: + title_all: OpenStreetMap changeset discussion + title_particular: "OpenStreetMap changeset #%{changeset_id} discussion" + timeout: + sorry: "Sorry, the list of changeset comments you requested took too long to retrieve." diary_entry: new: title: New Diary Entry