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

Match Ukrainian translation naming with Intl localizations 'naming' #417

Merged
merged 2 commits into from
Aug 19, 2024
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/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`.
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`.

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

locales.forEach((locale) => {
Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +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'
export { default as ukUA } from 'src/translations/ukUA'
23 changes: 23 additions & 0 deletions src/translations/ukUA.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
Loading