Skip to content

Commit 614e555

Browse files
authored
Merge pull request #336 from roysc1984/new-language-support-cs-el-ru
add new languages support cs/el/ru
2 parents 77f8ced + dc8aa58 commit 614e555

File tree

6 files changed

+73
-1
lines changed

6 files changed

+73
-1
lines changed

docusaurus/docs/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ npm install react-native-paper-dates --save
3636

3737
### Supported
3838

39-
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`.
39+
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`.
4040

4141
```javascript
4242
import { enGB, registerTranslation } from 'react-native-paper-dates'

example/src/App.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ import {
4848
tr,
4949
zh,
5050
zhTW,
51+
cs,
52+
el,
53+
ru,
5154
} from 'react-native-paper-dates'
5255
import { useCallback, useState } from 'react'
5356

@@ -69,6 +72,9 @@ const locales: [string, TranslationsType][] = [
6972
['tr', tr],
7073
['zh', zh],
7174
['zh-TW', zhTW],
75+
['cs', cs],
76+
['el', el],
77+
['ru', ru],
7278
]
7379

7480
locales.forEach((locale) => {

src/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ export { default as pt } from './translations/pt'
2525
export { default as tr } from './translations/tr'
2626
export { default as zh } from './translations/zh'
2727
export { default as zhTW } from './translations/zhTW'
28+
export { default as cs } from './translations/cs'
29+
export { default as el } from './translations/el'
30+
export { default as ru } from './translations/ru'

src/translations/cs.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import type { TranslationsType } from './utils'
2+
3+
const cs: TranslationsType = {
4+
save: 'Uložit',
5+
selectSingle: 'Vyberte datum',
6+
selectMultiple: 'Vyberte data',
7+
selectRange: 'Vyberte období',
8+
notAccordingToDateFormat: (inputFormat) =>
9+
`Formát data musí být ${inputFormat}`,
10+
mustBeHigherThan: (date) => `Musí to být později ${date}`,
11+
mustBeLowerThan: (date) => `Musí to být dříve ${date}`,
12+
mustBeBetween: (startDate, endDate) =>
13+
`Musí být mezi ${startDate} - ${endDate}`,
14+
dateIsDisabled: 'Den není povolen',
15+
previous: 'Předchozí',
16+
next: 'další ',
17+
typeInDate: 'Zadejte datum',
18+
pickDateFromCalendar: 'Vyberte datum z kalendáře',
19+
close: 'Zavřít',
20+
}
21+
export default cs

src/translations/el.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import type { TranslationsType } from './utils'
2+
3+
const el: TranslationsType = {
4+
save: 'Αποθηκεύσετε',
5+
selectSingle: 'Επιλέξτε ημερομηνία',
6+
selectMultiple: 'Επιλέξτε ημερομηνίες',
7+
selectRange: 'Επιλέξτε περίοδο',
8+
notAccordingToDateFormat: (inputFormat) =>
9+
`Η μορφή ημερομηνίας πρέπει να είναι ${inputFormat}`,
10+
mustBeHigherThan: (date) => `Πρέπει να είναι αργότερα${date}`,
11+
mustBeLowerThan: (date) => `Πρέπει να είναι νωρίτερα τότε ${date}`,
12+
mustBeBetween: (startDate, endDate) =>
13+
`Πρέπει να είναι μεταξύ ${startDate} - ${endDate}`,
14+
dateIsDisabled: 'Ημέρα δεν επιτρέπεται',
15+
previous: 'Προηγούμενος',
16+
next: 'Επόμενο',
17+
typeInDate: 'Πληκτρολογήστε την ημερομηνία',
18+
pickDateFromCalendar: 'Επιλέξτε ημερομηνία από το ημερολόγιο',
19+
close: 'Κλείσε',
20+
}
21+
export default el

src/translations/ru.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import type { TranslationsType } from './utils'
2+
3+
const ru: TranslationsType = {
4+
save: 'Сохранить',
5+
selectSingle: 'Выбор даты',
6+
selectMultiple: 'Выбор дат',
7+
selectRange: 'Выбор диапазона',
8+
notAccordingToDateFormat: (inputFormat) =>
9+
`Формат даты должен быть ${inputFormat}`,
10+
mustBeHigherThan: (date) => `Должен быть позже, чем ${date}`,
11+
mustBeLowerThan: (date) => `Должен быть ранее, чем ${date}`,
12+
mustBeBetween: (startDate, endDate) =>
13+
`Должен быть между ${startDate} - ${endDate}`,
14+
dateIsDisabled: 'День не разрешён',
15+
previous: 'Предыдущий',
16+
next: 'Следующий',
17+
typeInDate: 'Ввод в дате',
18+
pickDateFromCalendar: 'Выбор даты из календаря',
19+
close: 'Закрыть',
20+
}
21+
export default ru

0 commit comments

Comments
 (0)