Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions _messages/en-GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
6 changes: 6 additions & 0 deletions _messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
6 changes: 6 additions & 0 deletions _messages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "サンタさんの最新情報"
},
Expand Down
6 changes: 6 additions & 0 deletions _messages/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "산타 업데이트"
},
Expand Down
6 changes: 6 additions & 0 deletions _messages/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "圣诞老人最新行踪"
},
Expand Down
6 changes: 6 additions & 0 deletions _messages/zh-HK.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "聖誕老人最新消息"
},
Expand Down
6 changes: 6 additions & 0 deletions _messages/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "聖誕老人的最新狀態"
},
Expand Down
24 changes: 16 additions & 8 deletions en_src_messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <ph name=\"COUNT\"><ex>3</ex>{{count}}</ph> 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 <ph name=\"COUNT\"><ex>3</ex>{{count}}</ph> 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 <ph name=\"COUNT\"><ex>3</ex>{{count}}</ph> 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 <ph name=\"COUNT\"><ex>3</ex>{{count}}</ph> 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!"
},
Expand Down Expand Up @@ -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"
},
Expand Down
3 changes: 2 additions & 1 deletion static/scenes/modvil/elements/modvil-tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand Down
12 changes: 10 additions & 2 deletions static/src/elements/santa-santa.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,29 @@ 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},
};
}

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) {
const msgId = this.stop ? 'tracker_santa_is_at' : 'tracker_santa_is_heading_to';
label = _msg(msgId).replace('{{location}}', this.locationLabel);
}

return html`
<div id="outer">
<button>${_msg`santasearch_character_santa`}</button>
<button>${label}</button>
<div class="presents mode${mode}" ?hidden=${!this.stop}></div>
<div class="sleigh" data-dir=${dir} ?hidden=${this.stop}>
<div class="back"></div>
Expand Down