Loreinator / Shuffle-Move

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

GUI helpfullness improvement - ToolTips #26

Closed Loreinator closed 8 years ago

Loreinator commented 9 years ago

See here for how to implement in java

This needs to be added to all GUI buttons, labels, and fields in the program (not images, icons, or menu items).

The tooltips need to use i18n keys to obtain their text, allowing full localization of their helpfulness.

There are a LOT of gui components to put this on, so it will be a large amount of code additions as well as a lot of translation work for our translators.

kpwbo commented 8 years ago

Hi. :)

I think I can work on this. I have forked Shuffle Move and gave it a try to see how it works.

Can you check this commit and tell me if that is how it is supposed to be done ? Of course, I'll have to add the i18n keys for all the languages, which I forgot to do at first. For the non-English languages, do I keep the English text until the translations are available ?

Here's a screenshot of the added tooltip (the mouse is over the checkbox)

Loreinator commented 8 years ago

Yup, that's the general process of how to use i18n in the Shuffle Move.

Just a note though: The process I usually follow for introducing new i18n is:

  1. Create keys in the base properties file for that class. For this, it would mean making your tooltip entry in EditRosterService.properties
  2. Copy those keys over to the english properties files (_en and _en_CA)
  3. If there are only a couple keys, then send them off in a simple comment to each of the translators - when they respond it goes in to the next release. We don't wait for responses because they are low priority (just cosmetic) and the translators have lives and stuff that may keep them busy for a while. However if there are a large volume of keys, then they should be compiled simply into a file on their own and shared with the translators for them to update them.
  4. When the translations come back, the process is rather simple: Copy them into the native side of http://native2ascii.net/ and hit the arrow to convert the text. Then copy the result on the right side and paste it into notepad. Finally, copy the appropriate entries into each of the localization files.
  5. When complete, commit the changes and sync to the github repository. The build should automatically be built and uploaded to Google Drive here (Note this is only for commits made to the master branch of Loreinator/Shuffle-Move).
  6. With this new build, check that everything is good in the built package, then if there was more than a handful of tweaks/additions you should send it off to the translators to verify that everything got in alright and that there's nothing missing.

One other note about the code side: Some of the more 'live' components might update the i18n on the fly, you should probably check that you're able to retrieve the tooltiptext from the GUI Component directly or there will need to be separate tracking to handle that. One good example is the Entry Mode Panel - swapping the language will make it change text, so if the language is swapped the tooltips should also be updated.