Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Improve ctkLanguageComboBox #1019

Merged
merged 1 commit into from
Jan 20, 2022

Conversation

lassoan
Copy link
Member

@lassoan lassoan commented Jan 20, 2022

  • Added directories property to specify multiple folders to scan for translation (*.qm) files (before that only one directory could be specified).
  • Added countryFlagsVisible property to display "country" name instead of country flag, because not all region is a country with a flag (e.g., Latin America).
  • Updated the logic that determines if country name (or flag) should be shown: if a translation of a language is only available for one region then the region name is not displayed. This avoids redundant item text such as "Hungarian (Hungary)" (it is just displayed as "Hungarian").

Example of countryFlagsVisible=false:

image

@lassoan lassoan requested a review from pieper January 20, 2022 20:21
@lassoan lassoan self-assigned this Jan 20, 2022
@jamesobutler
Copy link
Contributor

I suppose this will also help for “English (US)” and “English (UK)” entries for “favorite color” vs “favourite colour”

@lassoan
Copy link
Member Author

lassoan commented Jan 20, 2022

Yes, anybody can now provide translations for Slicer at https://crowdin.com/translate/slicer
UK English language is not enabled yet but if you are willing to take on that task then let us know and we can add it.

@jamesobutler
Copy link
Contributor

I'll stick with improving "English" as though it is "English (US)" as the Slicer default language.

- Added `directories` property to specify multiple folders to scan for translation (*.qm) files (before that only one directory could be specified).
- Added `countryFlagsVisible` property to display "country" name instead of country flag, because not all region is a country with a flag (e.g., Latin America).
- Updated the logic that determines if country name (or flag) should be shown: if a translation of a language is only available for one region then the region name is not displayed. This avoids redundant item text such as "Hungarian (Hungary)" (it is just displayed as "Hungarian").
@lassoan lassoan force-pushed the languagebox-improvements branch from 244856a to fe296ab Compare January 20, 2022 21:29
Copy link
Member

@pieper pieper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@pieper pieper merged commit 4bdd45e into commontk:master Jan 20, 2022
@lassoan lassoan deleted the languagebox-improvements branch January 21, 2022 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants