Skip to content

Drop hardcoded /en-us/ locale from Microsoft Learn doc links - #193

Open
Chiara Mooney (chiaramooney) wants to merge 1 commit into
mainfrom
chiaramooney-learn-links-drop-en-us
Open

Drop hardcoded /en-us/ locale from Microsoft Learn doc links#193
Chiara Mooney (chiaramooney) wants to merge 1 commit into
mainfrom
chiaramooney-learn-links-drop-en-us

Conversation

@chiaramooney

Copy link
Copy Markdown
Collaborator

Fixes #190

What

Every "Learn more" link in the manifest editor webview hardcoded the /en-us/ locale segment, pinning Microsoft Learn docs to English for all readers. Microsoft Learn negotiates locale server-side, so a locale-less URL 302-redirects each reader to their preferred language, while an en-us URL stays English.

Changes

  • Removed /en-us/ from all 17 Learn links (15 unique URLs):
    • src/manifest-editor/webview-content.ts — 14 links
    • src/manifest-editor/webview-script-applications.ts — 3 links
  • Added src/test/docs-links.test.ts, a regression guard that scans src/ and fails if any file reintroduces a locale-pinned learn.microsoft.com/xx-xx/ URL.

Legitimate BCP-47 en-us language tags (appxmanifest Resource Language="en-us", validator error text, test fixtures, README) are untouched — the guard regex only matches learn.microsoft.com URLs.

Validation

  • npm run pretest (tsc + eslint) — clean, only pre-existing warnings
  • New guard test passes; English readers see no behavior change

Microsoft Learn negotiates locale server-side, so locale-less URLs
redirect readers to their preferred language. Pinning /en-us/ forced
English docs for everyone. Adds a test guarding against regressions.

Fixes #190

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

VSIX Build

Artifact Baseline Current Delta
VS Code Extension (VSIX) 27.88 MB 27.88 MB 📉 -0.0 KB (-0.00%)

Updated 2026-08-20 23:18:51 UTC · commit 45e39e4 · workflow run

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Manifest editor "Learn more" links hardcode /en-us/, forcing English docs for all users

2 participants