From 6fdbd02d1ec8e9a65514070872f9c9ffd3ee208b Mon Sep 17 00:00:00 2001 From: Kotentopf1337 Date: Tue, 2 Aug 2016 14:39:33 +0200 Subject: [PATCH] Translations for Pokemon possible Added german Pokemon transaltion Added Empty-Array of Translations for other languages --- .../Config/Translations/translation.da.json | 3 +- .../Config/Translations/translation.de.json | 606 ++++++++++++++++++ .../Config/Translations/translation.es.json | 3 +- .../Config/Translations/translation.et.json | 3 +- .../Config/Translations/translation.fr.json | 3 +- .../Config/Translations/translation.gr.json | 3 +- .../Config/Translations/translation.hu.json | 3 +- .../Config/Translations/translation.id.json | 3 +- .../Config/Translations/translation.it.json | 3 +- .../Config/Translations/translation.lt.json | 3 +- .../Config/Translations/translation.nl.json | 3 +- .../Config/Translations/translation.no.json | 3 +- .../Config/Translations/translation.pl.json | 3 +- .../Translations/translation.pt-br.json | 3 +- .../Translations/translation.pt-pt.json | 3 +- .../Translations/translation.ru_RU.json | 3 +- .../Config/Translations/translation.sv.json | 3 +- .../Config/Translations/translation.th.json | 3 +- .../Config/Translations/translation.tr.json | 3 +- .../Translations/translation.uk_UA.json | 3 +- .../Translations/translation.zh_CN.json | 3 +- .../Translations/translation.zh_tw.json | 3 +- PoGo.NecroBot.CLI/ConsoleEventListener.cs | 14 +- PoGo.NecroBot.Logic/Common/Translations.cs | 185 +++++- .../Tasks/CatchIncensePokemonsTask.cs | 2 +- .../Tasks/CatchNearbyPokemonsTask.cs | 2 +- .../Tasks/DisplayPokemonStatsTask.cs | 2 +- .../Tasks/FavoritePokemonTask.cs | 2 +- .../Tasks/LevelUpPokemonTask.cs | 4 +- .../Tasks/RenamePokemonTask.cs | 4 +- 30 files changed, 842 insertions(+), 42 deletions(-) diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.da.json b/PoGo.NecroBot.CLI/Config/Translations/translation.da.json index 2357c0ef5..181b18ab5 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.da.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.da.json @@ -343,5 +343,6 @@ "Key": "RequireInputText", "Value": "Programmet vil fortsætte efter et tryk på en knap..." } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.de.json b/PoGo.NecroBot.CLI/Config/Translations/translation.de.json index a4d9ae2ee..c45bfb059 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.de.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.de.json @@ -455,5 +455,611 @@ "Key": "PkmNotEnoughRessources", "Value": "Pokémon Upgrade fehlgeschlagen, nicht genügend Ressourcen" } + ], + "PokemonStrings": [ + { + "Key": "bulbasaur", + "Value": "Bisasam" + }, + { + "Key": "ivysaur", + "Value": "Bisaknosp" + }, + { + "Key": "venusaur", + "Value": "Bisaflor" + }, + { + "Key": "charmander", + "Value": "Glumanda" + }, + { + "Key": "charmeleon", + "Value": "Glutexo" + }, + { + "Key": "charizard", + "Value": "Glurak" + }, + { + "Key": "squirtle", + "Value": "Schiggy" + }, + { + "Key": "wartortle", + "Value": "Schillok" + }, + { + "Key": "blastoise", + "Value": "Turtok" + }, + { + "Key": "caterpie", + "Value": "Raupy" + }, + { + "Key": "metapod", + "Value": "Safcon" + }, + { + "Key": "butterfree", + "Value": "Smettbo" + }, + { + "Key": "weedle", + "Value": "Hornliu" + }, + { + "Key": "kakuna", + "Value": "Kokuna" + }, + { + "Key": "beedrill", + "Value": "Bibor" + }, + { + "Key": "pidgey", + "Value": "Taubsi" + }, + { + "Key": "pidgeotto", + "Value": "Tauboga" + }, + { + "Key": "pidgeot", + "Value": "Tauboss" + }, + { + "Key": "rattata", + "Value": "Rattfratz" + }, + { + "Key": "raticate", + "Value": "Rattikarl" + }, + { + "Key": "spearow", + "Value": "Habitak" + }, + { + "Key": "fearow", + "Value": "Ibitak" + }, + { + "Key": "ekans", + "Value": "Rettan" + }, + { + "Key": "arbok", + "Value": "Arbok" + }, + { + "Key": "pikachu", + "Value": "Pikachu" + }, + { + "Key": "raichu", + "Value": "Raichu" + }, + { + "Key": "sandshrew", + "Value": "Sandan" + }, + { + "Key": "sandslash", + "Value": "Sandamer" + }, + { + "Key": "nidoranFemale", + "Value": "NidoranF" + }, + { + "Key": "nidorina", + "Value": "Nidorina" + }, + { + "Key": "nidoqueen", + "Value": "Nidoqueen" + }, + { + "Key": "nidoranMale", + "Value": "NidoranM" + }, + { + "Key": "nidorino", + "Value": "Nidorino" + }, + { + "Key": "nidoking", + "Value": "Nidoking" + }, + { + "Key": "clefairy", + "Value": "Pipi" + }, + { + "Key": "clefable", + "Value": "Pixi" + }, + { + "Key": "vulpix", + "Value": "Vulpix" + }, + { + "Key": "ninetales", + "Value": "Vulnona" + }, + { + "Key": "jigglypuff", + "Value": "Pummeluff" + }, + { + "Key": "wigglytuff", + "Value": "Knuddeluff" + }, + { + "Key": "zubat", + "Value": "Zubat" + }, + { + "Key": "golbat", + "Value": "Golbat" + }, + { + "Key": "oddish", + "Value": "Myrapla" + }, + { + "Key": "gloom", + "Value": "Duflor" + }, + { + "Key": "vileplume", + "Value": "Giflor" + }, + { + "Key": "paras", + "Value": "Paras" + }, + { + "Key": "parasect", + "Value": "Parasek" + }, + { + "Key": "venonat", + "Value": "Bluzuk" + }, + { + "Key": "venomoth", + "Value": "Omot" + }, + { + "Key": "diglett", + "Value": "Digda" + }, + { + "Key": "dugtrio", + "Value": "Digdri" + }, + { + "Key": "meowth", + "Value": "Mauzi" + }, + { + "Key": "persian", + "Value": "Snobilikat" + }, + { + "Key": "psyduck", + "Value": "Enton" + }, + { + "Key": "golduck", + "Value": "Entoron" + }, + { + "Key": "mankey", + "Value": "Menki" + }, + { + "Key": "primeape", + "Value": "Rasaff" + }, + { + "Key": "growlithe", + "Value": "Fukano" + }, + { + "Key": "arcanine", + "Value": "Arkani" + }, + { + "Key": "poliwag", + "Value": "Quapsel" + }, + { + "Key": "poliwhirl", + "Value": "Quaputzi" + }, + { + "Key": "poliwrath", + "Value": "Quappo" + }, + { + "Key": "abra", + "Value": "Abra" + }, + { + "Key": "kadabra", + "Value": "Kadabra" + }, + { + "Key": "alakazam", + "Value": "Simsala" + }, + { + "Key": "machop", + "Value": "Machollo" + }, + { + "Key": "machoke", + "Value": "Maschock" + }, + { + "Key": "machamp", + "Value": "Machomei" + }, + { + "Key": "bellsprout", + "Value": "Knofensa" + }, + { + "Key": "weepinbell", + "Value": "Ultrigaria" + }, + { + "Key": "victreebel", + "Value": "Sarzenia" + }, + { + "Key": "tentacool", + "Value": "Tentacha" + }, + { + "Key": "tentacruel", + "Value": "Tentoxa" + }, + { + "Key": "geodude", + "Value": "Kleinstein" + }, + { + "Key": "graveler", + "Value": "Georock" + }, + { + "Key": "golem", + "Value": "Geowaz" + }, + { + "Key": "ponyta", + "Value": "Ponita" + }, + { + "Key": "rapidash", + "Value": "Gallopa" + }, + { + "Key": "slowpoke", + "Value": "Flegmon" + }, + { + "Key": "slowbro", + "Value": "Lahmus" + }, + { + "Key": "magnemite", + "Value": "Magnetilo" + }, + { + "Key": "magneton", + "Value": "Magneton" + }, + { + "Key": "farfetchd", + "Value": "Porenta" + }, + { + "Key": "doduo", + "Value": "Dodu" + }, + { + "Key": "dodrio", + "Value": "Dodri" + }, + { + "Key": "seel", + "Value": "Jurob" + }, + { + "Key": "dewgong", + "Value": "Jugong" + }, + { + "Key": "grimer", + "Value": "Sleima" + }, + { + "Key": "muk", + "Value": "Sleimok" + }, + { + "Key": "shellder", + "Value": "Muschas" + }, + { + "Key": "cloyster", + "Value": "Austos" + }, + { + "Key": "gastly", + "Value": "Nebulak" + }, + { + "Key": "haunter", + "Value": "Alpollo" + }, + { + "Key": "gengar", + "Value": "Gengar" + }, + { + "Key": "onix", + "Value": "Onix" + }, + { + "Key": "drowzee", + "Value": "Traumato" + }, + { + "Key": "hypno", + "Value": "Hypno" + }, + { + "Key": "krabby", + "Value": "Krabby" + }, + { + "Key": "kingler", + "Value": "Kingler" + }, + { + "Key": "voltorb", + "Value": "Voltoball" + }, + { + "Key": "electrode", + "Value": "Lektroball" + }, + { + "Key": "exeggcute", + "Value": "Owei" + }, + { + "Key": "exeggutor", + "Value": "Kokowei" + }, + { + "Key": "cubone", + "Value": "Tragosso" + }, + { + "Key": "marowak", + "Value": "Knogga" + }, + { + "Key": "hitmonlee", + "Value": "Kicklee" + }, + { + "Key": "hitmonchan", + "Value": "Nockchan" + }, + { + "Key": "lickitung", + "Value": "Schlurp" + }, + { + "Key": "koffing", + "Value": "Smogon" + }, + { + "Key": "weezing", + "Value": "Smogmog" + }, + { + "Key": "rhyhorn", + "Value": "Rihorn" + }, + { + "Key": "rhydon", + "Value": "Rizeros" + }, + { + "Key": "chansey", + "Value": "Chaneira" + }, + { + "Key": "tangela", + "Value": "Tangela" + }, + { + "Key": "kangaskhan", + "Value": "Kangama" + }, + { + "Key": "horsea", + "Value": "Seeper" + }, + { + "Key": "seadra", + "Value": "Seemon" + }, + { + "Key": "goldeen", + "Value": "Goldini" + }, + { + "Key": "seaking", + "Value": "Golking" + }, + { + "Key": "staryu", + "Value": "Sterndu" + }, + { + "Key": "starmie", + "Value": "Starmie" + }, + { + "Key": "mrMime", + "Value": "Pantimos" + }, + { + "Key": "scyther", + "Value": "Sichlor" + }, + { + "Key": "jynx", + "Value": "Rossana" + }, + { + "Key": "electabuzz", + "Value": "Elektek" + }, + { + "Key": "magmar", + "Value": "Magmar" + }, + { + "Key": "pinsir", + "Value": "Pinsir" + }, + { + "Key": "tauros", + "Value": "Tauros" + }, + { + "Key": "magikarp", + "Value": "Karpador" + }, + { + "Key": "gyarados", + "Value": "Garados" + }, + { + "Key": "lapras", + "Value": "Lapras" + }, + { + "Key": "ditto", + "Value": "Ditto" + }, + { + "Key": "eevee", + "Value": "Evoli" + }, + { + "Key": "vaporeon", + "Value": "Aquana" + }, + { + "Key": "jolteon", + "Value": "Blitza" + }, + { + "Key": "flareon", + "Value": "Flamara" + }, + { + "Key": "porygon", + "Value": "Porygon" + }, + { + "Key": "omanyte", + "Value": "Amonitas" + }, + { + "Key": "omastar", + "Value": "Amoroso" + }, + { + "Key": "kabuto", + "Value": "Kabuto" + }, + { + "Key": "kabutops", + "Value": "Kabutops" + }, + { + "Key": "aerodactyl", + "Value": "Aerodactyl" + }, + { + "Key": "snorlax", + "Value": "Relaxo" + }, + { + "Key": "articuno", + "Value": "Arktos" + }, + { + "Key": "zapdos", + "Value": "Zapdos" + }, + { + "Key": "moltres", + "Value": "Lavados" + }, + { + "Key": "dratini", + "Value": "Dratini" + }, + { + "Key": "dragonair", + "Value": "Dragonir" + }, + { + "Key": "dragonite", + "Value": "Dragoran" + }, + { + "Key": "mewtwo", + "Value": "Mewto" + }, + { + "Key": "mew", + "Value": "Mew" + } ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.es.json b/PoGo.NecroBot.CLI/Config/Translations/translation.es.json index 350e5fed8..3a9729fe7 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.es.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.es.json @@ -480,5 +480,6 @@ "Key": "pkmNotEnoughRessources", "Value": "Pokémon actualización fallida: No hay suficientes recursos" } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.et.json b/PoGo.NecroBot.CLI/Config/Translations/translation.et.json index 7fce0c979..0f408897f 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.et.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.et.json @@ -332,5 +332,6 @@ "Key": "pokemonIgnoreFilter", "Value": "[Pokémon-Ignore-Filter] - Ignoreerin {0} nagu sätetes määratud!" } - ] + ], + "PokemonStrings": [ ] } \ No newline at end of file diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.fr.json b/PoGo.NecroBot.CLI/Config/Translations/translation.fr.json index 890ba0035..3d0d01fec 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.fr.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.fr.json @@ -484,5 +484,6 @@ "Key": "itemRazzBerry", "Value": "Baie Framby" } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.gr.json b/PoGo.NecroBot.CLI/Config/Translations/translation.gr.json index a98463fb0..93e91b938 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.gr.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.gr.json @@ -385,5 +385,6 @@ "Key": "noPokemonToSnipe", "Value": "[Σναΐπερ] Δεν βρέθηκαν Pokemon για σναϊπάρισμα!" } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.hu.json b/PoGo.NecroBot.CLI/Config/Translations/translation.hu.json index d128dde48..803f2dcc7 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.hu.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.hu.json @@ -364,5 +364,6 @@ "Key": "NoPokemonToSnipe", "Value": "[Sniper] Nincs pokemon snipe-olni!" } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.id.json b/PoGo.NecroBot.CLI/Config/Translations/translation.id.json index 60541e3bd..615226323 100755 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.id.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.id.json @@ -448,5 +448,6 @@ "Key": "PkmNotEnoughRessources", "Value": "Peningkatan Pokemon gagal karena tidak cukup bahan" } - ] + ], + "PokemonStrings": [ ] } \ No newline at end of file diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.it.json b/PoGo.NecroBot.CLI/Config/Translations/translation.it.json index b699bade4..99ce50a8c 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.it.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.it.json @@ -476,5 +476,6 @@ "Key": "pkmNotEnoughRessources", "Value": "Potenziamento Pokemon Fallito: Risorse Insufficienti" } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.lt.json b/PoGo.NecroBot.CLI/Config/Translations/translation.lt.json index dd59bf8a4..b41cea7a8 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.lt.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.lt.json @@ -464,5 +464,6 @@ "Key": "pkmNotEnoughRessources", "Value": "Pokemono pagerinimas nepavyko - nepakanka resursų" } - ] + ], + "PokemonStrings": [ ] } \ No newline at end of file diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.nl.json b/PoGo.NecroBot.CLI/Config/Translations/translation.nl.json index e37bbee2e..915daf62e 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.nl.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.nl.json @@ -126,5 +126,6 @@ "Key": "incubatorStatusUpdate", "Value": "Broedmachine status update: {0:0.00}km resterend" } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.no.json b/PoGo.NecroBot.CLI/Config/Translations/translation.no.json index ba9c11595..dbcf62e1b 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.no.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.no.json @@ -122,5 +122,6 @@ "Key": "incubatorStatusUpdate", "Value": "Incubator oppdatering: {0:0.00}km igjen" } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.pl.json b/PoGo.NecroBot.CLI/Config/Translations/translation.pl.json index 2d90d3542..d7d178e27 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.pl.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.pl.json @@ -460,5 +460,6 @@ "Key": "pkmNotEnoughRessources", "Value": "Ulepszanie Pokemona zakończone niepowodzeniem. Zbyt mało zasobów!" } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.pt-br.json b/PoGo.NecroBot.CLI/Config/Translations/translation.pt-br.json index e0f6d65a2..5d3b77249 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.pt-br.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.pt-br.json @@ -381,5 +381,6 @@ "Key": "noPokemonToSnipe", "Value": "[Sniper] Nenhum Pokémon encontrado!" } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.pt-pt.json b/PoGo.NecroBot.CLI/Config/Translations/translation.pt-pt.json index 7c00d31c2..e2b9c7af3 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.pt-pt.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.pt-pt.json @@ -381,5 +381,6 @@ "Key": "noPokemonToSnipe", "Value": "[Sniper] Nenhum Pokémon encontrado!" } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.ru_RU.json b/PoGo.NecroBot.CLI/Config/Translations/translation.ru_RU.json index 48e461b73..00da4c8ee 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.ru_RU.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.ru_RU.json @@ -387,5 +387,6 @@ "Key": "noPokemonToSnipe", "Value": "[Снайпер] Покемона для отлова не обнаружено!" } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.sv.json b/PoGo.NecroBot.CLI/Config/Translations/translation.sv.json index deb7c1ccc..88af3d21b 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.sv.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.sv.json @@ -383,5 +383,6 @@ "Key": "noPokemonToSnipe", "Value": "[Krypskytt] Inga Pokemons funna!" } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.th.json b/PoGo.NecroBot.CLI/Config/Translations/translation.th.json index a5809eaa3..37bbb80cd 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.th.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.th.json @@ -82,5 +82,6 @@ "Key": "candies", "Value": "ลูกอม: {0}" } - ] + ], + "PokemonStrings": [ ] } \ No newline at end of file diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.tr.json b/PoGo.NecroBot.CLI/Config/Translations/translation.tr.json index 218712e06..17eb43252 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.tr.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.tr.json @@ -395,5 +395,6 @@ "Key": "displayHighestMOVE2Header", "Value": "Vuruş2" } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.uk_UA.json b/PoGo.NecroBot.CLI/Config/Translations/translation.uk_UA.json index 32aac3d55..54a03e19a 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.uk_UA.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.uk_UA.json @@ -388,5 +388,6 @@ "Key": "noPokemonToSnipe", "Value": "[Снайпер] Покемона для вилову не виявлено!" } - ] + ], + "PokemonStrings": [ ] } \ No newline at end of file diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.zh_CN.json b/PoGo.NecroBot.CLI/Config/Translations/translation.zh_CN.json index 59e41d79c..3e758fd23 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.zh_CN.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.zh_CN.json @@ -380,5 +380,6 @@ "Key": "noPokemonToSnipe", "Value": "[狙击手] 没有找到特殊宠物!" } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/Config/Translations/translation.zh_tw.json b/PoGo.NecroBot.CLI/Config/Translations/translation.zh_tw.json index 3953796db..7c471aade 100644 --- a/PoGo.NecroBot.CLI/Config/Translations/translation.zh_tw.json +++ b/PoGo.NecroBot.CLI/Config/Translations/translation.zh_tw.json @@ -364,5 +364,6 @@ "Key": "missingCredentialsPtc", "Value": "您需要在auth.json中填寫Ptc賬戶和密碼!" } - ] + ], + "PokemonStrings": [ ] } diff --git a/PoGo.NecroBot.CLI/ConsoleEventListener.cs b/PoGo.NecroBot.CLI/ConsoleEventListener.cs index caacedaaf..763038283 100644 --- a/PoGo.NecroBot.CLI/ConsoleEventListener.cs +++ b/PoGo.NecroBot.CLI/ConsoleEventListener.cs @@ -55,15 +55,15 @@ private static void HandleEvent(PokemonEvolveEvent pokemonEvolveEvent, ISession Logger.Write(pokemonEvolveEvent.Result == EvolvePokemonResponse.Types.Result.Success ? session.Translation.GetTranslation(TranslationString.EventPokemonEvolvedSuccess, pokemonEvolveEvent.Id, pokemonEvolveEvent.Exp) : session.Translation.GetTranslation(TranslationString.EventPokemonEvolvedFailed, pokemonEvolveEvent.Id, pokemonEvolveEvent.Result, - pokemonEvolveEvent.Id), + session.Translation.GetPokemonTranslation(pokemonEvolveEvent.Id)), LogLevel.Evolve); } private static void HandleEvent(TransferPokemonEvent transferPokemonEvent, ISession session) { Logger.Write( - session.Translation.GetTranslation(TranslationString.EventPokemonTransferred, - transferPokemonEvent.Id, + session.Translation.GetTranslation(TranslationString.EventPokemonTransferred, + session.Translation.GetPokemonTranslation(transferPokemonEvent.Id), transferPokemonEvent.Cp, transferPokemonEvent.Perfection.ToString("0.00"), transferPokemonEvent.BestCp, @@ -89,7 +89,7 @@ private static void HandleEvent(EggIncubatorStatusEvent eggIncubatorStatusEvent, private static void HandleEvent(EggHatchedEvent eggHatchedEvent, ISession session) { Logger.Write(session.Translation.GetTranslation(TranslationString.IncubatorEggHatched, - eggHatchedEvent.PokemonId.ToString(), eggHatchedEvent.Level, eggHatchedEvent.Cp, eggHatchedEvent.MaxCp, eggHatchedEvent.Perfection), + session.Translation.GetPokemonTranslation(eggHatchedEvent.PokemonId), eggHatchedEvent.Level, eggHatchedEvent.Cp, eggHatchedEvent.MaxCp, eggHatchedEvent.Perfection), LogLevel.Egg); } @@ -175,7 +175,7 @@ private static void HandleEvent(PokemonCaptureEvent pokemonCaptureEvent, ISessio : ""; Logger.Write( - session.Translation.GetTranslation(TranslationString.EventPokemonCapture, catchStatus, catchType, pokemonCaptureEvent.Id, + session.Translation.GetTranslation(TranslationString.EventPokemonCapture, catchStatus, catchType, session.Translation.GetPokemonTranslation(pokemonCaptureEvent.Id), pokemonCaptureEvent.Level, pokemonCaptureEvent.Cp, pokemonCaptureEvent.MaxCp, pokemonCaptureEvent.Perfection.ToString("0.00"), pokemonCaptureEvent.Probability, pokemonCaptureEvent.Distance.ToString("F2"), returnRealBallName(pokemonCaptureEvent.Pokeball), pokemonCaptureEvent.BallAmount, familyCandies), LogLevel.Caught); @@ -214,7 +214,7 @@ private static void HandleEvent(SnipeScanEvent snipeScanEvent, ISession session) Logger.Write(snipeScanEvent.PokemonId == PokemonId.Missingno ? session.Translation.GetTranslation(TranslationString.SnipeScan, $"{snipeScanEvent.Bounds.Latitude},{snipeScanEvent.Bounds.Longitude}") - : session.Translation.GetTranslation(TranslationString.SnipeScanEx, snipeScanEvent.PokemonId, + : session.Translation.GetTranslation(TranslationString.SnipeScanEx, session.Translation.GetPokemonTranslation(snipeScanEvent.PokemonId), snipeScanEvent.Iv > 0 ? snipeScanEvent.Iv.ToString(CultureInfo.InvariantCulture) : "unknown", $"{snipeScanEvent.Bounds.Latitude},{snipeScanEvent.Bounds.Longitude}"), LogLevel.Sniper); } @@ -253,7 +253,7 @@ private static void HandleEvent(DisplayHighestsPokemonEvent displayHighestsPokem Logger.Write($"====== {strHeader} ======", LogLevel.Info, ConsoleColor.Yellow); foreach (var pokemon in displayHighestsPokemonEvent.PokemonList) Logger.Write( - $"# CP {pokemon.Item1.Cp.ToString().PadLeft(4, ' ')}/{pokemon.Item2.ToString().PadLeft(4, ' ')} | ({pokemon.Item3.ToString("0.00")}% {strPerfect})\t| Lvl {pokemon.Item4.ToString("00")}\t {strName}: {pokemon.Item1.PokemonId.ToString().PadRight(10, ' ')}\t MOVE1: {pokemon.Item5.ToString().PadRight(20, ' ')} MOVE2: {pokemon.Item6.ToString().PadRight(20, ' ')} Candy: {pokemon.Item7}", + $"# CP {pokemon.Item1.Cp.ToString().PadLeft(4, ' ')}/{pokemon.Item2.ToString().PadLeft(4, ' ')} | ({pokemon.Item3.ToString("0.00")}% {strPerfect})\t| Lvl {pokemon.Item4.ToString("00")}\t {strName}: {session.Translation.GetPokemonTranslation(pokemon.Item1.PokemonId).PadRight(10, ' ')}\t MOVE1: {pokemon.Item5.ToString().PadRight(20, ' ')} MOVE2: {pokemon.Item6.ToString().PadRight(20, ' ')} Candy: {pokemon.Item7}", LogLevel.Info, ConsoleColor.Yellow); } diff --git a/PoGo.NecroBot.Logic/Common/Translations.cs b/PoGo.NecroBot.Logic/Common/Translations.cs index 006c61621..89b04f913 100644 --- a/PoGo.NecroBot.Logic/Common/Translations.cs +++ b/PoGo.NecroBot.Logic/Common/Translations.cs @@ -15,6 +15,8 @@ public interface ITranslation string GetTranslation(TranslationString translationString, params object[] data); string GetTranslation(TranslationString translationString); + + string GetPokemonTranslation(POGOProtos.Enums.PokemonId id); } public enum TranslationString @@ -144,7 +146,7 @@ public enum TranslationString PkmPotentialEvolveCount, PkmNotEnoughRessources, EventUsedIncense, - SnipeServerOffline + SnipeServerOffline, } public class Translation : ITranslation @@ -345,15 +347,175 @@ public class Translation : ITranslation new KeyValuePair(TranslationString.UseIncenseActive, "Incense Already Active"), new KeyValuePair(TranslationString.UseIncenseAmount, "Incense in Inventory: {0}"), new KeyValuePair(TranslationString.UsedIncense, "Used an Incense"), - new KeyValuePair(TranslationString.AmountPkmSeenCaught, + new KeyValuePair(TranslationString.AmountPkmSeenCaught, "Amount of Pokemon Seen: {0}/151, Amount of Pokemon Caught: {1}/151"), - new KeyValuePair(TranslationString.PkmPotentialEvolveCount, + new KeyValuePair(TranslationString.PkmPotentialEvolveCount, "[Evolves] Potential Evolves: {0}"), - new KeyValuePair(TranslationString.PkmNotEnoughRessources, + new KeyValuePair(TranslationString.PkmNotEnoughRessources, "Pokemon Upgrade Failed Not Enough Resources"), new KeyValuePair(TranslationString.SnipeServerOffline, "Sniping server is offline. Skipping...") }; + [JsonProperty("PokemonStrings", + ItemTypeNameHandling = TypeNameHandling.Arrays, + ItemConverterType = typeof(KeyValuePairConverter), + ObjectCreationHandling = ObjectCreationHandling.Replace, + DefaultValueHandling = DefaultValueHandling.Populate)] + private readonly List> _pokemonTranslationStrings = new List>() + { + new KeyValuePair((POGOProtos.Enums.PokemonId)001,"Bulbasaur"), + new KeyValuePair((POGOProtos.Enums.PokemonId)002,"Ivysaur"), + new KeyValuePair((POGOProtos.Enums.PokemonId)003,"Venusaur"), + new KeyValuePair((POGOProtos.Enums.PokemonId)004,"Charmander"), + new KeyValuePair((POGOProtos.Enums.PokemonId)005,"Charmeleon"), + new KeyValuePair((POGOProtos.Enums.PokemonId)006,"Charizard"), + new KeyValuePair((POGOProtos.Enums.PokemonId)007,"Squirtle"), + new KeyValuePair((POGOProtos.Enums.PokemonId)008,"Wartortle"), + new KeyValuePair((POGOProtos.Enums.PokemonId)009,"Blastoise"), + new KeyValuePair((POGOProtos.Enums.PokemonId)010,"Caterpie"), + new KeyValuePair((POGOProtos.Enums.PokemonId)011,"Metapod"), + new KeyValuePair((POGOProtos.Enums.PokemonId)012,"Butterfree"), + new KeyValuePair((POGOProtos.Enums.PokemonId)013,"Weedle"), + new KeyValuePair((POGOProtos.Enums.PokemonId)014,"Kakuna"), + new KeyValuePair((POGOProtos.Enums.PokemonId)015,"Beedrill"), + new KeyValuePair((POGOProtos.Enums.PokemonId)016,"Pidgey"), + new KeyValuePair((POGOProtos.Enums.PokemonId)017,"Pidgeotto"), + new KeyValuePair((POGOProtos.Enums.PokemonId)018,"Pidgeot"), + new KeyValuePair((POGOProtos.Enums.PokemonId)019,"Rattata"), + new KeyValuePair((POGOProtos.Enums.PokemonId)020,"Raticate"), + new KeyValuePair((POGOProtos.Enums.PokemonId)021,"Spearow"), + new KeyValuePair((POGOProtos.Enums.PokemonId)022,"Fearow"), + new KeyValuePair((POGOProtos.Enums.PokemonId)023,"Ekans"), + new KeyValuePair((POGOProtos.Enums.PokemonId)024,"Arbok"), + new KeyValuePair((POGOProtos.Enums.PokemonId)025,"Pikachu"), + new KeyValuePair((POGOProtos.Enums.PokemonId)026,"Raichu"), + new KeyValuePair((POGOProtos.Enums.PokemonId)027,"Sandshrew"), + new KeyValuePair((POGOProtos.Enums.PokemonId)028,"Sandslash"), + new KeyValuePair((POGOProtos.Enums.PokemonId)029,"NidoranF"), + new KeyValuePair((POGOProtos.Enums.PokemonId)030,"Nidorina"), + new KeyValuePair((POGOProtos.Enums.PokemonId)031,"Nidoqueen"), + new KeyValuePair((POGOProtos.Enums.PokemonId)032,"NidoranM"), + new KeyValuePair((POGOProtos.Enums.PokemonId)033,"Nidorino"), + new KeyValuePair((POGOProtos.Enums.PokemonId)034,"Nidoking"), + new KeyValuePair((POGOProtos.Enums.PokemonId)035,"Clefairy"), + new KeyValuePair((POGOProtos.Enums.PokemonId)036,"Clefable"), + new KeyValuePair((POGOProtos.Enums.PokemonId)037,"Vulpix"), + new KeyValuePair((POGOProtos.Enums.PokemonId)038,"Ninetales"), + new KeyValuePair((POGOProtos.Enums.PokemonId)039,"Jigglypuff"), + new KeyValuePair((POGOProtos.Enums.PokemonId)040,"Wigglytuff"), + new KeyValuePair((POGOProtos.Enums.PokemonId)041,"Zubat"), + new KeyValuePair((POGOProtos.Enums.PokemonId)042,"Golbat"), + new KeyValuePair((POGOProtos.Enums.PokemonId)043,"Oddish"), + new KeyValuePair((POGOProtos.Enums.PokemonId)044,"Gloom"), + new KeyValuePair((POGOProtos.Enums.PokemonId)045,"Vileplume"), + new KeyValuePair((POGOProtos.Enums.PokemonId)046,"Paras"), + new KeyValuePair((POGOProtos.Enums.PokemonId)047,"Parasect"), + new KeyValuePair((POGOProtos.Enums.PokemonId)048,"Venonat"), + new KeyValuePair((POGOProtos.Enums.PokemonId)049,"Venomoth"), + new KeyValuePair((POGOProtos.Enums.PokemonId)050,"Diglett"), + new KeyValuePair((POGOProtos.Enums.PokemonId)051,"Dugtrio"), + new KeyValuePair((POGOProtos.Enums.PokemonId)052,"Meowth"), + new KeyValuePair((POGOProtos.Enums.PokemonId)053,"Persian"), + new KeyValuePair((POGOProtos.Enums.PokemonId)054,"Psyduck"), + new KeyValuePair((POGOProtos.Enums.PokemonId)055,"Golduck"), + new KeyValuePair((POGOProtos.Enums.PokemonId)056,"Mankey"), + new KeyValuePair((POGOProtos.Enums.PokemonId)057,"Primeape"), + new KeyValuePair((POGOProtos.Enums.PokemonId)058,"Growlithe"), + new KeyValuePair((POGOProtos.Enums.PokemonId)059,"Arcanine"), + new KeyValuePair((POGOProtos.Enums.PokemonId)060,"Poliwag"), + new KeyValuePair((POGOProtos.Enums.PokemonId)061,"Poliwhirl"), + new KeyValuePair((POGOProtos.Enums.PokemonId)062,"Poliwrath"), + new KeyValuePair((POGOProtos.Enums.PokemonId)063,"Abra"), + new KeyValuePair((POGOProtos.Enums.PokemonId)064,"Kadabra"), + new KeyValuePair((POGOProtos.Enums.PokemonId)065,"Alakazam"), + new KeyValuePair((POGOProtos.Enums.PokemonId)066,"Machop"), + new KeyValuePair((POGOProtos.Enums.PokemonId)067,"Machoke"), + new KeyValuePair((POGOProtos.Enums.PokemonId)068,"Machamp"), + new KeyValuePair((POGOProtos.Enums.PokemonId)069,"Bellsprout"), + new KeyValuePair((POGOProtos.Enums.PokemonId)070,"Weepinbell"), + new KeyValuePair((POGOProtos.Enums.PokemonId)071,"Victreebel"), + new KeyValuePair((POGOProtos.Enums.PokemonId)072,"Tentacool"), + new KeyValuePair((POGOProtos.Enums.PokemonId)073,"Tentacruel"), + new KeyValuePair((POGOProtos.Enums.PokemonId)074,"Geodude"), + new KeyValuePair((POGOProtos.Enums.PokemonId)075,"Graveler"), + new KeyValuePair((POGOProtos.Enums.PokemonId)076,"Golem"), + new KeyValuePair((POGOProtos.Enums.PokemonId)077,"Ponyta"), + new KeyValuePair((POGOProtos.Enums.PokemonId)078,"Rapidash"), + new KeyValuePair((POGOProtos.Enums.PokemonId)079,"Slowpoke"), + new KeyValuePair((POGOProtos.Enums.PokemonId)080,"Slowbro"), + new KeyValuePair((POGOProtos.Enums.PokemonId)081,"Magnemite"), + new KeyValuePair((POGOProtos.Enums.PokemonId)082,"Magneton"), + new KeyValuePair((POGOProtos.Enums.PokemonId)083,"Farfetchd"), + new KeyValuePair((POGOProtos.Enums.PokemonId)084,"Doduo"), + new KeyValuePair((POGOProtos.Enums.PokemonId)085,"Dodrio"), + new KeyValuePair((POGOProtos.Enums.PokemonId)086,"Seel"), + new KeyValuePair((POGOProtos.Enums.PokemonId)087,"Dewgong"), + new KeyValuePair((POGOProtos.Enums.PokemonId)088,"Grimer"), + new KeyValuePair((POGOProtos.Enums.PokemonId)089,"Muk"), + new KeyValuePair((POGOProtos.Enums.PokemonId)090,"Shellder"), + new KeyValuePair((POGOProtos.Enums.PokemonId)091,"Cloyster"), + new KeyValuePair((POGOProtos.Enums.PokemonId)092,"Gastly"), + new KeyValuePair((POGOProtos.Enums.PokemonId)093,"Haunter"), + new KeyValuePair((POGOProtos.Enums.PokemonId)094,"Gengar"), + new KeyValuePair((POGOProtos.Enums.PokemonId)095,"Onix"), + new KeyValuePair((POGOProtos.Enums.PokemonId)096,"Drowzee"), + new KeyValuePair((POGOProtos.Enums.PokemonId)097,"Hypno"), + new KeyValuePair((POGOProtos.Enums.PokemonId)098,"Krabby"), + new KeyValuePair((POGOProtos.Enums.PokemonId)099,"Kingler"), + new KeyValuePair((POGOProtos.Enums.PokemonId)100,"Voltorb"), + new KeyValuePair((POGOProtos.Enums.PokemonId)101,"Electrode"), + new KeyValuePair((POGOProtos.Enums.PokemonId)102,"Exeggcute"), + new KeyValuePair((POGOProtos.Enums.PokemonId)103,"Exeggutor"), + new KeyValuePair((POGOProtos.Enums.PokemonId)104,"Cubone"), + new KeyValuePair((POGOProtos.Enums.PokemonId)105,"Marowak"), + new KeyValuePair((POGOProtos.Enums.PokemonId)106,"Hitmonlee"), + new KeyValuePair((POGOProtos.Enums.PokemonId)107,"Hitmonchan"), + new KeyValuePair((POGOProtos.Enums.PokemonId)108,"Lickitung"), + new KeyValuePair((POGOProtos.Enums.PokemonId)109,"Koffing"), + new KeyValuePair((POGOProtos.Enums.PokemonId)110,"Weezing"), + new KeyValuePair((POGOProtos.Enums.PokemonId)111,"Rhyhorn"), + new KeyValuePair((POGOProtos.Enums.PokemonId)112,"Rhydon"), + new KeyValuePair((POGOProtos.Enums.PokemonId)113,"Chansey"), + new KeyValuePair((POGOProtos.Enums.PokemonId)114,"Tangela"), + new KeyValuePair((POGOProtos.Enums.PokemonId)115,"Kangaskhan"), + new KeyValuePair((POGOProtos.Enums.PokemonId)116,"Horsea"), + new KeyValuePair((POGOProtos.Enums.PokemonId)117,"Seadra"), + new KeyValuePair((POGOProtos.Enums.PokemonId)118,"Goldeen"), + new KeyValuePair((POGOProtos.Enums.PokemonId)119,"Seaking"), + new KeyValuePair((POGOProtos.Enums.PokemonId)120,"Staryu"), + new KeyValuePair((POGOProtos.Enums.PokemonId)121,"Starmie"), + new KeyValuePair((POGOProtos.Enums.PokemonId)122,"Mr. Mime"), + new KeyValuePair((POGOProtos.Enums.PokemonId)123,"Scyther"), + new KeyValuePair((POGOProtos.Enums.PokemonId)124,"Jynx"), + new KeyValuePair((POGOProtos.Enums.PokemonId)125,"Electabuzz"), + new KeyValuePair((POGOProtos.Enums.PokemonId)126,"Magmar"), + new KeyValuePair((POGOProtos.Enums.PokemonId)127,"Pinsir"), + new KeyValuePair((POGOProtos.Enums.PokemonId)128,"Tauros"), + new KeyValuePair((POGOProtos.Enums.PokemonId)129,"Magikarp"), + new KeyValuePair((POGOProtos.Enums.PokemonId)130,"Gyarados"), + new KeyValuePair((POGOProtos.Enums.PokemonId)131,"Lapras"), + new KeyValuePair((POGOProtos.Enums.PokemonId)132,"Ditto"), + new KeyValuePair((POGOProtos.Enums.PokemonId)133,"Eevee"), + new KeyValuePair((POGOProtos.Enums.PokemonId)134,"Vaporeon"), + new KeyValuePair((POGOProtos.Enums.PokemonId)135,"Jolteon"), + new KeyValuePair((POGOProtos.Enums.PokemonId)136,"Flareon"), + new KeyValuePair((POGOProtos.Enums.PokemonId)137,"Porygon"), + new KeyValuePair((POGOProtos.Enums.PokemonId)138,"Omanyte"), + new KeyValuePair((POGOProtos.Enums.PokemonId)139,"Omastar"), + new KeyValuePair((POGOProtos.Enums.PokemonId)140,"Kabuto"), + new KeyValuePair((POGOProtos.Enums.PokemonId)141,"Kabutops"), + new KeyValuePair((POGOProtos.Enums.PokemonId)142,"Aerodactyl"), + new KeyValuePair((POGOProtos.Enums.PokemonId)143,"Snorlax"), + new KeyValuePair((POGOProtos.Enums.PokemonId)144,"Articuno"), + new KeyValuePair((POGOProtos.Enums.PokemonId)145,"Zapdos"), + new KeyValuePair((POGOProtos.Enums.PokemonId)146,"Moltres"), + new KeyValuePair((POGOProtos.Enums.PokemonId)147,"Dratini"), + new KeyValuePair((POGOProtos.Enums.PokemonId)148,"Dragonair"), + new KeyValuePair((POGOProtos.Enums.PokemonId)149,"Dragonite"), + new KeyValuePair((POGOProtos.Enums.PokemonId)150,"Mewtwo"), + new KeyValuePair((POGOProtos.Enums.PokemonId)151,"Mew"), + }; + public string GetTranslation(TranslationString translationString, params object[] data) { var translation = _translationStrings.FirstOrDefault(t => t.Key.Equals(translationString)).Value; @@ -368,6 +530,12 @@ public string GetTranslation(TranslationString translationString) return translation != default(string) ? translation : $"Translation for {translationString} is missing"; } + public string GetPokemonTranslation(POGOProtos.Enums.PokemonId id) + { + var translation = _pokemonTranslationStrings.FirstOrDefault(t => t.Key.Equals(id)).Value; + return translation != default(string) ? translation : $"Translation for pokemon {id} is missing"; + } + public static Translation Load(ILogicSettings logicSettings) { var translationsLanguageCode = logicSettings.TranslationLanguageCode; @@ -380,7 +548,7 @@ public static Translation Load(ILogicSettings logicSettings) var input = File.ReadAllText(fullPath); var jsonSettings = new JsonSerializerSettings(); - jsonSettings.Converters.Add(new StringEnumConverter {CamelCaseText = true}); + jsonSettings.Converters.Add(new StringEnumConverter { CamelCaseText = true }); jsonSettings.ObjectCreationHandling = ObjectCreationHandling.Replace; jsonSettings.DefaultValueHandling = DefaultValueHandling.Populate; translations = JsonConvert.DeserializeObject(input, jsonSettings); @@ -389,19 +557,24 @@ public static Translation Load(ILogicSettings logicSettings) item => translations._translationStrings.All(a => a.Key != item.Key)) .ToList() .ForEach(translations._translationStrings.Add); + new Translation()._pokemonTranslationStrings.Where( + item => translations._pokemonTranslationStrings.All(a => a.Key != item.Key)) + .ToList() + .ForEach(translations._pokemonTranslationStrings.Add); } else { translations = new Translation(); translations.Save(Path.Combine(translationPath, "translation.en.json")); } + return translations; } public void Save(string fullPath) { var output = JsonConvert.SerializeObject(this, Formatting.Indented, - new StringEnumConverter {CamelCaseText = true}); + new StringEnumConverter { CamelCaseText = true }); var folder = Path.GetDirectoryName(fullPath); if (folder != null && !Directory.Exists(folder)) diff --git a/PoGo.NecroBot.Logic/Tasks/CatchIncensePokemonsTask.cs b/PoGo.NecroBot.Logic/Tasks/CatchIncensePokemonsTask.cs index e622be497..d45c17283 100644 --- a/PoGo.NecroBot.Logic/Tasks/CatchIncensePokemonsTask.cs +++ b/PoGo.NecroBot.Logic/Tasks/CatchIncensePokemonsTask.cs @@ -39,7 +39,7 @@ public static async Task Execute(ISession session, CancellationToken cancellatio ( session.LogicSettings.UsePokemonToNotCatchFilter && session.LogicSettings.PokemonsNotToCatch.Contains( pokemon.PokemonId ) ) ) { Logger.Write(session.Translation.GetTranslation(TranslationString.PokemonIgnoreFilter, - pokemon.PokemonId)); + session.Translation.GetPokemonTranslation(pokemon.PokemonId))); } else { diff --git a/PoGo.NecroBot.Logic/Tasks/CatchNearbyPokemonsTask.cs b/PoGo.NecroBot.Logic/Tasks/CatchNearbyPokemonsTask.cs index f9a820e12..26d957f4f 100644 --- a/PoGo.NecroBot.Logic/Tasks/CatchNearbyPokemonsTask.cs +++ b/PoGo.NecroBot.Logic/Tasks/CatchNearbyPokemonsTask.cs @@ -43,7 +43,7 @@ public static async Task Execute(ISession session, CancellationToken cancellatio if( ( session.LogicSettings.UsePokemonSniperFilterOnly && !session.LogicSettings.PokemonToSnipe.Pokemon.Contains( pokemon.PokemonId ) ) || ( session.LogicSettings.UsePokemonToNotCatchFilter && session.LogicSettings.PokemonsNotToCatch.Contains( pokemon.PokemonId ) ) ) { - Logger.Write(session.Translation.GetTranslation(TranslationString.PokemonSkipped, pokemon.PokemonId)); + Logger.Write(session.Translation.GetTranslation(TranslationString.PokemonSkipped, session.Translation.GetPokemonTranslation(pokemon.PokemonId))); continue; } diff --git a/PoGo.NecroBot.Logic/Tasks/DisplayPokemonStatsTask.cs b/PoGo.NecroBot.Logic/Tasks/DisplayPokemonStatsTask.cs index 7581c5d95..f18f9d792 100644 --- a/PoGo.NecroBot.Logic/Tasks/DisplayPokemonStatsTask.cs +++ b/PoGo.NecroBot.Logic/Tasks/DisplayPokemonStatsTask.cs @@ -73,7 +73,7 @@ public static async Task Execute(ISession session) foreach (var pokemon in allPokemonInBag) { Dumper.Dump(session, - $"{pokemon.PokemonId},{PokemonInfo.GetLevel(pokemon)},{pokemon.Cp},{PokemonInfo.CalculatePokemonPerfection(pokemon)},{pokemon.Stamina},{pokemon.StaminaMax},{pokemon.Move1},{pokemon.Move2},{PokemonInfo.GetCandy(pokemon, myPokemonFamilies, myPokeSettings)},{pokemon.OwnerName},{pokemon.Origin},{pokemon.HeightM},{pokemon.WeightKg},{pokemon.IndividualAttack},{pokemon.IndividualDefense},{pokemon.IndividualStamina},{pokemon.CpMultiplier},{pokemon.BattlesAttacked},{pokemon.BattlesDefended},{pokemon.CreationTimeMs},{pokemon.NumUpgrades},{pokemon.AdditionalCpMultiplier},{pokemon.Favorite},{pokemon.Nickname}", + $"{session.Translation.GetPokemonTranslation(pokemon.PokemonId)},{PokemonInfo.GetLevel(pokemon)},{pokemon.Cp},{PokemonInfo.CalculatePokemonPerfection(pokemon)},{pokemon.Stamina},{pokemon.StaminaMax},{pokemon.Move1},{pokemon.Move2},{PokemonInfo.GetCandy(pokemon, myPokemonFamilies, myPokeSettings)},{pokemon.OwnerName},{pokemon.Origin},{pokemon.HeightM},{pokemon.WeightKg},{pokemon.IndividualAttack},{pokemon.IndividualDefense},{pokemon.IndividualStamina},{pokemon.CpMultiplier},{pokemon.BattlesAttacked},{pokemon.BattlesDefended},{pokemon.CreationTimeMs},{pokemon.NumUpgrades},{pokemon.AdditionalCpMultiplier},{pokemon.Favorite},{pokemon.Nickname}", dumpFileName); } } diff --git a/PoGo.NecroBot.Logic/Tasks/FavoritePokemonTask.cs b/PoGo.NecroBot.Logic/Tasks/FavoritePokemonTask.cs index 091580012..c3ba7b457 100644 --- a/PoGo.NecroBot.Logic/Tasks/FavoritePokemonTask.cs +++ b/PoGo.NecroBot.Logic/Tasks/FavoritePokemonTask.cs @@ -34,7 +34,7 @@ public static async Task Execute(ISession session, CancellationToken cancellatio session.EventDispatcher.Send(new NoticeEvent { Message = - session.Translation.GetTranslation(TranslationString.PokemonFavorite, perfection, pokemon.PokemonId, pokemon.Cp) + session.Translation.GetTranslation(TranslationString.PokemonFavorite, perfection, session.Translation.GetPokemonTranslation(pokemon.PokemonId), pokemon.Cp) }); } } diff --git a/PoGo.NecroBot.Logic/Tasks/LevelUpPokemonTask.cs b/PoGo.NecroBot.Logic/Tasks/LevelUpPokemonTask.cs index 514164ab8..88c6934c8 100644 --- a/PoGo.NecroBot.Logic/Tasks/LevelUpPokemonTask.cs +++ b/PoGo.NecroBot.Logic/Tasks/LevelUpPokemonTask.cs @@ -28,7 +28,7 @@ public static async Task Execute(ISession session, CancellationToken cancellatio var upgradeResult = await session.Inventory.UpgradePokemon(pokemon.Id); if (upgradeResult.Result.ToString().ToLower().Contains("success")) { - Logger.Write("Pokemon Upgraded:" + upgradeResult.UpgradedPokemon.PokemonId + ":" + + Logger.Write("Pokemon Upgraded:" + session.Translation.GetPokemonTranslation(upgradeResult.UpgradedPokemon.PokemonId) + ":" + upgradeResult.UpgradedPokemon.Cp); } else if (upgradeResult.Result.ToString().ToLower().Contains("insufficient")) @@ -45,7 +45,7 @@ public static async Task Execute(ISession session, CancellationToken cancellatio { Logger.Write( "Pokemon Upgrade Failed Unknown Error, Pokemon Could Be Max Level For Your Level The Pokemon That Caused Issue Was:" + - upgradeResult.UpgradedPokemon.PokemonId); + session.Translation.GetPokemonTranslation(upgradeResult.UpgradedPokemon.PokemonId)); break; } } diff --git a/PoGo.NecroBot.Logic/Tasks/RenamePokemonTask.cs b/PoGo.NecroBot.Logic/Tasks/RenamePokemonTask.cs index c6af98de7..f78251874 100644 --- a/PoGo.NecroBot.Logic/Tasks/RenamePokemonTask.cs +++ b/PoGo.NecroBot.Logic/Tasks/RenamePokemonTask.cs @@ -26,7 +26,7 @@ public static async Task Execute(ISession session, CancellationToken cancellatio cancellationToken.ThrowIfCancellationRequested(); var perfection = Math.Round(PokemonInfo.CalculatePokemonPerfection(pokemon)); - var pokemonName = pokemon.PokemonId.ToString(); + var pokemonName = session.Translation.GetPokemonTranslation(pokemon.PokemonId); // iv number + templating part + pokemonName <= 12 var nameLength = 12 - (perfection.ToString(CultureInfo.InvariantCulture).Length + @@ -48,7 +48,7 @@ public static async Task Execute(ISession session, CancellationToken cancellatio session.EventDispatcher.Send(new NoticeEvent { Message = - session.Translation.GetTranslation(TranslationString.PokemonRename, pokemon.PokemonId, + session.Translation.GetTranslation(TranslationString.PokemonRename, session.Translation.GetPokemonTranslation(pokemon.PokemonId), pokemon.Id, oldNickname, newNickname) }); }