From 5cd417f8e8b09712892f8da64ead32bd59eef5d1 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 7 Nov 2018 11:07:29 +0100 Subject: [PATCH] Use relative translations for changeset comments --- app/views/changeset_comments/_comment.html.erb | 4 ++-- app/views/changeset_comments/_comments.rss.builder | 2 +- app/views/changeset_comments/index.rss.builder | 4 ++-- config/locales/en.yml | 14 +++++++++----- 4 files changed, 14 insertions(+), 10 deletions(-) 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 -- 2.39.5