Skip to content
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ npm install react-native-paper-dates --save

## Import some localized strings
Ideally you do this somewhere in your `index.js` before `react-native-paper-dates` is used.
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
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
```tsx
// e.g in your index.js
import {
Expand All @@ -70,6 +70,7 @@ import {
// registerTranslation('en', en)
// registerTranslation('nl', nl)
// registerTranslation('pl', pl)
// registerTranslation('pt', pt)
registerTranslation('en-GB', enGB)
```

Expand Down
1 change: 1 addition & 0 deletions example/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
// registerTranslation('en', en)
// registerTranslation('nl', nl)
// registerTranslation('pl', pl)
// registerTranslation('pt', pt)
registerTranslation('en-GB', enGB)

import App from './App'
Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export { registerTranslation, getTranslation } from './translations/utils'
export { default as nl } from './translations/nl'
export { default as en } from './translations/en'
export { default as pl } from './translations/pl'
export { default as pt } from './translations/pt'
export { default as enGB } from './translations/enGB'
20 changes: 20 additions & 0 deletions src/translations/pt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { TranslationsType } from './utils'

const pt: TranslationsType = {
save: 'Salvar',
selectSingle: 'Selecione a data',
selectMultiple: 'Selecione as datas',
selectRange: 'Selecione o período',
notAccordingToDateFormat: (inputFormat: string) =>
`O formato da data deve ser ${inputFormat}`,
mustBeHigherThan: 'Deve ser depois de',
mustBeLowerThan: 'Deve ser antes de',
mustBeBetween: 'Deve estar entre',
dateIsDisabled: 'Data não é permitida',
previous: 'Anterior',
next: 'Próximo',
typeInDate: 'Digite a data',
pickDateFromCalendar: 'Escolha a data do calendário',
close: 'Fechar',
}
export default pt