Fix Trainer Localization Typos (#1010)

Took a look at some of the entries for trainers and adjusted accordingly. it looks like all of these trainer types were grabbed from an online source as a sort of future-proofing which is good, but resulted in some errors. Some of which have already been fixed, and some which are included here.

Also prevents an issue if there is a missing image and displays a warning in the console instead of a crash.
This commit is contained in:
Benjamin Odom 2024-05-17 00:01:35 -05:00 committed by GitHub
parent f2dff2cd25
commit 0cd305d78a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 80 additions and 39 deletions

View File

@ -378,16 +378,29 @@ export default class Trainer extends Phaser.GameObjects.Container {
};
const sprites = this.getSprites();
const tintSprites = this.getTintSprites();
sprites[0].play(trainerAnimConfig);
tintSprites[0].play(trainerAnimConfig);
// Don't try to play an animation when there isn't one
if (sprites.length > 1) {
sprites[0].play(trainerAnimConfig);
tintSprites[0].play(trainerAnimConfig);
}
else
console.warn(`No animation found for '${this.getKey()}'. Is this intentional?`);
if (this.variant === TrainerVariant.DOUBLE && !this.config.doubleOnly) {
const partnerTrainerAnimConfig = {
key: this.getKey(true),
repeat: 0,
startFrame: 0
};
sprites[1].play(partnerTrainerAnimConfig);
tintSprites[1].play(partnerTrainerAnimConfig);
// Don't try to play an animation when there isn't one
if (sprites.length > 1) {
sprites[1].play(partnerTrainerAnimConfig);
tintSprites[1].play(partnerTrainerAnimConfig);
}
else
console.warn(`No animation found for '${this.getKey()}'. Is this intentional?`);
}
}

View File

@ -44,8 +44,8 @@ export const trainerClasses: SimpleTranslationEntries = {
"depot_agent": "Bahnangestellter",
"doctor": "Arzt",
"doctor_female": "Ärztin",
"fishermen": "Angler",
"fishermen_female": "Angler", // Seems to be the same in german but exists in other languages like italian
"fisherman": "Angler",
"fisherman_female": "Angler", // Seems to be the same in german but exists in other languages like italian
"gentleman": "Gentleman",
"guitarist": "Gitarrist",
"guitarist_female": "Gitarristin",
@ -61,15 +61,15 @@ export const trainerClasses: SimpleTranslationEntries = {
"maid": "Zofe",
"madame": "Madam",
"medical_team": "Mediziner",
"musican": "Musiker",
"musician": "Musiker",
"hex_maniac": "Hexe",
"nurse": "Pflegerin",
"nursery_aide": "Erzieherin",
"officer": "Polizist",
"parasol_lady": "Schirmdame",
"pilot": "Pilot",
"poké_fan": "Pokéfan",
"poké_fan_family": "Pokéfan-Pärchen",
"pokefan": "Pokéfan",
"pokefan_family": "Pokéfan-Pärchen",
"preschooler": "Vorschüler",
"preschooler_female": "Vorschülerin",
"preschoolers": "Vorschüler",
@ -80,8 +80,12 @@ export const trainerClasses: SimpleTranslationEntries = {
"pokémon_rangers": "Pokémon-Ranger",
"ranger": "Ranger",
"restaurant_staff": "Restaurant Angestellte",
"rich": "Rich",
"rich_female": "Rich",
"rich_boy": "Schnösel",
"rich_couple": "Reiches Paar",
"rich_kid": "Rich Kid",
"rich_kid_female": "Rich Kid",
"rich_kids": "Schnösel",
"roughneck": "Raufbold",
"scientist": "Forscher",

View File

@ -44,8 +44,8 @@ export const trainerClasses: SimpleTranslationEntries = {
"depot_agent": "Depot Agent",
"doctor": "Doctor",
"doctor_female": "Doctor",
"fishermen": "Fishermen",
"fishermen_female": "Fishermen",
"fisherman": "Fisherman",
"fisherman_female": "Fisherman",
"gentleman": "Gentleman",
"guitarist": "Guitarist",
"guitarist_female": "Guitarist",
@ -61,15 +61,15 @@ export const trainerClasses: SimpleTranslationEntries = {
"maid": "Maid",
"madame": "Madame",
"medical_team": "Medical Team",
"musican": "Musician",
"musician": "Musician",
"hex_maniac": "Hex Maniac",
"nurse": "Nurse",
"nursery_aide": "Nursery Aide",
"officer": "Officer",
"parasol_lady": "Parasol Lady",
"pilot": "Pilot",
"poké_fan": "Poké Fan",
"poké_fan_family": "Poké Fan Family",
"pokefan": "Poké Fan",
"pokefan_family": "Poké Fan Family",
"preschooler": "Preschooler",
"preschooler_female": "Preschooler",
"preschoolers": "Preschoolers",
@ -80,8 +80,12 @@ export const trainerClasses: SimpleTranslationEntries = {
"pokémon_rangers": "Pokémon Ranger",
"ranger": "Ranger",
"restaurant_staff": "Restaurant Staff",
"rich": "Rich",
"rich_female": "Rich",
"rich_boy": "Rich Boy",
"rich_couple": "Rich Couple",
"rich_kid": "Rich Kid",
"rich_kid_female": "Rich Kid",
"rich_kids": "Rich Kids",
"roughneck": "Roughneck",
"scientist": "Scientist",

View File

@ -44,8 +44,8 @@ export const trainerClasses: SimpleTranslationEntries = {
"depot_agent": "Depot Agent",
"doctor": "Doctor",
"doctor_female": "Doctor",
"fishermen": "Fishermen",
"fishermen_female": "Fishermen",
"fisherman": "Fisherman",
"fisherman_female": "Fisherman",
"gentleman": "Gentleman",
"guitarist": "Guitarist",
"guitarist_female": "Guitarist",
@ -61,15 +61,15 @@ export const trainerClasses: SimpleTranslationEntries = {
"maid": "Maid",
"madame": "Madame",
"medical_team": "Medical Team",
"musican": "Musician",
"musician": "Musician",
"hex_maniac": "Hex Maniac",
"nurse": "Nurse",
"nursery_aide": "Nursery Aide",
"officer": "Officer",
"parasol_lady": "Parasol Lady",
"pilot": "Pilot",
"poké_fan": "Poké Fan",
"poké_fan_family": "Poké Fan Family",
"pokefan": "Poké Fan",
"pokefan_family": "Poké Fan Family",
"preschooler": "Preschooler",
"preschooler_female": "Preschooler",
"preschoolers": "Preschoolers",
@ -80,8 +80,12 @@ export const trainerClasses: SimpleTranslationEntries = {
"pokémon_rangers": "Pokémon Ranger",
"ranger": "Ranger",
"restaurant_staff": "Restaurant Staff",
"rich": "Rich",
"rich_female": "Rich",
"rich_boy": "Rich Boy",
"rich_couple": "Rich Couple",
"rich_kid": "Rich Kid",
"rich_kid_female": "Rich Kid",
"rich_kids": "Rich Kids",
"roughneck": "Roughneck",
"scientist": "Scientist",

View File

@ -44,8 +44,8 @@ export const trainerClasses: SimpleTranslationEntries = {
"depot_agent": "Cheminot",
"doctor": "Docteur",
"doctor_female": "Docteure",
"fishermen": "Pêcheur",
"fishermen_female": "Pêcheuse",
"fisherman": "Pêcheur",
"fisherman_female": "Pêcheuse",
"gentleman": "Gentleman",
"guitarist": "Guitariste",
"guitarist_female": "Guitariste",
@ -60,16 +60,16 @@ export const trainerClasses: SimpleTranslationEntries = {
"linebacker": "Quaterback",
"maid": "Gouvernante",
"madame": "Mondaine",
"musican": "Musicien",
"medical_team": "Médecins",
"musician": "Musicien",
"hex_maniac": "Mystimaniac",
"nurse": "Infirmière",
"nursery_aide": "Institutrice",
"officer": "Policier",
"parasol_lady": "Sœur Parasol",
"pilot": "Pilote",
"poké_fan": "Poké Fan",
"poké_fan_family": "Couple de Pokéfans",
"pokefan": "Poké Fan",
"pokefan_family": "Couple de Pokéfans",
"preschooler": "Petit",
"preschooler_female": "Petite",
"preschoolers": "Petits",
@ -80,8 +80,12 @@ export const trainerClasses: SimpleTranslationEntries = {
"pokémon_rangers": "Pokémon Rangers",
"ranger": "Ranger",
"restaurant_staff": "Serveurs",
"rich": "Rich",
"rich_female": "Rich",
"rich_boy": "Richard",
"rich_couple": "Couple de Bourgeois",
"rich_kid": "Rich Kid",
"rich_kid_female": "Rich Kid",
"rich_kids": "Richards",
"roughneck": "Loubard",
"scientist": "Scientifique",

View File

@ -44,8 +44,8 @@ export const trainerClasses: SimpleTranslationEntries = {
"depot_agent": "Depot Agent",
"doctor": "Doctor",
"doctor_female": "Doctor",
"fishermen": "Fishermen",
"fishermen_female": "Fishermen",
"fisherman": "Fisherman",
"fisherman_female": "Fisherman",
"gentleman": "Gentleman",
"guitarist": "Guitarist",
"guitarist_female": "Guitarist",
@ -61,15 +61,15 @@ export const trainerClasses: SimpleTranslationEntries = {
"maid": "Maid",
"madame": "Madame",
"medical_team": "Medical Team",
"musican": "Musician",
"musician": "Musician",
"hex_maniac": "Hex Maniac",
"nurse": "Nurse",
"nursery_aide": "Nursery Aide",
"officer": "Officer",
"parasol_lady": "Parasol Lady",
"pilot": "Pilot",
"poké_fan": "Poké Fan",
"poké_fan_family": "Poké Fan Family",
"pokefan": "Poké Fan",
"pokefan_family": "Poké Fan Family",
"preschooler": "Preschooler",
"preschooler_female": "Preschooler",
"preschoolers": "Preschoolers",
@ -80,8 +80,12 @@ export const trainerClasses: SimpleTranslationEntries = {
"pokémon_rangers": "Pokémon Ranger",
"ranger": "Ranger",
"restaurant_staff": "Restaurant Staff",
"rich": "Rich",
"rich_female": "Rich",
"rich_boy": "Rich Boy",
"rich_couple": "Rich Couple",
"rich_kid": "Rich Kid",
"rich_kid_female": "Rich Kid",
"rich_kids": "Rich Kids",
"roughneck": "Roughneck",
"scientist": "Scientist",

View File

@ -44,8 +44,8 @@ export const trainerClasses: SimpleTranslationEntries = {
"depot_agent": "Ferroviário",
"doctor": "Doutor",
"doctor_female": "Doutora",
"fishermen": "Pescador",
"fishermen_female": "Pescadora",
"fisherman": "Pescador",
"fisherman_female": "Pescadora",
"gentleman": "Gentleman",
"guitarist": "Guitarrista",
"guitarist_female": "Guitarrista",
@ -60,16 +60,16 @@ export const trainerClasses: SimpleTranslationEntries = {
"linebacker": "Zagueiro",
"maid": "Doméstica",
"madame": "Madame",
"musican": "Músico",
"medical_team": "Medical Team",
"musician": "Músico",
"hex_maniac": "Ocultista",
"nurse": "Enfermeira",
"nursery_aide": "Professora do Berçário",
"officer": "Policial",
"parasol_lady": "Moça de Sombrinha",
"pilot": "Piloto",
"poké_fan": "Pokefã",
"poké_fan_family": "Poké Fan Family",
"pokefan": "Pokefã",
"pokefan_family": "Poké Fan Family",
"preschooler": "Menino do Prezinho",
"preschooler_female": "Menina do Prezinho",
"preschoolers": "Preschoolers",
@ -80,8 +80,12 @@ export const trainerClasses: SimpleTranslationEntries = {
"pokémon_rangers": "Pokémon Ranger",
"ranger": "Guarda",
"restaurant_staff": "Restaurant Staff",
"rich": "Rich",
"rich_female": "Rich",
"rich_boy": "Rich Boy",
"rich_couple": "Rich Couple",
"rich_kid": "Rich Kid",
"rich_kid_female": "Rich Kid",
"rich_kids": "Rich Kids",
"roughneck": "Arruaceiro",
"scientist": "Cientista",

View File

@ -44,8 +44,8 @@ export const trainerClasses: SimpleTranslationEntries = {
"depot_agent": "铁路员工",
"doctor": "医生",
"doctor_female": "医生",
"fishermen": "垂钓者",
"fishermen_female": "垂钓者",
"fisherman": "垂钓者",
"fisherman_female": "垂钓者",
"gentleman": "绅士",
"guitarist": "吉他手",
"guitarist_female": "吉他手",
@ -61,15 +61,15 @@ export const trainerClasses: SimpleTranslationEntries = {
"maid": "女仆",
"madame": "女士",
"medical_team": "医疗团队",
"musican": "音乐家",
"musician": "音乐家",
"hex_maniac": "灵异迷",
"nurse": "护士",
"nursery_aide": "幼儿园老师",
"officer": "警察",
"parasol_lady": "阳伞姐姐",
"pilot": "飞行员",
"poké_fan": "发烧友俱乐部",
"poké_fan_family": "同好夫妇",
"pokefan": "发烧友俱乐部",
"pokefan_family": "同好夫妇",
"preschooler": "幼儿园小朋友",
"preschooler_female": "幼儿园小朋友",
"preschoolers": "幼儿园小朋友组合",
@ -80,8 +80,12 @@ export const trainerClasses: SimpleTranslationEntries = {
"pokémon_rangers": "宝可梦巡护员组合",
"ranger": "巡护员",
"restaurant_staff": "服务生组合",
"rich": "Rich",
"rich_female": "Rich",
"rich_boy": "富家少爷",
"rich_couple": "富豪夫妇",
"rich_kid": "Rich Kid",
"rich_kid_female": "Rich Kid",
"rich_kids": "富二代组合",
"roughneck": "光头男",
"scientist": "研究员",