Use relative translations for changeset comments

This commit is contained in:
Andy Allan 2018-11-07 11:07:29 +01:00
parent 04afeeb32f
commit 5cd417f8e8
4 changed files with 14 additions and 10 deletions

View file

@ -1,6 +1,6 @@
<h2><%= t "changeset.rss.comment", :author => comment.author.display_name, <h2><%= t ".comment", :author => comment.author.display_name,
:changeset_id => comment.changeset.id.to_s %></h2> :changeset_id => comment.changeset.id.to_s %></h2>
<div class="changeset-comment" style="margin-top: 5px"> <div class="changeset-comment" style="margin-top: 5px">
<div class="changeset-comment-description" style="font-size: smaller; color: #999999"><%= t "changeset.rss.commented_at_by_html", :when => friendly_date(comment.created_at), :user => comment.author.display_name %></div> <div class="changeset-comment-description" style="font-size: smaller; color: #999999"><%= t ".commented_at_by_html", :when => friendly_date(comment.created_at), :user => comment.author.display_name %></div>
<div class="changeset-comment-text"><%= comment.body %></div> <div class="changeset-comment-text"><%= comment.body %></div>
</div> </div>

View file

@ -1,6 +1,6 @@
comments.each do |comment| comments.each do |comment|
xml.item do 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.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) xml.guid url_for(:controller => "browse", :action => "changeset", :id => comment.changeset.id, :anchor => "c#{comment.id}", :only_path => false)

View file

@ -2,9 +2,9 @@ xml.rss("version" => "2.0",
"xmlns:dc" => "http://purl.org/dc/elements/1.1/") do "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
xml.channel do xml.channel do
if @changeset if @changeset
xml.title t("changeset.rss.title_particular", :changeset_id => @changeset.id) xml.title t(".title_particular", :changeset_id => @changeset.id)
else else
xml.title t("changeset.rss.title_all") xml.title t(".title_all")
end end
xml.link url_for(:controller => "site", :action => "index", :only_path => false) xml.link url_for(:controller => "site", :action => "index", :only_path => false)

View file

@ -242,13 +242,17 @@ en:
load_more: "Load more" load_more: "Load more"
timeout: timeout:
sorry: "Sorry, the list of changesets you requested took too long to retrieve." sorry: "Sorry, the list of changesets you requested took too long to retrieve."
rss: changeset_comments:
comment:
comment: "New comment on changeset #%{changeset_id} by %{author}"
commented_at_by_html: "Updated %{when} ago by %{user}"
comments:
comment: "New comment on changeset #%{changeset_id} by %{author}"
index:
title_all: OpenStreetMap changeset discussion title_all: OpenStreetMap changeset discussion
title_particular: "OpenStreetMap changeset #%{changeset_id} discussion" title_particular: "OpenStreetMap changeset #%{changeset_id} discussion"
comment: "New comment on changeset #%{changeset_id} by %{author}" timeout:
commented_at_html: "Updated %{when} ago" sorry: "Sorry, the list of changeset comments you requested took too long to retrieve."
commented_at_by_html: "Updated %{when} ago by %{user}"
full: Full discussion
diary_entry: diary_entry:
new: new:
title: New Diary Entry title: New Diary Entry