From 6a9fcb23d0b184ec44ee94c45b64fb7e2fe7d0b4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 13 Mar 2009 19:03:34 +0000 Subject: [PATCH] Adds a lang string with arguments for date ranges (#2305). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2587 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/projects/activity.rhtml | 6 +++--- app/views/timelog/_date_range.rhtml | 6 ++---- config/locales/bg.yml | 1 + config/locales/ca.yml | 1 + config/locales/cs.yml | 1 + config/locales/da.yml | 1 + config/locales/de.yml | 1 + config/locales/en.yml | 1 + config/locales/es.yml | 1 + config/locales/fi.yml | 1 + config/locales/fr.yml | 1 + config/locales/gl.yml | 1 + config/locales/he.yml | 1 + config/locales/hu.yml | 1 + config/locales/it.yml | 1 + config/locales/ja.yml | 1 + config/locales/ko.yml | 1 + config/locales/lt.yml | 1 + config/locales/nl.yml | 1 + config/locales/no.yml | 1 + config/locales/pl.yml | 1 + config/locales/pt-BR.yml | 1 + config/locales/pt.yml | 1 + config/locales/ro.yml | 1 + config/locales/ru.yml | 1 + config/locales/sk.yml | 1 + config/locales/sl.yml | 1 + config/locales/sr.yml | 1 + config/locales/sv.yml | 1 + config/locales/th.yml | 1 + config/locales/tr.yml | 1 + config/locales/uk.yml | 1 + config/locales/vi.yml | 1 + config/locales/zh-TW.yml | 1 + config/locales/zh.yml | 1 + 35 files changed, 38 insertions(+), 7 deletions(-) diff --git a/app/views/projects/activity.rhtml b/app/views/projects/activity.rhtml index dfc091fd1..efec01f14 100644 --- a/app/views/projects/activity.rhtml +++ b/app/views/projects/activity.rhtml @@ -1,5 +1,5 @@

<%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)) %>

-

<%= "#{l(:label_date_from)} #{format_date(@date_to - @days)} #{l(:label_date_to).downcase} #{format_date(@date_to-1)}" %>

+

<%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %>

<% @events_by_day.keys.sort.reverse.each do |day| %> @@ -24,13 +24,13 @@ <%= link_to_remote(('« ' + l(:label_previous)), {:update => "content", :url => params.merge(:from => @date_to - @days - 1), :method => :get, :complete => 'window.scrollTo(0,0)'}, {:href => url_for(params.merge(:from => @date_to - @days - 1)), - :title => "#{l(:label_date_from)} #{format_date(@date_to - 2*@days)} #{l(:label_date_to).downcase} #{format_date(@date_to - @days - 1)}"}) %> + :title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1))}) %>
<%= link_to_remote((l(:label_next) + ' »'), {:update => "content", :url => params.merge(:from => @date_to + @days - 1), :method => :get, :complete => 'window.scrollTo(0,0)'}, {:href => url_for(params.merge(:from => @date_to + @days - 1)), - :title => "#{l(:label_date_from)} #{format_date(@date_to)} #{l(:label_date_to).downcase} #{format_date(@date_to + @days - 1)}"}) unless @date_to >= Date.today %> + :title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1))}) unless @date_to >= Date.today %>
  <% other_formats_links do |f| %> diff --git a/app/views/timelog/_date_range.rhtml b/app/views/timelog/_date_range.rhtml index ed84b16cf..9b4557e1f 100644 --- a/app/views/timelog/_date_range.rhtml +++ b/app/views/timelog/_date_range.rhtml @@ -8,10 +8,8 @@

<%= radio_button_tag 'period_type', '2', @free_period %> -<%= l(:label_date_from) %> -<%= text_field_tag 'from', @from, :size => 10 %> <%= calendar_for('from') %> -<%= l(:label_date_to) %> -<%= text_field_tag 'to', @to, :size => 10 %> <%= calendar_for('to') %> +<%= l(:label_date_from_to, :start => (text_field_tag('from', @from, :size => 10) + calendar_for('from')), + :end => (text_field_tag('to', @to, :size => 10) + calendar_for('to'))) %> <%= submit_tag l(:button_apply), :name => nil %>

diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 0179cb261..bc69a97f1 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -781,3 +781,4 @@ bg: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/ca.yml b/config/locales/ca.yml index e62a936d6..6c0381c1f 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -782,3 +782,4 @@ ca: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 577758532..d8db54c7c 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -786,3 +786,4 @@ cs: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/da.yml b/config/locales/da.yml index 76323520f..ca1d9fa24 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -814,3 +814,4 @@ da: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/de.yml b/config/locales/de.yml index 95a6f6c38..7acff5118 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -813,3 +813,4 @@ de: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/en.yml b/config/locales/en.yml index e0cce3cbe..b051b4682 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -665,6 +665,7 @@ en: label_sort: Sort label_ascending: Ascending label_descending: Descending + label_date_from_to: From {{start}} to {{end}} button_login: Login button_submit: Submit diff --git a/config/locales/es.yml b/config/locales/es.yml index 259d29489..d249e9b05 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -834,3 +834,4 @@ es: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 1ae6bc75c..50682174b 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -824,3 +824,4 @@ fi: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 72a1023a0..d0c77bdfa 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -697,6 +697,7 @@ fr: label_sort: Tri label_ascending: Croissant label_descending: Décroissant + label_date_from_to: Du {{start}} au {{end}} button_login: Connexion button_submit: Soumettre diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 65f37de85..6cc9127c5 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -813,3 +813,4 @@ gl: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/he.yml b/config/locales/he.yml index e674cc160..805612571 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -796,3 +796,4 @@ he: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 7a82ed57f..2a43079d4 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -819,3 +819,4 @@ label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/it.yml b/config/locales/it.yml index d10084ce2..6da3a95aa 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -799,3 +799,4 @@ it: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/ja.yml b/config/locales/ja.yml index c82074b0f..ff64a413c 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -812,3 +812,4 @@ ja: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 30d04324f..f1a5d7e8e 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -843,3 +843,4 @@ ko: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/lt.yml b/config/locales/lt.yml index a8bea412f..4da7f13fc 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -824,3 +824,4 @@ lt: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 89e9b8346..9572d8447 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -769,3 +769,4 @@ nl: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/no.yml b/config/locales/no.yml index 1b670ad6e..61452f4a5 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -786,3 +786,4 @@ label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 8eb6eb940..15e510053 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -817,3 +817,4 @@ pl: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index ca9525d8f..6c663693e 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -819,3 +819,4 @@ pt-BR: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/pt.yml b/config/locales/pt.yml index fb4447978..510f517a9 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -805,3 +805,4 @@ pt: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 30fbc3a94..629dcb075 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -826,3 +826,4 @@ ro: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/ru.yml b/config/locales/ru.yml index fcb62b35e..c3a3cb3d7 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -912,3 +912,4 @@ ru: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/sk.yml b/config/locales/sk.yml index fb75161f1..b729fea8b 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -785,3 +785,4 @@ sk: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 249e47fbb..e949ce39e 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -783,3 +783,4 @@ sl: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/sr.yml b/config/locales/sr.yml index a4b66a058..5ac1dba04 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -807,3 +807,4 @@ label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/sv.yml b/config/locales/sv.yml index dcd274c56..f2136feec 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -841,3 +841,4 @@ sv: enumeration_issue_priorities: Ärendeprioriteter enumeration_doc_categories: Dokumentkategorier enumeration_activities: Aktiviteter (tidsuppföljning) + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/th.yml b/config/locales/th.yml index 147c59bfc..692a9059b 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -784,3 +784,4 @@ th: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/tr.yml b/config/locales/tr.yml index de4611940..a4298304d 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -820,3 +820,4 @@ tr: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 4eda51136..724afe206 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -783,3 +783,4 @@ uk: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/vi.yml b/config/locales/vi.yml index decba375f..1bf0a8f5c 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -853,3 +853,4 @@ vi: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 082ddcbdb..a7b7b2d17 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -891,3 +891,4 @@ enumeration_issue_priorities: 項目優先權 enumeration_doc_categories: 文件分類 enumeration_activities: 活動 (時間追蹤) + label_date_from_to: From {{start}} to {{end}} diff --git a/config/locales/zh.yml b/config/locales/zh.yml index e6fe11404..b25227f4d 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -817,3 +817,4 @@ zh: label_descending: Descending label_sort: Sort label_ascending: Ascending + label_date_from_to: From {{start}} to {{end}} -- 2.39.5