From a753f7949d499d78c56c60dae7d932342bc44069 Mon Sep 17 00:00:00 2001 From: Sasha Date: Sun, 30 Jul 2023 10:56:54 -0400 Subject: [PATCH 1/2] Added missing/disconnected translations - Added offline progress exit button translation - Added cube total translation in cube upgrades tab - Added Hepteract Exalt 3 bonus translation - Added Oct/GQ Cost/Spent translations - Added history descriptions translation - Connected history per second toggle translation - Connected upgrade costs to existing building costs translations - Connected the 'Auto Runes' in toggleSaveOff() to existing translations - Set some toggle button default texts to come from translations --- index.html | 36 ++++++++++++++++++------------------ src/Hepteracts.ts | 2 +- src/Octeracts.ts | 4 ++-- src/Synergism.ts | 2 +- src/Toggles.ts | 4 ++-- src/UpdateVisuals.ts | 2 +- src/Upgrades.ts | 20 ++++++++++++++------ src/singularity.ts | 4 ++-- translations/en.json | 18 ++++++++++++++---- translations/source.json | 15 ++++++++++++--- 10 files changed, 67 insertions(+), 40 deletions(-) diff --git a/index.html b/index.html index b336ea964..2d53a407e 100644 --- a/index.html +++ b/index.html @@ -108,7 +108,7 @@ - +
@@ -694,7 +694,7 @@ upg125 - +
Diamond @@ -730,7 +730,7 @@ - +
Mythos @@ -765,7 +765,7 @@ upg60 - +
Generators @@ -800,7 +800,7 @@ upg120 - +
Automation @@ -869,7 +869,7 @@ upg80 - +
@@ -2882,27 +2882,27 @@
settingpic1 - +
settingpic2 - +
settingpic3 - +
settingpic4 - +
settingpic5 - +
settingpic6 - +

@@ -3483,12 +3483,12 @@

Artists

0

- +
-

Here's what you got from your last resets (except challenges):

+

@@ -3496,7 +3496,7 @@

Artists

-

Your sacrifices got you the following:

+

@@ -3509,8 +3509,8 @@

Artists

-

Your last ascensions got you the following:

- +

+
@@ -3524,7 +3524,7 @@

Artists

-

Your last singularities got you the following:

+

diff --git a/src/Hepteracts.ts b/src/Hepteracts.ts index f1c51dde2..54de300b7 100644 --- a/src/Hepteracts.ts +++ b/src/Hepteracts.ts @@ -479,7 +479,7 @@ export const hepteractDescriptions = (type: hepteractTypes) => { const craftCostMulti = calculateSingularityDebuff('Hepteract Costs') const multiplier = player.hepteractCrafts[type].computeActualCap() / player.hepteractCrafts[type].CAP - bonusCapacityText.textContent = (player.hepteractCrafts[type].computeActualCap() / player.hepteractCrafts[type].CAP > 1) ? `Hepteract capacities are currently multiplied by ${multiplier}. Expansions cost what they would if this multiplier were 1.` : '' + bonusCapacityText.textContent = (multiplier > 1) ? i18next.t('wowCubes.hepteractForge.bonusCapacity', { multiplier }) : '' let currentEffectRecord!: StringMap let oneCost!: string | Record diff --git a/src/Octeracts.ts b/src/Octeracts.ts index 39d245656..6fdbe8ad0 100644 --- a/src/Octeracts.ts +++ b/src/Octeracts.ts @@ -137,8 +137,8 @@ export class OcteractUpgrade extends DynamicUpgrade { ${this.description} ${i18next.t('general.level')} ${format(this.level, 0, true)}${maxLevel}${freeLevelInfo} ${this.getEffect().desc} - ${i18next.t('octeract.toString.costNextLevel')} ${format(costNextLevel, 2, true, true, true)} Octeracts${affordableInfo} - ${i18next.t('general.spent')} Octeracts: ${format(this.octeractsInvested, 2, true, true, true)}` + ${i18next.t('octeract.toString.costNextLevel')} ${format(costNextLevel, 2, true, true, true)} ${i18next.t('octeract.octeracts')} ${affordableInfo} + ${i18next.t('general.spent')} ${i18next.t('octeract.octeracts')}: ${format(this.octeractsInvested, 2, true, true, true)}` } public updateUpgradeHTML(): void { diff --git a/src/Synergism.ts b/src/Synergism.ts index 41fda45b7..79d486ac4 100644 --- a/src/Synergism.ts +++ b/src/Synergism.ts @@ -1934,7 +1934,7 @@ const loadSynergy = async () => { toggleAutoAscend(1) } - DOMCacheGetOrSet('historyTogglePerSecondButton').textContent = 'Per second: ' + (player.historyShowPerSecond ? 'ON' : 'OFF') + DOMCacheGetOrSet('historyTogglePerSecondButton').textContent = i18next.t('history.perSecond' + (player.historyShowPerSecond ? 'On' : 'Off')) DOMCacheGetOrSet('historyTogglePerSecondButton').style.borderColor = (player.historyShowPerSecond ? 'green' : 'red') //If auto research is enabled and runing; Make sure there is something to try to research if possible diff --git a/src/Toggles.ts b/src/Toggles.ts index 54c60f673..2610e0ca6 100644 --- a/src/Toggles.ts +++ b/src/Toggles.ts @@ -419,13 +419,13 @@ export const toggleSaveOff = () => { player.autoSacrificeToggle = true el.textContent = i18next.t('toggles.saveOfferingsOff') el.style.color = 'white' - et.textContent = 'Auto Runes: ON' + et.textContent = i18next.t('runes.blessings.autoRuneOn') et.style.border = '2px solid green' } else { player.autoSacrificeToggle = false el.textContent = i18next.t('toggles.saveOfferingsOn') el.style.color = 'yellow' - et.textContent = 'Auto Runes: OFF' + et.textContent = i18next.t('runes.blessings.autoRuneOff') et.style.border = '2px solid red' } diff --git a/src/UpdateVisuals.ts b/src/UpdateVisuals.ts index 804720adf..c1af3b9cd 100644 --- a/src/UpdateVisuals.ts +++ b/src/UpdateVisuals.ts @@ -583,7 +583,7 @@ export const visualUpdateCubes = () => { break } case 4: - DOMCacheGetOrSet('cubeAmount2').textContent = `You have ${format(player.wowCubes, 0, true)} Wow! Cubes =)` + DOMCacheGetOrSet('cubeAmount2').textContent = i18next.t('cubes.total', { amount: format(player.wowCubes, 0, true) }) break case 5: break diff --git a/src/Upgrades.ts b/src/Upgrades.ts index ec1229bd7..8488c9acf 100644 --- a/src/Upgrades.ts +++ b/src/Upgrades.ts @@ -159,26 +159,34 @@ export const upgradedescriptions = (i: number) => { clickUpgrades(i, false) } - let currency = '' + let costCurrency = '' + let costProp = '' let color = '' if ((i <= 20 && i >= 1) || (i <= 110 && i >= 106) || (i <= 125 && i >= 121)) { - currency = 'Coins' + costCurrency = 'costCoins' + costProp = 'coins' color = 'yellow' } if ((i <= 40 && i >= 21) || (i <= 105 && i >= 101) || (i <= 115 && i >= 111) || (i <= 87 && i >= 81)) { - currency = 'Diamonds' + costCurrency = 'costDiamonds' + costProp = 'diamonds' color = 'cyan' } if ((i <= 60 && i >= 41) || (i <= 120 && i >= 116) || (i <= 93 && i >= 88)) { - currency = 'Mythos' + costCurrency = 'costMythos' + costProp = 'mythos' color = 'plum' } if ((i <= 80 && i >= 61) || (i <= 100 && i >= 94)) { - currency = 'Particles' + costCurrency = 'costParticles' + costProp = 'particles' color = 'limegreen' } - DOMCacheGetOrSet('upgradecost').textContent = 'Cost: ' + format(Decimal.pow(10, G.upgradeCosts[i])) + ' ' + currency + const costParams: Record = {} + costParams[costProp] = format(Decimal.pow(10, G.upgradeCosts[i])) + + DOMCacheGetOrSet('upgradecost').textContent = i18next.t(`buildings.${costCurrency}`, costParams) DOMCacheGetOrSet('upgradecost').style.color = color upgradeeffects(i) } diff --git a/src/singularity.ts b/src/singularity.ts index a27095746..225fc9f38 100644 --- a/src/singularity.ts +++ b/src/singularity.ts @@ -97,8 +97,8 @@ export class SingularityUpgrade extends DynamicUpgrade { ${minimumSingularity} ${i18next.t('general.level')} ${format(this.level, 0, true)}${maxLevel}${freeLevelInfo} ${this.getEffect().desc} - ${i18next.t('singularity.toString.costNextLevel')}: ${format(costNextLevel, 0, true)} Golden Quarks. - ${i18next.t('general.spent')} Quarks: ${format(this.goldenQuarksInvested, 0, true)}` + ${i18next.t('singularity.toString.costNextLevel')}: ${format(costNextLevel, 0, true)} ${i18next.t('singularity.goldenQuarkLabel')}. + ${i18next.t('general.spent')} ${i18next.t('singularity.goldenQuarkLabel')}: ${format(this.goldenQuarksInvested, 0, true)}` } public updateUpgradeHTML(): void { diff --git a/translations/en.json b/translations/en.json index 0acc7d780..f8d51beb2 100644 --- a/translations/en.json +++ b/translations/en.json @@ -1117,6 +1117,7 @@ }, "noCubesOpened": "OK. No cubes opened.", "howManyCubesOpen": "How many cubes would you like to open? You have {{x}}! \nYou can input a percentage of cubes to open, for example: \"50%\" or \"100%\". \nYou can start the input with \"-\" (put in a negative value) to put in a value, that will be saved, which means you open all cubes except the specified number (also works with %).", + "total": "You have {{amount}} Wow! Cubes =)", "validation": { "notEnough": "You don't have enough cubes to open!", "negative": "You can't open a negative amount of cubes.", @@ -2007,6 +2008,7 @@ "effect": "Blueberry Seconds Generation +{{n}}%(!)" } }, + "goldenQuarkLabel": "Golden Quarks", "goldenQuarkAmount": "You have {{goldenQuarks}} Golden Quarks!", "penalties": { "globalSpeed": "<> is divided by <>.", @@ -2104,7 +2106,8 @@ "v297hotfix1Sing": "You have loaded into the version 2.9.7 hotfix 1! Your uncapped resource singularity upgrades have been refunded! Sorry for the inconvenience." }, "languageChange": "Changing the language requires a reload! Would you like to reload now?", - "exportYourGame": "You haven't exported your game in a while, you better export it soon or you could lose it!" + "exportYourGame": "You haven't exported your game in a while, you better export it soon or you could lose it!", + "generateSummary": "Generate Savefile Stats Summary" }, "upgrades": { "descriptions": { @@ -2441,7 +2444,8 @@ "ingameAntSacTimer": "In-Game Ant Sacrifice Timer: +<> seconds", "realAntSacTimer": "Real-Life Ant Sacrifice Timer: +<> seconds", "currentAscensionTimer": "Current Ascension Timer: +<> seconds", - "exportQuarks": "Export Quarks: +<>" + "exportQuarks": "Export Quarks: +<>", + "exit": "That's cool. Take me to the game!" }, "corruptions": { "names": { @@ -2658,6 +2662,7 @@ "constantHover": "Hover over an icon for a description of the upgrade. Click to buy it!" }, "octeract": { + "octeracts": "Octeracts", "buyLevel": { "buyPrompt": "How many Octeracts would you like to spend? You have {{n}} OCT. Type -1 to use max!", "cancelPurchase": "Purchase cancelled!", @@ -3220,6 +3225,7 @@ "effect": "Effect:", "powder": "Powder:", "warps": "Warps:", + "bonusCapacity": "Hepteract capacities are currently multiplied by {{multiplier}}. Expansions cost what they would if this multiplier were 1.", "descriptions": { "chronos": { "effect": "This hepteract bends time, in your favor. +0.06% Ascension Speed per Chronos Hepteract.", @@ -3427,7 +3433,11 @@ }, "history": { "perSecondOn": "Per second: ON", - "perSecondOff": "Per second: OFF" + "perSecondOff": "Per second: OFF", + "resetGains": "Here's what you got from your last resets (except challenges):", + "antGains": "Your sacrifices got you the following:", + "ascensionGains": "Your last ascensions got you the following:", + "singularityGains": "Your last singularities got you the following:" }, "event": { "aprilFools": { @@ -3436,4 +3446,4 @@ "clickedText": "You have clicked the <>! Until refresh, gain <>, <>, <>!" } } -} +} diff --git a/translations/source.json b/translations/source.json index 68539f3cc..3a7ffb4e2 100644 --- a/translations/source.json +++ b/translations/source.json @@ -1117,6 +1117,7 @@ }, "noCubesOpened": "OK. No cubes opened.", "howManyCubesOpen": "How many cubes would you like to open? You have {{x}}! \nYou can input a percentage of cubes to open, for example: \"50%\" or \"100%\". \nYou can start the input with \"-\" (put in a negative value) to put in a value, that will be saved, which means you open all cubes except the specified number (also works with %).", + "total": "You have {{amount}} Wow! Cubes =)", "validation": { "notEnough": "You don't have enough cubes to open!", "negative": "You can't open a negative amount of cubes.", @@ -2104,7 +2105,8 @@ "v297hotfix1Sing": "You have loaded into the version 2.9.7 hotfix 1! Your uncapped resource singularity upgrades have been refunded! Sorry for the inconvenience." }, "languageChange": "Changing the language requires a reload! Would you like to reload now?", - "exportYourGame": "You haven't exported your game in a while, you better export it soon or you could lose it!" + "exportYourGame": "You haven't exported your game in a while, you better export it soon or you could lose it!", + "generateSummary": "Generate Savefile Stats Summary" }, "upgrades": { "descriptions": { @@ -2441,7 +2443,8 @@ "ingameAntSacTimer": "In-Game Ant Sacrifice Timer: +<> seconds", "realAntSacTimer": "Real-Life Ant Sacrifice Timer: +<> seconds", "currentAscensionTimer": "Current Ascension Timer: +<> seconds", - "exportQuarks": "Export Quarks: +<>" + "exportQuarks": "Export Quarks: +<>", + "exit": "That's cool. Take me to the game!" }, "corruptions": { "names": { @@ -2658,6 +2661,7 @@ "constantHover": "Hover over an icon for a description of the upgrade. Click to buy it!" }, "octeract": { + "octeracts": "Octeracts", "buyLevel": { "buyPrompt": "How many Octeracts would you like to spend? You have {{n}} OCT. Type -1 to use max!", "cancelPurchase": "Purchase cancelled!", @@ -3220,6 +3224,7 @@ "effect": "Effect:", "powder": "Powder:", "warps": "Warps:", + "bonusCapacity": "Hepteract capacities are currently multiplied by {{multiplier}}. Expansions cost what they would if this multiplier were 1.", "descriptions": { "chronos": { "effect": "This hepteract bends time, in your favor. +0.06% Ascension Speed per Chronos Hepteract.", @@ -3427,7 +3432,11 @@ }, "history": { "perSecondOn": "Per second: ON", - "perSecondOff": "Per second: OFF" + "perSecondOff": "Per second: OFF", + "resetGains": "Here's what you got from your last resets (except challenges):", + "antGains": "Your sacrifices got you the following:", + "ascensionGains": "Your last ascensions got you the following:", + "singularityGains": "Your last singularities got you the following:" }, "event": { "aprilFools": { From 8bccb9345aae5cbd961127ff25eb76feaf205268 Mon Sep 17 00:00:00 2001 From: Sasha Date: Sat, 12 Aug 2023 11:01:24 -0400 Subject: [PATCH 2/2] Changed Octeract and GQ Shop translations to be less composite --- src/Octeracts.ts | 6 +++--- src/singularity.ts | 6 +++--- translations/en.json | 8 ++++---- translations/source.json | 7 ++++--- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/Octeracts.ts b/src/Octeracts.ts index 6fdbe8ad0..e03c28634 100644 --- a/src/Octeracts.ts +++ b/src/Octeracts.ts @@ -135,10 +135,10 @@ export class OcteractUpgrade extends DynamicUpgrade { return `${this.name} ${this.description} - ${i18next.t('general.level')} ${format(this.level, 0, true)}${maxLevel}${freeLevelInfo} + ${i18next.t('general.level')} ${format(this.level, 0, true)}${maxLevel}${freeLevelInfo} ${this.getEffect().desc} - ${i18next.t('octeract.toString.costNextLevel')} ${format(costNextLevel, 2, true, true, true)} ${i18next.t('octeract.octeracts')} ${affordableInfo} - ${i18next.t('general.spent')} ${i18next.t('octeract.octeracts')}: ${format(this.octeractsInvested, 2, true, true, true)}` + ${i18next.t('octeract.toString.costNextLevel', { n: format(costNextLevel, 2, true, true, true) })} ${affordableInfo} + ${i18next.t('octeract.toString.spent', { n: format(this.octeractsInvested, 2, true, true, true) })}` } public updateUpgradeHTML(): void { diff --git a/src/singularity.ts b/src/singularity.ts index 225fc9f38..0aa03e728 100644 --- a/src/singularity.ts +++ b/src/singularity.ts @@ -95,10 +95,10 @@ export class SingularityUpgrade extends DynamicUpgrade { return `${this.name} ${this.description} ${minimumSingularity} - ${i18next.t('general.level')} ${format(this.level, 0, true)}${maxLevel}${freeLevelInfo} + ${i18next.t('general.level')} ${format(this.level, 0, true)}${maxLevel}${freeLevelInfo} ${this.getEffect().desc} - ${i18next.t('singularity.toString.costNextLevel')}: ${format(costNextLevel, 0, true)} ${i18next.t('singularity.goldenQuarkLabel')}. - ${i18next.t('general.spent')} ${i18next.t('singularity.goldenQuarkLabel')}: ${format(this.goldenQuarksInvested, 0, true)}` + ${i18next.t('singularity.toString.costNextLevel', { n: format(costNextLevel, 0, true) })} + ${i18next.t('singularity.toString.spent', { n: format(this.goldenQuarksInvested, 0, true) })}` } public updateUpgradeHTML(): void { diff --git a/translations/en.json b/translations/en.json index f8d51beb2..01bcc7f54 100644 --- a/translations/en.json +++ b/translations/en.json @@ -1629,7 +1629,8 @@ }, "toString": { "noMinimum": "No minimal Singularity to purchase required", - "costNextLevel": "Cost for next level" + "costNextLevel": "Cost for next level: {{n}} Golden Quarks.", + "spent": "Quarks spent: {{n}}" }, "data": { "goldenQuarks1": { @@ -2008,7 +2009,6 @@ "effect": "Blueberry Seconds Generation +{{n}}%(!)" } }, - "goldenQuarkLabel": "Golden Quarks", "goldenQuarkAmount": "You have {{goldenQuarks}} Golden Quarks!", "penalties": { "globalSpeed": "<> is divided by <>.", @@ -2662,7 +2662,6 @@ "constantHover": "Hover over an icon for a description of the upgrade. Click to buy it!" }, "octeract": { - "octeracts": "Octeracts", "buyLevel": { "buyPrompt": "How many Octeracts would you like to spend? You have {{n}} OCT. Type -1 to use max!", "cancelPurchase": "Purchase cancelled!", @@ -2671,7 +2670,8 @@ "multiBuy": "Purchased {{n}} levels, thanks to Multi Buy!" }, "toString": { - "costNextLevel": "Cost for next level", + "costNextLevel": "Cost for next level: {{n}} Octeracts", + "spent": "Spent Octeracts: {{n}}", "becomeAffordable": "(Affordable in {{n}})" }, "data": { diff --git a/translations/source.json b/translations/source.json index 3a7ffb4e2..d97860f81 100644 --- a/translations/source.json +++ b/translations/source.json @@ -1629,7 +1629,8 @@ }, "toString": { "noMinimum": "No minimal Singularity to purchase required", - "costNextLevel": "Cost for next level" + "costNextLevel": "Cost for next level: {{n}} Golden Quarks.", + "spent": "Quarks spent: {{n}}" }, "data": { "goldenQuarks1": { @@ -2661,7 +2662,6 @@ "constantHover": "Hover over an icon for a description of the upgrade. Click to buy it!" }, "octeract": { - "octeracts": "Octeracts", "buyLevel": { "buyPrompt": "How many Octeracts would you like to spend? You have {{n}} OCT. Type -1 to use max!", "cancelPurchase": "Purchase cancelled!", @@ -2670,7 +2670,8 @@ "multiBuy": "Purchased {{n}} levels, thanks to Multi Buy!" }, "toString": { - "costNextLevel": "Cost for next level", + "costNextLevel": "Cost for next level: {{n}} Octeracts", + "spent": "Spent Octeracts: {{n}}", "becomeAffordable": "(Affordable in {{n}})" }, "data": {