Skip to content

Commit

Permalink
Add pluralisation rules for Azerbaijani, Persian, Georgian, and Turkish
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamineskola committed Jan 20, 2022
1 parent 1ddbb20 commit b32830c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/govuk_app_config/govuk_i18n.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
module GovukI18n
def self.plurals
{
# Azerbaijani
az: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
# Dari - this isn't an iso code. Probably should be 'prs' as per ISO 639-3.
dr: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
# Latin America and Caribbean Spanish
"es-419": { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
# Persian
fa: { i18n: { plural: { keys: %i[one other], rule: ->(n) { [0, 1].include?(n) ? :one : :other } } } },
# Scottish Gaelic
gd: { i18n: { plural: { keys: %i[one two few other],
rule:
Expand All @@ -21,12 +25,16 @@ def self.plurals
end } } },
# Armenian
hy: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
# Georgian
ka: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
# Kazakh
kk: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
# Punjabi Shahmukhi
"pa-pk": { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
# Sinhalese
si: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
# Turkish
tr: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
# Uzbek
uz: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
# Chinese Hong Kong
Expand Down

0 comments on commit b32830c

Please sign in to comment.