From 6190fca6c29d04a67abdc1c4700f8b2f79d06a13 Mon Sep 17 00:00:00 2001 From: Kenrick Tandrian Date: Tue, 23 Dec 2025 15:51:36 +0700 Subject: [PATCH 1/6] feat(a11y): add Santa location to the button --- static/src/elements/santa-santa.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/static/src/elements/santa-santa.js b/static/src/elements/santa-santa.js index a77cfbc4d..6661f0d3e 100644 --- a/static/src/elements/santa-santa.js +++ b/static/src/elements/santa-santa.js @@ -52,11 +52,12 @@ common.preload.assets(...urls.map((raw) => `${assetRoot}/${raw}`)); class SantaSantaElement extends LitElement { - static get styles() { return [styles]; } + static get styles() {return [styles];} static get properties() { return { heading: {type: Number}, + locationLabel: {type: String}, stop: {type: Boolean}, }; } @@ -64,9 +65,19 @@ class SantaSantaElement extends LitElement { render() { const dir = dirForHeading(this.heading); const mode = Math.floor(Math.abs(this.heading) % 2); // could be decimal + + let label = _msg`santasearch_character_santa`; + if (this.locationLabel) { + if (this.stop) { + label = label + ` is at ${this.locationLabel}`; + } else { + label = label + ` is heading to ${this.locationLabel}`; + } + } + return html`
- +
From 8a1e23df268e569034398b84fb508dfd2da4f70a Mon Sep 17 00:00:00 2001 From: Kenrick Tandrian Date: Tue, 23 Dec 2025 15:51:54 +0700 Subject: [PATCH 2/6] feat(a11y): pass location label to santa component --- static/scenes/modvil/elements/modvil-tracker.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/scenes/modvil/elements/modvil-tracker.js b/static/scenes/modvil/elements/modvil-tracker.js index e022aee4a..bb9de42ec 100644 --- a/static/scenes/modvil/elements/modvil-tracker.js +++ b/static/scenes/modvil/elements/modvil-tracker.js @@ -48,7 +48,7 @@ const routeJitterRatio = +localStorage['routeJitter'] || 0; class ModvilTrackerElement extends LitElement { - static get styles() { return [styles]; } + static get styles() {return [styles];} static get properties() { return { @@ -197,6 +197,7 @@ class ModvilTrackerElement extends LitElement { const details = this._dataManager.details; this._santaOverlay.position = new google.maps.LatLng(details.location.lat, details.location.lng); this._santaNode.heading = details.heading; + this._santaNode.locationLabel = `${details.raw.city}, ${details.raw.region}`; this._santaNode.stop = details.stop; this._santaNode.hidden = details.home; this._details = details; From f18030fd657c127c64b5caae881463a4f28dc381 Mon Sep 17 00:00:00 2001 From: Kenrick Tandrian Date: Wed, 24 Dec 2025 09:36:04 +0700 Subject: [PATCH 3/6] fix(i18n): add translation entries for santa location descriptions --- en_src_messages.json | 24 ++++++++++++++++-------- static/src/elements/santa-santa.js | 7 ++----- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/en_src_messages.json b/en_src_messages.json index 71070ba9d..157ae5cbf 100644 --- a/en_src_messages.json +++ b/en_src_messages.json @@ -107,35 +107,35 @@ "description": "Name of a country. This appears as a label in a geography game.", "message": "Bhutan" }, - "buildandbolt-build-car-multiple" : { + "buildandbolt-build-car-multiple": { "description": "Message telling the player the quantity and type of toy they need to make.", "raw": "Build 3{{count}} cars!" }, - "buildandbolt-build-car-single" : { + "buildandbolt-build-car-single": { "description": "Message telling the player the quantity and type of toy they need to make.", "raw": "Build 1 car!" }, - "buildandbolt-build-robot-multiple" : { + "buildandbolt-build-robot-multiple": { "description": "Message telling the player the quantity and type of toy they need to make.", "raw": "Build 3{{count}} robots!" }, - "buildandbolt-build-robot-single" : { + "buildandbolt-build-robot-single": { "description": "Message telling the player the quantity and type of toy they need to make.", "raw": "Build 1 robot!" }, - "buildandbolt-build-teddybear-multiple" : { + "buildandbolt-build-teddybear-multiple": { "description": "Message telling the player the quantity and type of toy they need to make.", "raw": "Build 3{{count}} teddy bears!" }, - "buildandbolt-build-teddybear-single" : { + "buildandbolt-build-teddybear-single": { "description": "Message telling the player the quantity and type of toy they need to make.", "raw": "Build 1 teddy bear!" }, - "buildandbolt-build-rocket-multiple" : { + "buildandbolt-build-rocket-multiple": { "description": "Message telling the player the quantity and type of toy they need to make.", "raw": "Build 3{{count}} rockets!" }, - "buildandbolt-build-rocket-single" : { + "buildandbolt-build-rocket-single": { "description": "Message telling the player the quantity and type of toy they need to make.", "raw": "Build 1 rocket!" }, @@ -4741,6 +4741,14 @@ "description": "Heading where the location of the user is displayed below", "message": "Your location" }, + "tracker_santa_is_at": { + "description": "Describes Santa's current location when he is at a stop. {{location}} is the city and region name.", + "message": "Santa Claus is at {{location}}" + }, + "tracker_santa_is_heading_to": { + "description": "Describes Santa's destination when he is traveling. {{location}} is the city and region name.", + "message": "Santa Claus is heading to {{location}}" + }, "traditions-next": { "description": "Button text. Please keep short. User can move through a set of cards describing local traditions of a country.", "message": "Next Tradition" diff --git a/static/src/elements/santa-santa.js b/static/src/elements/santa-santa.js index 6661f0d3e..edba20734 100644 --- a/static/src/elements/santa-santa.js +++ b/static/src/elements/santa-santa.js @@ -68,11 +68,8 @@ class SantaSantaElement extends LitElement { let label = _msg`santasearch_character_santa`; if (this.locationLabel) { - if (this.stop) { - label = label + ` is at ${this.locationLabel}`; - } else { - label = label + ` is heading to ${this.locationLabel}`; - } + const msgId = this.stop ? 'tracker_santa_is_at' : 'tracker_santa_is_heading_to'; + label = _msg(msgId).replace('{{location}}', this.locationLabel); } return html` From 269da544f77c8d0fc462faa657d8ceea9c00dd59 Mon Sep 17 00:00:00 2001 From: Kenrick Tandrian Date: Wed, 24 Dec 2025 09:38:55 +0700 Subject: [PATCH 4/6] feat(i18n): add sample translations for Chinese languages --- _messages/zh-CN.json | 6 ++++++ _messages/zh-HK.json | 6 ++++++ _messages/zh-TW.json | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/_messages/zh-CN.json b/_messages/zh-CN.json index 02a3754f9..68bbde7e2 100644 --- a/_messages/zh-CN.json +++ b/_messages/zh-CN.json @@ -3596,6 +3596,12 @@ "tracker_your_location": { "message": "您所在的位置" }, + "tracker_santa_is_at": { + "message": "圣诞老人目前在 {{location}}" + }, + "tracker_santa_is_heading_to": { + "message": "圣诞老人正前往 {{location}}" + }, "traditions-next": { "message": "下一个习俗" }, diff --git a/_messages/zh-HK.json b/_messages/zh-HK.json index 42b1de330..12b6c610d 100644 --- a/_messages/zh-HK.json +++ b/_messages/zh-HK.json @@ -3596,6 +3596,12 @@ "tracker_your_location": { "message": "您的地點" }, + "tracker_santa_is_at": { + "message": "聖誕老人目前在 {{location}}" + }, + "tracker_santa_is_heading_to": { + "message": "聖誕老人正前往 {{location}}" + }, "traditions-next": { "message": "下一個傳統" }, diff --git a/_messages/zh-TW.json b/_messages/zh-TW.json index 87f7672c8..75b0d46b4 100644 --- a/_messages/zh-TW.json +++ b/_messages/zh-TW.json @@ -3596,6 +3596,12 @@ "tracker_your_location": { "message": "你的位置" }, + "tracker_santa_is_at": { + "message": "聖誕老人目前在 {{location}}" + }, + "tracker_santa_is_heading_to": { + "message": "聖誕老人正前往 {{location}}" + }, "traditions-next": { "message": "下個傳統" }, From 2b96b7db85671255cca1198222c7a723726a9eb7 Mon Sep 17 00:00:00 2001 From: Kenrick Tandrian Date: Wed, 24 Dec 2025 09:45:19 +0700 Subject: [PATCH 5/6] fix(i18n): change order --- _messages/en-GB.json | 6 ++++++ _messages/en.json | 6 ++++++ _messages/zh-CN.json | 12 ++++++------ _messages/zh-HK.json | 12 ++++++------ _messages/zh-TW.json | 12 ++++++------ en_src_messages.json | 16 ++++++++-------- 6 files changed, 38 insertions(+), 26 deletions(-) diff --git a/_messages/en-GB.json b/_messages/en-GB.json index f74aa8ff3..389f42eeb 100644 --- a/_messages/en-GB.json +++ b/_messages/en-GB.json @@ -3560,6 +3560,12 @@ "tracker_next_stop": { "message": "Next stop" }, + "tracker_santa_is_at": { + "message": "Santa Claus is at {{location}}" + }, + "tracker_santa_is_heading_to": { + "message": "Santa Claus is heading to {{location}}" + }, "tracker_santa_update": { "message": "SANTA UPDATE" }, diff --git a/_messages/en.json b/_messages/en.json index 03e42e1b8..994a0bdff 100644 --- a/_messages/en.json +++ b/_messages/en.json @@ -3560,6 +3560,12 @@ "tracker_next_stop": { "message": "Next stop" }, + "tracker_santa_is_at": { + "message": "Santa Claus is at {{location}}" + }, + "tracker_santa_is_heading_to": { + "message": "Santa Claus is heading to {{location}}" + }, "tracker_santa_update": { "message": "SANTA UPDATE" }, diff --git a/_messages/zh-CN.json b/_messages/zh-CN.json index 68bbde7e2..117f109fe 100644 --- a/_messages/zh-CN.json +++ b/_messages/zh-CN.json @@ -3560,6 +3560,12 @@ "tracker_next_stop": { "message": "下一站" }, + "tracker_santa_is_at": { + "message": "圣诞老人目前在 {{location}}" + }, + "tracker_santa_is_heading_to": { + "message": "圣诞老人正前往 {{location}}" + }, "tracker_santa_update": { "message": "圣诞老人最新行踪" }, @@ -3596,12 +3602,6 @@ "tracker_your_location": { "message": "您所在的位置" }, - "tracker_santa_is_at": { - "message": "圣诞老人目前在 {{location}}" - }, - "tracker_santa_is_heading_to": { - "message": "圣诞老人正前往 {{location}}" - }, "traditions-next": { "message": "下一个习俗" }, diff --git a/_messages/zh-HK.json b/_messages/zh-HK.json index 12b6c610d..269a9de3c 100644 --- a/_messages/zh-HK.json +++ b/_messages/zh-HK.json @@ -3560,6 +3560,12 @@ "tracker_next_stop": { "message": "下一站" }, + "tracker_santa_is_at": { + "message": "聖誕老人目前在 {{location}}" + }, + "tracker_santa_is_heading_to": { + "message": "聖誕老人正前往 {{location}}" + }, "tracker_santa_update": { "message": "聖誕老人最新消息" }, @@ -3596,12 +3602,6 @@ "tracker_your_location": { "message": "您的地點" }, - "tracker_santa_is_at": { - "message": "聖誕老人目前在 {{location}}" - }, - "tracker_santa_is_heading_to": { - "message": "聖誕老人正前往 {{location}}" - }, "traditions-next": { "message": "下一個傳統" }, diff --git a/_messages/zh-TW.json b/_messages/zh-TW.json index 75b0d46b4..5d405c055 100644 --- a/_messages/zh-TW.json +++ b/_messages/zh-TW.json @@ -3560,6 +3560,12 @@ "tracker_next_stop": { "message": "下一站" }, + "tracker_santa_is_at": { + "message": "聖誕老人目前在 {{location}}" + }, + "tracker_santa_is_heading_to": { + "message": "聖誕老人正前往 {{location}}" + }, "tracker_santa_update": { "message": "聖誕老人的最新狀態" }, @@ -3596,12 +3602,6 @@ "tracker_your_location": { "message": "你的位置" }, - "tracker_santa_is_at": { - "message": "聖誕老人目前在 {{location}}" - }, - "tracker_santa_is_heading_to": { - "message": "聖誕老人正前往 {{location}}" - }, "traditions-next": { "message": "下個傳統" }, diff --git a/en_src_messages.json b/en_src_messages.json index 157ae5cbf..a9b5bac6e 100644 --- a/en_src_messages.json +++ b/en_src_messages.json @@ -4710,6 +4710,14 @@ "description": "Heading above the next stop for Santa", "message": "Next stop" }, + "tracker_santa_is_at": { + "description": "Describes Santa's current location when he is at a stop. {{location}} is the city and region name.", + "message": "Santa Claus is at {{location}}" + }, + "tracker_santa_is_heading_to": { + "description": "Describes Santa's destination when he is traveling. {{location}} is the city and region name.", + "message": "Santa Claus is heading to {{location}}" + }, "tracker_santa_update": { "message": "SANTA UPDATE" }, @@ -4741,14 +4749,6 @@ "description": "Heading where the location of the user is displayed below", "message": "Your location" }, - "tracker_santa_is_at": { - "description": "Describes Santa's current location when he is at a stop. {{location}} is the city and region name.", - "message": "Santa Claus is at {{location}}" - }, - "tracker_santa_is_heading_to": { - "description": "Describes Santa's destination when he is traveling. {{location}} is the city and region name.", - "message": "Santa Claus is heading to {{location}}" - }, "traditions-next": { "description": "Button text. Please keep short. User can move through a set of cards describing local traditions of a country.", "message": "Next Tradition" From 03a94e811b3ef19bf81441f0c85595b4a9b0f88f Mon Sep 17 00:00:00 2001 From: Kenrick Tandrian Date: Wed, 24 Dec 2025 09:52:06 +0700 Subject: [PATCH 6/6] feat(i18n): add ja and ko translations --- _messages/ja.json | 6 ++++++ _messages/ko.json | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/_messages/ja.json b/_messages/ja.json index b76da1f15..0c0d54772 100644 --- a/_messages/ja.json +++ b/_messages/ja.json @@ -3560,6 +3560,12 @@ "tracker_next_stop": { "message": "次の目的地" }, + "tracker_santa_is_at": { + "message": "サンタさんは現在 {{location}} にいます" + }, + "tracker_santa_is_heading_to": { + "message": "サンタさんは {{location}} に向かっています" + }, "tracker_santa_update": { "message": "サンタさんの最新情報" }, diff --git a/_messages/ko.json b/_messages/ko.json index 9df39568b..bcde95fe6 100644 --- a/_messages/ko.json +++ b/_messages/ko.json @@ -3560,6 +3560,12 @@ "tracker_next_stop": { "message": "다음 방문지" }, + "tracker_santa_is_at": { + "message": "산타클로스는 현재 {{location}}에 있습니다" + }, + "tracker_santa_is_heading_to": { + "message": "산타클로스는 {{location}}(으)로 향하고 있습니다" + }, "tracker_santa_update": { "message": "산타 업데이트" },