Skip to content

Commit a87a57c

Browse files
thevrusdanielroeautofix-ci[bot]
authored
feat(i18n): add Ukrainian translation 🇺🇦 (#433)
Co-authored-by: Daniel Roe <daniel@roe.dev> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 5c973cd commit a87a57c

3 files changed

Lines changed: 1514 additions & 13 deletions

File tree

config/i18n.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,18 @@ const locales: (LocaleObjectData | (Omit<LocaleObjectData, 'code'> & { code: str
177177
const name = new Intl.PluralRules('ru-RU').select(choice)
178178
return { zero: 2, one: 0, two: 1, few: 1, many: 2, other: 3 }[name]
179179
},
180-
},
180+
} satisfies LocaleObjectData,
181+
{
182+
code: 'uk-UA',
183+
file: 'uk-UA.json',
184+
name: 'Українська',
185+
pluralRule: (choice: number) => {
186+
if (choice === 0) return 0
187+
188+
const name = new Intl.PluralRules('uk-UA').select(choice)
189+
return { zero: 0, one: 1, two: 0, few: 2, many: 3, other: 4 }[name]
190+
},
191+
} satisfies LocaleObjectData,
181192
/*{
182193
code: 'ru-RU',
183194
file: 'ru-RU.json',
@@ -187,18 +198,6 @@ const locales: (LocaleObjectData | (Omit<LocaleObjectData, 'code'> & { code: str
187198
return { zero: 2 /!* not used *!/, one: 0, two: 1 /!* not used *!/, few: 1, many: 2, other: 3 }[name]
188199
},
189200
},
190-
{
191-
code: 'uk-UA',
192-
file: 'uk-UA.json',
193-
name: 'Українська',
194-
pluralRule: (choice: number) => {
195-
if (choice === 0)
196-
return 0
197-
198-
const name = new Intl.PluralRules('uk-UA').select(choice)
199-
return { zero: 0, one: 1, two: 0 /!* not used *!/, few: 2, many: 3, other: 4 }[name]
200-
},
201-
},
202201
{
203202
code: 'cs-CZ',
204203
file: 'cs-CZ.json',

0 commit comments

Comments
 (0)