mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
IT WORKS!
Missing only zh_TW to get a manual list, but it technically works for it
(cherry picked from commit dcf100a11a
)
This commit is contained in:
parent
6ea7bc017b
commit
f885a54be4
@ -51,14 +51,19 @@ export function getPokemonSpeciesForm(species: Species, formIndex: integer): Pok
|
||||
}
|
||||
|
||||
export function getFusedSpeciesName(speciesA: PokemonSpecies, speciesB: PokemonSpecies): string {
|
||||
const prefix = i18next.t(`fusionAffixes:${Species[speciesA.speciesId].toLowerCase()}.fusionPrefix`);
|
||||
const suffix = i18next.t(`fusionAffixes:${Species[speciesB.speciesId].toLowerCase()}.fusionSuffix`);
|
||||
let firstKey = "fusionPrefix";
|
||||
let secondKey = "fusionSuffix";
|
||||
if (i18next.t("fusionAffixes:shouldReverse") === "true") {
|
||||
firstKey = "fusionSuffix";
|
||||
secondKey = "fusionPrefix";
|
||||
}
|
||||
|
||||
const prefix = i18next.t(`fusionAffixes:${Species[speciesA.speciesId].toLowerCase()}.${firstKey}`);
|
||||
const suffix = i18next.t(`fusionAffixes:${Species[speciesB.speciesId].toLowerCase()}.${secondKey}`);
|
||||
|
||||
return `${prefix}${suffix}`;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export type PokemonSpeciesFilter = (species: PokemonSpecies) => boolean;
|
||||
|
||||
export abstract class PokemonSpeciesForm {
|
||||
|
@ -10,13 +10,14 @@ export interface SimpleTranslationEntries {
|
||||
}
|
||||
|
||||
export interface FusionTranslationEntries {
|
||||
[key: string]: FusionTranslationEntry,
|
||||
shouldReverse: string,
|
||||
[key: string]: FusionTranslationEntry | string,
|
||||
}
|
||||
|
||||
export interface FusionTranslationEntry {
|
||||
fusionPrefix: string,
|
||||
fusionSuffix: string,
|
||||
}
|
||||
}
|
||||
|
||||
export interface MoveTranslationEntry {
|
||||
name: string,
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { FusionTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const fusionAffixes: FusionTranslationEntries = {
|
||||
shouldReverse: "false",
|
||||
bulbasaur: {
|
||||
fusionPrefix: "Bisas",
|
||||
fusionSuffix: "asam",
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { FusionTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const fusionAffixes: FusionTranslationEntries = {
|
||||
shouldReverse: "false",
|
||||
bulbasaur: {
|
||||
fusionPrefix: "Bul",
|
||||
fusionSuffix: "asaur",
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { FusionTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const fusionAffixes: FusionTranslationEntries = {
|
||||
shouldReverse: "false",
|
||||
bulbasaur: {
|
||||
fusionPrefix: "Bul",
|
||||
fusionSuffix: "asaur",
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { FusionTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const fusionAffixes: FusionTranslationEntries = {
|
||||
shouldReverse: "false",
|
||||
bulbasaur: {
|
||||
fusionPrefix: "Bul",
|
||||
fusionSuffix: "ulbizarre",
|
||||
|
@ -2,7 +2,8 @@
|
||||
# Run it from the folder in which the pokemon.ts file is located, ex. "src\locales\de\"
|
||||
# If the language doesn't use roman characters but uses an alphabet, it's possible to include the vowel/consonant characters to the script and use it's functionalities
|
||||
# For ideographic languages, a different approach is needed. For now, the "universal-fusion-affixes-generator" is how I made it work (found at the bottom)
|
||||
# The zh affixes have all been manually fixed so replace it with care. In case a new zh file is needed, prefixes and suffixes also need to be swapped due to differences in syntax. For that, use the very last script
|
||||
# The zh affixes have all been manually fixed so replace it with care.
|
||||
# The very last script is meant to swap prefixes with suffixes in the language in case it's needed (was requested due to misunderstanding, but it exists, so...)
|
||||
|
||||
import re
|
||||
import unicodedata
|
||||
@ -100,6 +101,7 @@ def combine_scripts(file_path):
|
||||
|
||||
output = "import { FusionTranslationEntries } from \"#app/interfaces/locales\";\n\n"
|
||||
output += "export const fusionAffixes: FusionTranslationEntries = {\n"
|
||||
output += " shouldReverse: \"true\",\n"
|
||||
|
||||
for word, prefix, suffix in zip(pokemon_dict.keys(), prefixes, suffixes):
|
||||
output += f" {word}: {{\n"
|
||||
@ -210,6 +212,7 @@ file_path = r"pokemon.ts"
|
||||
combine_scripts(file_path)"""
|
||||
|
||||
#change the order of affixes and suffixes (requested for zh translations)
|
||||
# TURNED OUT TO BE UNNECESSARY, BUT IT'S HERE IF ANYONE NEEDS IT...
|
||||
"""import re
|
||||
|
||||
def swap_fusion_entries(file_path):
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { FusionTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const fusionAffixes: FusionTranslationEntries = {
|
||||
shouldReverse: "false",
|
||||
bulbasaur: {
|
||||
fusionPrefix: "Bul",
|
||||
fusionSuffix: "asaur",
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { FusionTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const fusionAffixes: FusionTranslationEntries = {
|
||||
shouldReverse: "false",
|
||||
bulbasaur: {
|
||||
fusionPrefix: "이상해씨",
|
||||
fusionSuffix: "씨",
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { FusionTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const fusionAffixes: FusionTranslationEntries = {
|
||||
shouldReverse: "false",
|
||||
bulbasaur: {
|
||||
fusionPrefix: "Bul",
|
||||
fusionSuffix: "asaur",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,7 @@
|
||||
import { FusionTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const fusionAffixes: FusionTranslationEntries = {
|
||||
shouldReverse: "true",
|
||||
bulbasaur: {
|
||||
fusionPrefix: "妙蛙種",
|
||||
fusionSuffix: "蛙種子",
|
||||
|
Loading…
Reference in New Issue
Block a user