Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
zouhangwithsweet committed Jul 22, 2021
2 parents 90aa89b + 6eabfd8 commit 7788a8d
Show file tree
Hide file tree
Showing 14 changed files with 168 additions and 32 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ title: Change Log
toc: hidden
---

### 2.5.20

`2021-07-22`

- Feat
- Add more i18n support in the project

### 2.5.19

`2021-05-14`
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ title: 更新日志
toc: hidden
---

### 2.5.20

`2021-07-22`

- Feat
- 添加更多的国际化支持

### 2.5.19

`2021-05-14`
Expand Down
2 changes: 1 addition & 1 deletion components/_locale/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import defaultLang from './lang/zh-cn'
import defaultLang from './lang/zh-CN'

let lang = defaultLang

Expand Down
62 changes: 62 additions & 0 deletions components/_locale/lang/en-US.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
export default {
md: {
result_page: {
networkError: 'Network error',
noInformation: 'No data available',
lostWay: 'Page not found',
},
date_picker: {
month: 'Month',
minute: 'Minute',
hour: 'Hour',
day: 'Day',
second: 'Second',
year: 'Year',
},
cashier: {
payCash: 'Amount',
payFail: 'Error. Try again later',
payResultSearch: 'Processing...',
morePayWays: 'Other payment method',
confirm: 'OK',
confirmPay: 'Confirm and Pay',
pay: 'Pay',
paySuccess: 'Payment successful',
},
scroll_view: {
refresh: {
freedRefresh: 'Release',
pullDownRefresh: 'Pull down',
refreshing: 'Refreshing...',
},
more: {
loading: 'Loading more...',
allLoaded: 'All loaded',
},
},
captcha: {
sendCaptcha: 'Send Code',
countdown: 'Resend in {$1}s',
},
tab_picker: {
choose: 'Select',
},
dialog: {
confirm: 'OK',
cancel: 'Cancel',
},
action_sheet: {
cancel: 'Cancel',
},
selector: {
cancel: 'Cancel',
},
number_keyboard: {
confirm: 'OK',
},
picker: {
cancel: 'Cancel',
confirm: 'Confirm',
},
},
}
62 changes: 62 additions & 0 deletions components/_locale/lang/es-MX.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
export default {
md: {
result_page: {
networkError: 'Error de red',
noInformation: 'No hay datos disponibles',
lostWay: 'No se encontró la página',
},
date_picker: {
month: 'Mes',
minute: 'Minutos',
hour: 'Horas',
day: 'Día',
second: 'Segundo',
year: 'Año',
},
cashier: {
payCash: 'Monto',
payFail: 'Error. Intenta de nuevo.',
payResultSearch: 'Procesando...',
morePayWays: 'Otro método de pago',
confirm: 'Aceptar',
confirmPay: 'Confirmar y pagar',
pay: 'Pago',
paySuccess: 'Pago realizado',
},
scroll_view: {
refresh: {
freedRefresh: 'Suelta',
pullDownRefresh: 'Arrastra hacia abajo',
refreshing: 'Actualizando...',
},
more: {
loading: 'Cargando más...',
allLoaded: 'Carga completa',
},
},
captcha: {
sendCaptcha: 'Enviar código',
countdown: 'Reenviar en {$1}s',
},
tab_picker: {
choose: 'Elige una opción',
},
dialog: {
confirm: 'Aceptar',
cancel: 'Cancelar',
},
action_sheet: {
cancel: 'Cancelar',
},
selector: {
cancel: 'Cancelar',
},
number_keyboard: {
confirm: 'Aceptar',
},
picker: {
cancel: 'Cancelar',
confirm: 'Confirmar',
},
},
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
export default {
// [\u4e00-\u9fa5]
name: 'zh-cn',
md: {
'action-sheet': {
action_sheet: {
cancel: '取消',
},
captcha: {
sendCaptcha: '发送验证码',
countdown: '{$1}秒后重发'
countdown: '{$1}秒后重发',
},
cashier: {
payCash: '\u652f\u4ed8\u91d1\u989d\u0028\u5143\u0029',
Expand All @@ -19,30 +17,30 @@ export default {
payFail: '\u652f\u4ed8\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5',
confirm: '\u6211\u77e5\u9053\u4e86',
},
'date-picker': {
date_picker: {
year: '年',
month: '月',
day: '日',
hour: '时',
minute: '分',
},
'dialog': {
dialog: {
confirm: '确定',
cancel: '取消',
},
'number-keyboard': {
number_keyboard: {
confirm: '确定',
},
'picker': {
picker: {
confirm: '确认',
cancel: '取消',
},
'result-page': {
result_page: {
networkError: '\u7f51\u7edc\u8fde\u63a5\u5f02\u5e38',
noInformation: '\u6682\u65e0\u4fe1\u606f',
lostWay: '\u60a8\u8981\u8bbf\u95ee\u7684\u9875\u9762\u5df2\u4e22\u5931',
},
'scroll-view': {
scroll_view: {
more: {
loading: '更多加载中...',
allLoaded: '全部已加载',
Expand All @@ -53,11 +51,11 @@ export default {
refreshing: '刷新中...',
},
},
'selector': {
selector: {
cancel: '取消',
},
'tab-picker': {
tab_picker: {
choose: '请选择',
}
}
},
},
}
2 changes: 1 addition & 1 deletion components/action-sheet/action-sheet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default {
},
cancelText: {
type: String,
default: t('md.action-sheet.cancel'),
default: t('md.action_sheet.cancel'),
},
},
Expand Down
10 changes: 5 additions & 5 deletions components/date-picker/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ export default {
type: Array,
default () {
return [
t('md.date-picker.year'),
t('md.date-picker.month'),
t('md.date-picker.day'),
t('md.date-picker.hour'),
t('md.date-picker.minute'),
t('md.date_picker.year'),
t('md.date_picker.month'),
t('md.date_picker.day'),
t('md.date_picker.hour'),
t('md.date_picker.minute'),
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion components/number-keyboard/board.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default {
},
okText: {
type: String,
default: t('md.number-keyboard.confirm'),
default: t('md.number_keyboard.confirm'),
},
isView: {
type: Boolean,
Expand Down
6 changes: 3 additions & 3 deletions components/result-page/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ export default {
this.text ||
{
// 网络连接异常
network: t('md.result-page.networkError'),
network: t('md.result_page.networkError'),
// 暂无信息
empty: t('md.result-page.noInformation'),
empty: t('md.result_page.noInformation'),
}[this.type] ||
''
)
Expand All @@ -82,7 +82,7 @@ export default {
this.subtext ||
{
// 您要访问的页面已丢失
lost: t('md.result-page.lostWay'),
lost: t('md.result_page.lostWay'),
}[this.type] ||
''
)
Expand Down
4 changes: 2 additions & 2 deletions components/scroll-view/more.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export default {
props: {
loadingText: {
type: String,
default: t('md.scroll-view.more.loading'),
default: t('md.scroll_view.more.loading'),
},
finishedText: {
type: String,
default: t('md.scroll-view.more.allLoaded'),
default: t('md.scroll_view.more.allLoaded'),
},
isFinished: {
type: Boolean,
Expand Down
6 changes: 3 additions & 3 deletions components/scroll-view/refresh.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ export default {
},
refreshText: {
type: String,
default: t('md.scroll-view.refresh.pullDownRefresh'),
default: t('md.scroll_view.refresh.pullDownRefresh'),
},
refreshActiveText: {
type: String,
default: t('md.scroll-view.refresh.freedRefresh'),
default: t('md.scroll_view.refresh.freedRefresh'),
},
refreshingText: {
type: String,
default: t('md.scroll-view.refresh.refreshing'),
default: t('md.scroll_view.refresh.refreshing'),
},
rollerColor: {
type: String,
Expand Down
2 changes: 1 addition & 1 deletion components/tab-picker/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default {
},
placeholder: {
type: String,
default: t('md.tab-picker.choose'),
default: t('md.tab_picker.choose'),
},
// Mixin Props
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mand-mobile",
"version": "2.5.19",
"version": "2.5.20",
"description": "A Vue.js 2.0 Mobile UI Toolkit",
"homepage": "https://didi.github.io/mand-mobile",
"main": "lib/mand-mobile.umd.js",
Expand Down

0 comments on commit 7788a8d

Please sign in to comment.