summaryrefslogtreecommitdiff
path: root/resources/js/story.js
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-09-01 22:32:45 +0200
committerDaniel Weipert <code@drogueronin.de>2023-09-01 22:32:45 +0200
commit1d29ee6d87d3794a9319bca5bf36afdfe176072c (patch)
tree1e7e89ca87afd313b1806fcc80d456796b0af6db /resources/js/story.js
parent6b3a8aef783368d0ed9a2c104eea3ff5cf9984da (diff)
translations with fallback
Diffstat (limited to 'resources/js/story.js')
-rw-r--r--resources/js/story.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/resources/js/story.js b/resources/js/story.js
index 0ceb224..d5e6486 100644
--- a/resources/js/story.js
+++ b/resources/js/story.js
@@ -20,9 +20,9 @@ const Story = {
const npcCeo = await fetchNpc(characterCeo.slug);
const npcShopKeeper = await fetchNpc(characterShopKeeper.slug);
- await UI.buildAndShowStoryPopup({ speaker: npcCeo, text: translate(characterCeo.text[0], true) });
- await UI.buildAndShowStoryPopup({ speaker: npcCeo, text: translate(characterCeo.text[1], true) });
- await UI.buildAndShowStoryPopup({ speaker: npcShopKeeper, text: translate(characterShopKeeper.text[0], true) });
+ await UI.buildAndShowStoryPopup({ speaker: npcCeo, text: translate(characterCeo.text[0]) });
+ await UI.buildAndShowStoryPopup({ speaker: npcCeo, text: translate(characterCeo.text[1]) });
+ await UI.buildAndShowStoryPopup({ speaker: npcShopKeeper, text: translate(characterShopKeeper.text[0]) });
const possibleStarterMonsters = await Promise.all(
story.monsters.map(async (monsterData) => {
@@ -32,7 +32,7 @@ const Story = {
})
);
- const monsterSelection = UI.openStarterMonsterSelection(possibleStarterMonsters, { title: translate('story:introduction:monster_selection:title', true) });
+ const monsterSelection = UI.openStarterMonsterSelection(possibleStarterMonsters, { title: translate('story:introduction:monster_selection:title') });
await new Promise((resolve) => {
monsterSelection.addEventListener('starter:monster:selected', UI.wrapCallback(async (event) => {
if (!confirm(`Select ${event.detail.monster.name}?`)) {
@@ -41,7 +41,7 @@ const Story = {
event.detail.popup.remove();
- await UI.buildAndShowStoryPopup({ speaker: npcShopKeeper, text: translate(characterShopKeeper.text[1], true) });
+ await UI.buildAndShowStoryPopup({ speaker: npcShopKeeper, text: translate(characterShopKeeper.text[1]) });
// set rival monster
Memory.state.rivalMonster = event.detail.monster.slug;
@@ -62,9 +62,9 @@ const Story = {
const characterDante = story.characters.dante;
const npcDante = await fetchNpc(characterDante.slug);
- await UI.buildAndShowStoryPopup({ speaker: npcDante, text: translate(characterDante.text[0], true) });
- await UI.buildAndShowStoryPopup({ speaker: npcDante, text: translate(characterDante.text[1], true) });
- await UI.buildAndShowStoryPopup({ speaker: npcDante, text: translate(characterDante.text[2], true) });
+ await UI.buildAndShowStoryPopup({ speaker: npcDante, text: translate(characterDante.text[0]) });
+ await UI.buildAndShowStoryPopup({ speaker: npcDante, text: translate(characterDante.text[1]) });
+ await UI.buildAndShowStoryPopup({ speaker: npcDante, text: translate(characterDante.text[2]) });
const possibleStarterMonsters = await Promise.all(
story.monsters.map(async (monsterData) => {
@@ -74,7 +74,7 @@ const Story = {
})
);
- const monsterSelection = UI.openStarterMonsterSelection(possibleStarterMonsters, { title: translate('story:select_starter_monster:monster_selection:title', true) });
+ const monsterSelection = UI.openStarterMonsterSelection(possibleStarterMonsters, { title: translate('story:select_starter_monster:monster_selection:title') });
await new Promise((resolve) => {
monsterSelection.addEventListener('starter:monster:selected', UI.wrapCallback(async (event) => {
if (!confirm(`Select ${event.detail.monster.name}?`)) {
@@ -117,17 +117,17 @@ const Story = {
});
await Memory.state.opponent.initialize();
- await UI.buildAndShowStoryPopup({ speaker: npcRival, text: translate(characterRival.text[0], true) });
+ await UI.buildAndShowStoryPopup({ speaker: npcRival, text: translate(characterRival.text[0]) });
await Story.battle();
if (Game.didWinStoryBattle) {
- await UI.buildAndShowStoryPopup({ speaker: npcRival, text: translate(characterRival.text[1], true) });
+ await UI.buildAndShowStoryPopup({ speaker: npcRival, text: translate(characterRival.text[1]) });
} else {
- await UI.buildAndShowStoryPopup({ speaker: npcRival, text: translate(characterRival.text[2], true) });
+ await UI.buildAndShowStoryPopup({ speaker: npcRival, text: translate(characterRival.text[2]) });
}
- await UI.buildAndShowStoryPopup({ speaker: npcRival, text: translate(characterRival.text[3], true) });
+ await UI.buildAndShowStoryPopup({ speaker: npcRival, text: translate(characterRival.text[3]) });
Game.healParty();
},