Slicer / SlicerLanguagePacks

3D Slicer extension for creating, editing, and storing translations for Slicer core and extensions
MIT License
7 stars 11 forks source link

BUG: Ensure language combobox shows default language #57

Open jcfr opened 5 months ago

jcfr commented 5 months ago

This change ensures the fix integrated through commontk/CTK#1179 (BUG: Fix ctkLanguageComboBox normalizing default language and selection) is effective.

After installing the extension without having selected any language (and a settings file without any language entry or an empty one):

Before After
image image

References:

lassoan commented 4 months ago

The issue description suggests that it is wrong to display an empty selection when the current application language is not selected. For me, the current behavior seems correct, as it is important to distinguish between the user selected "English (US)" / the user did not specify any language. For example, if no language is explicitly selected then in the future we could automatically use the operating system's language.

lassoan commented 4 months ago

Maybe a good solution could be to have an explicit automatic option. If the user selects that then language would be set to empty string in the application settings. This automatic language option could appear in the combobox as (automatic) or automatic - English (US). When we implement automatic language selection based on OS language then we could always display the actual OS language instead of hardcoding - English (US).

pieper commented 4 months ago

Yes, automatically using the OS setting makes a lot of sense and making this explicit in the combo box would be good.