From 70852261febd6d7da23994e4c43cbb9124b556be Mon Sep 17 00:00:00 2001 From: Villu Vaimets Date: Fri, 14 Feb 2020 23:05:02 +0200 Subject: [PATCH 1/2] [l10n] Add Estonian (et-EE) locale --- .../pages/guides/localization/localization.md | 1 + packages/material-ui/src/locale/index.d.ts | 1 + packages/material-ui/src/locale/index.js | 25 +++++++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/docs/src/pages/guides/localization/localization.md b/docs/src/pages/guides/localization/localization.md index 4081585d44a7be..6238af4f53d19e 100644 --- a/docs/src/pages/guides/localization/localization.md +++ b/docs/src/pages/guides/localization/localization.md @@ -34,6 +34,7 @@ const theme = createMuiTheme({ | Czech | cs-CZ | `csCZ` | | Dutch | nl-NL | `nlNL` | | English (United States) | en-US | `enUS` | +| Estonian | et-EE | `etEE` | | Finnish | fi-FI | `fiFI` | | French | fr-FR | `frFR` | | German | de-DE | `deDE` | diff --git a/packages/material-ui/src/locale/index.d.ts b/packages/material-ui/src/locale/index.d.ts index 84dec92d52f5a8..d1a20175acf214 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 csCZ: object; export const deDE: object; export const enUS: object; export const esES: object; +export const etEE: object; export const faIR: object; export const fiFI: object; export const frFR: object; diff --git a/packages/material-ui/src/locale/index.js b/packages/material-ui/src/locale/index.js index e890e33938698a..4f9093552a8dbe 100644 --- a/packages/material-ui/src/locale/index.js +++ b/packages/material-ui/src/locale/index.js @@ -193,6 +193,31 @@ export const esES = { }, }; +export const etEE = { + props: { + MuiTablePagination: { + backIconButtonText: 'Eelmine lehekülg', + labelRowsPerPage: 'Ridu leheküljel:', + labelDisplayedRows: ({ from, to, count }) => `${from}-${to === -1 ? count : to} / ${count}`, + nextIconButtonText: 'Järgmine lehekülg', + }, + MuiRating: { + getLabelText: value => `${value} Tärn${value !== 1 ? 'i' : ''}`, + emptyLabelText: 'Tühi', + }, + MuiAutocomplete: { + clearText: 'Tühjenda', + closeText: 'Sulge', + loadingText: 'Laen…', + noOptionsText: 'Valikuid ei ole', + openText: 'Ava', + }, + MuiAlert: { + closeText: 'Sulge', + }, + }, +}; + export const faIR = { props: { MuiTablePagination: { From c5318c3446d5941f458eb84546bf5569d6172f0b Mon Sep 17 00:00:00 2001 From: Villu Vaimets Date: Fri, 14 Feb 2020 23:30:58 +0200 Subject: [PATCH 2/2] Estonian translation for MuiPagination --- packages/material-ui/src/locale/index.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/material-ui/src/locale/index.js b/packages/material-ui/src/locale/index.js index 4f9093552a8dbe..aa4162fe6f1210 100644 --- a/packages/material-ui/src/locale/index.js +++ b/packages/material-ui/src/locale/index.js @@ -215,6 +215,27 @@ export const etEE = { MuiAlert: { closeText: 'Sulge', }, + MuiPagination: { + 'aria-label': 'Lehekülgede valik', + getItemAriaLabel: (type, page, selected) => { + if (type === 'page') { + return `${selected ? '' : 'Vali '}lehekülg ${page}`; + } + if (type === 'first') { + return 'Vali esimene lehekülg'; + } + if (type === 'last') { + return 'Vali viimane lehekülg'; + } + if (type === 'next') { + return 'Vali järgmine lehekülg'; + } + if (type === 'previous') { + return 'Vali eelmine lehekülg'; + } + return undefined; + }, + }, }, };