mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Get more i18n fixed in for he locale. Include fallback to en locale and include pluralization mechanism
This commit is contained in:
parent
3ba7daf1d0
commit
e74f8842ae
20 changed files with 1839 additions and 1703 deletions
|
|
@ -89,16 +89,16 @@ class ApplicationController < ActionController::Base
|
|||
# is count and a string descriptor, correctly pluralised if there are no
|
||||
# actions or multiple actions
|
||||
#
|
||||
def count_undone_todos_phrase(todos_parent, string="actions")
|
||||
def count_undone_todos_phrase(todos_parent)
|
||||
count = count_undone_todos(todos_parent)
|
||||
deferred_count = count_deferred_todos(todos_parent)
|
||||
if count == 0 && deferred_count > 0
|
||||
word = deferred_count == 1 ? string.singularize : string.pluralize
|
||||
word = "deferred " + word
|
||||
deferred_count.to_s + " " + word
|
||||
word = I18n.t('common.actions_midsentence', :count => deferred_count)
|
||||
word = I18n.t('common.deferred') + " " + word
|
||||
return deferred_count.to_s + " " + word
|
||||
else
|
||||
word = count == 1 ? string.singularize : string.pluralize
|
||||
count.to_s + " " + word
|
||||
word = I18n.t('common.actions_midsentence', :count => count)
|
||||
return count.to_s + " " + word
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue