Skip to content

Commit fab54b8

Browse files
Merge pull request #125 from NicoleLatifiNutrien/add-portuguese
add Portuguese translations
2 parents 7f22e35 + 4c07040 commit fab54b8

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ npm install react-native-paper-dates --save
5757

5858
## Import some localized strings
5959
Ideally you do this somewhere in your `index.js` before `react-native-paper-dates` is used.
60-
Currently we only have en/nl/pl translations but it's really easy to add one extra since it are only some labels and error messages
60+
Currently we only have en/nl/pl/pt translations but it's really easy to add one extra since it are only some labels and error messages
6161
```tsx
6262
// e.g in your index.js
6363
import {
@@ -70,6 +70,7 @@ import {
7070
// registerTranslation('en', en)
7171
// registerTranslation('nl', nl)
7272
// registerTranslation('pl', pl)
73+
// registerTranslation('pt', pt)
7374
registerTranslation('en-GB', enGB)
7475
```
7576

example/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
// registerTranslation('en', en)
1010
// registerTranslation('nl', nl)
1111
// registerTranslation('pl', pl)
12+
// registerTranslation('pt', pt)
1213
registerTranslation('en-GB', enGB)
1314

1415
import App from './App'

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ export { registerTranslation, getTranslation } from './translations/utils'
1010
export { default as nl } from './translations/nl'
1111
export { default as en } from './translations/en'
1212
export { default as pl } from './translations/pl'
13+
export { default as pt } from './translations/pt'
1314
export { default as enGB } from './translations/enGB'

src/translations/pt.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import type { TranslationsType } from './utils'
2+
3+
const pt: TranslationsType = {
4+
save: 'Salvar',
5+
selectSingle: 'Selecione a data',
6+
selectMultiple: 'Selecione as datas',
7+
selectRange: 'Selecione o período',
8+
notAccordingToDateFormat: (inputFormat: string) =>
9+
`O formato da data deve ser ${inputFormat}`,
10+
mustBeHigherThan: 'Deve ser depois de',
11+
mustBeLowerThan: 'Deve ser antes de',
12+
mustBeBetween: 'Deve estar entre',
13+
dateIsDisabled: 'Data não é permitida',
14+
previous: 'Anterior',
15+
next: 'Próximo',
16+
typeInDate: 'Digite a data',
17+
pickDateFromCalendar: 'Escolha a data do calendário',
18+
close: 'Fechar',
19+
}
20+
export default pt

0 commit comments

Comments
 (0)