Adds label_total_time string (#13337).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11582 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3126ff8388
commit
06a92fe0d0
|
@ -107,14 +107,14 @@ module TimelogHelper
|
|||
# Column headers
|
||||
headers = report.criteria.collect {|criteria| l(report.available_criteria[criteria][:label]) }
|
||||
headers += report.periods
|
||||
headers << l(:label_total)
|
||||
headers << l(:label_total_time)
|
||||
csv << headers.collect {|c| Redmine::CodesetUtil.from_utf8(
|
||||
c.to_s,
|
||||
l(:general_csv_encoding) ) }
|
||||
# Content
|
||||
report_criteria_to_csv(csv, report.available_criteria, report.columns, report.criteria, report.periods, report.hours)
|
||||
# Total row
|
||||
str_total = Redmine::CodesetUtil.from_utf8(l(:label_total), l(:general_csv_encoding))
|
||||
str_total = Redmine::CodesetUtil.from_utf8(l(:label_total_time), l(:general_csv_encoding))
|
||||
row = [ str_total ] + [''] * (report.criteria.size - 1)
|
||||
total = 0
|
||||
report.periods.each do |period|
|
||||
|
|
|
@ -5,7 +5,7 @@ entries_by_day = entries.group_by(&:spent_on)
|
|||
%>
|
||||
|
||||
<div class="total-hours">
|
||||
<p><%= l(:label_total) %>: <%= html_hours("%.2f" % entries.sum(&:hours).to_f) %></p>
|
||||
<p><%= l(:label_total_time) %>: <%= html_hours("%.2f" % entries.sum(&:hours).to_f) %></p>
|
||||
</div>
|
||||
|
||||
<% if entries.any? %>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<% end %>
|
||||
|
||||
<div class="total-hours">
|
||||
<p><%= l(:label_total) %>: <%= html_hours(l_hours(@total_hours)) %></p>
|
||||
<p><%= l(:label_total_time) %>: <%= html_hours(l_hours(@total_hours)) %></p>
|
||||
</div>
|
||||
|
||||
<% unless @entries.empty? %>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
<% unless @report.criteria.empty? %>
|
||||
<div class="total-hours">
|
||||
<p><%= l(:label_total) %>: <%= html_hours(l_hours(@report.total_hours)) %></p>
|
||||
<p><%= l(:label_total_time) %>: <%= html_hours(l_hours(@report.total_hours)) %></p>
|
||||
</div>
|
||||
|
||||
<% unless @report.hours.empty? %>
|
||||
|
@ -45,13 +45,13 @@
|
|||
<% @report.periods.each do |period| %>
|
||||
<th class="period" width="<%= columns_width %>%"><%= period %></th>
|
||||
<% end %>
|
||||
<th class="total" width="<%= columns_width %>%"><%= l(:label_total) %></th>
|
||||
<th class="total" width="<%= columns_width %>%"><%= l(:label_total_time) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%= render :partial => 'report_criteria', :locals => {:criterias => @report.criteria, :hours => @report.hours, :level => 0} %>
|
||||
<tr class="total">
|
||||
<td><%= l(:label_total) %></td>
|
||||
<td><%= l(:label_total_time) %></td>
|
||||
<%= ('<td></td>' * (@report.criteria.size - 1)).html_safe %>
|
||||
<% total = 0 -%>
|
||||
<% @report.periods.each do |period| -%>
|
||||
|
|
|
@ -1087,3 +1087,4 @@ ar:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: الإجمالي
|
||||
|
|
|
@ -1184,3 +1184,4 @@ az:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Cəmi
|
||||
|
|
|
@ -1084,3 +1084,4 @@ bg:
|
|||
description_date_from: Въведете начална дата
|
||||
description_date_to: Въведете крайна дата
|
||||
text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.<br />Промяна след създаването му не е възможна.'
|
||||
label_total_time: Общо
|
||||
|
|
|
@ -1100,3 +1100,4 @@ bs:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Ukupno
|
||||
|
|
|
@ -1089,3 +1089,4 @@ ca:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Total
|
||||
|
|
|
@ -1091,3 +1091,4 @@ cs:
|
|||
field_closed_on: Uzavřeno
|
||||
field_generate_password: Generovat heslo
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Celkem
|
||||
|
|
|
@ -1104,3 +1104,4 @@ da:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Total
|
||||
|
|
|
@ -1099,4 +1099,4 @@ de:
|
|||
version_status_open: offen
|
||||
|
||||
warning_attachments_not_saved: "%{count} Datei(en) konnten nicht gespeichert werden."
|
||||
|
||||
label_total_time: Gesamtzeit
|
||||
|
|
|
@ -1087,3 +1087,4 @@ el:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Σύνολο
|
||||
|
|
|
@ -1089,3 +1089,4 @@ en-GB:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Total
|
||||
|
|
|
@ -619,6 +619,7 @@ en:
|
|||
one: 1 issue
|
||||
other: "%{count} issues"
|
||||
label_total: Total
|
||||
label_total_time: Total time
|
||||
label_permissions: Permissions
|
||||
label_current_status: Current status
|
||||
label_new_statuses_allowed: New statuses allowed
|
||||
|
|
|
@ -1123,3 +1123,4 @@ es:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Total
|
||||
|
|
|
@ -1100,3 +1100,4 @@ et:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: "Kokku"
|
||||
|
|
|
@ -1088,3 +1088,4 @@ eu:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Guztira
|
||||
|
|
|
@ -1089,3 +1089,4 @@ fa:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: جمله
|
||||
|
|
|
@ -1108,3 +1108,4 @@ fi:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Yhteensä
|
||||
|
|
|
@ -613,6 +613,7 @@ fr:
|
|||
one: 1 demande
|
||||
other: "%{count} demandes"
|
||||
label_total: Total
|
||||
label_total_time: Temps total
|
||||
label_permissions: Permissions
|
||||
label_current_status: Statut actuel
|
||||
label_new_statuses_allowed: Nouveaux statuts autorisés
|
||||
|
|
|
@ -1098,3 +1098,4 @@ gl:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Total
|
||||
|
|
|
@ -1092,3 +1092,4 @@ he:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: סה"כ
|
||||
|
|
|
@ -1088,3 +1088,4 @@ hr:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Ukupno
|
||||
|
|
|
@ -1106,3 +1106,4 @@
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Összesen
|
||||
|
|
|
@ -1091,3 +1091,4 @@ id:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Total
|
||||
|
|
|
@ -1088,3 +1088,4 @@ it:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Totale
|
||||
|
|
|
@ -1116,3 +1116,4 @@ ja:
|
|||
field_inherit_members: メンバーを継承
|
||||
field_closed_on: 終了日
|
||||
field_generate_password: パスワードを自動生成
|
||||
label_total_time: 合計
|
||||
|
|
|
@ -1137,3 +1137,4 @@ ko:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: 합계
|
||||
|
|
|
@ -1146,3 +1146,4 @@ lt:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Iš viso
|
||||
|
|
|
@ -1081,3 +1081,4 @@ lv:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Kopā
|
||||
|
|
|
@ -1087,3 +1087,4 @@ mk:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Вкупно
|
||||
|
|
|
@ -1088,3 +1088,4 @@ mn:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Нийт
|
||||
|
|
|
@ -1069,3 +1069,4 @@ nl:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Totaal
|
||||
|
|
|
@ -1077,3 +1077,4 @@
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Totalt
|
||||
|
|
|
@ -1108,3 +1108,4 @@ pl:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Ogółem
|
||||
|
|
|
@ -1107,3 +1107,4 @@ pt-BR:
|
|||
field_closed_on: Fechado
|
||||
field_generate_password: Gerar senha
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Total
|
||||
|
|
|
@ -1093,3 +1093,4 @@ pt:
|
|||
field_closed_on: Fechado
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Total
|
||||
|
|
|
@ -1082,3 +1082,4 @@ ro:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Total
|
||||
|
|
|
@ -1197,3 +1197,4 @@ ru:
|
|||
field_closed_on: Закрыта
|
||||
field_generate_password: Создание пароля
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Общее время
|
||||
|
|
|
@ -1084,3 +1084,4 @@ sk:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Celkovo
|
||||
|
|
|
@ -1087,3 +1087,4 @@ sl:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Skupaj
|
||||
|
|
|
@ -1083,3 +1083,4 @@ sq:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Total
|
||||
|
|
|
@ -1089,3 +1089,4 @@ sr-YU:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Ukupno
|
||||
|
|
|
@ -1088,3 +1088,4 @@ sr:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Укупно
|
||||
|
|
|
@ -1125,3 +1125,4 @@ sv:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Total
|
||||
|
|
|
@ -1084,3 +1084,4 @@ th:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: จำนวนรวม
|
||||
|
|
|
@ -1106,3 +1106,4 @@ tr:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Toplam
|
||||
|
|
|
@ -1082,3 +1082,4 @@ uk:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Всього
|
||||
|
|
|
@ -1140,3 +1140,4 @@ vi:
|
|||
field_closed_on: Đã đóng
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: Tổng cộng
|
||||
|
|
|
@ -1167,3 +1167,4 @@
|
|||
description_date_to: 輸入結束日期
|
||||
text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。<br />一旦儲存之後, 代碼便無法再次被更改。'
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: 總計
|
||||
|
|
|
@ -1091,3 +1091,4 @@ zh:
|
|||
field_closed_on: Closed
|
||||
field_generate_password: Generate password
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: 合计
|
||||
|
|
|
@ -140,7 +140,7 @@ class TimeEntryReportsControllerTest < ActionController::TestCase
|
|||
assert_select 'th:nth-child(2)', :text => '2009-52'
|
||||
assert_select 'th:nth-child(3)', :text => '2009-53'
|
||||
assert_select 'th:nth-child(4)', :text => '2010-1'
|
||||
assert_select 'th:nth-child(5)', :text => 'Total'
|
||||
assert_select 'th:nth-child(5)', :text => 'Total time'
|
||||
end
|
||||
assert_select '#time-report tbody tr' do
|
||||
assert_select 'td:nth-child(1)', :text => 'eCookbook'
|
||||
|
@ -206,9 +206,9 @@ class TimeEntryReportsControllerTest < ActionController::TestCase
|
|||
assert_equal 'text/csv; header=present', @response.content_type
|
||||
lines = @response.body.chomp.split("\n")
|
||||
# Headers
|
||||
assert_equal 'Project,User,Activity,2007-3,2007-4,Total', lines.first
|
||||
assert_equal 'Project,User,Activity,2007-3,2007-4,Total time', lines.first
|
||||
# Total row
|
||||
assert_equal 'Total,"","",154.25,8.65,162.90', lines.last
|
||||
assert_equal 'Total time,"","",154.25,8.65,162.90', lines.last
|
||||
end
|
||||
|
||||
def test_report_csv_export
|
||||
|
@ -219,9 +219,9 @@ class TimeEntryReportsControllerTest < ActionController::TestCase
|
|||
assert_equal 'text/csv; header=present', @response.content_type
|
||||
lines = @response.body.chomp.split("\n")
|
||||
# Headers
|
||||
assert_equal 'Project,User,Activity,2007-3,2007-4,Total', lines.first
|
||||
assert_equal 'Project,User,Activity,2007-3,2007-4,Total time', lines.first
|
||||
# Total row
|
||||
assert_equal 'Total,"","",154.25,8.65,162.90', lines.last
|
||||
assert_equal 'Total time,"","",154.25,8.65,162.90', lines.last
|
||||
end
|
||||
|
||||
def test_csv_big_5
|
||||
|
@ -348,8 +348,8 @@ class TimeEntryReportsControllerTest < ActionController::TestCase
|
|||
assert_equal 'text/csv; header=present', @response.content_type
|
||||
lines = @response.body.chomp.split("\n")
|
||||
# Headers
|
||||
s1 = "Utilisateur;2011-11-11;Total"
|
||||
s2 = "Total"
|
||||
s1 = "Utilisateur;2011-11-11;Temps total"
|
||||
s2 = "Temps total"
|
||||
if s1.respond_to?(:force_encoding)
|
||||
s1.force_encoding('ISO-8859-1')
|
||||
s2.force_encoding('ISO-8859-1')
|
||||
|
|
Loading…
Reference in New Issue