From cc58f71b525805355d4821bb2030812e30decc51 Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Mon, 16 Dec 2019 14:36:08 +0100 Subject: [PATCH 1/4] [i18n] Add Czech and Slovak traslation strings --- .../pages/guides/localization/localization.md | 2 + packages/material-ui/src/locale/index.d.ts | 2 + packages/material-ui/src/locale/index.js | 58 +++++++++++++++++++ 3 files changed, 62 insertions(+) diff --git a/docs/src/pages/guides/localization/localization.md b/docs/src/pages/guides/localization/localization.md index dc5daaf7146602..151adda47b7fb8 100644 --- a/docs/src/pages/guides/localization/localization.md +++ b/docs/src/pages/guides/localization/localization.md @@ -29,6 +29,7 @@ const theme = createMuiTheme({ |:-------|:---------|:---------| | Azerbaijani | az-AZ | `azAZ` | | Chinese (Simplified) | zh-CN | `zhCN` | +| Czech | cs-CZ | `csCz` | | Dutch | nl-NL | `nlNL` | | English (United States) | en-US | `enUS` | | French | fr-FR | `frFR` | @@ -41,6 +42,7 @@ const theme = createMuiTheme({ | Portuguese (Brazil) | pt-BR | `ptBR` | | Romanian | ro-RO | `roRO` | | Russian | ru-RU | `ruRU` | +| Slovak | sk-SK | `skSK` | | Spanish | es-ES | `esES` | | Swedish | sv-SE | `svSE` | | Turkish | tr-TR | `trTR` | diff --git a/packages/material-ui/src/locale/index.d.ts b/packages/material-ui/src/locale/index.d.ts index fab491e0e8f26a..53405ef905022e 100644 --- a/packages/material-ui/src/locale/index.d.ts +++ b/packages/material-ui/src/locale/index.d.ts @@ -1,4 +1,5 @@ export const azAZ: object; +export const csCZ: object; export const deDE: object; export const enUS: object; export const esES: object; @@ -12,6 +13,7 @@ export const plPL: object; export const ptBR: object; export const roRO: object; export const ruRU: object; +export const skSK: object; export const svSE: object; export const trTR: object; export const ukUA: object; diff --git a/packages/material-ui/src/locale/index.js b/packages/material-ui/src/locale/index.js index 05b54afecc8e13..19e6b4b36a70f8 100644 --- a/packages/material-ui/src/locale/index.js +++ b/packages/material-ui/src/locale/index.js @@ -28,6 +28,35 @@ export const azAZ = { }, }; +export const csCZ = { + props: { + MuiTablePagination: { + backIconButtonText: 'Předchozí stránka', + labelRowsPerPage: 'Řádků na stránce:', + labelDisplayedRows: ({ from, to, count }) => `${from}-${to === -1 ? count : to} z ${count}`, + nextIconButtonText: 'Další stránka', + }, + MuiRating: { + getLabelText: value => { + if (value === 1) { + return `${value} Hvězda`; + } + if (value >= 2 && value <= 4) { + return `${value} Hvězdy`; + } + return `${value} Hvězd`; + }, + }, + MuiAutocomplete: { + clearText: 'Vymazat', + closeText: 'Zavřít', + loadingText: 'Načítání…', + noOptionsText: 'Žádné možnosti ', + openText: 'Otevřít', + }, + }, +}; + export const deDE = { props: { MuiTablePagination: { @@ -327,6 +356,35 @@ export const ruRU = { }, }; +export const skSK = { + props: { + MuiTablePagination: { + backIconButtonText: 'Predchádzajúca stránka', + labelRowsPerPage: 'Riadkov na stránke:', + labelDisplayedRows: ({ from, to, count }) => `${from}-${to === -1 ? count : to} z ${count}`, + nextIconButtonText: 'Ďalšia stránka', + }, + MuiRating: { + getLabelText: value => { + if (value === 1) { + return `${value} Hviezda`; + } + if (value >= 2 && value <= 4) { + return `${value} Hviezdy`; + } + return `${value} Hviezd`; + }, + }, + MuiAutocomplete: { + clearText: 'Vymazať', + closeText: 'Zavrieť', + loadingText: 'Načítanie…', + noOptionsText: 'Žiadne možnosti ', + openText: 'Otvoriť', + }, + }, +}; + export const svSE = { props: { MuiTablePagination: { From 11b70ef8ea35163d43af426edfbe1a6464da0bae Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Tue, 17 Dec 2019 17:12:17 +0100 Subject: [PATCH 2/4] Update packages/material-ui/src/locale/index.js Co-Authored-By: Honza Javorek --- packages/material-ui/src/locale/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/material-ui/src/locale/index.js b/packages/material-ui/src/locale/index.js index 19e6b4b36a70f8..02cd8c5d3391e2 100644 --- a/packages/material-ui/src/locale/index.js +++ b/packages/material-ui/src/locale/index.js @@ -51,7 +51,7 @@ export const csCZ = { clearText: 'Vymazat', closeText: 'Zavřít', loadingText: 'Načítání…', - noOptionsText: 'Žádné možnosti ', + noOptionsText: 'Žádné možnosti', openText: 'Otevřít', }, }, From 0b63b9df39c84322b98e65edea34ae8b9e2df3a1 Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Tue, 17 Dec 2019 17:12:29 +0100 Subject: [PATCH 3/4] Update packages/material-ui/src/locale/index.js Co-Authored-By: Honza Javorek --- packages/material-ui/src/locale/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/material-ui/src/locale/index.js b/packages/material-ui/src/locale/index.js index 02cd8c5d3391e2..2334c368cc729c 100644 --- a/packages/material-ui/src/locale/index.js +++ b/packages/material-ui/src/locale/index.js @@ -379,7 +379,7 @@ export const skSK = { clearText: 'Vymazať', closeText: 'Zavrieť', loadingText: 'Načítanie…', - noOptionsText: 'Žiadne možnosti ', + noOptionsText: 'Žiadne možnosti', openText: 'Otvoriť', }, }, From ca459a142f495afffd8497b6c0113ae8b0443baa Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Tue, 17 Dec 2019 17:16:00 +0100 Subject: [PATCH 4/4] refactor: diminutive form --- packages/material-ui/src/locale/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/material-ui/src/locale/index.js b/packages/material-ui/src/locale/index.js index 2334c368cc729c..9ab400726ca460 100644 --- a/packages/material-ui/src/locale/index.js +++ b/packages/material-ui/src/locale/index.js @@ -39,12 +39,12 @@ export const csCZ = { MuiRating: { getLabelText: value => { if (value === 1) { - return `${value} Hvězda`; + return `${value} hvězdička`; } if (value >= 2 && value <= 4) { - return `${value} Hvězdy`; + return `${value} hvězdičky`; } - return `${value} Hvězd`; + return `${value} hvězdiček`; }, }, MuiAutocomplete: { @@ -367,12 +367,12 @@ export const skSK = { MuiRating: { getLabelText: value => { if (value === 1) { - return `${value} Hviezda`; + return `${value} hviezdička`; } if (value >= 2 && value <= 4) { - return `${value} Hviezdy`; + return `${value} hviezdičky`; } - return `${value} Hviezd`; + return `${value} hviezdičiek`; }, }, MuiAutocomplete: {