Skip to content

Commit 93ad1e4

Browse files
authored
Merge pull request #418 from MikLay/norwegian-translation
Add Norwegian translation
2 parents 443f914 + 772f9c0 commit 93ad1e4

File tree

5 files changed

+28
-25
lines changed

5 files changed

+28
-25
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/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`.
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/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`.
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
@@ -53,6 +53,7 @@ import {
5353
ja,
5454
th,
5555
ukUA,
56+
noNO,
5657
} from 'react-native-paper-dates'
5758
import { useCallback, useMemo, useState } from 'react'
5859
import React from 'react'
@@ -85,6 +86,7 @@ const locales: [string, TranslationsType][] = [
8586
['ja', ja],
8687
['th', th],
8788
['uk-UA', ukUA],
89+
['no-NO', noNO],
8890
]
8991

9092
locales.forEach((locale) => {

src/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ 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'
35+
export { default as ukUA } from './translations/ukUA'
36+
export { default as noNO } from './translations/noNO'

src/translations/noNO.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 noNO: TranslationsType = {
4+
save: 'Lagre',
5+
selectSingle: 'Velg dato',
6+
selectMultiple: 'Velg datoer',
7+
selectRange: 'Velg periode',
8+
notAccordingToDateFormat: (inputFormat) =>
9+
`Datoformatet må være ${inputFormat}`,
10+
mustBeHigherThan: (date) => `Må være senere enn ${date}`,
11+
mustBeLowerThan: (date) => `Må være tidligere enn ${date}`,
12+
mustBeBetween: (startDate, endDate) =>
13+
`Må være mellom ${startDate} - ${endDate}`,
14+
dateIsDisabled: 'Denne dagen er ikke tillatt',
15+
previous: 'Forrige',
16+
next: 'Neste',
17+
typeInDate: 'Skriv inn dato',
18+
pickDateFromCalendar: 'Velg dato fra kalenderen',
19+
close: 'Lukk',
20+
hour: 'Time',
21+
minute: 'Minutt',
22+
}
23+
export default noNO

src/translations/ua.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)