From: Tom Hughes Date: Sat, 2 Feb 2013 12:11:46 +0000 (+0000) Subject: Localise dates and times in notes popups X-Git-Tag: live~5096^2~46 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/e957aaacb622648a890657ed0880366c1f207699 Localise dates and times in notes popups --- diff --git a/app/assets/javascripts/templates/notes/show.jst.ejs b/app/assets/javascripts/templates/notes/show.jst.ejs index 6d3a9b3bf..abcecc66c 100644 --- a/app/assets/javascripts/templates/notes/show.jst.ejs +++ b/app/assets/javascripts/templates/notes/show.jst.ejs @@ -5,11 +5,12 @@ <% if (comment.user) { %> <%= I18n.t('javascripts.notes.show.' + comment.action + '_by', { - user: comment.user, user_url: comment.user_url, time: comment.date + user: comment.user, user_url: comment.user_url, + time: I18n.l("time.formats.long", comment.date) }) %> <% } else { %> <%- I18n.t('javascripts.notes.show.' + comment.action + '_by_anonymous', { - time: comment.date + time: I18n.l("time.formats.long", comment.date) }) %> <% } %> diff --git a/config/i18n-js.yml b/config/i18n-js.yml index 982d60da7..4882a4357 100644 --- a/config/i18n-js.yml +++ b/config/i18n-js.yml @@ -23,6 +23,8 @@ translations: - file: "app/assets/javascripts/i18n/translations.js" only: + - "*.date" + - "*.time" - "*.browse.start_rjs.*" - "*.export.start_rjs.*" - "*.javascripts.*" diff --git a/config/locales/en.yml b/config/locales/en.yml index b40a639d8..8d45dfe26 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2026,7 +2026,7 @@ en: commented_by: "comment from %{user} at %{time}" commented_by_anonymous: "comment from anonymous at %{time}" closed_by: "resolved by %{user} at %{time}" - closeded_by_anonymous: "resolved by anonymous at %{time}" + closed_by_anonymous: "resolved by anonymous at %{time}" reopened_by: "reactivated by %{user} at %{time}" reopened_by_anonymous: "reactivated by anonymous at %{time}" close: Close