Skip to content

Localize native MTP adapter runsettings resources#9897

Merged
Evangelink merged 1 commit into
mainfrom
dev/amauryleve/cuddly-parakeet
Jul 13, 2026
Merged

Localize native MTP adapter runsettings resources#9897
Evangelink merged 1 commit into
mainfrom
dev/amauryleve/cuddly-parakeet

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Problem

UnsupportedRunSettingsEntriesAreFlagged_Localization is broken on main.

PR #9748 (native MTP integration for MSTest) added a new copy of the runsettings warning strings to MSTest.TestAdapter's PlatformAdapterResources. Since the test asset uses EnableMSTestRunner=true, it now hits the native path (MSTestRunSettings.csPlatformAdapterResources) instead of the old VSTestBridge path.

However, every PlatformAdapterResources.*.xlf target was still state="new" with the English text, so no French/Italian output was ever produced and the test's localized assertions failed.

Fix

Ported the already-shipping, verbatim-identical translations from Microsoft.Testing.Extensions.VSTestBridge's ExtensionResources.*.xlf into PlatformAdapterResources.*.xlf, matching by exact <source> text. This fills 11 trans-units × 13 languages (143 targets), flipping each target from state="new" to state="translated".

Notes:

  • Only <target> lines changed (clean 143/143 diff); CRLF + UTF-8 BOM preserved.
  • Running dotnet msbuild /t:UpdateXlf will not undo this — it never overwrites existing translated targets, it only syncs sources.
  • This also correctly localizes the other new native-adapter strings (runsettings file errors, option descriptions) that were untranslated for the same reason.

Verification

.\build.cmd -pack -c Release, then ran the acceptance test:

total: 6  failed: 0  succeeded: 6  skipped: 0

PR #9748 added a native MTP copy of the runsettings warning strings to PlatformAdapterResources, but the *.xlf targets were left untranslated (state=new with English text). This broke UnsupportedRunSettingsEntriesAreFlagged_Localization, which asserts French/Italian output.

Port the verbatim-identical translations that already ship in the VSTestBridge ExtensionResources.*.xlf into PlatformAdapterResources.*.xlf (11 trans-units x 13 languages), flipping each target from state=new to state=translated.

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

Copilot-Session: e14a793a-02df-4926-bbea-7fb59e22ff59
Copilot AI review requested due to automatic review settings July 13, 2026 10:58
@Evangelink Evangelink added the state/needs-review Awaiting review from the team. label Jul 13, 2026
@Evangelink
Evangelink merged commit 8503466 into main Jul 13, 2026
9 checks passed
@Evangelink
Evangelink deleted the dev/amauryleve/cuddly-parakeet branch July 13, 2026 11:01

Copilot AI 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

Localizes native MTP adapter runsettings messages using existing VSTestBridge translations.

Changes:

  • Marks 143 resource targets as translated across 13 locales.
  • Restores localized runsettings warnings and option descriptions.
Show a summary per file
File Description
PlatformAdapterResources.cs.xlf Adds Czech translations.
PlatformAdapterResources.de.xlf Adds German translations.
PlatformAdapterResources.es.xlf Adds Spanish translations.
PlatformAdapterResources.fr.xlf Adds French translations.
PlatformAdapterResources.it.xlf Adds Italian translations.
PlatformAdapterResources.ja.xlf Adds Japanese translations.
PlatformAdapterResources.ko.xlf Adds Korean translations.
PlatformAdapterResources.pl.xlf Adds Polish translations.
PlatformAdapterResources.pt-BR.xlf Adds Brazilian Portuguese translations.
PlatformAdapterResources.ru.xlf Adds Russian translations.
PlatformAdapterResources.tr.xlf Adds Turkish translations.
PlatformAdapterResources.zh-Hans.xlf Adds Simplified Chinese translations.
PlatformAdapterResources.zh-Hant.xlf Adds Traditional Chinese translations.

Review details

  • Files reviewed: 13/13 changed files
  • Comments generated: 13
  • Review effort level: Medium

<trans-unit id="MissingRunSettingsAttribute">
<source>Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</source>
<target state="new">Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</target>
<target state="translated">.runsettings 檔案無效,遺漏 '&lt;RunSettings&gt;' 屬性</target>
<trans-unit id="MissingRunSettingsAttribute">
<source>Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</source>
<target state="new">Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</target>
<target state="translated">.runsettings 文件无效,缺少 '&lt;RunSettings&gt;' 属性</target>
<trans-unit id="MissingRunSettingsAttribute">
<source>Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</source>
<target state="new">Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</target>
<target state="translated">Geçersiz .runsettings dosyası, '&lt;RunSettings&gt;' özniteliği eksik</target>
<trans-unit id="MissingRunSettingsAttribute">
<source>Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</source>
<target state="new">Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</target>
<target state="translated">Недопустимый файл .runsettings, отсутствует атрибут "&lt;RunSettings&gt;"</target>
<trans-unit id="MissingRunSettingsAttribute">
<source>Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</source>
<target state="new">Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</target>
<target state="translated">Arquivo .runsettings inválido, o atributo "&lt;RunSettings&gt;" está ausente</target>
<trans-unit id="MissingRunSettingsAttribute">
<source>Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</source>
<target state="new">Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</target>
<target state="translated">File .runsettings non valido. Attributo '&lt;RunSettings&gt;' mancante</target>
<trans-unit id="MissingRunSettingsAttribute">
<source>Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</source>
<target state="new">Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</target>
<target state="translated">Fichier .runsettings non valide, « &lt;RunSettings&gt; » attribut est manquant</target>
<trans-unit id="MissingRunSettingsAttribute">
<source>Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</source>
<target state="new">Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</target>
<target state="translated">Archivo .runsettings no válido, falta el atributo "&lt;RunSettings&gt;"</target>
<trans-unit id="MissingRunSettingsAttribute">
<source>Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</source>
<target state="new">Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</target>
<target state="translated">Ungültige .runsettings-Datei, "&lt;RunSettings&gt;"-Attribut fehlt.</target>
<trans-unit id="MissingRunSettingsAttribute">
<source>Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</source>
<target state="new">Invalid .runsettings file, '&lt;RunSettings&gt;' attribute is missing</target>
<target state="translated">Neplatný soubor .runsettings. Chybí atribut &lt;RunSettings&gt;.</target>

@github-actions github-actions Bot 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.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Policy Violation: Manual XLF Edits

The repository localization guidelines state:

NEVER manually modify *.xlf files. Instead, regenerate them by running dotnet msbuild <project>.csproj /t:UpdateXlf.

This PR manually edits all 13 .xlf files. The correct workflow is:

  1. Add/update the translated strings in the .resx file (or the localization system that feeds translations).
  2. Run dotnet msbuild src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj /t:UpdateXlf to regenerate the .xlf files.

Please regenerate via UpdateXlf to ensure the files stay consistent with the tooling expected format and avoid drift.


Other observations (no blocking issues beyond the policy violation):

  • The 11 string IDs are updated consistently across all 13 locales ✓
  • state=newstate=translated is the correct transition ✓
  • Locked terms (.runsettings, <RunSettings>, {0} placeholders) appear preserved in the translations ✓
  • No functional code changes — risk is low ✓

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

Labels

needs/author-feedback Waiting on the original author. state/needs-review Awaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants