Skip to content

Commit bf01cb3

Browse files
hyx3179oliversalzburg
authored andcommitted
feat(i18n): Elect leader
1 parent 97d006b commit bf01cb3

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

packages/kitten-scientists/source/i18n/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
"option.chronofurnace": "Turn on Chrono Furnaces",
6060
"option.crypto": "Trade Blackcoin",
6161
"option.elect": "Elect leader",
62+
"option.elect.job": "Job",
63+
"option.elect.trait": "Trait",
6264
"option.embassies": "Build Embassies",
6365
"option.faith.adore": "Adore the Galaxy",
6466
"option.faith.best.unicorn": "Build Best Unicorn Building First",

packages/kitten-scientists/source/i18n/zh.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
"option.chronofurnace": "开启计时炉",
6060
"option.crypto": "黑币交易",
6161
"option.elect": "选择领导人",
62+
"option.elect.job": "工作",
63+
"option.elect.trait": "特质",
6264
"option.embassies": "建造大使馆",
6365
"option.faith.adore": "赞美群星",
6466
"option.faith.best.unicorn": "优先最佳独角兽建筑",

packages/kitten-scientists/source/ui/VillageSettingsUi.ts

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,31 @@ export class VillageSettingsUi extends SettingsSectionUi<VillageSettings> {
130130
);
131131
listAddition.addChild(this._promoteLeader);
132132

133-
this._electLeader = new SettingListItem(this._host, "Elect leader", this.setting.electLeader, {
134-
children: [
135-
new OptionsListItem(host, "Job", this.setting.electLeader.job),
136-
new OptionsListItem(host, "Trait", this.setting.electLeader.trait),
137-
],
138-
onCheck: () =>
139-
this._host.engine.imessage("status.sub.enable", [this._host.engine.i18n("option.elect")]),
140-
onUnCheck: () =>
141-
this._host.engine.imessage("status.sub.disable", [this._host.engine.i18n("option.elect")]),
142-
});
133+
this._electLeader = new SettingListItem(
134+
this._host,
135+
this._host.engine.i18n("option.elect"),
136+
this.setting.electLeader,
137+
{
138+
children: [
139+
new OptionsListItem(
140+
host,
141+
this._host.engine.i18n("option.elect.job"),
142+
this.setting.electLeader.job,
143+
),
144+
new OptionsListItem(
145+
host,
146+
this._host.engine.i18n("option.elect.trait"),
147+
this.setting.electLeader.trait,
148+
),
149+
],
150+
onCheck: () =>
151+
this._host.engine.imessage("status.sub.enable", [this._host.engine.i18n("option.elect")]),
152+
onUnCheck: () =>
153+
this._host.engine.imessage("status.sub.disable", [
154+
this._host.engine.i18n("option.elect"),
155+
]),
156+
},
157+
);
143158
listAddition.addChild(this._electLeader);
144159

145160
this.addChild(listAddition);

0 commit comments

Comments
 (0)