Improve i18n
This commit is contained in:
parent
2ffb8f7cf8
commit
b0fdf25b24
3 changed files with 44 additions and 27 deletions
|
@ -37,6 +37,15 @@ common:
|
|||
friday: "金"
|
||||
saturday: "土"
|
||||
|
||||
weekday:
|
||||
sunday: "日曜日"
|
||||
monday: "月曜日"
|
||||
tuesday: "火曜日"
|
||||
wednesday: "水曜日"
|
||||
thursday: "木曜日"
|
||||
friday: "金曜日"
|
||||
saturday: "土曜日"
|
||||
|
||||
reactions:
|
||||
like: "いいね"
|
||||
love: "しゅき"
|
||||
|
|
|
@ -4,27 +4,27 @@
|
|||
<div class="mkw-calendar--body">
|
||||
<div class="calendar" :data-is-holiday="isHoliday">
|
||||
<p class="month-and-year">
|
||||
<span class="year">%i18n:year-english%{{ year }}%i18n:year-japanese%</span>
|
||||
<span class="month">%i18n:month-english%{{ month }}%i18n:month-japanese%</span>
|
||||
<span class="year">%i18n:@year-english%{{ year }}%i18n:@year-japanese%</span>
|
||||
<span class="month">%i18n:@month-english%{{ month }}%i18n:@month-japanese%</span>
|
||||
</p>
|
||||
<p class="day">>%i18n:day-english%{{ day }}%i18n:day-japanese%</p>
|
||||
<p class="week-day">%i18n:weekday-english%{{ weekDay }}%i18n:weekday-japanese%</p>
|
||||
<p class="day">%i18n:@day-english%{{ day }}%i18n:@day-japanese%</p>
|
||||
<p class="week-day">{{ weekDay }}</p>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div>
|
||||
<p>%i18n:today%<b>{{ dayP.toFixed(1) }}%</b></p>
|
||||
<p>%i18n:@today%<b>{{ dayP.toFixed(1) }}%</b></p>
|
||||
<div class="meter">
|
||||
<div class="val" :style="{ width: `${dayP}%` }"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<p>%i18n:this-month%<b>{{ monthP.toFixed(1) }}%</b></p>
|
||||
<p>%i18n:@this-month%<b>{{ monthP.toFixed(1) }}%</b></p>
|
||||
<div class="meter">
|
||||
<div class="val" :style="{ width: `${monthP}%` }"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<p>%i18n:this-year%<b>{{ yearP.toFixed(1) }}%</b></p>
|
||||
<p>%i18n:@this-year%<b>{{ yearP.toFixed(1) }}%</b></p>
|
||||
<div class="meter">
|
||||
<div class="val" :style="{ width: `${yearP}%` }"></div>
|
||||
</div>
|
||||
|
@ -84,7 +84,15 @@ export default define({
|
|||
this.year = ny;
|
||||
this.month = nm + 1;
|
||||
this.day = nd;
|
||||
this.weekDay = ['日', '月', '火', '水', '木', '金', '土'][now.getDay()];
|
||||
this.weekDay = [
|
||||
'%i18n:common.weekday.sunday%',
|
||||
'%i18n:common.weekday.monday%',
|
||||
'%i18n:common.weekday.tuesday%',
|
||||
'%i18n:common.weekday.wednesday%',
|
||||
'%i18n:common.weekday.thursday%',
|
||||
'%i18n:common.weekday.friday%',
|
||||
'%i18n:common.weekday.saturday%'
|
||||
][now.getDay()];
|
||||
|
||||
const dayNumer = now.getTime() - new Date(ny, nm, nd).getTime();
|
||||
const dayDenom = 1000/*ms*/ * 60/*s*/ * 60/*m*/ * 24/*h*/;
|
||||
|
|
Loading…
Reference in a new issue