Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new languages support cs/el/ru #336

Merged
merged 8 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docusaurus/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 6 additions & 0 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ import {
tr,
zh,
zhTW,
cs,
el,
ru,
} from 'react-native-paper-dates'
import { useCallback, useState } from 'react'

Expand All @@ -69,6 +72,9 @@ const locales: [string, TranslationsType][] = [
['tr', tr],
['zh', zh],
['zh-TW', zhTW],
['cs', cs],
['el', el],
['ru', ru],
]

locales.forEach((locale) => {
Expand Down
3 changes: 3 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
21 changes: 21 additions & 0 deletions src/translations/cs.ts
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions src/translations/el.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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
21 changes: 21 additions & 0 deletions src/translations/ru.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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