Repository navigation
fix(installer): localize Ursa control strings and correct English wording - #6
Merged
Merged
Conversation
…ding Ursa's SemiTheme ships its built-in control strings (PopConfirm and MessageBox buttons) in en-US / fr-FR / zh-CN, defaulting to zh-CN. The app only set Lang.Resources.Culture, so English mode still showed Chinese confirm/cancel buttons. Resolve the UrsaSemiTheme style and set its Locale from the effective culture at startup. Also fix ungrammatical English resource strings (ConfirmTitle, InvalidInstallPath, FileNotFound, DeleteFailed, SelectFirst, InstallDone, ResetDone) and drop the British "programme" spelling in favour of "program". Fixes MetaHookSv/MetaHookSv#912 Co-Authored-By: Claude Code <noreply@anthropic.com>
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.
Problem
Fixes MetaHookSv/MetaHookSv#912.
In English mode the installer's own strings were translated, but the Ursa
PopConfirmbuttons still rendered as 取消 / 确定:Root cause
Ursa's
SemiThemeships its built-in control strings (thePopConfirmandMessageBoxbuttons) inen-US/fr-FR/zh-CN, and defaults to zh-CN.App.axamldeclares<u-semi:SemiTheme/>without aLocale, andApp.axaml.csonly set
Lang.Resources.Culture— the theme'sLocalewas never touched, soits buttons stayed Chinese regardless of the selected language.
Verified directly against the shipped package:
Changes
App.axaml.cs: resolve theUrsaSemiThemestyle and set itsLocalefrom theeffective culture at startup (
zh*→ zh-CN,fr*→ fr-FR, otherwise en-US).This keeps the theme's buttons in sync with the app language.
Resources.resx: fix the ungrammatical English strings that were also part ofthe report:
ConfirmTitleConfirmInstallConfirmUninstallInvalidInstallPathFileNotFoundDeleteFailedSelectFirstInstallDoneResetDoneBuildDirectoryNotFoundVerification
dotnet build MetahookInstaller.sln -c Debug— 0 warnings, 0 errors.dotnet run --project tests/MetahookInstaller.FileTests— 33/33 pass.u-semi:SemiThemeis found viaStyles.OfType<Ursa.Themes.Semi.SemiTheme>()and setting
Locale = en-USyieldsOK=OK CANCEL=Cancel.Note: the GUI itself was not launched interactively; verification is the build,
the regression harness, and the locale mechanism probe above.
🤖 Generated with Claude Code