Closed skaldarnar closed 1 year ago
Looks good to me code-wise, but I still need to test it. I currently plan to test it tomorrow, so please ping me again if I didn't review/comment again until the day after tomorrow.
To answer your comments
- settings view: logging level label
- settings view: show pre-releases and nightly builds checkbox
They do update for me when I test with the latest code ... :roll_eyes:
- settings view: advanced options details section title
- main view: tab titles
The tab names just don't have translations. Code-wise, the label binding is in place and they would update if we'd provide translations for them. Same holds for the "advanced options" section title.
[...] in the settings view, the initial and max memory drop-down "not used" default stays in English when changing the language.
I have no clue how I can get the selected cell of the check box to update when the locale changes. I tried a custom cell factory in which I bind the text property, but that also did not help. I cannot find anything like TableView#refresh
for the ComboBox
, so the only thing left would be a hacky "listen to locale changes and re-create the whole combo boxes each time"... Or the there is a smarter way and I'm just to dump to see it... :confused:
They do update for me when I test with the latest code ... :roll_eyes:
Seems I only tested with languages that don't have a translation for them yet :sweat_smile: When I select German, it works :+1:
The tab names just don't have translations. Code-wise, the label binding is in place and they would update if we'd provide translations for them. Same holds for the "advanced options" section title.
FYI: I added german translations for these in https://github.com/MovingBlocks/TerasologyLauncher/pull/682
Thanks for the review :green_heart: Will address the remaining comments in a follow-up PR.
Contains
Languages
and merge it withBundleUtils
BundleUtils
>>>I18N
, now holding utility for translating resource bundles in generalI18N
to create aTooltip
with a string bindingLocale
s as value for the language selection and use custom cell renderer for icon and translated textBased on https://sodocumentation.net/javafx/topic/5434/internationalization-in-javafx
Contributes to #505.
How to test
This binds the translation of labels and tooltips to the current settings.
~/.terasologylauncher/settings.json
) and is picked up on next startFor good measure, switch up the steps, close and restart in between, etc.
Also, please take note of any labels or texts that do not update when changing the locale.
Outstanding before merging
JavaHeapSize
or remove it completely? (see https://github.com/MovingBlocks/TerasologyLauncher/pull/679#issuecomment-1301278345)