-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Initializing without a country code should find l10ns with a country code #109
Comments
Do we care what happens if both zh-CN and zh-Hans (or -HK, -TW, or -AU) are available? |
If a client tries to initialize a LocalizationManager with only a language code, and we have a language available with that code plus extra information, use that language without prompting the user. This addresses #109 This addresses https://jira.sil.org/browse/LT-21232
I'm not an expert on Chinese, but these can be tricky questions. For some languages, including Chinese, there is more than one script, and while the spoken language might me more or less the same, there is no guarantee that a person who reads one script will have any ability to read another. Where there is a single predominant script, an generic language tag should probably select that script without asking. Where there are multiple scripts or country-specific variants with no clear default, it's presumably better to ask than to blindy select one. But if the differences between the two are relatively minor (e.g., en-US vs. en-GB), there might be times when it is better to select one and leave it to the user to select the preferred one later if they need to. |
If a client tries to initialize a LocalizationManager with only a language code, and we have a language available with that code plus extra information, use that language without prompting the user. This addresses #109 This addresses https://jira.sil.org/browse/LT-21232
Right, this is tricky. Unfortunately, L10nSharp doesn't work with language tags apart from extracting the bare language code to find matches. Without shipping langtags.json, it would be impossible to know whether we're looking at en-US vs. en-GB or zh-Hans vs. zh-Hant (simplified or traditional script). Do you think the existing code should be changed to require an exact or more generic match? I agree that it may be better to allow the user to choose if there are multiple matches. |
My two cents: |
Present behaviour (v6.1.0-beta008): |
If a client tries to initialize a LocalizationManager with only a language code, and we have a language available with that code plus extra information, use that language without prompting the user. This addresses #109 This addresses https://jira.sil.org/browse/LT-21232
If a client tries to initialize a LocalizationManager with only a language code, and we have a language available with that code plus extra information, use that language without prompting the user. Update ReadMe and ChangeLog This addresses #109 This addresses https://jira.sil.org/browse/LT-21232 +semver: major (I don't expect this to break anything, but it does change behaviour for existing clients) Also: * Fix StackOverflowException in obsolete Create method * Fix capitalization of Xliff in an internal class * Accept autocorrections to the solution
var palasoLocMan = LocalizationManager.Create("zh", "Palaso", "Palaso", version, installedL10nBaseDir, userL10nBaseDir, CommonResources.chorus, FlexLocalizationEmailAddress, "SIL");
Expected: a zh-CN LocalizationManager is initialized w/o user input
Actual: a dialog says Chinese is unavailable and prompts the user to choose a different language from { English, Chinese (China) }
This would resolve https://jira.sil.org/browse/LT-21232, but that was also resolved client-side.
The text was updated successfully, but these errors were encountered: