[openstreetmap/openstreetmap-website] Add last updated date to diary entry page (#2969)
Andy Allan
notifications at github.com
Wed Nov 25 13:29:24 UTC 2020
@gravitystorm requested changes on this pull request.
> @@ -7,7 +7,7 @@
<h2><%= link_to diary_entry.title, diary_entry_path(diary_entry.user, diary_entry) %></h2>
<small class='text-muted'>
- <%= t(".posted_by_html", :link_user => (link_to diary_entry.user.display_name, user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to diary_entry.language.name, :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code)) %>
+ <%= t(".posted_by_html", :link_user => (link_to diary_entry.user.display_name, user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to diary_entry.language.name, :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code), :updated => l(diary_entry.updated_at, :format => :blog)) %>
I suspect that it's rare for diary entries to be updated. I would be interested in whether people think this should only be shown when there has been a change, rather than always showing it.
> @@ -433,7 +433,7 @@ en:
heading: "No entry with the id: %{id}"
body: "Sorry, there is no diary entry or comment with the id %{id}. Please check your spelling, or maybe the link you clicked is wrong."
diary_entry:
- posted_by_html: "Posted by %{link_user} on %{created} in %{language_link}"
+ posted_by_html: "Posted by %{link_user} on %{created} in %{language_link} last updated on %{updated}"
Unfortunately we can't change the number of interpolation variables in an existing string. Doing so causes server errors until all the translation strings are updated. So if you change the number of interpolation variables, you have to also rename the translation key (`posted_by_html`).
Alternatively, you could look at adding this as a separate sentence, i.e. adding a full stop to the existing sentence, and starting a new one with the last updated information.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2969#pullrequestreview-538426760
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20201125/157967c7/attachment.htm>
More information about the rails-dev
mailing list