pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

Implements localization on Modifiers and everything related to them

Open Emmayuel80 opened this issue 9 months ago • 3 comments

This is a big change since a lot of things were dependent on the name string, so it needs to be carefully tested before merging, I did try to test every modifier before submitting and seemed fine but there's a lot of them so it's possible I missed something.

The most critical bug I found while making this is that sometimes i18n doesn't execute the t method at the right time, so it generates undefined values (Mostly when rendering modifiers created with the ModifierType constructor, some modifiers like AddPokeballModifierType render just fine). I added a solution for when that happens, but it was by brute force so the root of the cause it's still a mystery, needs more investigation.

Changelog: -Added berry en locale -Added modifier types en/es locale -Added modifier en/es locale contains miscelaneous descriptions for modifiers -Added nature en/es locale -Added type en locale -Import new localization files into i18n plugin

  • Creates localize function withing various modifier classes -Reeplaces enum name strings for berry, nature, battle stats, vouchers, attack type boosters, stat boosters -Includes Dire Hit on the TempStatBooster modifier -Added a workaround for modifier name and description being undefined at rendering time (not the most optimal, needs more investigation)

Emmayuel80 avatar Apr 28 '24 17:04 Emmayuel80

I would advise to make separate branches/PRs to properly introduce these changes : one for berries, another one for natures, etc.🤔 IMHO It would make it easier to review and test, and make sure there isn't any hidden bug or regression 😅

TeKrop avatar May 02 '24 20:05 TeKrop

I'm currently busy with other stuff from work, will revisit this when I gain some free time again 👀

Emmayuel80 avatar May 02 '24 20:05 Emmayuel80

No news about this?

Adri1 avatar May 15 '24 02:05 Adri1

Currently out of date. Most of this has now been added in smaller chunks.

bennybroseph avatar May 16 '24 08:05 bennybroseph