[Refactor] External locales (#4529)

* Removed local translation files

added translations submodule

[Enhancement] Add post-merge command to update submodules in lefthook configuration

[Enhancement] Add postinstall script to install lefthook after package installation

[Enhancement] Update postinstall script to run post-merge command after lefthook installation

* Add subproject commit for locales directory

* Remove translation team assignments from CODEOWNERS

* Add recursive submodule checkout to workflow files and update README for translations

* fix: run without locales present (#4539)

some code was hard-wired with  locales having to be present. This is no longer the case now

---------

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
This commit is contained in:
Frederico Santos 2024-10-01 23:41:09 +01:00 committed by GitHub
parent 95386861bb
commit 5e151f5604
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
972 changed files with 30 additions and 120388 deletions

38
.github/CODEOWNERS vendored
View File

@ -5,41 +5,3 @@
# github actions/templates etc. - Dev Leads # github actions/templates etc. - Dev Leads
/.github @pagefaultgames/dev-leads /.github @pagefaultgames/dev-leads
# --- Translations ---
# all translations - Translation Leads
/src/locales @pagefaultgames/translation-leads
# Catalan (Spain/Spanish)
/src/locales/ca_ES @pagefaultgames/catalan-translation-team
# German
/src/locales/de @pagefaultgames/german-translation-team
# English
/src/locales/en @pagefaultgames/english-translation-team
# Spanish
/src/locales/es @pagefaultgames/spanish-translation-team
# French
/src/locales/fr @pagefaultgames/french-translation-team
# Italian
/src/locales/it @pagefaultgames/italian-translation-team
# Japenese
/src/locales/ja @pagefaultgames/japanese-translation-team
# Korean
/src/locales/ko @pagefaultgames/korean-translation-team
# Brasilian (Brasil/Portuguese)
/src/locales/pt_BR @pagefaultgames/portuguese_br-translation-team
# Chinese (simplified)
/src/locales/zh_CN @pagefaultgames/chinese_simplified-translation-team
# Chinese (traditional)
/src/locales/zh_TW @pagefaultgames/chinese_traditional-translation-team

View File

@ -11,6 +11,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: "20" node-version: "20"

View File

@ -10,6 +10,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: "20" node-version: "20"

View File

@ -22,6 +22,8 @@ jobs:
steps: steps:
- name: Check out Git repository # Step to check out the repository - name: Check out Git repository # Step to check out the repository
uses: actions/checkout@v4 # Use the checkout action version 4 uses: actions/checkout@v4 # Use the checkout action version 4
with:
submodules: 'recursive'
- name: Set up Node.js # Step to set up Node.js environment - name: Set up Node.js # Step to set up Node.js environment
uses: actions/setup-node@v4 # Use the setup-node action version 4 uses: actions/setup-node@v4 # Use the setup-node action version 4

View File

@ -26,6 +26,7 @@ jobs:
- name: Checkout repository for Typedoc - name: Checkout repository for Typedoc
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
submodules: 'recursive'
path: pokerogue_docs path: pokerogue_docs
- name: Install OS package - name: Install OS package

View File

@ -20,6 +20,8 @@ jobs:
steps: steps:
- name: Check out Git repository - name: Check out Git repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:

View File

@ -22,6 +22,7 @@ jobs:
- name: Check out Git repository - name: Check out Git repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
submodules: 'recursive'
path: tests-action path: tests-action
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "public/locales"]
path = public/locales
url = https://github.com/pagefaultgames/pokerogue-locales

View File

@ -24,6 +24,9 @@ We're using ESLint as our common linter and formatter. It will run automatically
**How do I test a new _______?** **How do I test a new _______?**
- In the `src/overrides.ts` file there are overrides for most values you'll need to change for testing - In the `src/overrides.ts` file there are overrides for most values you'll need to change for testing
**How do I retrieve the translations?**
- The translations were moved to the [dedicated translation repository](https://github.com/pagefaultgames/pokerogue-locales) and are now applied as a submodule in this project.
- The command to retrieve the translations is `git submodule update --init --recursive`. If you still struggle to get it working, please reach out to #dev-corner channel in Discord.
## 🪧 To Do ## 🪧 To Do
Check out [Github Issues](https://github.com/pagefaultgames/pokerogue/issues) to see how can you help us! Check out [Github Issues](https://github.com/pagefaultgames/pokerogue/issues) to see how can you help us!

View File

@ -13,4 +13,9 @@ pre-push:
commands: commands:
eslint: eslint:
glob: "*.{js,ts,jsx,tsx}" glob: "*.{js,ts,jsx,tsx}"
run: npx eslint --fix {push_files} run: npx eslint --fix {push_files}
post-merge:
commands:
update-submodules:
run: git submodule update --init --recursive

View File

@ -19,7 +19,8 @@
"docs": "typedoc", "docs": "typedoc",
"depcruise": "depcruise src", "depcruise": "depcruise src",
"depcruise:graph": "depcruise src --output-type dot | node dependency-graph.js > dependency-graph.svg", "depcruise:graph": "depcruise src --output-type dot | node dependency-graph.js > dependency-graph.svg",
"create-test": "node ./create-test-boilerplate.js" "create-test": "node ./create-test-boilerplate.js",
"postinstall": "npx lefthook install && npx lefthook run post-merge"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.3.0", "@eslint/js": "^9.3.0",

1
public/locales Submodule

@ -0,0 +1 @@
Subproject commit 005989574fe5638897fa2933b6f57ae4b9c83635

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1,40 +0,0 @@
{
"activeBattleEffects": "Efectes d'Arena Activa",
"player": "Jugador",
"neutral": "Neutre",
"enemy": "Enemic",
"sunny": "Assolellat",
"rain": "Plujós",
"sandstorm": "Tempesta Sorra",
"hail": "Calamarsa",
"snow": "Neu",
"fog": "Boira",
"heavyRain": "Diluvi",
"harshSun": "Sol Abrasador",
"strongWinds": "Vents Forts",
"misty": "Camp de Boira",
"electric": "Camp Elèctric",
"grassy": "Camp d'Herba",
"psychic": "Camp Psíquic",
"mudSport": "Xipollejo Fang",
"waterSport": "Hidrorraig",
"spikes": "Pues",
"toxicSpikes": "Pues Tòxiques",
"mist": "Boirina",
"futureSight": "Premonició",
"doomDesire": "Desig Ocult",
"wish": "Desig",
"stealthRock": "Trampa Roques",
"stickyWeb": "Xarxa Viscosa",
"trickRoom": "Espai Rar",
"gravity": "Gravetat",
"reflect": "Reflex",
"lightScreen": "Pantalla de Llum",
"auroraVeil": "Vel Aurora",
"quickGuard": "Anticipi",
"wideGuard": "Vasta Guàrdia",
"matBlock": "Escut Tatami",
"craftyShield": "Truc Defensa",
"tailwind": "Vent Afí",
"happyHour": "Paga Extra"
}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1,38 +0,0 @@
{
"unknownLocation": "En algun lloc que no recordes",
"TOWN": "Poble",
"PLAINS": "Vall",
"GRASS": "Camp",
"TALL_GRASS": "Herba Alta",
"METROPOLIS": "Metròpoli",
"FOREST": "Bosc",
"SEA": "Mar",
"SWAMP": "Pantà",
"BEACH": "Platja",
"LAKE": "Llac",
"SEABED": "Fons Marí",
"MOUNTAIN": "Muntanya",
"BADLANDS": "Badlands",
"CAVE": "Cova",
"DESERT": "Desert",
"ICE_CAVE": "Cova Gelada",
"MEADOW": "Prat",
"POWER_PLANT": "Planta d'Energia",
"VOLCANO": "Volcà",
"GRAVEYARD": "Cementiri",
"DOJO": "Dojo",
"FACTORY": "Fàbrica",
"RUINS": "Ruïnes Antigues",
"WASTELAND": "Terra Erma",
"ABYSS": "Avenc",
"SPACE": "Espai",
"CONSTRUCTION_SITE": "Obra",
"JUNGLE": "Jungla",
"FAIRY_CAVE": "Cova de Fades",
"TEMPLE": "Temple",
"SLUM": "Suburbi",
"SNOWY_FOREST": "Bosc Nevat",
"ISLAND": "Illa",
"LABORATORY": "Laboratori",
"END": "???"
}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1,8 +0,0 @@
{
"start": "Començar",
"luckIndicator": "Sort:",
"shinyOnHover": "Variocolor",
"commonShiny": "Comú",
"rareShiny": "Rar",
"epicShiny": "Èpica"
}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1,55 +0,0 @@
{
"cancel": "Cancel-la",
"continue": "Continuar",
"dailyRun": "Repte Diari (Beta)",
"loadGame": "Carregar Partida",
"newGame": "Nova Partida",
"settings": "Opcions",
"selectGameMode": "Trieu un mode de joc",
"logInOrCreateAccount": "Inicieu sessió o creeu un compte per començar. No cal correu electrònic!",
"username": "Usuari",
"password": "Contrasenya",
"login": "Iniciar Sessió",
"orUse": "O Usa",
"register": "Registrar-se",
"emptyUsername": "L'usuari no pot estar buit",
"invalidLoginUsername": "L'usuari no és vàlid",
"invalidRegisterUsername": "L'usuari només pot contenir lletres, números i guions baixos",
"invalidLoginPassword": "La contrasenya no és vàlida",
"invalidRegisterPassword": "La Contrasenya ha de tenir 6 o més caràcters",
"usernameAlreadyUsed": "L'usuari ja està en ús",
"accountNonExistent": "L'usuari no existeix",
"unmatchingPassword": "La contrasenya no coincideix",
"passwordNotMatchingConfirmPassword": "La contrasenya ha de coincidir amb la contrasenya de confirmació",
"confirmPassword": "Confirmeu la Contrasenya",
"registrationAgeWarning": "En registrar-te, confirmes que tens 13 anys o més.",
"backToLogin": "Torna a Iniciar Sessió",
"failedToLoadSaveData": "No s'han pogut carregar les dades desades. Torneu a carregar la pàgina.\nSi això continua, comproveu #announcements a Discord.",
"sessionSuccess": "Sessió carregada amb èxit.",
"failedToLoadSession": "No s'han pogut carregar les dades de la sessió.\nÉs possible que estiguin malmeses.",
"boyOrGirl": "Ets Nen o Nena?",
"evolving": "Que?\n{{pokemonName}} està evolucionant!",
"stoppedEvolving": "Prou?\nL'evolució de {{pokemonName}} s'ha aturat!",
"pauseEvolutionsQuestion": "Vols aturar les evolucions de {{pokémon Name}}?\nSempre poden ser activades des de la pantalla del teu equip.",
"evolutionsPaused": "L'evolució s'ha posat en pausa per a ",
"evolutionDone": "Enhorabona!\n{{pokemonName}} ha evolucionat a {{evolvedPokemonName}}!",
"dailyRankings": "Rànquings Diaris",
"weeklyRankings": "Rànquings Setmanals",
"noRankings": "Sense Rànquings",
"positionIcon": "#",
"usernameScoreboard": "Usuari",
"score": "Puntuació",
"wave": "Onada",
"loading": "Carregant…",
"loadingAsset": "Carregant actius: {{assetName}}",
"playersOnline": "Jugadors en Línia",
"yes":"Sí",
"no":"No",
"disclaimer": "AVÍS",
"disclaimerDescription": "Aquest joc encara no s'ha completat; podríeu tenir problemes de joc (inclosa la possible pèrdua de dades desades),\n el joc pot canviar sense previ avís, i el joc es pot actualitzar o completar o no.",
"choosePokemon": "Elegir un Pokémon.",
"renamePokemon": "Rebatejar Pokémon",
"rename": "Rebatejar",
"nickname": "Sobrenom",
"errorServerDown": "Vaja! S'ha produït un problema en contactar amb el servidor.\n\nPots deixar aquesta pestanya oberta,\nel joc es tornarà a connectar automàticament."
}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1,27 +0,0 @@
{
"Hardy": "Forta",
"Lonely": "Esquerpa",
"Brave": "Audaç",
"Adamant": "Ferma",
"Naughty": "Múrria",
"Bold": "Agosarada",
"Docile": "Dòcil",
"Relaxed": "Relaxat",
"Impish": "Frenètic",
"Lax": "Despreocupat",
"Timid": "Poruc",
"Hasty": "Àvid",
"Serious": "Seriós",
"Jolly": "Jovial",
"Naive": "Ingenu",
"Modest": "Modesta",
"Mild": "Suau",
"Quiet": "Tranquil",
"Bashful": "Vergonyós",
"Rash": "Imprudent",
"Calm": "Serena",
"Gentle": "Amable",
"Sassy": "Descarat",
"Careful": "Cautelós",
"Quirky": "Estrany"
}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1,40 +0,0 @@
{
"Stat": {
"HP": "PS",
"HPshortened": "PS",
"ATK": "Atac",
"ATKshortened": "Ata",
"DEF": "Defensa",
"DEFshortened": "Def",
"SPATK": "At. Esp.",
"SPATKshortened": "AtEsp",
"SPDEF": "Def. Esp.",
"SPDEFshortened": "DefEsp",
"SPD": "Velocitat",
"SPDshortened": "Veloc.",
"ACC": "Precisió",
"EVA": "Evació"
},
"Type": {
"UNKNOWN": "???",
"NORMAL": "Normal",
"FIGHTING": "Lluita",
"FLYING": "Volador",
"POISON": "Verí",
"GROUND": "Terra",
"ROCK": "Roca",
"BUG": "Bestiola",
"GHOST": "Fantasma",
"STEEL": "Acer",
"FIRE": "Foc",
"WATER": "Aigua",
"GRASS": "Planta",
"ELECTRIC": "Elèctric",
"PSYCHIC": "Psíquic",
"ICE": "Gel",
"DRAGON": "Drac",
"DARK": "Sinistre",
"FAIRY": "Fada",
"STELLAR": "Astral"
}
}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1,64 +0,0 @@
{
"blockRecoilDamage": "{{pokemonName}} wurde durch {{abilityName}} vor Rückstoß geschützt!",
"badDreams": "{{pokemonName}} ist in einem Alptraum gefangen!",
"costar": "{{pokemonName}} kopiert die Statusveränderungen von {{allyName}}!",
"iceFaceAvoidedDamage": "{{pokemonNameWithAffix}} wehrt Schaden mit {{abilityName}} ab!",
"perishBody": "Durch {{abilityName}} von {{pokemonName}} werden beide Pokémon nach drei Runden K.O. gehen!",
"poisonHeal": "{{abilityName}} von {{pokemonName}} füllte einige KP auf!",
"trace": "{{pokemonName}} kopiert {{abilityName}} von {{targetName}}!",
"windPowerCharged": "Der Treffer durch {{moveName}} läd die Stärke von {{pokemonName}} auf!",
"quickDraw": "Durch Schnellschuss kann {{pokemonName}} schneller handeln als sonst!",
"blockItemTheft": "{{abilityName}} von {{pokemonNameWithAffix}} verhindert Item-Diebstahl!",
"typeImmunityHeal": "{{abilityName}} von {{pokemonNameWithAffix}} füllte einige KP auf!",
"nonSuperEffectiveImmunity": "{{pokemonNameWithAffix}} vermeidet Schaden mit {{abilityName}}!",
"disguiseAvoidedDamage": "Die Tarnung von {{pokemonNameWithAffix}} ist aufgeflogen!!",
"fullHpResistType": "Der Panzer von {{pokemonNameWithAffix}} funkelt und verzerrt die Wechselwirkungen zwischen den Typen!",
"moveImmunity": "Es hat keine Wirkung auf {{pokemonNameWithAffix}}...",
"reverseDrain": "{{pokemonNameWithAffix}} saugt Kloakensoße auf!",
"postDefendTypeChange": "{{abilityName}} von {{pokemonNameWithAffix}} macht es zu einem {{typeName}}-Typ!",
"postDefendContactDamage": "{{abilityName}} von {{pokemonNameWithAffix}} schadet seinem Angreifer!",
"postDefendAbilitySwap": "{{pokemonNameWithAffix}} tauscht Fähigkeiten mit dem Ziel!",
"postDefendAbilityGive": "{{pokemonNameWithAffix}} gibt seinem Ziel {{abilityName}}!",
"postDefendMoveDisable": "{{moveName}} von {{pokemonNameWithAffix}} wurde blockiert!",
"pokemonTypeChange": "{{pokemonNameWithAffix}} nimmt den Typ {{moveType}} an!",
"postAttackStealHeldItem": "{{pokemonNameWithAffix}} stiehlt {{stolenItemType}} von {{defenderName}}!",
"postDefendStealHeldItem": "{{pokemonNameWithAffix}} stiehlt {{stolenItemType}} von {{attackerName}}!",
"copyFaintedAllyAbility": "Die Fähigkeit {{abilityName}} von {{pokemonNameWithAffix}} wurde übernommen!",
"intimidateImmunity": "{{abilityName}} von {{pokemonNameWithAffix}} verhindert den Effekt von Bedroher!",
"postSummonAllyHeal": "{{pokemonNameWithAffix}} trinkt den von {{pokemonName}} zubereiteten Tee!",
"postSummonClearAllyStats": "Die Statusveränderungen von {{pokemonNameWithAffix}} wurden aufgehoben!",
"postSummonTransform": "{{pokemonNameWithAffix}} verwandelt sich in {{targetName}}!",
"protectStat": "{{abilityName}} von {{pokemonNameWithAffix}} verhindert das der Statuswert {{statName}} gesenkt wird!",
"statusEffectImmunityWithName": "{{abilityName}} von {{pokemonNameWithAffix}} verhindert {{statusEffectName}}!",
"statusEffectImmunity": "{{abilityName}} von {{pokemonNameWithAffix}} verhindert Statusprobleme",
"battlerTagImmunity": "{{abilityName}} von {{pokemonNameWithAffix}} verhindert {{battlerTagName}}!",
"forewarn": "Vorwarnung von {{pokemonNameWithAffix}}: Konzentraion auf {{moveName}}!",
"frisk": "{{pokemonNameWithAffix}} hat die Fähigkeit {{opponentAbilityName}} von {{opponentName}} erschnüffelt!",
"postWeatherLapseHeal": "{{abilityName}} von {{pokemonNameWithAffix}} füllte einige KP auf!",
"postWeatherLapseDamage": "{{pokemonNameWithAffix}} wurde durch {{abilityName}} verletzt!",
"postTurnLootCreateEatenBerry": "{{pokemonNameWithAffix}} hat {{berryName}} geerntet!",
"postTurnHeal": "{{abilityName}} von {{pokemonNameWithAffix}} füllte einige KP auf!",
"fetchBall": "{{pokemonNameWithAffix}} hat einen {{pokeballName}} gefunden!",
"healFromBerryUse": "{{abilityName}} von {{pokemonNameWithAffix}} füllte einige KP auf!",
"arenaTrap": "{{abilityName}} von {{pokemonNameWithAffix}} verhindert den Tausch!",
"postBattleLoot": "{{pokemonNameWithAffix}} hebt {{itemName}} auf!",
"postFaintContactDamage": "{{abilityName}} von {{pokemonNameWithAffix}} schadet seinem Angreifer!",
"postFaintHpDamage": "{{abilityName}} von {{pokemonNameWithAffix}} schadet seinem Angreifer!",
"postSummonPressure": "{{pokemonNameWithAffix}} setzt Gegner mit Erzwinger unter Druck!",
"weatherEffectDisappeared": "Jegliche wetterbedingten Effekte wurden aufgehoben!",
"postSummonMoldBreaker": "{{pokemonNameWithAffix}} gelingt es, gegnerische Fähigkeiten zu überbrücken!",
"postSummonAnticipation": "{{pokemonNameWithAffix}} erschaudert!",
"postSummonTurboblaze": "{{pokemonNameWithAffix}} strahlt eine lodernde Aura aus!",
"postSummonTeravolt": "{{pokemonNameWithAffix}} strahlt eine knisternde Aura aus!",
"postSummonDarkAura": "{{pokemonNameWithAffix}} strahlt eine dunkle Aura aus!",
"postSummonFairyAura": "{{pokemonNameWithAffix}} strahlt eine Feenaura aus!",
"postSummonAuraBreak": "{{pokemonNameWithAffix}} kehrt die Wirkung aller Aura-Fähigkeiten um!",
"postSummonNeutralizingGas": "Reaktionsgas von {{pokemonNameWithAffix}} hat sich in der Umgebung ausgebreitet!",
"postSummonAsOneGlastrier": "{{pokemonNameWithAffix}} verfügt über zwei Fähigkeiten!",
"postSummonAsOneSpectrier": "{{pokemonNameWithAffix}} verfügt über zwei Fähigkeiten!",
"postSummonVesselOfRuin": "Unheilsgefäß von {{pokemonNameWithAffix}} schwächt {{statName}} aller Pokémon im Umkreis!",
"postSummonSwordOfRuin": "Unheilsschwert von {{pokemonNameWithAffix}} schwächt {{statName}} aller Pokémon im Umkreis!",
"postSummonTabletsOfRuin": "Unheilstafeln von {{pokemonNameWithAffix}} schwächt {{statName}} aller Pokémon im Umkreis!",
"postSummonBeadsOfRuin": "Unheilsjuwelen von {{pokemonNameWithAffix}} schwächt {{statName}} aller Pokémon im Umkreis!",
"preventBerryUse": "{{pokemonNameWithAffix}} kriegt vor Anspannung keine Beeren mehr runter!"
}

Some files were not shown because too many files have changed in this diff Show More