Skip to content

Commit

Permalink
[l10n] Add Ukrainian (uk-UA) locale (#18832)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgenBabenko authored and oliviertassinari committed Dec 15, 2019
1 parent 1ccba13 commit d5635c1
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/src/pages/guides/localization/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const theme = createMuiTheme({
| Spanish | es-ES | `esES` |
| Swedish | sv-SE | `svSE` |
| Turkish | tr-TR | `trTR` |
| Ukrainian | uk-UA | `ukUA` |

You can [find the source](https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/locale/index.js) in the GitHub repository.

Expand Down
1 change: 1 addition & 0 deletions packages/material-ui/src/locale/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export const roRO: object;
export const ruRU: object;
export const svSE: object;
export const trTR: object;
export const ukUA: object;
export const zhCN: object;
32 changes: 32 additions & 0 deletions packages/material-ui/src/locale/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,38 @@ export const trTR = {
},
};

export const ukUA = {
props: {
MuiTablePagination: {
backIconButtonText: 'Попередня сторінка',
labelRowsPerPage: 'Рядків на сторінці:',
labelDisplayedRows: ({ from, to, count }) => `${from}-${to === -1 ? count : to} з ${count}`,
nextIconButtonText: 'Наступна сторінка',
},
MuiRating: {
getLabelText: value => {
let pluralForm = 'Зірок';
const lastDigit = value % 10;

if (lastDigit > 1 && lastDigit < 5) {
pluralForm = 'Зірки';
} else if (lastDigit === 1) {
pluralForm = 'Зірка';
}

return `${value} ${pluralForm}`;
},
},
MuiAutocomplete: {
clearText: 'Очистити',
closeText: 'Згорнути',
loadingText: 'Завантаження…',
noOptionsText: 'Немає варіантів',
openText: 'Розгорнути',
},
},
};

export const zhCN = {
props: {
MuiTablePagination: {
Expand Down

0 comments on commit d5635c1

Please sign in to comment.