Loreinator / Shuffle-Move

Program to help choose moves in the Pokemon Shuffle puzzle game
GNU General Public License v3.0
97 stars 18 forks source link

Some GUI elements are not updated when the language changes #86

Closed kpwbo closed 9 years ago

kpwbo commented 9 years ago

Example of how to reproduce : 1) Open Shuffle Move. 2) Open the Move Chooser. 3) Change Shuffle Move's language. 4) Notice how the menu of Move Chooser, its buttons, and the label are not translated into the new language. (this happens with lots of things in different windows, this is just an example)

The basic solution is to update the text of these components when the language changes. I've tried it out here https://github.com/kpwbo/Shuffle-Move/commit/b05d8cfbcf3fcb28f081cfa3b2ad89edf3c03e41. Is there a better way of doing this ? I'm thinking of maybe adding checks to see if the language has changed before setting the text, but I'm not sure if that would be efficient/necessary.

Loreinator commented 9 years ago

Fixed here by making Move Chooser use the same update methodology as seen in the primary menu for the main window (uses its own instance of the menu).

kpwbo commented 9 years ago

The Move Chooser window is actually just an example, the bug is also present in the other windows as well (File/Import, Roster/Edit, Roster/Edit Species, Team/Edit, Move/Preferences, Help/Help, Help/Bug Report, Help/Update, Help/About, and the Save prompt). They all have buttons/labels/etc. that aren't updated when the language changes while they are already opened.

Loreinator commented 9 years ago

The other popups were never intended to update language when you switch, since they modify data instead of acting like a display. I won't be adding them to a similar update system unless there is a large number of people who have issue with needing to close and reopen those temporary windows when they change the language.