Proper inflection for de and nl

This commit is contained in:
echarp 2020-02-27 21:33:03 +01:00
parent 4249c91af9
commit a35b71f68f
7 changed files with 14 additions and 11 deletions

View File

@ -289,7 +289,7 @@ GEM
activerecord (>= 4.2)
request_store (~> 1.1)
parallel (1.19.1)
parser (2.7.0.2)
parser (2.7.0.3)
ast (~> 2.4.0)
piwik_analytics (1.0.2)
actionpack
@ -303,7 +303,7 @@ GEM
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (4.0.3)
puma (4.3.1)
puma (4.3.2)
nio4r (~> 2.0)
rack (2.2.2)
rack-livereload (0.3.17)

View File

@ -47,7 +47,7 @@
= t '.tags'
= link_to orgas_path do
%em.fa.fa-users
= Orga.model_name.human.pluralize
= Orga.model_name.human.pluralize I18n.locale
= link_to versions_path do
%em.fa.fa-history
= t 'versions.index.title'

View File

@ -9,7 +9,7 @@
%th(colspan='8')
%h3
%em.fa.fa-users
= Orga.model_name.human.pluralize @orgas.count
= Orga.model_name.human.pluralize @orgas.count, I18n.locale
- @orgas.group_by { |orga| orga.region.flag }.each do |code, orgas|
%thead
@ -46,7 +46,7 @@
%th(colspan='8')
%h3
%em.fa.fa-calendar
= Event.model_name.human.pluralize @events.count
= Event.model_name.human.pluralize @events.count, I18n.locale
- @events.group_by { |event| event.region.flag }.each do |code, events|
%thead

View File

@ -7,11 +7,11 @@
%li
= link_to orgas_path q: params[:q], page: params[:page] do
%em.fa.fa-li.fa-arrow-left
= Orga.model_name.human.pluralize
= Orga.model_name.human.pluralize I18n.locale
%li
= link_to tag_path @orga.name_as_tag do
%em.fa.fa-li.fa-tag
= Event.model_name.human.pluralize
= Event.model_name.human.pluralize I18n.locale
%li
= link_to events_path tag: @orga.name_as_tag do
%em.fa.fa-li.fa-calendar

View File

@ -3,7 +3,7 @@
%h2
= link_to orgas_path do
%em.fa.fa-users
= Orga.model_name.human.pluralize
= Orga.model_name.human.pluralize I18n.locale
%ul.fa-ul
- @orgas.each do |orga|
%li

View File

@ -11,11 +11,14 @@
# end
ActiveSupport::Inflector.inflections(:de) do |inflect|
inflect.plural 'veranstaltung', 'veranstaltungen'
inflect.plural 'Evenement', 'Evenementen'
inflect.plural 'Veranstaltung', 'Veranstaltungen'
inflect.plural 'Organisatie', 'Organisatien'
end
ActiveSupport::Inflector.inflections(:nl) do |inflect|
inflect.plural 'evenement', 'evenementen'
inflect.plural 'Evenement', 'Evenementen'
inflect.plural 'Organisatie', 'Organisaties'
end
# These inflection rules are supported but not enabled by default:

View File

@ -17,7 +17,7 @@ de:
models:
event: Veranstaltung
user: Moderator
orga: Orga
orga: Organisatie
kind: Typ
city: Stadt
region: Region