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` | 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: {