Skip to content

Commit

Permalink
- 修复l10n冲突问题
Browse files Browse the repository at this point in the history
- 优化无安排视图的星期显示颜色
  • Loading branch information
ipuppet committed Oct 9, 2021
1 parent fec9ea0 commit 275b06c
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"info": {
"name": "WAIO",
"version": "1.4.7",
"version": "1.4.8",
"author": "ipuppet",
"module": false
},
Expand Down
14 changes: 7 additions & 7 deletions scripts/widget/Calendar/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ class Calendar {

localizedWeek(index) {
const week = [
$l10n("SUNDAY"),
$l10n("MONDAY"),
$l10n("TUESDAY"),
$l10n("WEDNESDAY"),
$l10n("THURSDAY"),
$l10n("FRIDAY"),
$l10n("SATURDAY")
$l10n("SHORT_SUNDAY"),
$l10n("SHORT_MONDAY"),
$l10n("SHORT_TUESDAY"),
$l10n("SHORT_WEDNESDAY"),
$l10n("SHORT_THURSDAY"),
$l10n("SHORT_FRIDAY"),
$l10n("SHORT_SATURDAY")
]
if (this.firstDayOfWeek === 1) {
index += 1
Expand Down
14 changes: 7 additions & 7 deletions scripts/widget/Calendar/strings/en.strings
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"_SUNDAY" = "Sunday";
"_MONDAY" = "Monday";

"SUNDAY" = "S";
"MONDAY" = "M";
"TUESDAY" = "T";
"WEDNESDAY" = "W";
"THURSDAY" = "T";
"FRIDAY" = "F";
"SATURDAY" = "S";
"SHORT_SUNDAY" = "S";
"SHORT_MONDAY" = "M";
"SHORT_TUESDAY" = "T";
"SHORT_WEDNESDAY" = "W";
"SHORT_THURSDAY" = "T";
"SHORT_FRIDAY" = "F";
"SHORT_SATURDAY" = "S";

"BLANK_MONTH" = " ";
"JANUARY_C" = "January";
Expand Down
14 changes: 7 additions & 7 deletions scripts/widget/Calendar/strings/zh-Hans.strings
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"_SUNDAY" = "周日";
"_MONDAY" = "周一";

"SUNDAY" = "日";
"MONDAY" = "一";
"TUESDAY" = "二";
"WEDNESDAY" = "三";
"THURSDAY" = "四";
"FRIDAY" = "五";
"SATURDAY" = "六";
"SHORT_SUNDAY" = "日";
"SHORT_MONDAY" = "一";
"SHORT_TUESDAY" = "二";
"SHORT_WEDNESDAY" = "三";
"SHORT_THURSDAY" = "四";
"SHORT_FRIDAY" = "五";
"SHORT_SATURDAY" = "六";

"BLANK_MONTH" = "月";
"JANUARY_C" = "一";
Expand Down
6 changes: 4 additions & 2 deletions scripts/widget/Schedule/schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ class Schedule {
*/
scheduleView(family) {
const nothingView = (text) => {
const date = new Date()
return {
type: "vstack",
props: {
Expand Down Expand Up @@ -271,8 +272,9 @@ class Schedule {
maxWidth: Infinity,
alignment: $widget.alignment.leading
},
text: this.week[new Date().getDay()],
text: this.week[date.getDay()],
font: $font(11),
color: this.colorDate,
widgetURL: this.urlScheme
}
},
Expand All @@ -285,7 +287,7 @@ class Schedule {
maxWidth: Infinity,
alignment: $widget.alignment.leading
},
text: String(new Date().getDate()),
text: String(date.getDate()),
font: $font(33),
widgetURL: this.urlScheme
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/widget/Schedule/strings/en.strings
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"REMINDER_COLOR" = "Reminder Color";
"NO_CALENDAR" = "No Schedule";
"NO_REMINDER" = "No Reminder";
"NO_CALENDAR&REMINDER" = "No Schedule";
"NO_CALENDAR&REMINDER" = "No Events";
"ITEM_LENGTH" = "Items to Display";
"CLICK_EVENT" = "Click Event";
"REMINDER" = "Reminder";
Expand Down

0 comments on commit 275b06c

Please sign in to comment.