mirror of https://github.com/ElemeFE/element
i18n: add English config (#685)
parent
f960ea50b9
commit
01531e84e0
|
@ -152,11 +152,11 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
leftLabel() {
|
leftLabel() {
|
||||||
return this.date.getFullYear() + ' ' + this.$t('el.datepicker.year') + ' ' + (this.date.getMonth() + 1) + ' ' + this.$t('el.datepicker.month');
|
return this.date.getFullYear() + ' ' + this.$t('el.datepicker.year') + ' ' + this.$t(`el.datepicker.month${ this.date.getMonth() + 1 }`);
|
||||||
},
|
},
|
||||||
|
|
||||||
rightLabel() {
|
rightLabel() {
|
||||||
return this.rightDate.getFullYear() + ' ' + this.$t('el.datepicker.year') + ' ' + (this.rightDate.getMonth() + 1) + ' ' + this.$t('el.datepicker.month');
|
return this.rightDate.getFullYear() + ' ' + this.$t('el.datepicker.year') + ' ' + this.$t(`el.datepicker.month${ this.rightDate.getMonth() + 1 }`);
|
||||||
},
|
},
|
||||||
|
|
||||||
leftYear() {
|
leftYear() {
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
@click="showMonthPicker"
|
@click="showMonthPicker"
|
||||||
v-show="currentView === 'date'"
|
v-show="currentView === 'date'"
|
||||||
class="el-date-picker__header-label"
|
class="el-date-picker__header-label"
|
||||||
:class="{ active: currentView === 'month' }">{{ month + 1 }} {{$t('el.datepicker.month')}}</span>
|
:class="{ active: currentView === 'month' }">{{$t(`el.datepicker.month${ month + 1 }`)}}</span>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@click="nextYear"
|
@click="nextYear"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
var CONFIRM_TEXT = '确定';
|
import { $t } from 'element-ui/src/locale';
|
||||||
var CANCEL_TEXT = '取消';
|
|
||||||
|
var CONFIRM_TEXT = $t('el.messagebox.confirm');
|
||||||
|
var CANCEL_TEXT = $t('el.messagebox.cancel');
|
||||||
|
|
||||||
var defaults = {
|
var defaults = {
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<ul class="el-select-dropdown__list" v-show="options.length > 0 && filteredOptionsCount > 0 && !loading">
|
<ul class="el-select-dropdown__list" v-show="options.length > 0 && filteredOptionsCount > 0 && !loading">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</ul>
|
</ul>
|
||||||
<p class="el-select-dropdown__nodata" v-if="emptyText">{{ emptyText }}</p>
|
<p class="el-select-dropdown__empty" v-if="emptyText">{{ emptyText }}</p>
|
||||||
</el-select-menu>
|
</el-select-menu>
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
this.voidRemoteQuery = false;
|
this.voidRemoteQuery = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.filteredOptionsCount === 0) {
|
if (this.filterable && this.filteredOptionsCount === 0) {
|
||||||
return this.$t('el.select.noMatch');
|
return this.$t('el.select.noMatch');
|
||||||
}
|
}
|
||||||
if (this.options.length === 0) {
|
if (this.options.length === 0) {
|
||||||
|
|
|
@ -21,7 +21,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-select .el-input {
|
.el-select .el-input {
|
||||||
width: 100px;
|
width: 110px;
|
||||||
|
input {
|
||||||
|
padding-right: 25px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
|
|
|
@ -35,11 +35,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@b select-dropdown__nodata {
|
@b select-dropdown__empty {
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #999;
|
color: #999;
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@b select-dropdown__list {
|
@b select-dropdown__list {
|
||||||
|
|
|
@ -1,62 +1,73 @@
|
||||||
export default {
|
export default {
|
||||||
el: {
|
el: {
|
||||||
datepicker: {
|
datepicker: {
|
||||||
now: 'now',
|
now: 'Now',
|
||||||
today: 'today',
|
today: 'Today',
|
||||||
cancel: 'cancel',
|
cancel: 'Cancel',
|
||||||
clear: 'clear',
|
// clear: 'Clear',
|
||||||
confirm: 'confirm',
|
confirm: 'OK',
|
||||||
selectDate: 'selectDate',
|
selectDate: 'Select date',
|
||||||
selectTime: 'selectTime',
|
selectTime: 'Select time',
|
||||||
startDate: 'startDate',
|
startDate: 'Start Date',
|
||||||
startTime: 'startTime',
|
startTime: 'Start Time',
|
||||||
endDate: 'endDate',
|
endDate: 'End Date',
|
||||||
endTime: 'endTime',
|
endTime: 'End Time',
|
||||||
year: 'year',
|
year: '',
|
||||||
month: 'month',
|
month1: 'January',
|
||||||
week: 'week',
|
month2: 'February',
|
||||||
|
month3: 'March',
|
||||||
|
month4: 'April',
|
||||||
|
month5: 'May',
|
||||||
|
month6: 'June',
|
||||||
|
month7: 'July',
|
||||||
|
month8: 'August',
|
||||||
|
month9: 'September',
|
||||||
|
month10: 'October',
|
||||||
|
month11: 'November',
|
||||||
|
month12: 'December',
|
||||||
|
// week: 'week',
|
||||||
weeks: {
|
weeks: {
|
||||||
sun: 'sun',
|
sun: 'Sun',
|
||||||
mon: 'mon',
|
mon: 'Mon',
|
||||||
tue: 'tue',
|
tue: 'Tue',
|
||||||
wed: 'wed',
|
wed: 'Wed',
|
||||||
thu: 'thu',
|
thu: 'Thu',
|
||||||
fri: 'fri',
|
fri: 'Fri',
|
||||||
sat: 'sat'
|
sat: 'Sat'
|
||||||
},
|
},
|
||||||
months: {
|
months: {
|
||||||
jan: 'jan',
|
jan: 'Jan',
|
||||||
feb: 'feb',
|
feb: 'Feb',
|
||||||
mar: 'mar',
|
mar: 'Mar',
|
||||||
apr: 'apr',
|
apr: 'Apr',
|
||||||
may: 'may',
|
may: 'May',
|
||||||
jun: 'jun',
|
jun: 'Jun',
|
||||||
jul: 'jul',
|
jul: 'Jul',
|
||||||
aug: 'aug',
|
aug: 'Aug',
|
||||||
sep: 'sep',
|
sep: 'Sep',
|
||||||
oct: 'oct',
|
oct: 'Oct',
|
||||||
nov: 'nov',
|
nov: 'Nov',
|
||||||
dec: 'dec'
|
dec: 'Dec'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
loading: 'loading',
|
loading: 'Loading',
|
||||||
noMatch: 'noMatch',
|
noMatch: 'No matching data',
|
||||||
noData: 'noData',
|
noData: 'No data',
|
||||||
placeholder: 'placeholder'
|
placeholder: 'Select'
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
pagesize: 'pagesize/页'
|
pagesize: '/page'
|
||||||
},
|
},
|
||||||
messagebox: {
|
messagebox: {
|
||||||
confirm: 'confirm',
|
confirm: 'OK',
|
||||||
cancel: 'cancel',
|
cancel: 'Cancel',
|
||||||
error: 'error!'
|
error: 'Illegal input'
|
||||||
},
|
},
|
||||||
upload: {
|
upload: {
|
||||||
delete: 'delete',
|
delete: 'Delete',
|
||||||
preview: 'preview',
|
preview: 'Preview',
|
||||||
continue: 'continue'
|
continue: 'Continue'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@ export default {
|
||||||
now: '此刻',
|
now: '此刻',
|
||||||
today: '今天',
|
today: '今天',
|
||||||
cancel: '取消',
|
cancel: '取消',
|
||||||
clear: '清空',
|
// clear: '清空',
|
||||||
confirm: '确定',
|
confirm: '确定',
|
||||||
selectDate: '选择日期',
|
selectDate: '选择日期',
|
||||||
selectTime: '选择时间',
|
selectTime: '选择时间',
|
||||||
|
@ -13,8 +13,19 @@ export default {
|
||||||
endDate: '结束日期',
|
endDate: '结束日期',
|
||||||
endTime: '结束时间',
|
endTime: '结束时间',
|
||||||
year: '年',
|
year: '年',
|
||||||
month: '月',
|
month1: '1 月',
|
||||||
week: '周次',
|
month2: '2 月',
|
||||||
|
month3: '3 月',
|
||||||
|
month4: '4 月',
|
||||||
|
month5: '5 月',
|
||||||
|
month6: '6 月',
|
||||||
|
month7: '7 月',
|
||||||
|
month8: '8 月',
|
||||||
|
month9: '9 月',
|
||||||
|
month10: '10 月',
|
||||||
|
month11: '11 月',
|
||||||
|
month12: '12 月',
|
||||||
|
// week: '周次',
|
||||||
weeks: {
|
weeks: {
|
||||||
sun: '日',
|
sun: '日',
|
||||||
mon: '一',
|
mon: '一',
|
||||||
|
|
Loading…
Reference in New Issue