Repository navigation
fix(extensions-manager): restore 'Install Extension' label for en-GB users - #1694
Open
xiao115255 wants to merge 2 commits into
Open
xiao115255 wants to merge 2 commits into
xiao115255 wants to merge 2 commits into
Conversation
…users Fixes DevToys-app#1651. The 'Install Extension' button text in the Manage Extensions tool was rendered without a label when the UI culture was en-GB, because the strongly-typed resource ExtensionsManager.InstallExtension had an empty value in ExtensionsManager.en-GB.resx (apparently a Crowdin translation glitch). The button then only showed its icon, leaving users unable to discover the feature. - Set the en-GB value to 'Install an extension', matching the neutral resource (en-GB English is not expected to differ for this label). - Add unit tests that pin the non-empty en-GB value and confirm it matches the neutral text. Co-Authored-By: Claude Code <noreply@anthropic.com>
Address code-review feedback on ExtensionsManagerResourceTests: - Guard the neutral-comparison test with its own NotBeNullOrWhiteSpace assertion so it stays meaningful if run in isolation. - Use CultureInfo.GetCultureInfo (cached instance) instead of constructing a new CultureInfo per test. - Add the missing trailing newline to the test file. 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.
What & Why
Fixes #1651.
The "Install Extension" button in DevToys' Manage Extensions tool rendered icon-only when the UI culture was
en-GB, leaving users on British English unable to discover how to install an extension. The root cause was an empty value in the strongly-typed resourceExtensionsManager.InstallExtensioninsideExtensionsManager.en-GB.resx, while the neutralExtensionsManager.resxcorrectly containedInstall an extension. The mismatch appears to have been introduced by a Crowdin translation sync PR.This PR:
InstallExtensionvalue inExtensionsManager.en-GB.resxtoInstall an extension(matching the neutral resource; en-GB English is not expected to differ for this label).src/app/tests/DevToys.UnitTests/Blazor/BuiltInTools/ExtensionsManagerResourceTests.csthat pin the non-empty en-GB value and assert it matches the neutral text, preventing a future Crowdin regression from silently reintroducing the bug.Verification against issue acceptance criteria:
ExtensionsManager.*.resxhas an emptyInstallExtensionentry (verified via grep across all 41 locale files).Related finding (out of scope for this PR)
While auditing the file, I noticed
AccessibleNameinExtensionsManager.en-GB.resxalso has an empty value (<value></value>), where the neutral resource containsManage extensions in DevToys. That value flows into the tool's accessibility name (AccessibleNameResourceName = nameof(ExtensionsManager.AccessibleName)inExtensionsManagerGuiTool.cs:21), so en-GB screen-reader users currently get an empty tool name — same root cause, same file. I kept this PR strictly scoped to the button label reported in the issue, but I'm happy to fold theAccessibleNamefix into this PR (or a follow-up) at the maintainer's preference; just say the word.How Tested
dotnet test src/app/tests/DevToys.UnitTests/DevToys.UnitTests.csproj -c Debug→ 152/152 passed (150 existing + 2 new).dotnet build src/app/dev/DevToys.Blazor/DevToys.Blazor.csproj -c Debug→ 0 errors (TypeScript step skipped locally; the resource change does not affect TS)..github/workflows/ci.yml) runs./build.cmd RunTestson Windows / Ubuntu / macOS, which discovers**/*Tests.csproj(including the new tests) and exercises the full NUnit/xUnit suite plus build.AI Disclosure
This PR was prepared with AI assistance (Claude Code), reviewed and submitted by @xiao115255.
🤖 Generated with Claude Code