Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331 - #8510

Merged
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557
May 23, 2026
Merged

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331#8510
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557

Conversation

@dotnet-bot

Copy link
Copy Markdown
Collaborator

This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.

CopilotAI review requested due to automatic review settings May 22, 2026 16:02
@github-actions
github-actionsBot enabled auto-merge (squash) May 22, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This OneLocBuild-generated PR updates Microsoft.Testing.Platform localized XLF resource files under src/Platform/Microsoft.Testing.Platform/Resources/xlf/.

Changes:

  • Removes the TerminalAnsiOptionDescription trans-unit from multiple locale XLF files.
  • Removes the TerminalAnsiOptionInvalidArgument trans-unit from multiple locale XLF files.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 13 comments.

Show a summary per file
FileDescription
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlfRemoves TerminalAnsiOption* trans-units from the Czech locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlfRemoves TerminalAnsiOption* trans-units from the German locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlfRemoves TerminalAnsiOption* trans-units from the Spanish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlfRemoves TerminalAnsiOption* trans-units from the French locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlfRemoves TerminalAnsiOption* trans-units from the Italian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlfRemoves TerminalAnsiOption* trans-units from the Japanese locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlfRemoves TerminalAnsiOption* trans-units from the Korean locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlfRemoves TerminalAnsiOption* trans-units from the Polish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlfRemoves TerminalAnsiOption* trans-units from the Portuguese (Brazil) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlfRemoves TerminalAnsiOption* trans-units from the Russian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlfRemoves TerminalAnsiOption* trans-units from the Turkish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Simplified) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Traditional) locale XLF.

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Der Telemetrieanbieter ist bereits festgelegt</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">El proveedor de telemetría ya está establecido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Le fournisseur de télémétrie est déjà défini</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Il provider di telemetria è già impostato</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">O provedor de telemetria já está definido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Поставщик телеметрии уже настроен</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Telemetri sağlayıcısı zaten ayarlanmış</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">已设置遥测提供程序</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">遙測提供者已設定</target>
<note />
</trans-unit>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981843Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872May 22, 2026
@Evangelink

Copy link
Copy Markdown
Member

Localization Synchronization Issue

This PR has a critical synchronization problem between source resources and localized files:

Issue Summary

The OneLocBuild task is deleting TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from all 13 .xlf files, but these resource strings are still actively used in PlatformResources.resx.

Timeline of Events

  1. PR Add --ansi <auto|on|off> CLI option for explicit ANSI control (#5081) #8493 (commit 8359a8a, merged ~hours ago) added the --ansi CLI option and introduced these two resource strings
  2. The strings were added to .xlf files with state="new" (untranslated, pending localization)
  3. This PR removes them from all .xlf files via OneLocBuild cleanup
  4. Problem: The source .resx file still references them for runtime use

Why This Will Break

The --ansi option implementation loads these strings at runtime:

  • TerminalAnsiOptionDescription - shown in --help output
  • TerminalAnsiOptionInvalidArgument - shown when user provides invalid argument

For non-English locales, the ResourceManager will fail to find these keys after this PR merges, causing either:

  • Fallback to English (breaking the localized user experience)
  • Missing resource exceptions in strict resource loading modes

Recommended Resolution

Option A (Preferred if --ansi is shipping):

  1. Close this PR or revert these deletions
  2. Keep the state="new" entries in .xlf files until they're properly translated
  3. Coordinate with the OneLocBuild pipeline to process these strings

Option B (If --ansi is being removed):

  1. First remove TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from PlatformResources.resx
  2. Then let OneLocBuild clean up the orphaned .xlf entries in a subsequent PR

Files to Check

Source (still contains the strings):

  • src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx lines 619-627

Usage (references these resource keys):

  • src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs
  • src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineOptionArgumentValidator.cs

Dimension 9 (Localization & Resources): BLOCKING issue - source/localized resource mismatch will break non-English users.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M ·

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Expert Code Review - PR #8510

This automated localization PR contains a critical synchronization bug that will break non-English users of the --ansi CLI option.

Findings Summary

#DimensionVerdict
9Localization & Resources🔴 1 BLOCKING

1/21 dimensions with findings (20 dimensions not applicable to localization-only PR)


Critical Finding

  • Localization & Resources — Source .resx contains resource strings that this PR deletes from all .xlf files

Issue Details

The OneLocBuild task is removing TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files. However, the source PlatformResources.resx file still contains and actively uses these resource strings for the --ansi CLI option added in PR #8493 (merged hours before this PR was created).

Impact:

  • The --ansi help text will not be localized for Czech, German, Spanish, French, Italian, Japanese, Korean, Polish, Portuguese, Russian, Turkish, and Chinese users
  • Error messages for invalid --ansi arguments will fall back to English
  • Violates the "Localization Done Right" principle (Overarching Principle #7)

Root Cause:
These strings were added with state="new" (untranslated) and OneLocBuild's cleanup logic is removing them before they were sent through the translation pipeline. This is a timing issue between feature merges and localization builds.

Resolution Required:
Either (A) retain these entries in .xlf files until properly translated, or (B) if the --ansi feature is being removed, delete the strings from PlatformResources.resx first.


Review Methodology

This review applied the 21-dimension expert-reviewer framework. Dimensions 1-8, 10-21 are not applicable to this PR as it only modifies localization files. Dimension 9 (Localization & Resources) was evaluated in depth and revealed the critical bug described above.

See inline comment on PlatformResources.cs.xlf:822 for full technical details and verification steps.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[BLOCKING] Localization & Resources (Dimension 9)

This PR deletes the TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files, but the source PlatformResources.resx file still contains these resource strings.

Concrete failing scenario:

  1. User launches test executable with locale set to Czech (cs), German (de), or any other localized language
  2. Help text or error message attempts to load TerminalAnsiOptionDescription or TerminalAnsiOptionInvalidArgument
  3. The ResourceManager cannot find these keys in the .xlf files (because this PR deleted them)
  4. Result: Either fallback to English text (breaking localized experience) or MissingManifestResourceException

Root cause:
These strings were added in commit 8359a8a (PR #8493) with state="new" (untranslated), never sent to the localization pipeline, and are now being incorrectly deleted by OneLocBuild's cleanup logic.

Impact:

Recommendation:

  1. Do not merge this PR in its current state
  2. Retain these translation units in all .xlf files (even with state="new")
  3. Ensure the localization pipeline processes these strings for the next release
  4. OR: If these strings are truly being removed from the codebase, remove them from PlatformResources.resxfirst, then allow OneLocBuild to clean up the .xlf files

Verification:

# Source .resx still contains these strings:
grep -A2 "TerminalAnsiOption" src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx
# But this PR deletes them from all .xlf files
git diff main -- src/Platform/Microsoft.Testing.Platform/Resources/xlf/*.xlf | grep "TerminalAnsiOption"

@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot added the needs/author-feedback Waiting on the original author. label May 22, 2026
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315May 23, 2026
CopilotAI review requested due to automatic review settings May 23, 2026 03:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
CopilotAI review requested due to automatic review settings May 23, 2026 03:05

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331May 23, 2026
@Evangelink
Amaury Levé (Evangelink) merged commit 1619a15 into mainMay 23, 2026
37 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557 branch May 23, 2026 15:43
@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot removed the needs/author-feedback Waiting on the original author. label May 23, 2026
Sign up for freeto 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.

3 participants

@dotnet-bot@Evangelink
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331 - #8510

Merged
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557
May 23, 2026
Merged

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331#8510
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557

Conversation

@dotnet-bot

Copy link
Copy Markdown
Collaborator

This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.

CopilotAI review requested due to automatic review settings May 22, 2026 16:02
@github-actions
github-actionsBot enabled auto-merge (squash) May 22, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This OneLocBuild-generated PR updates Microsoft.Testing.Platform localized XLF resource files under src/Platform/Microsoft.Testing.Platform/Resources/xlf/.

Changes:

  • Removes the TerminalAnsiOptionDescription trans-unit from multiple locale XLF files.
  • Removes the TerminalAnsiOptionInvalidArgument trans-unit from multiple locale XLF files.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 13 comments.

Show a summary per file
FileDescription
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlfRemoves TerminalAnsiOption* trans-units from the Czech locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlfRemoves TerminalAnsiOption* trans-units from the German locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlfRemoves TerminalAnsiOption* trans-units from the Spanish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlfRemoves TerminalAnsiOption* trans-units from the French locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlfRemoves TerminalAnsiOption* trans-units from the Italian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlfRemoves TerminalAnsiOption* trans-units from the Japanese locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlfRemoves TerminalAnsiOption* trans-units from the Korean locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlfRemoves TerminalAnsiOption* trans-units from the Polish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlfRemoves TerminalAnsiOption* trans-units from the Portuguese (Brazil) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlfRemoves TerminalAnsiOption* trans-units from the Russian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlfRemoves TerminalAnsiOption* trans-units from the Turkish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Simplified) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Traditional) locale XLF.

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Der Telemetrieanbieter ist bereits festgelegt</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">El proveedor de telemetría ya está establecido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Le fournisseur de télémétrie est déjà défini</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Il provider di telemetria è già impostato</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">O provedor de telemetria já está definido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Поставщик телеметрии уже настроен</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Telemetri sağlayıcısı zaten ayarlanmış</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">已设置遥测提供程序</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">遙測提供者已設定</target>
<note />
</trans-unit>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981843Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872May 22, 2026
@Evangelink

Copy link
Copy Markdown
Member

Localization Synchronization Issue

This PR has a critical synchronization problem between source resources and localized files:

Issue Summary

The OneLocBuild task is deleting TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from all 13 .xlf files, but these resource strings are still actively used in PlatformResources.resx.

Timeline of Events

  1. PR Add --ansi <auto|on|off> CLI option for explicit ANSI control (#5081) #8493 (commit 8359a8a, merged ~hours ago) added the --ansi CLI option and introduced these two resource strings
  2. The strings were added to .xlf files with state="new" (untranslated, pending localization)
  3. This PR removes them from all .xlf files via OneLocBuild cleanup
  4. Problem: The source .resx file still references them for runtime use

Why This Will Break

The --ansi option implementation loads these strings at runtime:

  • TerminalAnsiOptionDescription - shown in --help output
  • TerminalAnsiOptionInvalidArgument - shown when user provides invalid argument

For non-English locales, the ResourceManager will fail to find these keys after this PR merges, causing either:

  • Fallback to English (breaking the localized user experience)
  • Missing resource exceptions in strict resource loading modes

Recommended Resolution

Option A (Preferred if --ansi is shipping):

  1. Close this PR or revert these deletions
  2. Keep the state="new" entries in .xlf files until they're properly translated
  3. Coordinate with the OneLocBuild pipeline to process these strings

Option B (If --ansi is being removed):

  1. First remove TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from PlatformResources.resx
  2. Then let OneLocBuild clean up the orphaned .xlf entries in a subsequent PR

Files to Check

Source (still contains the strings):

  • src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx lines 619-627

Usage (references these resource keys):

  • src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs
  • src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineOptionArgumentValidator.cs

Dimension 9 (Localization & Resources): BLOCKING issue - source/localized resource mismatch will break non-English users.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M ·

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Expert Code Review - PR #8510

This automated localization PR contains a critical synchronization bug that will break non-English users of the --ansi CLI option.

Findings Summary

#DimensionVerdict
9Localization & Resources🔴 1 BLOCKING

1/21 dimensions with findings (20 dimensions not applicable to localization-only PR)


Critical Finding

  • Localization & Resources — Source .resx contains resource strings that this PR deletes from all .xlf files

Issue Details

The OneLocBuild task is removing TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files. However, the source PlatformResources.resx file still contains and actively uses these resource strings for the --ansi CLI option added in PR #8493 (merged hours before this PR was created).

Impact:

  • The --ansi help text will not be localized for Czech, German, Spanish, French, Italian, Japanese, Korean, Polish, Portuguese, Russian, Turkish, and Chinese users
  • Error messages for invalid --ansi arguments will fall back to English
  • Violates the "Localization Done Right" principle (Overarching Principle #7)

Root Cause:
These strings were added with state="new" (untranslated) and OneLocBuild's cleanup logic is removing them before they were sent through the translation pipeline. This is a timing issue between feature merges and localization builds.

Resolution Required:
Either (A) retain these entries in .xlf files until properly translated, or (B) if the --ansi feature is being removed, delete the strings from PlatformResources.resx first.


Review Methodology

This review applied the 21-dimension expert-reviewer framework. Dimensions 1-8, 10-21 are not applicable to this PR as it only modifies localization files. Dimension 9 (Localization & Resources) was evaluated in depth and revealed the critical bug described above.

See inline comment on PlatformResources.cs.xlf:822 for full technical details and verification steps.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[BLOCKING] Localization & Resources (Dimension 9)

This PR deletes the TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files, but the source PlatformResources.resx file still contains these resource strings.

Concrete failing scenario:

  1. User launches test executable with locale set to Czech (cs), German (de), or any other localized language
  2. Help text or error message attempts to load TerminalAnsiOptionDescription or TerminalAnsiOptionInvalidArgument
  3. The ResourceManager cannot find these keys in the .xlf files (because this PR deleted them)
  4. Result: Either fallback to English text (breaking localized experience) or MissingManifestResourceException

Root cause:
These strings were added in commit 8359a8a (PR #8493) with state="new" (untranslated), never sent to the localization pipeline, and are now being incorrectly deleted by OneLocBuild's cleanup logic.

Impact:

Recommendation:

  1. Do not merge this PR in its current state
  2. Retain these translation units in all .xlf files (even with state="new")
  3. Ensure the localization pipeline processes these strings for the next release
  4. OR: If these strings are truly being removed from the codebase, remove them from PlatformResources.resxfirst, then allow OneLocBuild to clean up the .xlf files

Verification:

# Source .resx still contains these strings:
grep -A2 "TerminalAnsiOption" src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx
# But this PR deletes them from all .xlf files
git diff main -- src/Platform/Microsoft.Testing.Platform/Resources/xlf/*.xlf | grep "TerminalAnsiOption"

@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot added the needs/author-feedback Waiting on the original author. label May 22, 2026
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315May 23, 2026
CopilotAI review requested due to automatic review settings May 23, 2026 03:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
CopilotAI review requested due to automatic review settings May 23, 2026 03:05

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331May 23, 2026
@Evangelink
Amaury Levé (Evangelink) merged commit 1619a15 into mainMay 23, 2026
37 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557 branch May 23, 2026 15:43
@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot removed the needs/author-feedback Waiting on the original author. label May 23, 2026
Sign up for freeto 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.

3 participants

@dotnet-bot@Evangelink
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331 - #8510

Merged
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557
May 23, 2026
Merged

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331#8510
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557

Conversation

@dotnet-bot

Copy link
Copy Markdown
Collaborator

This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.

CopilotAI review requested due to automatic review settings May 22, 2026 16:02
@github-actions
github-actionsBot enabled auto-merge (squash) May 22, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This OneLocBuild-generated PR updates Microsoft.Testing.Platform localized XLF resource files under src/Platform/Microsoft.Testing.Platform/Resources/xlf/.

Changes:

  • Removes the TerminalAnsiOptionDescription trans-unit from multiple locale XLF files.
  • Removes the TerminalAnsiOptionInvalidArgument trans-unit from multiple locale XLF files.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 13 comments.

Show a summary per file
FileDescription
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlfRemoves TerminalAnsiOption* trans-units from the Czech locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlfRemoves TerminalAnsiOption* trans-units from the German locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlfRemoves TerminalAnsiOption* trans-units from the Spanish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlfRemoves TerminalAnsiOption* trans-units from the French locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlfRemoves TerminalAnsiOption* trans-units from the Italian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlfRemoves TerminalAnsiOption* trans-units from the Japanese locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlfRemoves TerminalAnsiOption* trans-units from the Korean locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlfRemoves TerminalAnsiOption* trans-units from the Polish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlfRemoves TerminalAnsiOption* trans-units from the Portuguese (Brazil) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlfRemoves TerminalAnsiOption* trans-units from the Russian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlfRemoves TerminalAnsiOption* trans-units from the Turkish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Simplified) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Traditional) locale XLF.

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Der Telemetrieanbieter ist bereits festgelegt</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">El proveedor de telemetría ya está establecido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Le fournisseur de télémétrie est déjà défini</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Il provider di telemetria è già impostato</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">O provedor de telemetria já está definido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Поставщик телеметрии уже настроен</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Telemetri sağlayıcısı zaten ayarlanmış</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">已设置遥测提供程序</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">遙測提供者已設定</target>
<note />
</trans-unit>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981843Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872May 22, 2026
@Evangelink

Copy link
Copy Markdown
Member

Localization Synchronization Issue

This PR has a critical synchronization problem between source resources and localized files:

Issue Summary

The OneLocBuild task is deleting TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from all 13 .xlf files, but these resource strings are still actively used in PlatformResources.resx.

Timeline of Events

  1. PR Add --ansi <auto|on|off> CLI option for explicit ANSI control (#5081) #8493 (commit 8359a8a, merged ~hours ago) added the --ansi CLI option and introduced these two resource strings
  2. The strings were added to .xlf files with state="new" (untranslated, pending localization)
  3. This PR removes them from all .xlf files via OneLocBuild cleanup
  4. Problem: The source .resx file still references them for runtime use

Why This Will Break

The --ansi option implementation loads these strings at runtime:

  • TerminalAnsiOptionDescription - shown in --help output
  • TerminalAnsiOptionInvalidArgument - shown when user provides invalid argument

For non-English locales, the ResourceManager will fail to find these keys after this PR merges, causing either:

  • Fallback to English (breaking the localized user experience)
  • Missing resource exceptions in strict resource loading modes

Recommended Resolution

Option A (Preferred if --ansi is shipping):

  1. Close this PR or revert these deletions
  2. Keep the state="new" entries in .xlf files until they're properly translated
  3. Coordinate with the OneLocBuild pipeline to process these strings

Option B (If --ansi is being removed):

  1. First remove TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from PlatformResources.resx
  2. Then let OneLocBuild clean up the orphaned .xlf entries in a subsequent PR

Files to Check

Source (still contains the strings):

  • src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx lines 619-627

Usage (references these resource keys):

  • src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs
  • src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineOptionArgumentValidator.cs

Dimension 9 (Localization & Resources): BLOCKING issue - source/localized resource mismatch will break non-English users.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M ·

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Expert Code Review - PR #8510

This automated localization PR contains a critical synchronization bug that will break non-English users of the --ansi CLI option.

Findings Summary

#DimensionVerdict
9Localization & Resources🔴 1 BLOCKING

1/21 dimensions with findings (20 dimensions not applicable to localization-only PR)


Critical Finding

  • Localization & Resources — Source .resx contains resource strings that this PR deletes from all .xlf files

Issue Details

The OneLocBuild task is removing TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files. However, the source PlatformResources.resx file still contains and actively uses these resource strings for the --ansi CLI option added in PR #8493 (merged hours before this PR was created).

Impact:

  • The --ansi help text will not be localized for Czech, German, Spanish, French, Italian, Japanese, Korean, Polish, Portuguese, Russian, Turkish, and Chinese users
  • Error messages for invalid --ansi arguments will fall back to English
  • Violates the "Localization Done Right" principle (Overarching Principle #7)

Root Cause:
These strings were added with state="new" (untranslated) and OneLocBuild's cleanup logic is removing them before they were sent through the translation pipeline. This is a timing issue between feature merges and localization builds.

Resolution Required:
Either (A) retain these entries in .xlf files until properly translated, or (B) if the --ansi feature is being removed, delete the strings from PlatformResources.resx first.


Review Methodology

This review applied the 21-dimension expert-reviewer framework. Dimensions 1-8, 10-21 are not applicable to this PR as it only modifies localization files. Dimension 9 (Localization & Resources) was evaluated in depth and revealed the critical bug described above.

See inline comment on PlatformResources.cs.xlf:822 for full technical details and verification steps.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[BLOCKING] Localization & Resources (Dimension 9)

This PR deletes the TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files, but the source PlatformResources.resx file still contains these resource strings.

Concrete failing scenario:

  1. User launches test executable with locale set to Czech (cs), German (de), or any other localized language
  2. Help text or error message attempts to load TerminalAnsiOptionDescription or TerminalAnsiOptionInvalidArgument
  3. The ResourceManager cannot find these keys in the .xlf files (because this PR deleted them)
  4. Result: Either fallback to English text (breaking localized experience) or MissingManifestResourceException

Root cause:
These strings were added in commit 8359a8a (PR #8493) with state="new" (untranslated), never sent to the localization pipeline, and are now being incorrectly deleted by OneLocBuild's cleanup logic.

Impact:

Recommendation:

  1. Do not merge this PR in its current state
  2. Retain these translation units in all .xlf files (even with state="new")
  3. Ensure the localization pipeline processes these strings for the next release
  4. OR: If these strings are truly being removed from the codebase, remove them from PlatformResources.resxfirst, then allow OneLocBuild to clean up the .xlf files

Verification:

# Source .resx still contains these strings:
grep -A2 "TerminalAnsiOption" src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx
# But this PR deletes them from all .xlf files
git diff main -- src/Platform/Microsoft.Testing.Platform/Resources/xlf/*.xlf | grep "TerminalAnsiOption"

@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot added the needs/author-feedback Waiting on the original author. label May 22, 2026
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315May 23, 2026
CopilotAI review requested due to automatic review settings May 23, 2026 03:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
CopilotAI review requested due to automatic review settings May 23, 2026 03:05

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331May 23, 2026
@Evangelink
Amaury Levé (Evangelink) merged commit 1619a15 into mainMay 23, 2026
37 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557 branch May 23, 2026 15:43
@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot removed the needs/author-feedback Waiting on the original author. label May 23, 2026
Sign up for freeto 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.

3 participants

@dotnet-bot@Evangelink
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331 - #8510

Merged
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557
May 23, 2026
Merged

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331#8510
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557

Conversation

@dotnet-bot

Copy link
Copy Markdown
Collaborator

This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.

CopilotAI review requested due to automatic review settings May 22, 2026 16:02
@github-actions
github-actionsBot enabled auto-merge (squash) May 22, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This OneLocBuild-generated PR updates Microsoft.Testing.Platform localized XLF resource files under src/Platform/Microsoft.Testing.Platform/Resources/xlf/.

Changes:

  • Removes the TerminalAnsiOptionDescription trans-unit from multiple locale XLF files.
  • Removes the TerminalAnsiOptionInvalidArgument trans-unit from multiple locale XLF files.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 13 comments.

Show a summary per file
FileDescription
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlfRemoves TerminalAnsiOption* trans-units from the Czech locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlfRemoves TerminalAnsiOption* trans-units from the German locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlfRemoves TerminalAnsiOption* trans-units from the Spanish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlfRemoves TerminalAnsiOption* trans-units from the French locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlfRemoves TerminalAnsiOption* trans-units from the Italian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlfRemoves TerminalAnsiOption* trans-units from the Japanese locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlfRemoves TerminalAnsiOption* trans-units from the Korean locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlfRemoves TerminalAnsiOption* trans-units from the Polish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlfRemoves TerminalAnsiOption* trans-units from the Portuguese (Brazil) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlfRemoves TerminalAnsiOption* trans-units from the Russian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlfRemoves TerminalAnsiOption* trans-units from the Turkish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Simplified) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Traditional) locale XLF.

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Der Telemetrieanbieter ist bereits festgelegt</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">El proveedor de telemetría ya está establecido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Le fournisseur de télémétrie est déjà défini</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Il provider di telemetria è già impostato</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">O provedor de telemetria já está definido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Поставщик телеметрии уже настроен</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Telemetri sağlayıcısı zaten ayarlanmış</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">已设置遥测提供程序</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">遙測提供者已設定</target>
<note />
</trans-unit>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981843Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872May 22, 2026
@Evangelink

Copy link
Copy Markdown
Member

Localization Synchronization Issue

This PR has a critical synchronization problem between source resources and localized files:

Issue Summary

The OneLocBuild task is deleting TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from all 13 .xlf files, but these resource strings are still actively used in PlatformResources.resx.

Timeline of Events

  1. PR Add --ansi <auto|on|off> CLI option for explicit ANSI control (#5081) #8493 (commit 8359a8a, merged ~hours ago) added the --ansi CLI option and introduced these two resource strings
  2. The strings were added to .xlf files with state="new" (untranslated, pending localization)
  3. This PR removes them from all .xlf files via OneLocBuild cleanup
  4. Problem: The source .resx file still references them for runtime use

Why This Will Break

The --ansi option implementation loads these strings at runtime:

  • TerminalAnsiOptionDescription - shown in --help output
  • TerminalAnsiOptionInvalidArgument - shown when user provides invalid argument

For non-English locales, the ResourceManager will fail to find these keys after this PR merges, causing either:

  • Fallback to English (breaking the localized user experience)
  • Missing resource exceptions in strict resource loading modes

Recommended Resolution

Option A (Preferred if --ansi is shipping):

  1. Close this PR or revert these deletions
  2. Keep the state="new" entries in .xlf files until they're properly translated
  3. Coordinate with the OneLocBuild pipeline to process these strings

Option B (If --ansi is being removed):

  1. First remove TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from PlatformResources.resx
  2. Then let OneLocBuild clean up the orphaned .xlf entries in a subsequent PR

Files to Check

Source (still contains the strings):

  • src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx lines 619-627

Usage (references these resource keys):

  • src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs
  • src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineOptionArgumentValidator.cs

Dimension 9 (Localization & Resources): BLOCKING issue - source/localized resource mismatch will break non-English users.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M ·

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Expert Code Review - PR #8510

This automated localization PR contains a critical synchronization bug that will break non-English users of the --ansi CLI option.

Findings Summary

#DimensionVerdict
9Localization & Resources🔴 1 BLOCKING

1/21 dimensions with findings (20 dimensions not applicable to localization-only PR)


Critical Finding

  • Localization & Resources — Source .resx contains resource strings that this PR deletes from all .xlf files

Issue Details

The OneLocBuild task is removing TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files. However, the source PlatformResources.resx file still contains and actively uses these resource strings for the --ansi CLI option added in PR #8493 (merged hours before this PR was created).

Impact:

  • The --ansi help text will not be localized for Czech, German, Spanish, French, Italian, Japanese, Korean, Polish, Portuguese, Russian, Turkish, and Chinese users
  • Error messages for invalid --ansi arguments will fall back to English
  • Violates the "Localization Done Right" principle (Overarching Principle #7)

Root Cause:
These strings were added with state="new" (untranslated) and OneLocBuild's cleanup logic is removing them before they were sent through the translation pipeline. This is a timing issue between feature merges and localization builds.

Resolution Required:
Either (A) retain these entries in .xlf files until properly translated, or (B) if the --ansi feature is being removed, delete the strings from PlatformResources.resx first.


Review Methodology

This review applied the 21-dimension expert-reviewer framework. Dimensions 1-8, 10-21 are not applicable to this PR as it only modifies localization files. Dimension 9 (Localization & Resources) was evaluated in depth and revealed the critical bug described above.

See inline comment on PlatformResources.cs.xlf:822 for full technical details and verification steps.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[BLOCKING] Localization & Resources (Dimension 9)

This PR deletes the TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files, but the source PlatformResources.resx file still contains these resource strings.

Concrete failing scenario:

  1. User launches test executable with locale set to Czech (cs), German (de), or any other localized language
  2. Help text or error message attempts to load TerminalAnsiOptionDescription or TerminalAnsiOptionInvalidArgument
  3. The ResourceManager cannot find these keys in the .xlf files (because this PR deleted them)
  4. Result: Either fallback to English text (breaking localized experience) or MissingManifestResourceException

Root cause:
These strings were added in commit 8359a8a (PR #8493) with state="new" (untranslated), never sent to the localization pipeline, and are now being incorrectly deleted by OneLocBuild's cleanup logic.

Impact:

Recommendation:

  1. Do not merge this PR in its current state
  2. Retain these translation units in all .xlf files (even with state="new")
  3. Ensure the localization pipeline processes these strings for the next release
  4. OR: If these strings are truly being removed from the codebase, remove them from PlatformResources.resxfirst, then allow OneLocBuild to clean up the .xlf files

Verification:

# Source .resx still contains these strings:
grep -A2 "TerminalAnsiOption" src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx
# But this PR deletes them from all .xlf files
git diff main -- src/Platform/Microsoft.Testing.Platform/Resources/xlf/*.xlf | grep "TerminalAnsiOption"

@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot added the needs/author-feedback Waiting on the original author. label May 22, 2026
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315May 23, 2026
CopilotAI review requested due to automatic review settings May 23, 2026 03:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
CopilotAI review requested due to automatic review settings May 23, 2026 03:05

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331May 23, 2026
@Evangelink
Amaury Levé (Evangelink) merged commit 1619a15 into mainMay 23, 2026
37 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557 branch May 23, 2026 15:43
@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot removed the needs/author-feedback Waiting on the original author. label May 23, 2026
Sign up for freeto 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.

3 participants

@dotnet-bot@Evangelink
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331 - #8510

Merged
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557
May 23, 2026
Merged

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331#8510
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557

Conversation

@dotnet-bot

Copy link
Copy Markdown
Collaborator

This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.

CopilotAI review requested due to automatic review settings May 22, 2026 16:02
@github-actions
github-actionsBot enabled auto-merge (squash) May 22, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This OneLocBuild-generated PR updates Microsoft.Testing.Platform localized XLF resource files under src/Platform/Microsoft.Testing.Platform/Resources/xlf/.

Changes:

  • Removes the TerminalAnsiOptionDescription trans-unit from multiple locale XLF files.
  • Removes the TerminalAnsiOptionInvalidArgument trans-unit from multiple locale XLF files.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 13 comments.

Show a summary per file
FileDescription
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlfRemoves TerminalAnsiOption* trans-units from the Czech locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlfRemoves TerminalAnsiOption* trans-units from the German locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlfRemoves TerminalAnsiOption* trans-units from the Spanish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlfRemoves TerminalAnsiOption* trans-units from the French locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlfRemoves TerminalAnsiOption* trans-units from the Italian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlfRemoves TerminalAnsiOption* trans-units from the Japanese locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlfRemoves TerminalAnsiOption* trans-units from the Korean locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlfRemoves TerminalAnsiOption* trans-units from the Polish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlfRemoves TerminalAnsiOption* trans-units from the Portuguese (Brazil) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlfRemoves TerminalAnsiOption* trans-units from the Russian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlfRemoves TerminalAnsiOption* trans-units from the Turkish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Simplified) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Traditional) locale XLF.

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Der Telemetrieanbieter ist bereits festgelegt</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">El proveedor de telemetría ya está establecido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Le fournisseur de télémétrie est déjà défini</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Il provider di telemetria è già impostato</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">O provedor de telemetria já está definido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Поставщик телеметрии уже настроен</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Telemetri sağlayıcısı zaten ayarlanmış</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">已设置遥测提供程序</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">遙測提供者已設定</target>
<note />
</trans-unit>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981843Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872May 22, 2026
@Evangelink

Copy link
Copy Markdown
Member

Localization Synchronization Issue

This PR has a critical synchronization problem between source resources and localized files:

Issue Summary

The OneLocBuild task is deleting TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from all 13 .xlf files, but these resource strings are still actively used in PlatformResources.resx.

Timeline of Events

  1. PR Add --ansi <auto|on|off> CLI option for explicit ANSI control (#5081) #8493 (commit 8359a8a, merged ~hours ago) added the --ansi CLI option and introduced these two resource strings
  2. The strings were added to .xlf files with state="new" (untranslated, pending localization)
  3. This PR removes them from all .xlf files via OneLocBuild cleanup
  4. Problem: The source .resx file still references them for runtime use

Why This Will Break

The --ansi option implementation loads these strings at runtime:

  • TerminalAnsiOptionDescription - shown in --help output
  • TerminalAnsiOptionInvalidArgument - shown when user provides invalid argument

For non-English locales, the ResourceManager will fail to find these keys after this PR merges, causing either:

  • Fallback to English (breaking the localized user experience)
  • Missing resource exceptions in strict resource loading modes

Recommended Resolution

Option A (Preferred if --ansi is shipping):

  1. Close this PR or revert these deletions
  2. Keep the state="new" entries in .xlf files until they're properly translated
  3. Coordinate with the OneLocBuild pipeline to process these strings

Option B (If --ansi is being removed):

  1. First remove TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from PlatformResources.resx
  2. Then let OneLocBuild clean up the orphaned .xlf entries in a subsequent PR

Files to Check

Source (still contains the strings):

  • src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx lines 619-627

Usage (references these resource keys):

  • src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs
  • src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineOptionArgumentValidator.cs

Dimension 9 (Localization & Resources): BLOCKING issue - source/localized resource mismatch will break non-English users.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M ·

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Expert Code Review - PR #8510

This automated localization PR contains a critical synchronization bug that will break non-English users of the --ansi CLI option.

Findings Summary

#DimensionVerdict
9Localization & Resources🔴 1 BLOCKING

1/21 dimensions with findings (20 dimensions not applicable to localization-only PR)


Critical Finding

  • Localization & Resources — Source .resx contains resource strings that this PR deletes from all .xlf files

Issue Details

The OneLocBuild task is removing TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files. However, the source PlatformResources.resx file still contains and actively uses these resource strings for the --ansi CLI option added in PR #8493 (merged hours before this PR was created).

Impact:

  • The --ansi help text will not be localized for Czech, German, Spanish, French, Italian, Japanese, Korean, Polish, Portuguese, Russian, Turkish, and Chinese users
  • Error messages for invalid --ansi arguments will fall back to English
  • Violates the "Localization Done Right" principle (Overarching Principle #7)

Root Cause:
These strings were added with state="new" (untranslated) and OneLocBuild's cleanup logic is removing them before they were sent through the translation pipeline. This is a timing issue between feature merges and localization builds.

Resolution Required:
Either (A) retain these entries in .xlf files until properly translated, or (B) if the --ansi feature is being removed, delete the strings from PlatformResources.resx first.


Review Methodology

This review applied the 21-dimension expert-reviewer framework. Dimensions 1-8, 10-21 are not applicable to this PR as it only modifies localization files. Dimension 9 (Localization & Resources) was evaluated in depth and revealed the critical bug described above.

See inline comment on PlatformResources.cs.xlf:822 for full technical details and verification steps.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[BLOCKING] Localization & Resources (Dimension 9)

This PR deletes the TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files, but the source PlatformResources.resx file still contains these resource strings.

Concrete failing scenario:

  1. User launches test executable with locale set to Czech (cs), German (de), or any other localized language
  2. Help text or error message attempts to load TerminalAnsiOptionDescription or TerminalAnsiOptionInvalidArgument
  3. The ResourceManager cannot find these keys in the .xlf files (because this PR deleted them)
  4. Result: Either fallback to English text (breaking localized experience) or MissingManifestResourceException

Root cause:
These strings were added in commit 8359a8a (PR #8493) with state="new" (untranslated), never sent to the localization pipeline, and are now being incorrectly deleted by OneLocBuild's cleanup logic.

Impact:

Recommendation:

  1. Do not merge this PR in its current state
  2. Retain these translation units in all .xlf files (even with state="new")
  3. Ensure the localization pipeline processes these strings for the next release
  4. OR: If these strings are truly being removed from the codebase, remove them from PlatformResources.resxfirst, then allow OneLocBuild to clean up the .xlf files

Verification:

# Source .resx still contains these strings:
grep -A2 "TerminalAnsiOption" src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx
# But this PR deletes them from all .xlf files
git diff main -- src/Platform/Microsoft.Testing.Platform/Resources/xlf/*.xlf | grep "TerminalAnsiOption"

@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot added the needs/author-feedback Waiting on the original author. label May 22, 2026
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315May 23, 2026
CopilotAI review requested due to automatic review settings May 23, 2026 03:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
CopilotAI review requested due to automatic review settings May 23, 2026 03:05

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331May 23, 2026
@Evangelink
Amaury Levé (Evangelink) merged commit 1619a15 into mainMay 23, 2026
37 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557 branch May 23, 2026 15:43
@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot removed the needs/author-feedback Waiting on the original author. label May 23, 2026
Sign up for freeto 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.

3 participants

@dotnet-bot@Evangelink
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331 - #8510

Merged
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557
May 23, 2026
Merged

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331#8510
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557

Conversation

@dotnet-bot

Copy link
Copy Markdown
Collaborator

This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.

CopilotAI review requested due to automatic review settings May 22, 2026 16:02
@github-actions
github-actionsBot enabled auto-merge (squash) May 22, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This OneLocBuild-generated PR updates Microsoft.Testing.Platform localized XLF resource files under src/Platform/Microsoft.Testing.Platform/Resources/xlf/.

Changes:

  • Removes the TerminalAnsiOptionDescription trans-unit from multiple locale XLF files.
  • Removes the TerminalAnsiOptionInvalidArgument trans-unit from multiple locale XLF files.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 13 comments.

Show a summary per file
FileDescription
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlfRemoves TerminalAnsiOption* trans-units from the Czech locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlfRemoves TerminalAnsiOption* trans-units from the German locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlfRemoves TerminalAnsiOption* trans-units from the Spanish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlfRemoves TerminalAnsiOption* trans-units from the French locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlfRemoves TerminalAnsiOption* trans-units from the Italian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlfRemoves TerminalAnsiOption* trans-units from the Japanese locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlfRemoves TerminalAnsiOption* trans-units from the Korean locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlfRemoves TerminalAnsiOption* trans-units from the Polish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlfRemoves TerminalAnsiOption* trans-units from the Portuguese (Brazil) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlfRemoves TerminalAnsiOption* trans-units from the Russian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlfRemoves TerminalAnsiOption* trans-units from the Turkish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Simplified) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Traditional) locale XLF.

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Der Telemetrieanbieter ist bereits festgelegt</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">El proveedor de telemetría ya está establecido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Le fournisseur de télémétrie est déjà défini</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Il provider di telemetria è già impostato</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">O provedor de telemetria já está definido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Поставщик телеметрии уже настроен</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Telemetri sağlayıcısı zaten ayarlanmış</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">已设置遥测提供程序</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">遙測提供者已設定</target>
<note />
</trans-unit>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981843Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872May 22, 2026
@Evangelink

Copy link
Copy Markdown
Member

Localization Synchronization Issue

This PR has a critical synchronization problem between source resources and localized files:

Issue Summary

The OneLocBuild task is deleting TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from all 13 .xlf files, but these resource strings are still actively used in PlatformResources.resx.

Timeline of Events

  1. PR Add --ansi <auto|on|off> CLI option for explicit ANSI control (#5081) #8493 (commit 8359a8a, merged ~hours ago) added the --ansi CLI option and introduced these two resource strings
  2. The strings were added to .xlf files with state="new" (untranslated, pending localization)
  3. This PR removes them from all .xlf files via OneLocBuild cleanup
  4. Problem: The source .resx file still references them for runtime use

Why This Will Break

The --ansi option implementation loads these strings at runtime:

  • TerminalAnsiOptionDescription - shown in --help output
  • TerminalAnsiOptionInvalidArgument - shown when user provides invalid argument

For non-English locales, the ResourceManager will fail to find these keys after this PR merges, causing either:

  • Fallback to English (breaking the localized user experience)
  • Missing resource exceptions in strict resource loading modes

Recommended Resolution

Option A (Preferred if --ansi is shipping):

  1. Close this PR or revert these deletions
  2. Keep the state="new" entries in .xlf files until they're properly translated
  3. Coordinate with the OneLocBuild pipeline to process these strings

Option B (If --ansi is being removed):

  1. First remove TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from PlatformResources.resx
  2. Then let OneLocBuild clean up the orphaned .xlf entries in a subsequent PR

Files to Check

Source (still contains the strings):

  • src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx lines 619-627

Usage (references these resource keys):

  • src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs
  • src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineOptionArgumentValidator.cs

Dimension 9 (Localization & Resources): BLOCKING issue - source/localized resource mismatch will break non-English users.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M ·

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Expert Code Review - PR #8510

This automated localization PR contains a critical synchronization bug that will break non-English users of the --ansi CLI option.

Findings Summary

#DimensionVerdict
9Localization & Resources🔴 1 BLOCKING

1/21 dimensions with findings (20 dimensions not applicable to localization-only PR)


Critical Finding

  • Localization & Resources — Source .resx contains resource strings that this PR deletes from all .xlf files

Issue Details

The OneLocBuild task is removing TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files. However, the source PlatformResources.resx file still contains and actively uses these resource strings for the --ansi CLI option added in PR #8493 (merged hours before this PR was created).

Impact:

  • The --ansi help text will not be localized for Czech, German, Spanish, French, Italian, Japanese, Korean, Polish, Portuguese, Russian, Turkish, and Chinese users
  • Error messages for invalid --ansi arguments will fall back to English
  • Violates the "Localization Done Right" principle (Overarching Principle #7)

Root Cause:
These strings were added with state="new" (untranslated) and OneLocBuild's cleanup logic is removing them before they were sent through the translation pipeline. This is a timing issue between feature merges and localization builds.

Resolution Required:
Either (A) retain these entries in .xlf files until properly translated, or (B) if the --ansi feature is being removed, delete the strings from PlatformResources.resx first.


Review Methodology

This review applied the 21-dimension expert-reviewer framework. Dimensions 1-8, 10-21 are not applicable to this PR as it only modifies localization files. Dimension 9 (Localization & Resources) was evaluated in depth and revealed the critical bug described above.

See inline comment on PlatformResources.cs.xlf:822 for full technical details and verification steps.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[BLOCKING] Localization & Resources (Dimension 9)

This PR deletes the TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files, but the source PlatformResources.resx file still contains these resource strings.

Concrete failing scenario:

  1. User launches test executable with locale set to Czech (cs), German (de), or any other localized language
  2. Help text or error message attempts to load TerminalAnsiOptionDescription or TerminalAnsiOptionInvalidArgument
  3. The ResourceManager cannot find these keys in the .xlf files (because this PR deleted them)
  4. Result: Either fallback to English text (breaking localized experience) or MissingManifestResourceException

Root cause:
These strings were added in commit 8359a8a (PR #8493) with state="new" (untranslated), never sent to the localization pipeline, and are now being incorrectly deleted by OneLocBuild's cleanup logic.

Impact:

Recommendation:

  1. Do not merge this PR in its current state
  2. Retain these translation units in all .xlf files (even with state="new")
  3. Ensure the localization pipeline processes these strings for the next release
  4. OR: If these strings are truly being removed from the codebase, remove them from PlatformResources.resxfirst, then allow OneLocBuild to clean up the .xlf files

Verification:

# Source .resx still contains these strings:
grep -A2 "TerminalAnsiOption" src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx
# But this PR deletes them from all .xlf files
git diff main -- src/Platform/Microsoft.Testing.Platform/Resources/xlf/*.xlf | grep "TerminalAnsiOption"

@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot added the needs/author-feedback Waiting on the original author. label May 22, 2026
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315May 23, 2026
CopilotAI review requested due to automatic review settings May 23, 2026 03:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
CopilotAI review requested due to automatic review settings May 23, 2026 03:05

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331May 23, 2026
@Evangelink
Amaury Levé (Evangelink) merged commit 1619a15 into mainMay 23, 2026
37 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557 branch May 23, 2026 15:43
@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot removed the needs/author-feedback Waiting on the original author. label May 23, 2026
Sign up for freeto 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.

3 participants

@dotnet-bot@Evangelink
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331 - #8510

Merged
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557
May 23, 2026
Merged

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331#8510
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557

Conversation

@dotnet-bot

Copy link
Copy Markdown
Collaborator

This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.

CopilotAI review requested due to automatic review settings May 22, 2026 16:02
@github-actions
github-actionsBot enabled auto-merge (squash) May 22, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This OneLocBuild-generated PR updates Microsoft.Testing.Platform localized XLF resource files under src/Platform/Microsoft.Testing.Platform/Resources/xlf/.

Changes:

  • Removes the TerminalAnsiOptionDescription trans-unit from multiple locale XLF files.
  • Removes the TerminalAnsiOptionInvalidArgument trans-unit from multiple locale XLF files.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 13 comments.

Show a summary per file
FileDescription
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlfRemoves TerminalAnsiOption* trans-units from the Czech locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlfRemoves TerminalAnsiOption* trans-units from the German locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlfRemoves TerminalAnsiOption* trans-units from the Spanish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlfRemoves TerminalAnsiOption* trans-units from the French locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlfRemoves TerminalAnsiOption* trans-units from the Italian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlfRemoves TerminalAnsiOption* trans-units from the Japanese locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlfRemoves TerminalAnsiOption* trans-units from the Korean locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlfRemoves TerminalAnsiOption* trans-units from the Polish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlfRemoves TerminalAnsiOption* trans-units from the Portuguese (Brazil) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlfRemoves TerminalAnsiOption* trans-units from the Russian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlfRemoves TerminalAnsiOption* trans-units from the Turkish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Simplified) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Traditional) locale XLF.

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Der Telemetrieanbieter ist bereits festgelegt</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">El proveedor de telemetría ya está establecido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Le fournisseur de télémétrie est déjà défini</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Il provider di telemetria è già impostato</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">O provedor de telemetria já está definido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Поставщик телеметрии уже настроен</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Telemetri sağlayıcısı zaten ayarlanmış</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">已设置遥测提供程序</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">遙測提供者已設定</target>
<note />
</trans-unit>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981843Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872May 22, 2026
@Evangelink

Copy link
Copy Markdown
Member

Localization Synchronization Issue

This PR has a critical synchronization problem between source resources and localized files:

Issue Summary

The OneLocBuild task is deleting TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from all 13 .xlf files, but these resource strings are still actively used in PlatformResources.resx.

Timeline of Events

  1. PR Add --ansi <auto|on|off> CLI option for explicit ANSI control (#5081) #8493 (commit 8359a8a, merged ~hours ago) added the --ansi CLI option and introduced these two resource strings
  2. The strings were added to .xlf files with state="new" (untranslated, pending localization)
  3. This PR removes them from all .xlf files via OneLocBuild cleanup
  4. Problem: The source .resx file still references them for runtime use

Why This Will Break

The --ansi option implementation loads these strings at runtime:

  • TerminalAnsiOptionDescription - shown in --help output
  • TerminalAnsiOptionInvalidArgument - shown when user provides invalid argument

For non-English locales, the ResourceManager will fail to find these keys after this PR merges, causing either:

  • Fallback to English (breaking the localized user experience)
  • Missing resource exceptions in strict resource loading modes

Recommended Resolution

Option A (Preferred if --ansi is shipping):

  1. Close this PR or revert these deletions
  2. Keep the state="new" entries in .xlf files until they're properly translated
  3. Coordinate with the OneLocBuild pipeline to process these strings

Option B (If --ansi is being removed):

  1. First remove TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from PlatformResources.resx
  2. Then let OneLocBuild clean up the orphaned .xlf entries in a subsequent PR

Files to Check

Source (still contains the strings):

  • src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx lines 619-627

Usage (references these resource keys):

  • src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs
  • src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineOptionArgumentValidator.cs

Dimension 9 (Localization & Resources): BLOCKING issue - source/localized resource mismatch will break non-English users.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M ·

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Expert Code Review - PR #8510

This automated localization PR contains a critical synchronization bug that will break non-English users of the --ansi CLI option.

Findings Summary

#DimensionVerdict
9Localization & Resources🔴 1 BLOCKING

1/21 dimensions with findings (20 dimensions not applicable to localization-only PR)


Critical Finding

  • Localization & Resources — Source .resx contains resource strings that this PR deletes from all .xlf files

Issue Details

The OneLocBuild task is removing TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files. However, the source PlatformResources.resx file still contains and actively uses these resource strings for the --ansi CLI option added in PR #8493 (merged hours before this PR was created).

Impact:

  • The --ansi help text will not be localized for Czech, German, Spanish, French, Italian, Japanese, Korean, Polish, Portuguese, Russian, Turkish, and Chinese users
  • Error messages for invalid --ansi arguments will fall back to English
  • Violates the "Localization Done Right" principle (Overarching Principle #7)

Root Cause:
These strings were added with state="new" (untranslated) and OneLocBuild's cleanup logic is removing them before they were sent through the translation pipeline. This is a timing issue between feature merges and localization builds.

Resolution Required:
Either (A) retain these entries in .xlf files until properly translated, or (B) if the --ansi feature is being removed, delete the strings from PlatformResources.resx first.


Review Methodology

This review applied the 21-dimension expert-reviewer framework. Dimensions 1-8, 10-21 are not applicable to this PR as it only modifies localization files. Dimension 9 (Localization & Resources) was evaluated in depth and revealed the critical bug described above.

See inline comment on PlatformResources.cs.xlf:822 for full technical details and verification steps.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[BLOCKING] Localization & Resources (Dimension 9)

This PR deletes the TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files, but the source PlatformResources.resx file still contains these resource strings.

Concrete failing scenario:

  1. User launches test executable with locale set to Czech (cs), German (de), or any other localized language
  2. Help text or error message attempts to load TerminalAnsiOptionDescription or TerminalAnsiOptionInvalidArgument
  3. The ResourceManager cannot find these keys in the .xlf files (because this PR deleted them)
  4. Result: Either fallback to English text (breaking localized experience) or MissingManifestResourceException

Root cause:
These strings were added in commit 8359a8a (PR #8493) with state="new" (untranslated), never sent to the localization pipeline, and are now being incorrectly deleted by OneLocBuild's cleanup logic.

Impact:

Recommendation:

  1. Do not merge this PR in its current state
  2. Retain these translation units in all .xlf files (even with state="new")
  3. Ensure the localization pipeline processes these strings for the next release
  4. OR: If these strings are truly being removed from the codebase, remove them from PlatformResources.resxfirst, then allow OneLocBuild to clean up the .xlf files

Verification:

# Source .resx still contains these strings:
grep -A2 "TerminalAnsiOption" src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx
# But this PR deletes them from all .xlf files
git diff main -- src/Platform/Microsoft.Testing.Platform/Resources/xlf/*.xlf | grep "TerminalAnsiOption"

@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot added the needs/author-feedback Waiting on the original author. label May 22, 2026
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315May 23, 2026
CopilotAI review requested due to automatic review settings May 23, 2026 03:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
CopilotAI review requested due to automatic review settings May 23, 2026 03:05

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331May 23, 2026
@Evangelink
Amaury Levé (Evangelink) merged commit 1619a15 into mainMay 23, 2026
37 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557 branch May 23, 2026 15:43
@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot removed the needs/author-feedback Waiting on the original author. label May 23, 2026
Sign up for freeto 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.

3 participants

@dotnet-bot@Evangelink
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331 - #8510

Merged
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557
May 23, 2026
Merged

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331#8510
Amaury Levé (Evangelink) merged 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557

Conversation

@dotnet-bot

Copy link
Copy Markdown
Collaborator

This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.

CopilotAI review requested due to automatic review settings May 22, 2026 16:02
@github-actions
github-actionsBot enabled auto-merge (squash) May 22, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This OneLocBuild-generated PR updates Microsoft.Testing.Platform localized XLF resource files under src/Platform/Microsoft.Testing.Platform/Resources/xlf/.

Changes:

  • Removes the TerminalAnsiOptionDescription trans-unit from multiple locale XLF files.
  • Removes the TerminalAnsiOptionInvalidArgument trans-unit from multiple locale XLF files.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 13 comments.

Show a summary per file
FileDescription
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlfRemoves TerminalAnsiOption* trans-units from the Czech locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlfRemoves TerminalAnsiOption* trans-units from the German locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlfRemoves TerminalAnsiOption* trans-units from the Spanish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlfRemoves TerminalAnsiOption* trans-units from the French locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlfRemoves TerminalAnsiOption* trans-units from the Italian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlfRemoves TerminalAnsiOption* trans-units from the Japanese locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlfRemoves TerminalAnsiOption* trans-units from the Korean locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlfRemoves TerminalAnsiOption* trans-units from the Polish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlfRemoves TerminalAnsiOption* trans-units from the Portuguese (Brazil) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlfRemoves TerminalAnsiOption* trans-units from the Russian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlfRemoves TerminalAnsiOption* trans-units from the Turkish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Simplified) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlfRemoves TerminalAnsiOption* trans-units from the Chinese (Traditional) locale XLF.

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Der Telemetrieanbieter ist bereits festgelegt</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">El proveedor de telemetría ya está establecido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Le fournisseur de télémétrie est déjà défini</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Il provider di telemetria è già impostato</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">O provedor de telemetria já está definido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Поставщик телеметрии уже настроен</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Telemetri sağlayıcısı zaten ayarlanmış</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">已设置遥测提供程序</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">遙測提供者已設定</target>
<note />
</trans-unit>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981843Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872May 22, 2026
@Evangelink

Copy link
Copy Markdown
Member

Localization Synchronization Issue

This PR has a critical synchronization problem between source resources and localized files:

Issue Summary

The OneLocBuild task is deleting TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from all 13 .xlf files, but these resource strings are still actively used in PlatformResources.resx.

Timeline of Events

  1. PR Add --ansi <auto|on|off> CLI option for explicit ANSI control (#5081) #8493 (commit 8359a8a, merged ~hours ago) added the --ansi CLI option and introduced these two resource strings
  2. The strings were added to .xlf files with state="new" (untranslated, pending localization)
  3. This PR removes them from all .xlf files via OneLocBuild cleanup
  4. Problem: The source .resx file still references them for runtime use

Why This Will Break

The --ansi option implementation loads these strings at runtime:

  • TerminalAnsiOptionDescription - shown in --help output
  • TerminalAnsiOptionInvalidArgument - shown when user provides invalid argument

For non-English locales, the ResourceManager will fail to find these keys after this PR merges, causing either:

  • Fallback to English (breaking the localized user experience)
  • Missing resource exceptions in strict resource loading modes

Recommended Resolution

Option A (Preferred if --ansi is shipping):

  1. Close this PR or revert these deletions
  2. Keep the state="new" entries in .xlf files until they're properly translated
  3. Coordinate with the OneLocBuild pipeline to process these strings

Option B (If --ansi is being removed):

  1. First remove TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from PlatformResources.resx
  2. Then let OneLocBuild clean up the orphaned .xlf entries in a subsequent PR

Files to Check

Source (still contains the strings):

  • src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx lines 619-627

Usage (references these resource keys):

  • src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs
  • src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineOptionArgumentValidator.cs

Dimension 9 (Localization & Resources): BLOCKING issue - source/localized resource mismatch will break non-English users.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M ·

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Expert Code Review - PR #8510

This automated localization PR contains a critical synchronization bug that will break non-English users of the --ansi CLI option.

Findings Summary

#DimensionVerdict
9Localization & Resources🔴 1 BLOCKING

1/21 dimensions with findings (20 dimensions not applicable to localization-only PR)


Critical Finding

  • Localization & Resources — Source .resx contains resource strings that this PR deletes from all .xlf files

Issue Details

The OneLocBuild task is removing TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files. However, the source PlatformResources.resx file still contains and actively uses these resource strings for the --ansi CLI option added in PR #8493 (merged hours before this PR was created).

Impact:

  • The --ansi help text will not be localized for Czech, German, Spanish, French, Italian, Japanese, Korean, Polish, Portuguese, Russian, Turkish, and Chinese users
  • Error messages for invalid --ansi arguments will fall back to English
  • Violates the "Localization Done Right" principle (Overarching Principle #7)

Root Cause:
These strings were added with state="new" (untranslated) and OneLocBuild's cleanup logic is removing them before they were sent through the translation pipeline. This is a timing issue between feature merges and localization builds.

Resolution Required:
Either (A) retain these entries in .xlf files until properly translated, or (B) if the --ansi feature is being removed, delete the strings from PlatformResources.resx first.


Review Methodology

This review applied the 21-dimension expert-reviewer framework. Dimensions 1-8, 10-21 are not applicable to this PR as it only modifies localization files. Dimension 9 (Localization & Resources) was evaluated in depth and revealed the critical bug described above.

See inline comment on PlatformResources.cs.xlf:822 for full technical details and verification steps.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
github:
min-integrity: approved # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[BLOCKING] Localization & Resources (Dimension 9)

This PR deletes the TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files, but the source PlatformResources.resx file still contains these resource strings.

Concrete failing scenario:

  1. User launches test executable with locale set to Czech (cs), German (de), or any other localized language
  2. Help text or error message attempts to load TerminalAnsiOptionDescription or TerminalAnsiOptionInvalidArgument
  3. The ResourceManager cannot find these keys in the .xlf files (because this PR deleted them)
  4. Result: Either fallback to English text (breaking localized experience) or MissingManifestResourceException

Root cause:
These strings were added in commit 8359a8a (PR #8493) with state="new" (untranslated), never sent to the localization pipeline, and are now being incorrectly deleted by OneLocBuild's cleanup logic.

Impact:

Recommendation:

  1. Do not merge this PR in its current state
  2. Retain these translation units in all .xlf files (even with state="new")
  3. Ensure the localization pipeline processes these strings for the next release
  4. OR: If these strings are truly being removed from the codebase, remove them from PlatformResources.resxfirst, then allow OneLocBuild to clean up the .xlf files

Verification:

# Source .resx still contains these strings:
grep -A2 "TerminalAnsiOption" src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx
# But this PR deletes them from all .xlf files
git diff main -- src/Platform/Microsoft.Testing.Platform/Resources/xlf/*.xlf | grep "TerminalAnsiOption"

@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot added the needs/author-feedback Waiting on the original author. label May 22, 2026
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315May 23, 2026
CopilotAI review requested due to automatic review settings May 23, 2026 03:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
CopilotAI review requested due to automatic review settings May 23, 2026 03:05

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
@dotnet-botdotnet bot (dotnet-bot) changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331May 23, 2026
@Evangelink
Amaury Levé (Evangelink) merged commit 1619a15 into mainMay 23, 2026
37 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557 branch May 23, 2026 15:43
@microsoft-github-policy-servicemicrosoft-github-policy-serviceBot removed the needs/author-feedback Waiting on the original author. label May 23, 2026
Sign up for freeto 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.

3 participants

@dotnet-bot@Evangelink