Allow localized quotation marks in resource strings - #11111
Conversation
Remove apostrophes from 152 localization locks where the bare invariant token is already unambiguous. Retain punctuation for the 29 collision-sensitive locks, regenerate affected XLF notes, and document the conditional rule. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 63c25c36-0fb9-4605-86fa-e2152aa7588b
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.
Review Summary
Clean, well-scoped localization hygiene change. No blocking issues found across all 22 review dimensions.
What this PR does
Removes unnecessary quote-wrapping from 152 {Locked="..."} markers where the bare invariant token is already unique in its resource value, freeing translators to use locale-appropriate quotation marks. The 29 markers that must retain punctuation to avoid substring collisions (e.g. 'Assert' vs StringAssert/CollectionAssert, 'Dispose' vs DisposeAsync) are correctly preserved.
Key verification points
| Check | Result |
|---|---|
Retained 'Assert' quotes (collision with StringAssert, CollectionAssert) |
✅ Correct |
Retained 'Dispose' quotes (collision with DisposeAsync) |
✅ Correct |
XLF <source> text unchanged (no manual xlf edits) |
✅ Confirmed |
XLF <note> elements updated via UpdateXlf |
✅ 469 needs-review-translation, 194 new |
Docs updated consistently (copilot-instructions.md, expert-reviewer.agent.md) |
✅ |
| No new public API surface | ✅ |
| No behavioral change | ✅ |
Dimension Verdict
| # | Dimension | Verdict |
|---|---|---|
| 1 | Public API | ✅ N/A |
| 2 | No init |
✅ N/A |
| 3 | Localization | ✅ Clean — collisions correctly identified and preserved |
| 4 | Test Architecture | ✅ N/A |
| 5 | IPC Protocol | ✅ N/A |
| 6 | Analyzer IDs | ✅ N/A |
| 7 | Thread Safety | ✅ N/A |
| 8 | Naming | ✅ N/A |
| 9 | Performance | ✅ N/A |
| 10 | Error Handling | ✅ N/A |
| 11 | Cancellation | ✅ N/A |
| 12 | Async | ✅ N/A |
| 13 | Security | ✅ N/A |
| 14 | Cross-TFM | ✅ N/A |
| 15 | Backward Compat | ✅ No behavioral change |
| 16 | Disposal | ✅ N/A |
| 17 | Logging | ✅ N/A |
| 18 | Config / Options | ✅ N/A |
| 19 | Documentation | ✅ Updated guidance in 2 docs |
| 20 | Code Style | ✅ Clean |
| 21 | Build Infra | ✅ N/A |
| 22 | PowerShell | ✅ N/A |
Result: No blocking issues. The substring-collision analysis is sound and the documentation updates are consistent with the code changes.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
At least one updated resource comment still locks quote-wrapped option text ({Locked="'off'"}) where a bare lock appears safe, undermining the PR’s goal of allowing localized quotation marks.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Lite
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalResources.resx — TerminalAnsiOptionDescription still locks the option value as {Locked="'off'"} (including the… |
What changed in this PR
This PR refines localization lock-marker guidance and updates generated localization artifacts so translators can use locale-appropriate quotation marks while still keeping invariant tokens (CLI values, placeholders, option names) protected.
Changes:
- Removes unnecessary quote-wrapping from many
{Locked="…"}markers while retaining punctuation only where needed to avoid substring collisions. - Regenerates the affected
*.xlffiles to reflect updated.resxnotes/comments without changing source/target text. - Updates repository guidance (
.github/…) to prefer bare invariant tokens and only include punctuation when required for collision avoidance.
| File | Description |
|---|---|
| src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.zh-Hans.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.ru.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.pt-BR.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.pl.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.ko.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.it.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.fr.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.es.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.de.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.cs.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalResources.resx | Adjusted {Locked="…"} markers in resource comments. |
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Resources/xlf/ExtensionResources.zh-Hant.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Resources/xlf/ExtensionResources.zh-Hans.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Resources/xlf/ExtensionResources.tr.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Resources/xlf/ExtensionResources.ru.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Resources/xlf/ExtensionResources.pt-BR.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Resources/xlf/ExtensionResources.pl.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Resources/xlf/ExtensionResources.ko.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Resources/xlf/ExtensionResources.ja.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Resources/xlf/ExtensionResources.it.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Resources/xlf/ExtensionResources.fr.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Resources/xlf/ExtensionResources.es.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Resources/xlf/ExtensionResources.de.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Resources/xlf/ExtensionResources.cs.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Resources/ExtensionResources.resx | Adjusted {Locked="…"} markers in resource comments. |
| src/Platform/Microsoft.Testing.Extensions.JUnitReport/Resources/xlf/ExtensionResources.zh-Hant.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.JUnitReport/Resources/xlf/ExtensionResources.zh-Hans.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.JUnitReport/Resources/xlf/ExtensionResources.tr.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.JUnitReport/Resources/xlf/ExtensionResources.ru.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.JUnitReport/Resources/xlf/ExtensionResources.pt-BR.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.JUnitReport/Resources/xlf/ExtensionResources.pl.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.JUnitReport/Resources/xlf/ExtensionResources.ko.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.JUnitReport/Resources/xlf/ExtensionResources.ja.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.JUnitReport/Resources/xlf/ExtensionResources.it.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.JUnitReport/Resources/xlf/ExtensionResources.fr.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.JUnitReport/Resources/xlf/ExtensionResources.es.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.JUnitReport/Resources/xlf/ExtensionResources.de.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.JUnitReport/Resources/xlf/ExtensionResources.cs.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.JUnitReport/Resources/ExtensionResources.resx | Adjusted {Locked="…"} markers in resource comments. |
| src/Platform/Microsoft.Testing.Extensions.HtmlReport/Resources/xlf/ExtensionResources.zh-Hant.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.HtmlReport/Resources/xlf/ExtensionResources.zh-Hans.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.HtmlReport/Resources/xlf/ExtensionResources.tr.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.HtmlReport/Resources/xlf/ExtensionResources.ru.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.HtmlReport/Resources/xlf/ExtensionResources.pt-BR.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.HtmlReport/Resources/xlf/ExtensionResources.pl.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.HtmlReport/Resources/xlf/ExtensionResources.ko.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.HtmlReport/Resources/xlf/ExtensionResources.ja.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.HtmlReport/Resources/xlf/ExtensionResources.it.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.HtmlReport/Resources/xlf/ExtensionResources.fr.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.HtmlReport/Resources/xlf/ExtensionResources.es.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.HtmlReport/Resources/xlf/ExtensionResources.de.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.HtmlReport/Resources/xlf/ExtensionResources.cs.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.HtmlReport/Resources/ExtensionResources.resx | Adjusted {Locked="…"} markers in resource comments. |
| src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/GitHubActionsResources.resx | Updated {Locked="…"} markers to reduce quote-locking. |
| src/Platform/Microsoft.Testing.Extensions.CtrfReport/Resources/xlf/ExtensionResources.zh-Hant.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CtrfReport/Resources/xlf/ExtensionResources.zh-Hans.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CtrfReport/Resources/xlf/ExtensionResources.tr.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CtrfReport/Resources/xlf/ExtensionResources.ru.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CtrfReport/Resources/xlf/ExtensionResources.pt-BR.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CtrfReport/Resources/xlf/ExtensionResources.pl.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CtrfReport/Resources/xlf/ExtensionResources.ko.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CtrfReport/Resources/xlf/ExtensionResources.ja.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CtrfReport/Resources/xlf/ExtensionResources.it.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CtrfReport/Resources/xlf/ExtensionResources.fr.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CtrfReport/Resources/xlf/ExtensionResources.es.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CtrfReport/Resources/xlf/ExtensionResources.de.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CtrfReport/Resources/xlf/ExtensionResources.cs.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CtrfReport/Resources/ExtensionResources.resx | Adjusted {Locked="…"} markers in resource comments. |
| src/Platform/Microsoft.Testing.Extensions.CrashDump/Resources/xlf/CrashDumpResources.zh-Hant.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CrashDump/Resources/xlf/CrashDumpResources.zh-Hans.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CrashDump/Resources/xlf/CrashDumpResources.tr.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CrashDump/Resources/xlf/CrashDumpResources.ru.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CrashDump/Resources/xlf/CrashDumpResources.pt-BR.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CrashDump/Resources/xlf/CrashDumpResources.pl.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CrashDump/Resources/xlf/CrashDumpResources.ko.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CrashDump/Resources/xlf/CrashDumpResources.ja.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CrashDump/Resources/xlf/CrashDumpResources.it.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CrashDump/Resources/xlf/CrashDumpResources.fr.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CrashDump/Resources/xlf/CrashDumpResources.es.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CrashDump/Resources/xlf/CrashDumpResources.de.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CrashDump/Resources/xlf/CrashDumpResources.cs.xlf | Updated lock notes to prefer bare tokens. |
| src/Platform/Microsoft.Testing.Extensions.CrashDump/Resources/CrashDumpResources.resx | Adjusted {Locked="…"} markers in resource comments. |
| src/Analyzers/MSTest.Analyzers.CodeFixes/xlf/CodeFixResources.zh-Hant.xlf | Updated lock notes to prefer bare tokens. |
| src/Analyzers/MSTest.Analyzers.CodeFixes/xlf/CodeFixResources.zh-Hans.xlf | Updated lock notes to prefer bare tokens. |
| src/Analyzers/MSTest.Analyzers.CodeFixes/xlf/CodeFixResources.tr.xlf | Updated lock notes to prefer bare tokens. |
| src/Analyzers/MSTest.Analyzers.CodeFixes/xlf/CodeFixResources.ru.xlf | Updated lock notes to prefer bare tokens. |
| src/Analyzers/MSTest.Analyzers.CodeFixes/xlf/CodeFixResources.pt-BR.xlf | Updated lock notes to prefer bare tokens. |
| src/Analyzers/MSTest.Analyzers.CodeFixes/xlf/CodeFixResources.pl.xlf | Updated lock notes to prefer bare tokens. |
| src/Analyzers/MSTest.Analyzers.CodeFixes/xlf/CodeFixResources.ko.xlf | Updated lock notes to prefer bare tokens. |
| src/Analyzers/MSTest.Analyzers.CodeFixes/xlf/CodeFixResources.ja.xlf | Updated lock notes to prefer bare tokens. |
| src/Analyzers/MSTest.Analyzers.CodeFixes/xlf/CodeFixResources.it.xlf | Updated lock notes to prefer bare tokens. |
| src/Analyzers/MSTest.Analyzers.CodeFixes/xlf/CodeFixResources.fr.xlf | Updated lock notes to prefer bare tokens. |
| src/Analyzers/MSTest.Analyzers.CodeFixes/xlf/CodeFixResources.es.xlf | Updated lock notes to prefer bare tokens. |
| src/Analyzers/MSTest.Analyzers.CodeFixes/xlf/CodeFixResources.de.xlf | Updated lock notes to prefer bare tokens. |
| src/Analyzers/MSTest.Analyzers.CodeFixes/xlf/CodeFixResources.cs.xlf | Updated lock notes to prefer bare tokens. |
| src/Analyzers/MSTest.Analyzers.CodeFixes/CodeFixResources.resx | Adjusted {Locked="…"} markers in resource comments. |
| .github/copilot-instructions.md | Updated localization guidance for {Locked="…"} usage. |
| .github/agents/expert-reviewer.agent.md | Updated reviewer guidance/checklist for lock-marker usage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Use a bare localization lock for off in the ANSI option description and regenerate TerminalResources XLF notes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 63c25c36-0fb9-4605-86fa-e2152aa7588b
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
At least one updated {Locked="…"} marker still forces ASCII quotation marks where punctuation does not appear necessary, which undermines the PR’s stated localization goal and should be corrected with corresponding XLF regeneration.
Review tier: Lite
Findings: None
Issues resolved since last review (1)
| Severity | Finding |
|---|---|
src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalResources.resx — TerminalAnsiOptionDescription still locks the option value as {Locked="'off'"} (including the… View resolved comment |
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/GitHubActionsResources.resx:150
HistoryWindowRequiresHistorystill locks the option name as{Locked="'--report-gh-history'"}(including the ASCII quotes). This prevents localizers from using locale-appropriate quotation marks around the option, and the quotes don’t seem necessary here because the only substring collision is with another invariant option name (--report-gh-history-window), not with a translatable word. Consider switching this to{Locked="--report-gh-history"}(keeping{Locked="--report-gh-history-window"}) and regenerating the corresponding*.xlfnotes.

Summary
{Locked="…"}markers where the bare invariant token is already unique in its resource valueValidation
new; 469 translated targets move toneeds-review-translationbecause their localization note changedgit diff --checkpasses