From 55d4e320b2f922e04a680f2df52249d3dfe890db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20J=C4=99drzejewski?= Date: Wed, 4 Dec 2019 18:22:39 +0100 Subject: [PATCH 1/2] added plPL translation --- packages/material-ui/src/locale/index.d.ts | 1 + packages/material-ui/src/locale/index.js | 32 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/packages/material-ui/src/locale/index.d.ts b/packages/material-ui/src/locale/index.d.ts index 12f94736600730..713374962e9feb 100644 --- a/packages/material-ui/src/locale/index.d.ts +++ b/packages/material-ui/src/locale/index.d.ts @@ -5,6 +5,7 @@ export const faIR: object; export const frFR: object; export const itIT: object; export const jaJP: object; +export const plPL: object; export const ptBR: object; export const ruRU: object; export const svSE: object; diff --git a/packages/material-ui/src/locale/index.js b/packages/material-ui/src/locale/index.js index 5d00af5f5196cd..410c663b6cc89c 100644 --- a/packages/material-ui/src/locale/index.js +++ b/packages/material-ui/src/locale/index.js @@ -148,6 +148,38 @@ export const jaJP = { }, }; +export const plPL = { + props: { + MuiTablePagination: { + backIconButtonText: 'Poprzednia strona', + labelRowsPerPage: 'Wierszy na stronę:', + labelDisplayedRows: ({ from, to, count }) => `${from}-${to === -1 ? count : to} z ${count}`, + nextIconButtonText: 'Następna strona', + }, + MuiRating: { + getLabelText: value => { + let pluralForm = 'gwiazdek'; + const lastDigit = value % 10; + + if ((value < 10 || value > 20) && lastDigit > 1 && lastDigit < 5) { + pluralForm = 'gwiazdki'; + } else if (value === 1) { + pluralForm = 'gwiazdka'; + } + + return `${value} ${pluralForm}`; + }, + }, + MuiAutocomplete: { + clearText: 'Wyczyść', + closeText: 'Zamknij', + loadingText: 'Ładowanie…', + noOptionsText: 'Brak opcji', + openText: 'Otwórz', + }, + }, +}; + export const ptBR = { props: { MuiTablePagination: { From 2e890af26430eb796ac0d9a8c8803f1695c8ef28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20J=C4=99drzejewski?= Date: Wed, 4 Dec 2019 18:22:56 +0100 Subject: [PATCH 2/2] updated docs --- docs/src/pages/guides/localization/localization.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/pages/guides/localization/localization.md b/docs/src/pages/guides/localization/localization.md index 0a248746bc80a5..2a635281bec5dc 100644 --- a/docs/src/pages/guides/localization/localization.md +++ b/docs/src/pages/guides/localization/localization.md @@ -34,6 +34,7 @@ const theme = createMuiTheme({ | Italian | it-IT | `itIT` | | Japanese | ja-JP | `jaJP` | | Persian | fa-IR | `faIR` | +| Polish | pl-PL | `plPL` | | Portuguese (Brazil) | pt-BR | `ptBR` | | Russian | ru-RU | `ruRU` | | Spanish | es-ES | `esES` |