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

Mgr: Offer only languages for which we have translations #5332

Closed
wants to merge 1 commit into from

Conversation

CharlieFenton
Copy link
Contributor

Before BOINC 7.24.0, the Other Options dialog offered users all 897 languages and language variants possibly supported by wxWidgets. PR #5176 reduced this number by eliminating those for which we don't have a reasonable substitute translation for the requested language variant. For example, if the user selected the French dialect spoken in Chad (ISO language code fr_TD), BOINC substitutes generic French (ISO code fr); so the dialog offered fr_TD even though it would actually provide a generic French translation.

This is still an unwieldy number of choices and gives the false impression that BOINC actually provides all the listed dialects. This PR modifies the code to offer only the language dialects for which we provide actual translations. For backward compatibility, if the user had selected a dialect not in the new list while running an earlier version of BOINC, that dialect will continue to be listed.

In addition, this change makes it possible for me to make the improvement I unsuccessfully tried to implement in PR #5329: Compare best translations for selected languages.

@AenBleidd and @BrianNixon please tell me what you think.

Here is how the new trimmed language selection dialog looks now on the Mac:

Screenshot 2023-08-16 at 3 34 39 AM

Mgr: compare best translations for selected languages
@CharlieFenton CharlieFenton marked this pull request as draft August 16, 2023 11:00
@CharlieFenton CharlieFenton marked this pull request as ready for review August 16, 2023 11:18
@CharlieFenton CharlieFenton marked this pull request as draft August 16, 2023 13:57
@BrianNixon
Copy link
Contributor

BrianNixon commented Aug 16, 2023

This approach was one of the interim stages of #5176. I rejected it because it removes the ability to choose different regional formats for the same base language. If the only choice for English now uses U.S. formatting, expect complaints from users who find M/D/YY for dates unfathomable…

@CharlieFenton
Copy link
Contributor Author

@BrianNixon Thank you for the clear explanation. I am closing this PR. For this reason, my idea of comparing the best translations rather than the full ISO code in PR #5329 was wrong, since it only considered the translations and not the regional locale attributes.

But this led me to do some testing and discovered that the regional attributes (date, time and numeric [decimal point & thousands separator] formats) are not getting set properly on the Mac when Automatic Detection is used, though they are correct when the Country and region is explicitly selected from the list in the Other Options dialog. This was true in 7.22.2 (automatic detection was used if the LanguageISO preference tag was an empty string, thus: LanguageISO=.) I believe this has been true for a very long time, and may never have worked.

This problem occurred because wxLocale::GetLanguageInfo(wxLANGUAGE_DEFAULT) doesn't get the correct default language code on the Mac for the reason explained in https://stackoverflow.com/questions/48136456. On the Mac, we must use wxUILocale::GetSystemLanguage(). The wxWidgets documentation for wxLocale warns of this.

I will be submitting a new PR to fix this.

@CharlieFenton CharlieFenton deleted the trim_language_list branch August 17, 2023 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants