Skip to content

Commit 3a4c729

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 96da5de commit 3a4c729

File tree

3 files changed

+1513
-12
lines changed

3 files changed

+1513
-12
lines changed

config/i18n.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,17 @@ const locales: (LocaleObjectData | (Omit<LocaleObjectData, 'code'> & { code: str
183183
return { zero: 2, one: 0, two: 1, few: 1, many: 2, other: 3 }[name]
184184
},
185185
},
186+
{
187+
code: 'uk-UA',
188+
file: 'uk-UA.json',
189+
name: 'Українська',
190+
pluralRule: (choice: number) => {
191+
if (choice === 0) return 0
192+
193+
const name = new Intl.PluralRules('uk-UA').select(choice)
194+
return { zero: 0, one: 1, two: 0, few: 2, many: 3, other: 4 }[name]
195+
},
196+
},
186197
/*{
187198
code: 'ru-RU',
188199
file: 'ru-RU.json',
@@ -192,18 +203,6 @@ const locales: (LocaleObjectData | (Omit<LocaleObjectData, 'code'> & { code: str
192203
return { zero: 2 /!* not used *!/, one: 0, two: 1 /!* not used *!/, few: 1, many: 2, other: 3 }[name]
193204
},
194205
},
195-
{
196-
code: 'uk-UA',
197-
file: 'uk-UA.json',
198-
name: 'Українська',
199-
pluralRule: (choice: number) => {
200-
if (choice === 0)
201-
return 0
202-
203-
const name = new Intl.PluralRules('uk-UA').select(choice)
204-
return { zero: 0, one: 1, two: 0 /!* not used *!/, few: 2, many: 3, other: 4 }[name]
205-
},
206-
},
207206
{
208207
code: 'cs-CZ',
209208
file: 'cs-CZ.json',

0 commit comments

Comments
 (0)