Skip to content

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

Description

Describe the bug

Every Microsoft Learn "Learn more" link rendered by the manifest editor webview hardcodes the /en-us/ locale segment in its URL. This pins the docs to English for all users regardless of their language, instead of letting learn.microsoft.com serve the reader's preferred language.

Microsoft Learn already handles locale negotiation server-side. A locale-less URL 302-redirects to the reader's preferred locale based on Accept-Language, while an en-us URL stays pinned to English:

# no locale segment -> redirected to the reader's language
$ curl -I -H "Accept-Language: fr-FR,fr;q=0.9" \
    https://learn.microsoft.com/uwp/schemas/appxpackage/uapmanifestschema/element-identity
302 -> https://learn.microsoft.com/fr-fr/uwp/schemas/appxpackage/uapmanifestschema/element-identity

# hardcoded en-us -> stays English
$ curl -I -H "Accept-Language: fr-FR,fr;q=0.9" \
    https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-identity
301 -> https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-f-identity

Omitting the locale is also the documented guidance for Microsoft Learn links, and it makes the URLs shorter.

Affected locations

All 17 doc links live in two files, covering 15 unique URLs — every one of them hardcodes /en-us/. There are no locale-less Learn links anywhere in the repo, so this is consistent across the board:

src/manifest-editor/webview-content.ts (14 links) — lines 99, 165, 203, 350, 360, 365, 370, 375, 380, 385, 393, 401, 409, 426

src/manifest-editor/webview-script-applications.ts (3 links) — lines 131, 220, 225

Unique URLs (all under https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/):

element-1-extension
element-application
element-capabilities
element-dependencies
element-identity
element-packagedependency
element-properties
element-resources
element-uap-visualelements
element-uap10-hostruntimedependency
element-uap3-mainpackagedependency2
element-uap4-customcapability
element-uap5-driverdependency
element-uap7-ospackagedependency
element-win32dependencies-externaldependency

Out of scope

Other en-us matches in the repo are legitimate BCP-47 language tags in appxmanifest <Resource Language="en-us" /> content (test fixtures, manifest-validator.ts error text, webview-script-resources.ts placeholder, README.md line 178). These are unrelated to URL localization and must not be changed.

To Reproduce

  1. Set your browser / OS display language to something other than English (e.g. French or Japanese).
  2. Open an AppxManifest.xml / Package.appxmanifest file in the WinApp manifest editor.
  3. On any tab (Identity, Properties, Dependencies, Resources, Applications, Capabilities), click a Learn more link.
  4. The Microsoft Learn page opens in English rather than the reader's language, because the URL is pinned to /en-us/.

Expected behavior

The /en-us/ segment should be dropped from all Microsoft Learn URLs, e.g.:

- https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-identity
+ https://learn.microsoft.com/uwp/schemas/appxpackage/uapmanifestschema/element-identity

Microsoft Learn then redirects each reader to the appropriate localized page automatically, and English readers see no change in behavior.

It would also be worth considering a lightweight guard so the pattern doesn't creep back in — for example a lint rule or a unit test asserting that no source file contains learn.microsoft.com/en-us/.

Screenshots

N/A

OS Version and details

Windows 11 (not OS-specific — affects all platforms and any non-English reader).

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions