From 614978f73be2789366fc01167be0f50b3782c228 Mon Sep 17 00:00:00 2001 From: saberzero1 Date: Sat, 4 Apr 2026 02:01:38 +0200 Subject: [PATCH] i18n: add translations for 30 locales from Quartz v4 --- src/i18n/locales/ru-RU.ts | 20 ++++++++++++++++++++ src/i18n/locales/th-TH.ts | 9 +++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/i18n/locales/ru-RU.ts create mode 100644 src/i18n/locales/th-TH.ts diff --git a/src/i18n/locales/ru-RU.ts b/src/i18n/locales/ru-RU.ts new file mode 100644 index 0000000..ca42358 --- /dev/null +++ b/src/i18n/locales/ru-RU.ts @@ -0,0 +1,20 @@ +export default { + pages: { + folderContent: { + folder: "Папка", + itemsUnderFolder: ({ count }: { count: number }) => + `в этой папке ${count} элемент${getForm(count, "", "а", "ов")}`, + }, + }, + components: {}, +}; + +function getForm(number: number, form1: string, form2: string, form5: string): string { + const remainder100 = number % 100; + const remainder10 = remainder100 % 10; + + if (remainder100 >= 10 && remainder100 <= 20) return form5; + if (remainder10 > 1 && remainder10 < 5) return form2; + if (remainder10 == 1) return form1; + return form5; +} diff --git a/src/i18n/locales/th-TH.ts b/src/i18n/locales/th-TH.ts new file mode 100644 index 0000000..043cdca --- /dev/null +++ b/src/i18n/locales/th-TH.ts @@ -0,0 +1,9 @@ +export default { + pages: { + folderContent: { + folder: "โฟลเดอร์", + itemsUnderFolder: ({ count }: { count: number }) => `มี ${count} รายการในโฟลเดอร์นี้`, + }, + }, + components: {}, +};