From 7dad4a956ee80247fc52d8be3f923b62c100f420 Mon Sep 17 00:00:00 2001 From: Roy Schonberg Date: Mon, 18 Sep 2023 12:50:50 +0300 Subject: [PATCH 1/8] add new languages support cs/el/ru --- src/translations/cs.ts | 21 +++++++++++++++++++++ src/translations/el.ts | 22 ++++++++++++++++++++++ src/translations/ru.ts | 23 +++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 src/translations/cs.ts create mode 100644 src/translations/el.ts create mode 100644 src/translations/ru.ts diff --git a/src/translations/cs.ts b/src/translations/cs.ts new file mode 100644 index 00000000..e93ec742 --- /dev/null +++ b/src/translations/cs.ts @@ -0,0 +1,21 @@ +import type { TranslationsType } from './utils'; + +const cs: TranslationsType = { + save: 'Uložit', + selectSingle: 'Vyberte datum', + selectMultiple: 'Vyberte data', + selectRange: 'Vyberte období', + notAccordingToDateFormat: (inputFormat) => + `Formát data musí být ${inputFormat}`, + mustBeHigherThan: (date) => `Musí to být později ${date}`, + mustBeLowerThan: (date) => `Musí to být dříve ${date}`, + mustBeBetween: (startDate, endDate) => + `Musí být mezi ${startDate} - ${endDate}`, + dateIsDisabled: 'Den není povolen', + previous: 'Předchozí', + next: 'další ', + typeInDate: 'Zadejte datum', + pickDateFromCalendar: 'Vyberte datum z kalendáře', + close: 'Zavřít', +}; +export default cs; diff --git a/src/translations/el.ts b/src/translations/el.ts new file mode 100644 index 00000000..d59a3556 --- /dev/null +++ b/src/translations/el.ts @@ -0,0 +1,22 @@ +import type { TranslationsType } from './utils'; + +const el: 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: 'Κλείσε', + }; + export default el; + \ No newline at end of file diff --git a/src/translations/ru.ts b/src/translations/ru.ts new file mode 100644 index 00000000..c6c73217 --- /dev/null +++ b/src/translations/ru.ts @@ -0,0 +1,23 @@ + +import type { TranslationsType } from './utils'; + +const ru: 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: 'Закрыть', + }; + export default ru; + \ No newline at end of file From ceb1b87f84abcfedb90f4f7b4ae1a34f1edca787 Mon Sep 17 00:00:00 2001 From: Roy Schonberg Date: Mon, 18 Sep 2023 21:13:38 +0300 Subject: [PATCH 2/8] update doc and example --- docusaurus/docs/intro.md | 2 +- example/src/App.tsx | 6 ++++++ src/index.tsx | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docusaurus/docs/intro.md b/docusaurus/docs/intro.md index 230096a3..478be759 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` 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` 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' diff --git a/example/src/App.tsx b/example/src/App.tsx index 3c1a6f8f..675256a2 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -48,6 +48,9 @@ import { tr, zh, zhTW, + cs, + el, + ru, } from 'react-native-paper-dates' import { useCallback, useState } from 'react' @@ -69,6 +72,9 @@ const locales: [string, TranslationsType][] = [ ['tr', tr], ['zh', zh], ['zh-TW', zhTW], + ['cs', cs], + ['el', el], + ['ru', ru], ] locales.forEach((locale) => { diff --git a/src/index.tsx b/src/index.tsx index 293d02da..c1ee0c43 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -25,3 +25,6 @@ export { default as pt } from './translations/pt' export { default as tr } from './translations/tr' export { default as zh } from './translations/zh' export { default as zhTW } from './translations/zhTW' +export { default as cs } from './translations/cs' +export { default as el } from './translations/el' +export { default as ru } from './translations/ru' From 4a9b6b56bfa908a50777e24679862d1203886078 Mon Sep 17 00:00:00 2001 From: Roy Schonberg Date: Mon, 18 Sep 2023 22:23:38 +0300 Subject: [PATCH 3/8] remove space --- src/translations/ru.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/translations/ru.ts b/src/translations/ru.ts index c6c73217..bf23a495 100644 --- a/src/translations/ru.ts +++ b/src/translations/ru.ts @@ -1,4 +1,3 @@ - import type { TranslationsType } from './utils'; const ru: TranslationsType = { From a3460e92c902e11df21d39270b2d0c871bfe878b Mon Sep 17 00:00:00 2001 From: Roy Schonberg Date: Mon, 18 Sep 2023 22:24:26 +0300 Subject: [PATCH 4/8] remove lint bug --- src/translations/ru.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/translations/ru.ts b/src/translations/ru.ts index bf23a495..033164bb 100644 --- a/src/translations/ru.ts +++ b/src/translations/ru.ts @@ -1,4 +1,4 @@ -import type { TranslationsType } from './utils'; +import type { TranslationsType } from './utils' const ru: TranslationsType = { save: 'Сохранить', @@ -17,6 +17,6 @@ const ru: TranslationsType = { typeInDate: 'Ввод в дате', pickDateFromCalendar: 'Выбор даты из календаря', close: 'Закрыть', - }; - export default ru; + } + export default ru \ No newline at end of file From 836f19d8f3e5f17df7108ab3c009d00dd26c0eb4 Mon Sep 17 00:00:00 2001 From: Roy Schonberg Date: Mon, 18 Sep 2023 23:05:53 +0300 Subject: [PATCH 5/8] remove lint error in cs,el --- src/translations/cs.ts | 6 +++--- src/translations/el.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/translations/cs.ts b/src/translations/cs.ts index e93ec742..41324a2c 100644 --- a/src/translations/cs.ts +++ b/src/translations/cs.ts @@ -1,4 +1,4 @@ -import type { TranslationsType } from './utils'; +import type { TranslationsType } from './utils' const cs: TranslationsType = { save: 'Uložit', @@ -17,5 +17,5 @@ const cs: TranslationsType = { typeInDate: 'Zadejte datum', pickDateFromCalendar: 'Vyberte datum z kalendáře', close: 'Zavřít', -}; -export default cs; +} +export default cs diff --git a/src/translations/el.ts b/src/translations/el.ts index d59a3556..6480687c 100644 --- a/src/translations/el.ts +++ b/src/translations/el.ts @@ -1,4 +1,4 @@ -import type { TranslationsType } from './utils'; +import type { TranslationsType } from './utils' const el: TranslationsType = { save: 'Αποθηκεύσετε', @@ -17,6 +17,6 @@ const el: TranslationsType = { typeInDate: 'Πληκτρολογήστε την ημερομηνία', pickDateFromCalendar: 'Επιλέξτε ημερομηνία από το ημερολόγιο', close: 'Κλείσε', - }; - export default el; + } + export default el \ No newline at end of file From 99b3fea8c5c3143e5795911594e24850c57934a0 Mon Sep 17 00:00:00 2001 From: Roy Schonberg Date: Mon, 18 Sep 2023 23:14:56 +0300 Subject: [PATCH 6/8] fix space --- src/translations/el.ts | 32 ++++++++++++++++---------------- src/translations/ru.ts | 32 ++++++++++++++++---------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/translations/el.ts b/src/translations/el.ts index 6480687c..5b181fb5 100644 --- a/src/translations/el.ts +++ b/src/translations/el.ts @@ -1,22 +1,22 @@ import type { TranslationsType } from './utils' const el: 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: 'Κλείσε', + save: 'Αποθηκεύσετε', + selectSingle: 'Επιλέξτε ημερομηνία', + selectMultiple: 'Επιλέξτε ημερομηνίες', + selectRange: 'Επιλέξτε περίοδο', + notAccordingToDateFormat: (inputFormat) => + `Η μορφή ημερομηνίας πρέπει να είναι ${inputFormat}`, + mustBeHigherThan: (date) => `Πρέπει να είναι αργότερα${date}`, + mustBeLowerThan: (date) => `Πρέπει να είναι νωρίτερα τότε ${date}`, + mustBeBetween: (startDate, endDate) => + `Πρέπει να είναι μεταξύ ${startDate} - ${endDate}`, + dateIsDisabled: 'Ημέρα δεν επιτρέπεται', + previous: 'Προηγούμενος', + next: 'Επόμενο', + typeInDate: 'Πληκτρολογήστε την ημερομηνία', + pickDateFromCalendar: 'Επιλέξτε ημερομηνία από το ημερολόγιο', + close: 'Κλείσε', } export default el \ No newline at end of file diff --git a/src/translations/ru.ts b/src/translations/ru.ts index 033164bb..f5d37783 100644 --- a/src/translations/ru.ts +++ b/src/translations/ru.ts @@ -1,22 +1,22 @@ import type { TranslationsType } from './utils' const ru: 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: 'Закрыть', + save: 'Сохранить', + selectSingle: 'Выбор даты', + selectMultiple: 'Выбор дат', + selectRange: 'Выбор диапазона', + notAccordingToDateFormat: (inputFormat) => + `Формат даты должен быть ${inputFormat}`, + mustBeHigherThan: (date) => `Должен быть позже, чем ${date}`, + mustBeLowerThan: (date) => `Должен быть ранее, чем ${date}`, + mustBeBetween: (startDate, endDate) => + `Должен быть между ${startDate} - ${endDate}`, + dateIsDisabled: 'День не разрешён', + previous: 'Предыдущий', + next: 'Следующий', + typeInDate: 'Ввод в дате', + pickDateFromCalendar: 'Выбор даты из календаря', + close: 'Закрыть', } export default ru \ No newline at end of file From c75986c6e526f80dd6cccbc20a5e8bdebffa4d51 Mon Sep 17 00:00:00 2001 From: Roy Schonberg Date: Mon, 18 Sep 2023 23:18:38 +0300 Subject: [PATCH 7/8] another space fix --- src/translations/el.ts | 4 ++-- src/translations/ru.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/translations/el.ts b/src/translations/el.ts index 5b181fb5..20d64bee 100644 --- a/src/translations/el.ts +++ b/src/translations/el.ts @@ -17,6 +17,6 @@ const el: TranslationsType = { typeInDate: 'Πληκτρολογήστε την ημερομηνία', pickDateFromCalendar: 'Επιλέξτε ημερομηνία από το ημερολόγιο', close: 'Κλείσε', - } - export default el +} +export default el \ No newline at end of file diff --git a/src/translations/ru.ts b/src/translations/ru.ts index f5d37783..523e49c9 100644 --- a/src/translations/ru.ts +++ b/src/translations/ru.ts @@ -17,6 +17,6 @@ const ru: TranslationsType = { typeInDate: 'Ввод в дате', pickDateFromCalendar: 'Выбор даты из календаря', close: 'Закрыть', - } - export default ru +} +export default ru \ No newline at end of file From dc8aa587cb3adbfd8afd097a0aca84d96178bafd Mon Sep 17 00:00:00 2001 From: Roy Schonberg Date: Mon, 18 Sep 2023 23:19:58 +0300 Subject: [PATCH 8/8] last fix --- src/translations/el.ts | 1 - src/translations/ru.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/src/translations/el.ts b/src/translations/el.ts index 20d64bee..d281863b 100644 --- a/src/translations/el.ts +++ b/src/translations/el.ts @@ -19,4 +19,3 @@ const el: TranslationsType = { close: 'Κλείσε', } export default el - \ No newline at end of file diff --git a/src/translations/ru.ts b/src/translations/ru.ts index 523e49c9..c145a856 100644 --- a/src/translations/ru.ts +++ b/src/translations/ru.ts @@ -19,4 +19,3 @@ const ru: TranslationsType = { close: 'Закрыть', } export default ru - \ No newline at end of file