Repository navigation
Conversation
An empty Language setting now means "follow CultureInfo.CurrentUICulture", matched against the catalogues that are actually installed: exact culture first, then the primary language subtag, then the en-AU source culture. The detected culture is deliberately not written back to settings, so the app keeps following later changes to the OS display language. Existing installs keep whatever they already saved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
An empty
Languagesetting now means "follow the system language" instead of falling back to a hard-codeden-AU.Resolution order, against the catalogues that are actually installed:
zh-CN->zh-CN.toml)zh-TW/zh-HK->zh-CN;en-US/en-GB->en-AU)en-AUsource cultureThe detected culture is deliberately not written back to
settings.json- persisting it would freeze the value and stop the app following later changes to the Windows display language.Refs #388.
Why no "follow system language" dropdown entry
The empty setting is the follow-system state. A dropdown row would need a second sentinel that survives the round trip through
ComboBox.SelectedIndex, and picking a real language already makes the choice sticky viaLoadLanguage(). The settings page keeps showing whichever language is actually active becauseCurrentLanguagereadsL.CurrentCulture, not the setting.Scope: new installs only, on purpose
SettingsService.LoadSettings()re-serialises settings on every start, so every existing install already has"language": "en-AU"on disk - indistinguishable from a deliberate choice. Migrating them would need either a newLanguageSetExplicitlyfield, or aSettingsVersionbump that resets every other setting. Neither seemed worth it for a default; happy to add the field if you'd rather upgraders picked this up too.One existing path had to change
SettingsViewModel.CheckForLanguageUpdates()calledLoadLanguage(AppSettings.Language)in both arms of anif/elsewhose branches were identical. With an empty setting that becomesL.TryLoadLanguage(""), which fails - silently turning the "Reload Languages" button into a no-op. It now reloads the culture that is actually loaded, and no longer re-persists a language the user never chose.CheckForLanguageUpdate()likewise keys offL.CurrentCulture.Name.Verification
Unrelated, but it blocked building
The committed
NuGet.Configpoints at..\LazyTranslate\artifacts, and neitherLazyTranslatenorLazyTranslate.CatalogueBuilderis on nuget.org. The publicIridiumIO/LazyTranslatemaster is at 0.1.0 and is missing three things this repo already uses -LocalisationOptions.ProgramVersion,.OutputMissingTranslationsToDebug, and theloc:MultiBindingmarkup extension - sodotnet restorefails from a clean clone. I patched a local copy to compile this. Flagging it in case the gap is unintentional rather than just an unpublished package.