From 5c84559ce012e403d01773112774de56d7e74723 Mon Sep 17 00:00:00 2001 From: Quoc-Anh Nguyen Date: Wed, 29 Jan 2020 00:09:30 +0700 Subject: [PATCH] [l10n] Add vietnamese (vi-VN) locale (#19439) * Update index.js * Update index.d.ts * Update localization.md * Update index.d.ts * Update index.js * yarn prettier Co-authored-by: Olivier Tassinari --- .../pages/guides/localization/localization.md | 1 + packages/material-ui/src/locale/index.d.ts | 1 + packages/material-ui/src/locale/index.js | 26 +++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/docs/src/pages/guides/localization/localization.md b/docs/src/pages/guides/localization/localization.md index 555855f4ec1da8..bb060161f69277 100644 --- a/docs/src/pages/guides/localization/localization.md +++ b/docs/src/pages/guides/localization/localization.md @@ -51,6 +51,7 @@ const theme = createMuiTheme({ | Swedish | sv-SE | `svSE` | | Turkish | tr-TR | `trTR` | | Ukrainian | uk-UA | `ukUA` | +| Vietnamese | vi-VN | `viVN` | 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. diff --git a/packages/material-ui/src/locale/index.d.ts b/packages/material-ui/src/locale/index.d.ts index c6b463a057a514..b10dfb4801dd44 100644 --- a/packages/material-ui/src/locale/index.d.ts +++ b/packages/material-ui/src/locale/index.d.ts @@ -21,4 +21,5 @@ export const skSK: object; export const svSE: object; export const trTR: object; export const ukUA: object; +export const viVN: object; export const zhCN: object; diff --git a/packages/material-ui/src/locale/index.js b/packages/material-ui/src/locale/index.js index 1b097b9d8dea14..d5e1c64785ab23 100644 --- a/packages/material-ui/src/locale/index.js +++ b/packages/material-ui/src/locale/index.js @@ -630,6 +630,32 @@ export const ukUA = { }, }; +export const viVN = { + props: { + MuiTablePagination: { + backIconButtonText: 'Trang trước', + labelRowsPerPage: 'Số hàng mỗi trang:', + labelDisplayedRows: ({ from, to, count }) => + `${from}-${to === -1 ? count : to} trong ${count}`, + nextIconButtonText: 'Trang sau', + }, + MuiRating: { + getLabelText: value => `${value} sao`, + emptyLabelText: 'Trống', + }, + MuiAutocomplete: { + clearText: 'Xóa', + closeText: 'Đóng', + loadingText: 'Đang tải…', + noOptionsText: 'Không có lựa chọn', + openText: 'Mở', + }, + MuiAlert: { + closeText: 'Đóng', + }, + }, +}; + export const zhCN = { props: { MuiTablePagination: {