From a47ca32f83800c73c5b7b20155a448846a00c7f2 Mon Sep 17 00:00:00 2001 From: Maciek Zmijewski Date: Tue, 2 Nov 2021 14:28:33 +0000 Subject: [PATCH] feat: Polish and EnglishGB localisation --- example/src/App.tsx | 2 +- example/src/index.ts | 4 ++++ src/index.tsx | 2 ++ src/translations/enGB.ts | 15 +++++++++++++++ src/translations/pl.ts | 15 +++++++++++++++ 5 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 src/translations/enGB.ts create mode 100644 src/translations/pl.ts diff --git a/example/src/App.tsx b/example/src/App.tsx index 7c88a444..b01ea716 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -123,7 +123,7 @@ function App() { const pastDate = new Date(new Date().setDate(new Date().getDate() - 5)) const futureDate = new Date(new Date().setDate(new Date().getDate() + 5)) - const locale = 'en' + const locale = 'en-gb' return ( <> + `Date format must be ${inputFormat}`, + mustBeHigherThan: 'Must be later then', + mustBeLowerThan: 'Must be earlier then', + mustBeBetween: 'Must be between', + dateIsDisabled: 'Day is not allowed', +} +export default enGB diff --git a/src/translations/pl.ts b/src/translations/pl.ts new file mode 100644 index 00000000..be41b161 --- /dev/null +++ b/src/translations/pl.ts @@ -0,0 +1,15 @@ +import type { TranslationsType } from './utils' + +const pl: TranslationsType = { + save: 'Zapisz', + selectSingle: 'Wybierz datę', + selectMultiple: 'Wybierz daty', + selectRange: 'Wybierz zakres', + notAccordingToDateFormat: (inputFormat: string) => + `Data musi mieć format ${inputFormat}`, + mustBeHigherThan: 'Nie wcześniej niż', + mustBeLowerThan: 'Nie później niż', + mustBeBetween: 'Pomiędzy', + dateIsDisabled: 'Niedozwolona data', +} +export default pl