Skip to content

Commit 5cae4e7

Browse files
committed
Add Ukrainian translation
1 parent 9aeac91 commit 5cae4e7

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-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/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`.
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/ro/id/ja/th/uk-UA` 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/app/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import {
5252
id,
5353
ja,
5454
th,
55+
ukUA,
5556
} from 'react-native-paper-dates'
5657
import { useCallback, useMemo, useState } from 'react'
5758
import React from 'react'
@@ -83,6 +84,7 @@ const locales: [string, TranslationsType][] = [
8384
['id', id],
8485
['ja', ja],
8586
['th', th],
87+
['uk-UA', ukUA],
8688
]
8789

8890
locales.forEach((locale) => {

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ export { default as ro } from './translations/ro'
3232
export { default as id } from './translations/id'
3333
export { default as ja } from './translations/ja'
3434
export { default as th } from './translations/th'
35+
export { default as ukUA } from 'src/translations/ukUA'

src/translations/ukUA.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import type { TranslationsType } from './utils'
2+
3+
const ukUA: TranslationsType = {
4+
save: 'Зберегти',
5+
selectSingle: 'Оберіть дату',
6+
selectMultiple: 'Оберіть дати',
7+
selectRange: 'Оберіть період',
8+
notAccordingToDateFormat: (inputFormat: string) =>
9+
`Формат дати має бути ${inputFormat}`,
10+
mustBeHigherThan: (date: string) => `Має бути пізніше ніж ${date}`,
11+
mustBeLowerThan: (date: string) => `Має бути раніше ніж ${date}`,
12+
mustBeBetween: (startDate: string, endDate: string) =>
13+
`Має бути між ${startDate} - ${endDate}`,
14+
dateIsDisabled: 'Цей день не дозволено обирати',
15+
previous: 'Попередній',
16+
next: 'Наступний',
17+
typeInDate: 'Введіть дату',
18+
pickDateFromCalendar: 'Оберіть дату з календаря',
19+
close: 'Закрити',
20+
hour: 'Година',
21+
minute: 'Хвилина',
22+
}
23+
export default ukUA

0 commit comments

Comments
 (0)