Fix invalid localization lock markers - #11377
Amaury Levé (Evangelink) wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The lock markers now match their source values, and regenerated catalogs preserve localized content.
Review effort: Balanced
Findings: None
What changed in this PR
Corrects invalid localization lock annotations across MSTest, MTP extensions, analyzers, and adapter resources without changing user-facing strings or translations.
Changes:
- Removes or retargets lock markers absent from source values.
- Regenerates affected XLF metadata for all 13 locales.
- Marks affected translations for review while preserving their text.
| File | Description |
|---|---|
TestFramework/Resources/FrameworkMessages.resx |
Corrects lock metadata. |
TestFramework/Resources/xlf/FrameworkMessages.{cs,de,es,fr,it,ja,ko,pl,pt-BR,ru,tr,zh-Hans,zh-Hant}.xlf |
Regenerates 13 locale catalogs. |
TestFramework.Extensions/Resources/FrameworkExtensionsMessages.resx |
Corrects lock metadata. |
TestFramework.Extensions/Resources/xlf/FrameworkExtensionsMessages.{cs,de,es,fr,it,ja,ko,pl,pt-BR,ru,tr,zh-Hans,zh-Hant}.xlf |
Regenerates 13 locale catalogs. |
Microsoft.Testing.Extensions.TrxReport/Resources/ExtensionResources.resx |
Removes or retargets invalid TRX locks. |
Microsoft.Testing.Extensions.TrxReport/Resources/xlf/ExtensionResources.{cs,de,es,fr,it,ja,ko,pl,pt-BR,ru,tr,zh-Hans,zh-Hant}.xlf |
Regenerates 13 locale catalogs. |
Microsoft.Testing.Extensions.Retry/Resources/ExtensionResources.resx |
Removes unrelated option-name locks. |
Microsoft.Testing.Extensions.Retry/Resources/xlf/ExtensionResources.{cs,de,es,fr,it,ja,ko,pl,pt-BR,ru,tr,zh-Hans,zh-Hant}.xlf |
Regenerates 13 locale catalogs. |
Microsoft.Testing.Extensions.MSBuild/Resources/ExtensionResources.resx |
Retains only the present MSBuild lock. |
Microsoft.Testing.Extensions.MSBuild/Resources/xlf/ExtensionResources.{cs,de,es,fr,it,ja,ko,pl,pt-BR,ru,tr,zh-Hans,zh-Hant}.xlf |
Regenerates 13 locale catalogs. |
Microsoft.Testing.Extensions.JUnitReport/Resources/ExtensionResources.resx |
Removes the absent CLI-option lock. |
Microsoft.Testing.Extensions.JUnitReport/Resources/xlf/ExtensionResources.{cs,de,es,fr,it,ja,ko,pl,pt-BR,ru,tr,zh-Hans,zh-Hant}.xlf |
Regenerates 13 locale catalogs. |
Microsoft.Testing.Extensions.HtmlReport/Resources/ExtensionResources.resx |
Removes the absent CLI-option lock. |
Microsoft.Testing.Extensions.HtmlReport/Resources/xlf/ExtensionResources.{cs,de,es,fr,it,ja,ko,pl,pt-BR,ru,tr,zh-Hans,zh-Hant}.xlf |
Regenerates 13 locale catalogs. |
Microsoft.Testing.Extensions.CtrfReport/Resources/ExtensionResources.resx |
Removes the absent CLI-option lock. |
Microsoft.Testing.Extensions.CtrfReport/Resources/xlf/ExtensionResources.{cs,de,es,fr,it,ja,ko,pl,pt-BR,ru,tr,zh-Hans,zh-Hant}.xlf |
Regenerates 13 locale catalogs. |
Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/AzureDevOpsResources.resx |
Removes contextual tokens absent from messages. |
Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.{cs,de,es,fr,it,ja,ko,pl,pt-BR,ru,tr,zh-Hans,zh-Hant}.xlf |
Regenerates 13 locale catalogs. |
MSTest.Analyzers/Resources.resx |
Retargets partial ResourceLock markers. |
MSTest.Analyzers/xlf/Resources.{cs,de,es,fr,it,ja,ko,pl,pt-BR,ru,tr,zh-Hans,zh-Hant}.xlf |
Regenerates 13 locale catalogs. |
MSTest.Analyzers.CodeFixes/CodeFixResources.resx |
Retargets the ResourceLock marker. |
MSTest.Analyzers.CodeFixes/xlf/CodeFixResources.{cs,de,es,fr,it,ja,ko,pl,pt-BR,ru,tr,zh-Hans,zh-Hant}.xlf |
Regenerates 13 locale catalogs. |
MSTestAdapter.PlatformServices/Resources/Resource.resx |
Removes resource-key names absent from the message. |
MSTestAdapter.PlatformServices/Resources/xlf/Resource.{cs,de,es,fr,it,ja,ko,pl,pt-BR,ru,tr,zh-Hans,zh-Hant}.xlf |
Regenerates 13 locale catalogs. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Note
🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.
✅ 22/22 dimensions clean — no findings.
This PR is a purely mechanical localization fix: it narrows .resx <comment> markers to remove stale/incorrect {Locked="..."} tokens and regenerates all corresponding .xlf translation files via the standard UpdateXlf tooling. No C#, analyzer, MSBuild, or test files are touched (210 files changed, all .resx/.xlf, with balanced insertions/deletions in every file — confirming in-place comment/note edits only, no structural or reordering changes).
Verification performed:
- Cross-checked every
{Locked="..."}token removed against the corresponding<value>text in each.resxentry — all removed tokens (e.g.--publish-azdo-test-resultscompanions likeTF_BUILD=true,SYSTEM_TEAMPROJECT;--hangdump;--crashdump-filename;--crash-report-if-supported;()/[];{DisplayName} ({Phase}, {Seconds}s);;; other resource-ID references likeCannotExpandIDataSourceAttribute_DuplicateDisplayName) do not occur as literal substrings of the corresponding message text, so removing them is correct per the repo's Localization Guidelines (§9 Localization & Resources: every{Locked="X"}token must occur verbatim in the resource value). - Checked the few added/changed lock tokens (e.g.
{pname},{pid},{asm},{tfm},{time},%e/%p/%h/%tinCrashDumpFileNameOptionDescription;Mini/Heap/Triage/Full;TRX/Trx;ResourceLockreplacing[ResourceLock]) — all newly locked/re-cased tokens are present verbatim in their value text, and none reintroduce the classic{Locked="const"}-inside-"constant"substring-collision bug this repo has hit before (PR #10310). - Confirmed the two
0 is ...→{0} is ...comment typo fixes (TrxComparerToolOptionExpectsSingleArgument,HangDumpOptionDescription-adjacent entry) are pure typo corrections, not semantic changes. - Every
.resxcomment change has a matching<note>update across all language.xlffiles for that resource, and the affected<target>elements were correctly flipped fromstate="translated"tostate="needs-review-translation"— exactly the expected effect of runningdotnet msbuild <project>.csproj /t:UpdateXlfafter a.resxcomment edit. No.xlffile shows evidence of hand-editing (no stray formatting drift, no out-of-band target/source changes). - No production code, public API surface, or test files are affected, so dimensions 1–8, 10–20, and 22 are N/A; dimension 21 (Scope & PR Discipline) is clean — the PR is single-purpose (fixing invalid lock markers) and matches its title/commit message.
Review coverage
- ➖ Algorithmic correctness — N/A (no code changes)
- ➖ Threading & concurrency — N/A
- ➖ Security & IPC contract safety — N/A
- ➖ Public API & binary compatibility — N/A
- ➖ Performance & allocations — N/A
- ➖ Cross-TFM compatibility — N/A
- ➖ Resource & IDisposable management — N/A
- ➖ Defensive coding at boundaries — N/A
- ✅ Localization & resources — verified
{Locked}marker removals/additions against value text and confirmed correct.xlfregeneration - ➖ Test isolation — N/A (no test files)
- ➖ Assertion quality — N/A
- ➖ Flakiness patterns — N/A
- ➖ Test completeness & coverage — N/A
- ➖ Data-driven test coverage — N/A
- ➖ Code structure & simplification — N/A
- ➖ Naming & conventions — N/A
- ➖ Documentation accuracy — N/A
- ➖ Analyzer & code fix quality — N/A (no
src/Analyzers/code changes, only resx comments) - ➖ IPC wire compatibility — N/A
- ➖ Build infrastructure & dependencies — N/A (no dependency version changes)
- ✅ Scope & PR discipline — single-purpose, mechanical fix matching its stated intent
- ➖ PowerShell scripting hygiene — N/A
- ➖ MSBuild authoring (supplemental) — N/A (no
.props/.targetsfiles changed)
|
Final test-triage resolution — Azure Pipelines build 1602160 This is the final resolution for pull request #11377 (head Test-result evidence: All 16,336 normalized CTRF/TRX/JUnit test records from this build report Build failures observed (out of scope for test triage): The
None of these carry a test name, assertion, or stack trace signature, so they fall under build/infrastructure failure analysis rather than this agent's test-triage scope, and history collection found no comparable prior test failures ( Conclusion: No actionable test failure, flake, crash, or slowness regression to report. No issue is warranted for this run. The build failure is attributable to CI infrastructure/build-stage problems (dump-enable step and artifact publishing errors on Windows legs, and a worker timeout on macOS) rather than a product or test defect.
|
Summary
{Locked="…"}markers whose tokens were not present in their RESX source valuesUpdateXlfThe regenerated XLF files mark the 44 affected entries as
needs-review-translation, as expected when localization notes change.Validation
translatedtoneeds-review-translation), with no source, target, or ID changes./Build.cmd -bl(0 warnings, 0 errors)