Verified Commit 752de9cb authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻
Browse files

change format_hours helper to make use of Rails I18n pluralization feature

parent 53523e37
......@@ -4,8 +4,7 @@ module FormatHelper
end
def format_hours(hours)
hours = hours.to_i if (hours % 1).zero?
pluralize hours, 'Stunde', 'Stunden'
t('activerecord.attributes.billing_expense.hours', count: hours.to_i)
end
def format_hours_semester(hours)
......
......@@ -297,6 +297,10 @@ de:
assignment: Begleitung
created_by: Erstellt von
semester: Semester
hours:
zero: keine Stunden
one: eine Stunde
other: '%{count} Stunden'
certificate:
<<: *id-generic_keys
assignment: Einsatz
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment