Skip to content

Commit 95399b3

Browse files
authored
Merge pull request #417 from MikLay/ukrainian-translation
Match Ukrainian translation naming with Intl localizations 'naming'
2 parents 58e76bc + fa99ac2 commit 95399b3

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
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/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`.
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import {
5252
id,
5353
ja,
5454
th,
55-
ua,
55+
ukUA,
5656
} from 'react-native-paper-dates'
5757
import { useCallback, useMemo, useState } from 'react'
5858
import React from 'react'
@@ -84,7 +84,7 @@ const locales: [string, TranslationsType][] = [
8484
['id', id],
8585
['ja', ja],
8686
['th', th],
87-
['ua', ua],
87+
['uk-UA', ukUA],
8888
]
8989

9090
locales.forEach((locale) => {

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +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 ua } from './translations/ua'
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)