Added splash messages literals for all languages (#600)

* Added splash messages literals for all languages

* Removed debug code + fixed function casing

---------

Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
This commit is contained in:
Alessandro Bruzzese 2024-05-16 10:37:40 +02:00 committed by GitHub
parent 975d1ed562
commit 8dce9fa2f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 244 additions and 40 deletions

View File

@ -1,37 +1,45 @@
export const battleCountSplashMessage = '{COUNT} Battles Won!'; import i18next from "../plugins/i18n";
export const splashMessages = Array(10).fill(battleCountSplashMessage); export function getBattleCountSplashMessage(): string {
splashMessages.push(...[ return `{COUNT} ${i18next.t('splashMessages:battlesWon')}`;
'Join the Discord!', }
'Infinite Levels!',
'Everything Stacks!', export function getSplashMessages(): string[] {
'Optional Save Scumming!', const splashMessages = Array(10).fill(getBattleCountSplashMessage());
'35 Biomes!', splashMessages.push(...[
'Open Source!', i18next.t('splashMessages:joinTheDiscord'),
'Play with 5x Speed!', i18next.t('splashMessages:infiniteLevel'),
'Live Bug Testing!', i18next.t('splashMessages:everythingStacks'),
'Heavy RoR2 Influence!', i18next.t('splashMessages:optionalSaveScumming'),
'Pokémon Risk and Pokémon Rain!', i18next.t('splashMessages:biomes'),
'Now with 33% More Salt!', i18next.t('splashMessages:openSource'),
'Infinite Fusion at Home!', i18next.t('splashMessages:playWith5xSpeed'),
'Broken Egg Moves!', i18next.t('splashMessages:liveBugTesting'),
'Magnificent!', i18next.t('splashMessages:heavyRoR2Influence'),
'Mubstitute!', i18next.t('splashMessages:pokemonRiskAndPokemonRain'),
'That\'s Crazy!', i18next.t('splashMessages:nowWithMoreSalt'),
'Orance Juice!', i18next.t('splashMessages:infiniteFusionAtHome'),
'Questionable Balancing!', i18next.t('splashMessages:brokenEggMoves'),
'Cool Shaders!', i18next.t('splashMessages:magnificent'),
'AI-Free!', i18next.t('splashMessages:mubstitute'),
'Sudden Difficulty Spikes!', i18next.t('splashMessages:thatsCrazy'),
'Based on an Unfinished Flash Game!', i18next.t('splashMessages:oranceJuice'),
'More Addictive than Intended!', i18next.t('splashMessages:questionableBalancing'),
'Mostly Consistent Seeds!', i18next.t('splashMessages:coolShaders'),
'Achievement Points Don\'t Do Anything!', i18next.t('splashMessages:aiFree'),
'You Do Not Start at Level 2000!', i18next.t('splashMessages:suddenDifficultySpikes'),
'Don\'t Talk About the Manaphy Egg Incident!', i18next.t('splashMessages:basedOnAnUnfinishedFlashGame'),
'Also Try Pokéngine!', i18next.t('splashMessages:moreAddictiveThanIntended'),
'Also Try Emerald Rogue!', i18next.t('splashMessages:mostlyConsistentSeeds'),
'Also Try Radical Red!', i18next.t('splashMessages:achievementPointsDontDoAnything'),
'Eevee Expo!', i18next.t('splashMessages:youDoNotStartAtLevel'),
'YNOproject!' i18next.t('splashMessages:dontTalkAboutTheManaphyEggIncident'),
]); i18next.t('splashMessages:alsoTryPokengine'),
i18next.t('splashMessages:alsoTryEmeraldRogue'),
i18next.t('splashMessages:alsoTryRadicalRed'),
i18next.t('splashMessages:eeveeExpo'),
i18next.t('splashMessages:ynoproject'),
]);
return splashMessages
}

View File

@ -15,6 +15,7 @@ import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat"; import { pokemonStat } from "./pokemon-stat";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { splashMessages } from "./splash-messages"
export const deConfig = { export const deConfig = {
@ -32,6 +33,7 @@ export const deConfig = {
pokemon: pokemon, pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial, tutorial: tutorial,
splashMessages: splashMessages,
nature: nature, nature: nature,
growth: growth, growth: growth,
modifierType: modifierType, modifierType: modifierType,

View File

@ -0,0 +1,37 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const splashMessages: SimpleTranslationEntries = {
"battlesWon": "Battles Won!",
"joinTheDiscord": "Join the Discord!",
"infiniteLevels": "Infinite Levels!",
"everythingStacks": "Everything Stacks!",
"optionalSaveScumming": "Optional Save Scumming!",
"biomes": "35 Biomes!",
"openSource": "Open Source!",
"playWithSpeed": "Play with 5x Speed!",
"liveBugTesting": "Live Bug Testing!",
"heavyInfluence": "Heavy RoR2 Influence!",
"pokemonRiskAndPokemonRain": "Pokémon Risk and Pokémon Rain!",
"nowWithMoreSalt": "Now with 33% More Salt!",
"infiniteFusionAtHome": "Infinite Fusion at Home!",
"brokenEggMoves": "Broken Egg Moves!",
"magnificent": "Magnificent!",
"mubstitute": "Mubstitute!",
"thatsCrazy": "That\'s Crazy!",
"oranceJuice": "Orance Juice!",
"questionableBalancing": "Questionable Balancing!",
"coolShaders": "Cool Shaders!",
"aiFree": "AI-Free!",
"suddenDifficultySpikes": "Sudden Difficulty Spikes!",
"basedOnAnUnfinishedFlashGame": "Based on an Unfinished Flash Game!",
"moreAddictiveThanIntended": "More Addictive than Intended!",
"mostlyConsistentSeeds": "Mostly Consistent Seeds!",
"achievementPointsDontDoAnything": "Achievement Points Don\'t Do Anything!",
"youDoNotStartAtLevel": "You Do Not Start at Level 2000!",
"dontTalkAboutTheManaphyEggIncident": "Don\'t Talk About the Manaphy Egg Incident!",
"alsoTryPokengine": "Also Try Pokéngine!",
"alsoTryEmeraldRogue": "Also Try Emerald Rogue!",
"alsoTryRadicalRed": "Also Try Radical Red!",
"eeveeExpo": "Eevee Expo!",
"ynoproject": "YNOproject!",
} as const;

View File

@ -15,6 +15,7 @@ import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat"; import { pokemonStat } from "./pokemon-stat";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { splashMessages } from "./splash-messages"
import { weather } from "./weather"; import { weather } from "./weather";
@ -33,6 +34,7 @@ export const enConfig = {
pokemon: pokemon, pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial, tutorial: tutorial,
splashMessages: splashMessages,
nature: nature, nature: nature,
growth: growth, growth: growth,
weather: weather, weather: weather,

View File

@ -0,0 +1,37 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const splashMessages: SimpleTranslationEntries = {
"battlesWon": "Battles Won!",
"joinTheDiscord": "Join the Discord!",
"infiniteLevels": "Infinite Levels!",
"everythingStacks": "Everything Stacks!",
"optionalSaveScumming": "Optional Save Scumming!",
"biomes": "35 Biomes!",
"openSource": "Open Source!",
"playWithSpeed": "Play with 5x Speed!",
"liveBugTesting": "Live Bug Testing!",
"heavyInfluence": "Heavy RoR2 Influence!",
"pokemonRiskAndPokemonRain": "Pokémon Risk and Pokémon Rain!",
"nowWithMoreSalt": "Now with 33% More Salt!",
"infiniteFusionAtHome": "Infinite Fusion at Home!",
"brokenEggMoves": "Broken Egg Moves!",
"magnificent": "Magnificent!",
"mubstitute": "Mubstitute!",
"thatsCrazy": "That\'s Crazy!",
"oranceJuice": "Orance Juice!",
"questionableBalancing": "Questionable Balancing!",
"coolShaders": "Cool Shaders!",
"aiFree": "AI-Free!",
"suddenDifficultySpikes": "Sudden Difficulty Spikes!",
"basedOnAnUnfinishedFlashGame": "Based on an Unfinished Flash Game!",
"moreAddictiveThanIntended": "More Addictive than Intended!",
"mostlyConsistentSeeds": "Mostly Consistent Seeds!",
"achievementPointsDontDoAnything": "Achievement Points Don\'t Do Anything!",
"youDoNotStartAtLevel": "You Do Not Start at Level 2000!",
"dontTalkAboutTheManaphyEggIncident": "Don\'t Talk About the Manaphy Egg Incident!",
"alsoTryPokengine": "Also Try Pokéngine!",
"alsoTryEmeraldRogue": "Also Try Emerald Rogue!",
"alsoTryRadicalRed": "Also Try Radical Red!",
"eeveeExpo": "Eevee Expo!",
"ynoproject": "YNOproject!",
} as const;

View File

@ -15,6 +15,7 @@ import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat"; import { pokemonStat } from "./pokemon-stat";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { splashMessages } from "./splash-messages"
import { weather } from "./weather"; import { weather } from "./weather";
@ -33,6 +34,7 @@ export const esConfig = {
pokemon: pokemon, pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial, tutorial: tutorial,
splashMessages: splashMessages,
nature: nature, nature: nature,
growth: growth, growth: growth,
weather: weather, weather: weather,

View File

@ -0,0 +1,37 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const splashMessages: SimpleTranslationEntries = {
"battlesWon": "Battles Won!",
"joinTheDiscord": "Join the Discord!",
"infiniteLevels": "Infinite Levels!",
"everythingStacks": "Everything Stacks!",
"optionalSaveScumming": "Optional Save Scumming!",
"biomes": "35 Biomes!",
"openSource": "Open Source!",
"playWithSpeed": "Play with 5x Speed!",
"liveBugTesting": "Live Bug Testing!",
"heavyInfluence": "Heavy RoR2 Influence!",
"pokemonRiskAndPokemonRain": "Pokémon Risk and Pokémon Rain!",
"nowWithMoreSalt": "Now with 33% More Salt!",
"infiniteFusionAtHome": "Infinite Fusion at Home!",
"brokenEggMoves": "Broken Egg Moves!",
"magnificent": "Magnificent!",
"mubstitute": "Mubstitute!",
"thatsCrazy": "That\'s Crazy!",
"oranceJuice": "Orance Juice!",
"questionableBalancing": "Questionable Balancing!",
"coolShaders": "Cool Shaders!",
"aiFree": "AI-Free!",
"suddenDifficultySpikes": "Sudden Difficulty Spikes!",
"basedOnAnUnfinishedFlashGame": "Based on an Unfinished Flash Game!",
"moreAddictiveThanIntended": "More Addictive than Intended!",
"mostlyConsistentSeeds": "Mostly Consistent Seeds!",
"achievementPointsDontDoAnything": "Achievement Points Don\'t Do Anything!",
"youDoNotStartAtLevel": "You Do Not Start at Level 2000!",
"dontTalkAboutTheManaphyEggIncident": "Don\'t Talk About the Manaphy Egg Incident!",
"alsoTryPokengine": "Also Try Pokéngine!",
"alsoTryEmeraldRogue": "Also Try Emerald Rogue!",
"alsoTryRadicalRed": "Also Try Radical Red!",
"eeveeExpo": "Eevee Expo!",
"ynoproject": "YNOproject!",
} as const;

View File

@ -15,6 +15,7 @@ import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat"; import { pokemonStat } from "./pokemon-stat";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { splashMessages } from "./splash-messages"
import { weather } from "./weather"; import { weather } from "./weather";
@ -33,6 +34,7 @@ export const frConfig = {
pokemon: pokemon, pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial, tutorial: tutorial,
splashMessages: splashMessages,
nature: nature, nature: nature,
growth: growth, growth: growth,
weather: weather, weather: weather,

View File

@ -0,0 +1,37 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const splashMessages: SimpleTranslationEntries = {
"battlesWon": "Battles Won!",
"joinTheDiscord": "Join the Discord!",
"infiniteLevels": "Infinite Levels!",
"everythingStacks": "Everything Stacks!",
"optionalSaveScumming": "Optional Save Scumming!",
"biomes": "35 Biomes!",
"openSource": "Open Source!",
"playWithSpeed": "Play with 5x Speed!",
"liveBugTesting": "Live Bug Testing!",
"heavyInfluence": "Heavy RoR2 Influence!",
"pokemonRiskAndPokemonRain": "Pokémon Risk and Pokémon Rain!",
"nowWithMoreSalt": "Now with 33% More Salt!",
"infiniteFusionAtHome": "Infinite Fusion at Home!",
"brokenEggMoves": "Broken Egg Moves!",
"magnificent": "Magnificent!",
"mubstitute": "Mubstitute!",
"thatsCrazy": "That\'s Crazy!",
"oranceJuice": "Orance Juice!",
"questionableBalancing": "Questionable Balancing!",
"coolShaders": "Cool Shaders!",
"aiFree": "AI-Free!",
"suddenDifficultySpikes": "Sudden Difficulty Spikes!",
"basedOnAnUnfinishedFlashGame": "Based on an Unfinished Flash Game!",
"moreAddictiveThanIntended": "More Addictive than Intended!",
"mostlyConsistentSeeds": "Mostly Consistent Seeds!",
"achievementPointsDontDoAnything": "Achievement Points Don\'t Do Anything!",
"youDoNotStartAtLevel": "You Do Not Start at Level 2000!",
"dontTalkAboutTheManaphyEggIncident": "Don\'t Talk About the Manaphy Egg Incident!",
"alsoTryPokengine": "Also Try Pokéngine!",
"alsoTryEmeraldRogue": "Also Try Emerald Rogue!",
"alsoTryRadicalRed": "Also Try Radical Red!",
"eeveeExpo": "Eevee Expo!",
"ynoproject": "YNOproject!",
} as const;

View File

@ -15,6 +15,7 @@ import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat"; import { pokemonStat } from "./pokemon-stat";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { splashMessages } from "./splash-messages"
import { weather } from "./weather"; import { weather } from "./weather";
@ -33,6 +34,7 @@ export const itConfig = {
pokemon: pokemon, pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial, tutorial: tutorial,
splashMessages: splashMessages,
nature: nature, nature: nature,
growth: growth, growth: growth,
weather: weather, weather: weather,

View File

@ -0,0 +1,37 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const splashMessages: SimpleTranslationEntries = {
"battlesWon": "Battaglie Vinte!",
"joinTheDiscord": "Entra nel Discord!",
"infiniteLevels": "Livelli Infiniti!",
"everythingStacks": "Tutto si impila!",
"optionalSaveScumming": "Salvataggio Facoltativo!",
"biomes": "35 Biomi!",
"openSource": "Open Source!",
"playWithSpeed": "Gioca con il 5x di Velocità!",
"liveBugTesting": "Test dei Bug in Tempo Reale!",
"heavyInfluence": "Influenzato da RoR2!",
"pokemonRiskAndPokemonRain": "Pokémon Risk e Pokémon Rain!",
"nowWithMoreSalt": "Adesso con il 33% di sale in più!",
"infiniteFusionAtHome": "Fusioni Infinite a Casa!",
"brokenEggMoves": "Mosse delle Uova Rotte!",
"magnificent": "Magnifico!",
"mubstitute": "Mubstitute!",
"thatsCrazy": "È Pazzesco!",
"oranceJuice": "Succo d\'Arancia!",
"questionableBalancing": "Bilanciamento Discutibile!",
"coolShaders": "Shader fantastici!",
"aiFree": "Senza Intelligenza Artificiale!",
"suddenDifficultySpikes": "Picchi di Difficoltà Improvvisi!",
"basedOnAnUnfinishedFlashGame": "Basato su un Gioco Flash Incompiuto!",
"moreAddictiveThanIntended": "Crea Dipendeza più del Dovuto!",
"mostlyConsistentSeeds": "Seeds Consistenti!",
"achievementPointsDontDoAnything": "I Punti Obiettivo non Fanno Nulla!",
"youDoNotStartAtLevel": "Non Cominci dal Livello 2000!",
"dontTalkAboutTheManaphyEggIncident": "Non Parlare dell'Incidente dell'Uovo di Manaphy!",
"alsoTryPokengine": "Prova anche Pokéngine!",
"alsoTryEmeraldRogue": "Prova anche Emerald Rogue!",
"alsoTryRadicalRed": "Prova anche Radical Red!",
"eeveeExpo": "Eevee Expo!",
"ynoproject": "YNOproject!",
} as const;

View File

@ -124,6 +124,7 @@ declare module 'i18next' {
fightUiHandler: SimpleTranslationEntries; fightUiHandler: SimpleTranslationEntries;
tutorial: SimpleTranslationEntries; tutorial: SimpleTranslationEntries;
starterSelectUiHandler: SimpleTranslationEntries; starterSelectUiHandler: SimpleTranslationEntries;
splashMessages: SimpleTranslationEntries;
nature: SimpleTranslationEntries; nature: SimpleTranslationEntries;
growth: SimpleTranslationEntries; growth: SimpleTranslationEntries;
egg: SimpleTranslationEntries; egg: SimpleTranslationEntries;

View File

@ -4,7 +4,7 @@ import OptionSelectUiHandler from "./option-select-ui-handler";
import { Mode } from "./ui"; import { Mode } from "./ui";
import * as Utils from "../utils"; import * as Utils from "../utils";
import { TextStyle, addTextObject } from "./text"; import { TextStyle, addTextObject } from "./text";
import { battleCountSplashMessage, splashMessages } from "../data/splash-messages"; import { getBattleCountSplashMessage, getSplashMessages } from "../data/splash-messages";
import i18next from "i18next"; import i18next from "i18next";
export default class TitleUiHandler extends OptionSelectUiHandler { export default class TitleUiHandler extends OptionSelectUiHandler {
@ -63,8 +63,8 @@ export default class TitleUiHandler extends OptionSelectUiHandler {
.then(request => request.json()) .then(request => request.json())
.then(stats => { .then(stats => {
this.playerCountLabel.setText(`${stats.playerCount} ${i18next.t("menu:playersOnline")}`); this.playerCountLabel.setText(`${stats.playerCount} ${i18next.t("menu:playersOnline")}`);
if (this.splashMessage === battleCountSplashMessage) if (this.splashMessage === getBattleCountSplashMessage())
this.splashMessageText.setText(battleCountSplashMessage.replace('{COUNT}', stats.battleCount.toLocaleString('en-US'))); this.splashMessageText.setText(getBattleCountSplashMessage().replace('{COUNT}', stats.battleCount.toLocaleString('en-US')));
}) })
.catch(err => { .catch(err => {
console.error("Failed to fetch title stats:\n", err); console.error("Failed to fetch title stats:\n", err);
@ -75,7 +75,7 @@ export default class TitleUiHandler extends OptionSelectUiHandler {
const ret = super.show(args); const ret = super.show(args);
if (ret) { if (ret) {
this.splashMessage = Utils.randItem(splashMessages); this.splashMessage = Utils.randItem(getSplashMessages());
this.splashMessageText.setText(this.splashMessage.replace('{COUNT}', '?')); this.splashMessageText.setText(this.splashMessage.replace('{COUNT}', '?'));
const ui = this.getUi(); const ui = this.getUi();