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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -44,8 +44,8 @@ export const trainerClasses: SimpleTranslationEntries = {
"depot_agent": "铁路员工", "depot_agent": "铁路员工",
"doctor": "医生", "doctor": "医生",
"doctor_female": "医生", "doctor_female": "医生",
"fishermen": "垂钓者", "fisherman": "垂钓者",
"fishermen_female": "垂钓者", "fisherman_female": "垂钓者",
"gentleman": "绅士", "gentleman": "绅士",
"guitarist": "吉他手", "guitarist": "吉他手",
"guitarist_female": "吉他手", "guitarist_female": "吉他手",
@ -61,15 +61,15 @@ export const trainerClasses: SimpleTranslationEntries = {
"maid": "女仆", "maid": "女仆",
"madame": "女士", "madame": "女士",
"medical_team": "医疗团队", "medical_team": "医疗团队",
"musican": "音乐家", "musician": "音乐家",
"hex_maniac": "灵异迷", "hex_maniac": "灵异迷",
"nurse": "护士", "nurse": "护士",
"nursery_aide": "幼儿园老师", "nursery_aide": "幼儿园老师",
"officer": "警察", "officer": "警察",
"parasol_lady": "阳伞姐姐", "parasol_lady": "阳伞姐姐",
"pilot": "飞行员", "pilot": "飞行员",
"poké_fan": "发烧友俱乐部", "pokefan": "发烧友俱乐部",
"poké_fan_family": "同好夫妇", "pokefan_family": "同好夫妇",
"preschooler": "幼儿园小朋友", "preschooler": "幼儿园小朋友",
"preschooler_female": "幼儿园小朋友", "preschooler_female": "幼儿园小朋友",
"preschoolers": "幼儿园小朋友组合", "preschoolers": "幼儿园小朋友组合",
@ -80,8 +80,12 @@ export const trainerClasses: SimpleTranslationEntries = {
"pokémon_rangers": "宝可梦巡护员组合", "pokémon_rangers": "宝可梦巡护员组合",
"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": "研究员",