Skip to content

Commit

Permalink
Add Ukrainian translation
Browse files Browse the repository at this point in the history
  • Loading branch information
MikLay committed Aug 19, 2024
1 parent 9aeac91 commit c84c2f9
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
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/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`.
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`.

```javascript
import { enGB, registerTranslation } from 'react-native-paper-dates'
Expand Down
2 changes: 2 additions & 0 deletions example/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import {
id,
ja,
th,
ua,
} from 'react-native-paper-dates'
import { useCallback, useMemo, useState } from 'react'
import React from 'react'
Expand Down Expand Up @@ -83,6 +84,7 @@ const locales: [string, TranslationsType][] = [
['id', id],
['ja', ja],
['th', th],
['ua', ua],
]

locales.forEach((locale) => {
Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ export { default as ro } from './translations/ro'
export { default as id } from './translations/id'
export { default as ja } from './translations/ja'
export { default as th } from './translations/th'
export { default as ua } from './translations/ua'
23 changes: 23 additions & 0 deletions src/translations/ua.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { TranslationsType } from './utils'

const ukUA: TranslationsType = {
save: 'Зберегти',
selectSingle: 'Оберіть дату',
selectMultiple: 'Оберіть дати',
selectRange: 'Оберіть період',
notAccordingToDateFormat: (inputFormat: string) =>
`Формат дати має бути ${inputFormat}`,
mustBeHigherThan: (date: string) => `Має бути пізніше ніж ${date}`,
mustBeLowerThan: (date: string) => `Має бути раніше ніж ${date}`,
mustBeBetween: (startDate: string, endDate: string) =>
`Має бути між ${startDate} - ${endDate}`,
dateIsDisabled: 'Цей день не дозволено обирати',
previous: 'Попередній',
next: 'Наступний',
typeInDate: 'Введіть дату',
pickDateFromCalendar: 'Оберіть дату з календаря',
close: 'Закрити',
hour: 'Година',
minute: 'Хвилина',
}
export default ukUA

0 comments on commit c84c2f9

Please sign in to comment.