From 4583d4c2cc20afc3e397673e71693e44e13abb71 Mon Sep 17 00:00:00 2001 From: Chachchai Tongthavornsuwan <38347860+CartoonToYou@users.noreply.github.com> Date: Fri, 5 Jul 2024 15:27:15 +0700 Subject: [PATCH 1/4] Add th.ts --- src/translations/th.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/translations/th.ts diff --git a/src/translations/th.ts b/src/translations/th.ts new file mode 100644 index 00000000..32f5a0a3 --- /dev/null +++ b/src/translations/th.ts @@ -0,0 +1,23 @@ +import type { TranslationsType } from './utils' + +const th: TranslationsType = { + save: 'บันทึก', + selectSingle: 'เลือกวันที่', + selectMultiple: 'เลือกวันที่', + selectRange: 'เลือกช่วงวันที่', + notAccordingToDateFormat: (inputFormat) => + `รูปแบบวันที่จะต้องเป็น ${inputFormat}`, + mustBeHigherThan: (date) => `ต้องอยู่ภายหลังวันที่ ${date}`, + mustBeLowerThan: (date) => `ต้องอยู่ก่อนวันที่ ${date}`, + mustBeBetween: (startDate, endDate) => + `ต้องอยู่ในช่วงวันที่ ${startDate} - ${endDate}`, + dateIsDisabled: 'ไม่สามารถใช้วันที่นี้ได้', + previous: 'ก่อนหน้า', + next: 'ถัดไป', + typeInDate: 'พิมพ์วันที่', + pickDateFromCalendar: 'เลือกวันที่จากปฏิทิน', + close: 'ปิด', + minute: 'นาที', + hour: 'ชั่วโมง', +} +export default th From 6033ef9ff95870cebb54c8ee6da978d4e90086b8 Mon Sep 17 00:00:00 2001 From: Chachchai Tongthavornsuwan <38347860+CartoonToYou@users.noreply.github.com> Date: Fri, 5 Jul 2024 15:28:32 +0700 Subject: [PATCH 2/4] Update index.tsx Adding export th file --- src/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.tsx b/src/index.tsx index 7bff28b6..0b5501c9 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -31,3 +31,4 @@ export { default as ru } from './translations/ru' export { default as ro } from './translations/ro' export { default as id } from './translations/id' export { default as ja } from './translations/ja' +export { default as th } from './translations/th' From 814d75dc29da7a83bb2a8faae26fc2705c3aaec6 Mon Sep 17 00:00:00 2001 From: Chachchai Tongthavornsuwan <38347860+CartoonToYou@users.noreply.github.com> Date: Fri, 5 Jul 2024 15:30:13 +0700 Subject: [PATCH 3/4] Update App.tsx Add th to locales --- example/src/App.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/example/src/App.tsx b/example/src/App.tsx index 673ff094..91a98096 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -55,6 +55,7 @@ import { ro, id, ja, + th, } from 'react-native-paper-dates' import { useCallback, useState } from 'react' @@ -83,6 +84,7 @@ const locales: [string, TranslationsType][] = [ ['ro', ro], ['id', id], ['ja', ja], + ['th', th], ] locales.forEach((locale) => { From 436e5018000ffc79035825448b5640c663a3dc61 Mon Sep 17 00:00:00 2001 From: Chachchai Tongthavornsuwan <38347860+CartoonToYou@users.noreply.github.com> Date: Fri, 5 Jul 2024 15:32:30 +0700 Subject: [PATCH 4/4] Update intro.md Add th to currently supports paragraph --- docusaurus/docs/intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/intro.md b/docusaurus/docs/intro.md index 4483abf6..023374a8 100644 --- a/docusaurus/docs/intro.md +++ b/docusaurus/docs/intro.md @@ -36,7 +36,7 @@ npm install react-native-paper-dates --save ### Supported -React-Native-Paper-Dates currently supports `ar/ca/de/en/en-GB/es/fr/he/hi/it/ko/nl/pl/pt/tr/zh/zh-TW/cs/el/ru/ro/id/ja` translations. Ideally you would do this somewhere before react-native-paper-dates is used. For example, you might add the follow to your `index.js` or `app.js`. +React-Native-Paper-Dates currently supports `ar/ca/de/en/en-GB/es/fr/he/hi/it/ko/nl/pl/pt/tr/zh/zh-TW/cs/el/ru/ro/id/ja/th` translations. Ideally you would do this somewhere before react-native-paper-dates is used. For example, you might add the follow to your `index.js` or `app.js`. ```javascript import { enGB, registerTranslation } from 'react-native-paper-dates'