Skip to content

fix(extensions-manager): restore 'Install Extension' label for en-GB users - #1694

Open
xiao115255 wants to merge 2 commits into
DevToys-app:mainfrom
xiao115255:claude/issue-1651
Open

xiao115255 wants to merge 2 commits into
DevToys-app:mainfrom
xiao115255:claude/issue-1651

Conversation

@xiao115255

Copy link
Copy Markdown

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 resource ExtensionsManager.InstallExtension inside ExtensionsManager.en-GB.resx, while the neutral ExtensionsManager.resx correctly contained Install an extension. The mismatch appears to have been introduced by a Crowdin translation sync PR.

This PR:

  • Restores the InstallExtension value in ExtensionsManager.en-GB.resx to Install an extension (matching the neutral resource; en-GB English is not expected to differ for this label).
  • Adds two xUnit/FluentAssertions tests under src/app/tests/DevToys.UnitTests/Blazor/BuiltInTools/ExtensionsManagerResourceTests.cs that 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:

  • The "Install Extension" button now renders a visible label for en-GB users.
  • No other locale in ExtensionsManager.*.resx has an empty InstallExtension entry (verified via grep across all 41 locale files).
  • The neutral resource is unchanged, so users on other locales are unaffected.

Related finding (out of scope for this PR)

While auditing the file, I noticed AccessibleName in ExtensionsManager.en-GB.resx also has an empty value (<value></value>), where the neutral resource contains Manage extensions in DevToys. That value flows into the tool's accessibility name (AccessibleNameResourceName = nameof(ExtensionsManager.AccessibleName) in ExtensionsManagerGuiTool.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 the AccessibleName fix into this PR (or a follow-up) at the maintainer's preference; just say the word.

How Tested

  • Added two failing-first tests; both pass after the fix.
  • 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).
  • The CI pipeline (.github/workflows/ci.yml) runs ./build.cmd RunTests on 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

xiao115255 and others added 2 commits September 30, 2026 01:32
…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>
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.

Manage Extensions: Potential Missing Language Entry

1 participant