Skip to content

Commit

Permalink
Add Norwegian translation and match its naming with Intl localization…
Browse files Browse the repository at this point in the history
…'s naming, Remove unused file 'ua.ts'
  • Loading branch information
MikLay committed Aug 19, 2024
1 parent 443f914 commit 772f9c0
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 25 deletions.
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/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`.
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/no-NO` 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 @@ -53,6 +53,7 @@ import {
ja,
th,
ukUA,
noNO,
} from 'react-native-paper-dates'
import { useCallback, useMemo, useState } from 'react'
import React from 'react'
Expand Down Expand Up @@ -85,6 +86,7 @@ const locales: [string, TranslationsType][] = [
['ja', ja],
['th', th],
['uk-UA', ukUA],
['no-NO', noNO],
]

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

const noNO: TranslationsType = {
save: 'Lagre',
selectSingle: 'Velg dato',
selectMultiple: 'Velg datoer',
selectRange: 'Velg periode',
notAccordingToDateFormat: (inputFormat) =>
`Datoformatet må være ${inputFormat}`,
mustBeHigherThan: (date) => `Må være senere enn ${date}`,
mustBeLowerThan: (date) => `Må være tidligere enn ${date}`,
mustBeBetween: (startDate, endDate) =>
`Må være mellom ${startDate} - ${endDate}`,
dateIsDisabled: 'Denne dagen er ikke tillatt',
previous: 'Forrige',
next: 'Neste',
typeInDate: 'Skriv inn dato',
pickDateFromCalendar: 'Velg dato fra kalenderen',
close: 'Lukk',
hour: 'Time',
minute: 'Minutt',
}
export default noNO
23 changes: 0 additions & 23 deletions src/translations/ua.ts

This file was deleted.

0 comments on commit 772f9c0

Please sign in to comment.