diff --git a/README.md b/README.md index 53b690cb..180aba41 100644 --- a/README.md +++ b/README.md @@ -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 { @@ -70,6 +70,7 @@ import { // registerTranslation('en', en) // registerTranslation('nl', nl) // registerTranslation('pl', pl) +// registerTranslation('pt', pt) registerTranslation('en-GB', enGB) ``` diff --git a/example/src/index.ts b/example/src/index.ts index 550a8978..6a1c2be4 100644 --- a/example/src/index.ts +++ b/example/src/index.ts @@ -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' diff --git a/src/index.tsx b/src/index.tsx index 05a3c6b1..ed7a438c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -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' diff --git a/src/translations/pt.ts b/src/translations/pt.ts new file mode 100644 index 00000000..8fc61a3e --- /dev/null +++ b/src/translations/pt.ts @@ -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