Merge remote-tracking branch 'upstream/pull/1837'

This commit is contained in:
Tom Hughes 2018-04-25 17:38:19 +01:00
commit aebfbdcfbd
8 changed files with 24 additions and 24 deletions

View file

@ -1,8 +1,8 @@
<div class="note-comment" style="margin-top: 5px"> <div class="note-comment" style="margin-top: 5px">
<% if comment.author.nil? -%> <% if comment.author.nil? -%>
<div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at_html", :when => friendly_date(comment.created_at) %></div> <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t ".#{comment.event}_at_html", :when => friendly_date(comment.created_at) %></div>
<% else -%> <% else -%>
<div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at_by_html", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %></div> <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t ".#{comment.event}_at_by_html", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %></div>
<% end -%> <% end -%>
<div class="note-comment-text"><%= comment.body %></div> <div class="note-comment-text"><%= comment.body %></div>
</div> </div>

View file

@ -1,4 +1,4 @@
<h2><%= t "note.entry.comment" %></h2> <h2><%= t ".comment" %></h2>
<%= render :partial => "comment", :object => entry %> <%= render :partial => "comment", :object => entry %>
<h2><%= t "note.entry.full" %></h2> <h2><%= t ".full" %></h2>
<%= render :partial => "description", :object => entry.note %> <%= render :partial => "description", :object => entry.note %>

View file

@ -2,11 +2,11 @@ xml.item do
location = describe_location(note.lat, note.lon, 14, locale) location = describe_location(note.lat, note.lon, 14, locale)
if note.closed? if note.closed?
xml.title t("note.rss.closed", :place => location) xml.title t("notes.rss.closed", :place => location)
elsif note.comments.length > 1 elsif note.comments.length > 1
xml.title t("note.rss.commented", :place => location) xml.title t("notes.rss.commented", :place => location)
else else
xml.title t("note.rss.opened", :place => location) xml.title t("notes.rss.opened", :place => location)
end end
xml.link browse_note_url(note) xml.link browse_note_url(note)

View file

@ -5,15 +5,15 @@ xml.rss("version" => "2.0",
"xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#", "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
"xmlns:georss" => "http://www.georss.org/georss") do "xmlns:georss" => "http://www.georss.org/georss") do
xml.channel do xml.channel do
xml.title t("note.rss.title") xml.title t("notes.rss.title")
xml.description t("note.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon) xml.description t("notes.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon)
xml.link url_for(:controller => "site", :action => "index", :only_path => false) xml.link url_for(:controller => "site", :action => "index", :only_path => false)
@comments.each do |comment| @comments.each do |comment|
location = describe_location(comment.note.lat, comment.note.lon, 14, locale) location = describe_location(comment.note.lat, comment.note.lon, 14, locale)
xml.item do xml.item do
xml.title t("note.rss.#{comment.event}", :place => location) xml.title t("notes.rss.#{comment.event}", :place => location)
xml.link url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false) xml.link url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)
xml.guid url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false) xml.guid url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)

View file

@ -5,8 +5,8 @@ xml.rss("version" => "2.0",
"xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#", "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
"xmlns:georss" => "http://www.georss.org/georss") do "xmlns:georss" => "http://www.georss.org/georss") do
xml.channel do xml.channel do
xml.title t("note.rss.title") xml.title t("notes.rss.title")
xml.description t("note.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon) xml.description t("notes.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon)
xml.link url_for(:controller => "site", :action => "index", :only_path => false) xml.link url_for(:controller => "site", :action => "index", :only_path => false)
xml << (render(:partial => "note", :collection => @notes) || "") xml << (render(:partial => "note", :collection => @notes) || "")

View file

@ -8,11 +8,11 @@
<table class="note_list"> <table class="note_list">
<tr> <tr>
<th></th> <th></th>
<th><%= t'note.mine.id' %></th> <th><%= t '.id' %></th>
<th><%= t'note.mine.creator' %></th> <th><%= t '.creator' %></th>
<th><%= t'note.mine.description' %></th> <th><%= t '.description' %></th>
<th><%= t'note.mine.created_at' %></th> <th><%= t '.created_at' %></th>
<th><%= t'note.mine.last_changed' %></th> <th><%= t '.last_changed' %></th>
</tr> </tr>
<% @notes.each do |note| -%> <% @notes.each do |note| -%>
<tr<% if note.author != @user2 %> class="creator"<% end %>> <tr<% if note.author != @user2 %> class="creator"<% end %>>
@ -25,9 +25,9 @@
</td> </td>
<td><%= link_to note.id.to_s, :controller => "browse", :action => "note", :id => note.id %></td> <td><%= link_to note.id.to_s, :controller => "browse", :action => "note", :id => note.id %></td>
<td><%= note_author(note.author) %></td> <td><%= note_author(note.author) %></td>
<td><%= note.comments.first.body.to_html %></td> <td><%= note.comments.first.body.to_html %></td>
<td><%= t 'note.mine.ago_html', :when => friendly_date(note.created_at) %></td> <td><%= t '.ago_html', :when => friendly_date(note.created_at) %></td>
<td><%= t 'note.mine.ago_html', :when => friendly_date(note.updated_at) %></td> <td><%= t '.ago_html', :when => friendly_date(note.updated_at) %></td>
</tr> </tr>
<% end -%> <% end -%>
</table> </table>

View file

@ -4,8 +4,8 @@ xml.rss("version" => "2.0",
"xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#", "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
"xmlns:georss" => "http://www.georss.org/georss") do "xmlns:georss" => "http://www.georss.org/georss") do
xml.channel do xml.channel do
xml.title t("note.rss.title") xml.title t("notes.rss.title")
xml.description t("note.rss.description_item", :id => @note.id) xml.description t("notes.rss.description_item", :id => @note.id)
xml.link url_for(:controller => "site", :action => "index", :only_path => false) xml.link url_for(:controller => "site", :action => "index", :only_path => false)
xml << render(:partial => "note", :object => @note) xml << render(:partial => "note", :object => @note)

View file

@ -2202,8 +2202,8 @@ en:
showing_page: "Page %{page}" showing_page: "Page %{page}"
next: "Next »" next: "Next »"
previous: "« Previous" previous: "« Previous"
note: notes:
description: comment:
opened_at_html: "Created %{when} ago" opened_at_html: "Created %{when} ago"
opened_at_by_html: "Created %{when} ago by %{user}" opened_at_by_html: "Created %{when} ago by %{user}"
commented_at_html: "Updated %{when} ago" commented_at_html: "Updated %{when} ago"