From 012cbf285ff72100851ffcfefbe2f5ee0c8e247b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Thu, 12 Jan 2017 10:21:47 +0800 Subject: [PATCH] update locale update locale --- src/components/modal/confirm.js | 5 +++-- src/components/modal/modal.vue | 9 +++++++-- src/components/page/options.vue | 8 +++++--- src/components/page/page.vue | 20 ++++++++++--------- src/components/poptip/poptip.vue | 9 +++++++-- src/components/transfer/transfer.vue | 11 +++++++--- src/locale/lang/en-US.js | 30 +++++++++++++++++++++++++++- src/locale/lang/zh-CN.js | 28 ++++++++++++++++++++++++++ src/locale/lang/zh-TW.js | 28 ++++++++++++++++++++++++++ 9 files changed, 126 insertions(+), 22 deletions(-) diff --git a/src/components/modal/confirm.js b/src/components/modal/confirm.js index cba0875f..3a848346 100644 --- a/src/components/modal/confirm.js +++ b/src/components/modal/confirm.js @@ -3,6 +3,7 @@ import Modal from './modal.vue'; import Icon from '../icon/icon.vue'; import iButton from '../button/button.vue'; import { camelcaseToHyphen } from '../../utils/assist'; +import { t } from '../../locale'; const prefixCls = 'ivu-modal-confirm'; @@ -44,8 +45,8 @@ Modal.newInstance = properties => { body: '', iconType: '', iconName: '', - okText: '确定', - cancelText: '取消', + okText: t('i.modal.okText'), + cancelText: t('i.modal.cancelText'), showCancel: false, loading: false, buttonLoading: false diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue index a5fa8a31..00b8d1d8 100644 --- a/src/components/modal/modal.vue +++ b/src/components/modal/modal.vue @@ -24,6 +24,7 @@ import Icon from '../icon'; import iButton from '../button/button.vue'; import { getScrollBarSize } from '../../utils/assist'; + import { t } from '../../locale'; const prefixCls = 'ivu-modal'; @@ -51,11 +52,15 @@ }, okText: { type: String, - default: '确定' + default () { + return t('i.modal.okText'); + } }, cancelText: { type: String, - default: '取消' + default () { + return t('i.modal.cancelText'); + } }, loading: { type: Boolean, diff --git a/src/components/page/options.vue b/src/components/page/options.vue index 0055ad97..6f6f726e 100644 --- a/src/components/page/options.vue +++ b/src/components/page/options.vue @@ -2,19 +2,20 @@
- {{ item }} 条/页 + {{ item }} {{ t('i.page.page') }}
- 跳至 + {{ t('i.page.goto') }} - 页 + {{ t('i.page.p') }}