Skip to content

Commit 142fa75

Browse files
authored
Merge pull request #325 from JoanGil/catalan-translations-added
Added catalan translations
2 parents 18b2292 + 7cc8cd2 commit 142fa75

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
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/de/en/en-GB/es/fr/he/hi/it/ko/nl/pl/pt/tr/zh/zh-TW` 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` 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/src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
registerTranslation,
3333
TranslationsType,
3434
ar,
35+
ca,
3536
de,
3637
en,
3738
enGB,
@@ -52,6 +53,7 @@ import { useCallback, useState } from 'react'
5253

5354
const locales: [string, TranslationsType][] = [
5455
['ar', ar],
56+
['ca', ca],
5557
['de', de],
5658
['en', en],
5759
['en-GB', enGB],

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export type { TranslationsType } from './translations/utils'
99
export { registerTranslation, getTranslation } from './translations/utils'
1010

1111
export { default as ar } from './translations/ar'
12+
export { default as ca } from './translations/ca'
1213
export { default as de } from './translations/de'
1314
export { default as en } from './translations/en'
1415
export { default as enGB } from './translations/enGB'

src/translations/ca.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import type { TranslationsType } from './utils'
2+
3+
const ca: TranslationsType = {
4+
save: 'Guardar',
5+
selectSingle: 'Seleccionar data',
6+
selectMultiple: 'Seleccionar dates',
7+
selectRange: 'Seleccionar període',
8+
notAccordingToDateFormat: (inputFormat) =>
9+
`El format de la data ha de ser ${inputFormat}`,
10+
mustBeHigherThan: (date) => `Ha de ser posterior a ${date}`,
11+
mustBeLowerThan: (date) => `Ha de ser anterior a ${date}`,
12+
mustBeBetween: (startDate, endDate) =>
13+
`Ha d'estar entre ${startDate} - ${endDate}`,
14+
dateIsDisabled: 'Dia no permès',
15+
previous: 'Anterior',
16+
next: 'Següent',
17+
typeInDate: 'Escriu la data',
18+
pickDateFromCalendar: 'Seleccionar la data del calendari',
19+
close: 'Tancar',
20+
}
21+
export default ca

0 commit comments

Comments
 (0)