Skip to content

Commit 99b98d2

Browse files
committed
feat(i18n): add Ukrainian translation
1 parent ace20d1 commit 99b98d2

2 files changed

Lines changed: 763 additions & 12 deletions

File tree

config/i18n.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,18 @@ const locales: (Omit<LocaleObjectData, 'code'> & { code: string })[] = [
178178
return { zero: 2, one: 0, two: 1, few: 1, many: 2, other: 3 }[name]
179179
},
180180
} satisfies LocaleObjectData,
181+
{
182+
code: 'uk-UA',
183+
file: 'uk-UA.json',
184+
name: 'Українська',
185+
pluralRule: (choice: number) => {
186+
if (choice === 0)
187+
return 0
188+
189+
const name = new Intl.PluralRules('uk-UA').select(choice)
190+
return { zero: 0, one: 1, two: 0, few: 2, many: 3, other: 4 }[name]
191+
},
192+
} satisfies LocaleObjectData,
181193
/*{
182194
code: 'ru-RU',
183195
file: 'ru-RU.json',
@@ -187,18 +199,6 @@ const locales: (Omit<LocaleObjectData, 'code'> & { code: string })[] = [
187199
return { zero: 2 /!* not used *!/, one: 0, two: 1 /!* not used *!/, few: 1, many: 2, other: 3 }[name]
188200
},
189201
},
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-
},
202202
{
203203
code: 'cs-CZ',
204204
file: 'cs-CZ.json',

0 commit comments

Comments
 (0)