Skip to content

Remove orphaned neutral and English .xlf localization files#14491

Merged
JanProvaznik merged 2 commits into
dotnet:mainfrom
DustinCampbell:remove-legacy-xlf-files
Jul 23, 2026
Merged

Remove orphaned neutral and English .xlf localization files#14491
JanProvaznik merged 2 commits into
dotnet:mainfrom
DustinCampbell:remove-legacy-xlf-files

Conversation

@DustinCampbell

Copy link
Copy Markdown
Member

Summary

Removes 7 stale .xlf localization files that are no longer maintained by any build tooling: the six neutral (no-language) files and the last surviving English (Strings.en.xlf) file. The change is split into two commits so each set's distinct history is clear.

Files removed

Neutral (no-language):

  • src/Build/Resources/xlf/Strings.xlf
  • src/MSBuild/Resources/xlf/Strings.xlf
  • src/MSBuildTaskHost/Resources/xlf/SR.xlf
  • src/Tasks/ManifestUtil/Resources/xlf/Strings.ManifestUtilities.xlf
  • src/Tasks/Resources/xlf/Strings.xlf
  • src/Utilities/Resources/xlf/Strings.xlf

English:

  • src/Build/Resources/xlf/Strings.en.xlf

Why

The UpdateXlf task from the external XliffTasks package only generates and validates per-language files (<Name>.<lang>.xlf) for the cultures in $(XlfLanguages). It never produces a neutral or English file, so none of these files are regenerated, sorted, or checked by ErrorOnOutOfDateXlf. They are pre-existing orphans that only stayed roughly correct through occasional manual edits, and silently drift out of sync with the source .resx otherwise. Not every localized project even had them (e.g. Framework has neither), confirming the tooling neither needs nor maintains them.

Neutral files — legacy of a custom, since-removed localization system:

  • Introduced in 0cd5b42 ("Neutral xlf", 2016-11-04) via an in-repo ConvertToNeutralXlf task and a CreateNeutralXlf target.
  • Orphaned when the repo moved to XliffTasks in d2ad02e ("Enable XliffTasks", 2018-01-04) and deleted the custom tooling in 6370bbd / 299f624 (2018-01-03/04).

English file — leftover from a languages-list change:

Validation

A full build.cmd with all 7 files removed succeeds with 0 warnings / 0 errors and does not regenerate any of them, confirming they are unused. The per-language <Name>.<lang>.xlf files are untouched.

These 6 neutral, no-language .xlf files (e.g. Resources/xlf/Strings.xlf)
are legacy artifacts that are no longer maintained by any build tooling.

History:
 - 0cd5b42 (dotnet#1288, 2016-11-04) "Neutral xlf" introduced them via a
   custom in-repo task (build/LocalizationTasks/ConvertToNeutralXlf.cs)
   and a CreateNeutralXlf target. They were regenerated by that custom
   localization system through late 2017.
 - d2ad02e (2018-01-04) "Enable XliffTasks" switched the repo to the
   external XliffTasks package. Its UpdateXlf task only generates and
   validates per-language files (Strings.<lang>.xlf); it never produces
   a neutral file.
 - 6370bbd (2018-01-03) "Remove old build infrastructure" and
   299f624 (2018-01-04) "Delete old LocalizationTasks" removed the
   custom ConvertToNeutralXlf generator entirely.

Since that January 2018 migration the neutral files have been orphaned:
UpdateXlf ignores them, ErrorOnOutOfDateXlf does not validate them, and
the only subsequent edits were incidental hand-updates that let them
silently drift out of sync with the source .resx. A full build.cmd with
these files removed succeeds with 0 warnings/0 errors and does not
regenerate them, confirming they are unused.
src/Build/Resources/xlf/Strings.en.xlf is the last surviving *.en.xlf
file, an orphan left over from a change to the localized languages list.

History:
 - The repo once overrode XlfLanguages to force English satellite
   assemblies: "en;cs;de;es;fr;it;ja;ko;pl;pt-BR;ru;tr;zh-Hans;zh-Hant".
 - a66a243 "Use default XlfLanguages" (2021-06-18, merged via PR dotnet#6595)
   removed that override, reverting to the XliffTasks default, which
   excludes 'en' (English is the source language). That commit deleted all
   *.en.xlf files across the repo.
 - 864047d "Fail Builds Fast When SDKResolvers Throw Exceptions (dotnet#6763)"
   then accidentally re-added src/Build/Resources/xlf/Strings.en.xlf via a
   stale branch/merge; the PR itself was unrelated to localization.

Because 'en' is no longer in XlfLanguages, UpdateXlf never regenerates or
validates this file, and no other project has an *.en.xlf counterpart. A
full build.cmd with it removed succeeds with 0 warnings/0 errors and does
not regenerate it.
@DustinCampbell
DustinCampbell requested a review from a team as a code owner July 22, 2026 16:11
Copilot AI review requested due to automatic review settings July 22, 2026 16:11

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

This PR removes a set of stale XLIFF localization artifacts (neutral *.xlf and a leftover English Strings.en.xlf) that are not maintained by the repo’s current localization tooling and are not required for building MSBuild.

Changes:

  • Delete 6 neutral (no-language) .xlf files across Build/MSBuild/Tasks/Utilities/MSBuildTaskHost.
  • Delete the remaining English .xlf file (Strings.en.xlf) in src/Build.
  • Leave the per-language *.<lang>.xlf files intact.

Reviewed changes

Copilot reviewed 4 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Build/Resources/xlf/Strings.xlf Remove orphaned neutral XLF file.
src/Build/Resources/xlf/Strings.en.xlf Remove leftover English XLF file.
src/MSBuild/Resources/xlf/Strings.xlf Remove orphaned neutral XLF file.
src/MSBuildTaskHost/Resources/xlf/SR.xlf Remove orphaned neutral XLF file.
src/Tasks/ManifestUtil/Resources/xlf/Strings.ManifestUtilities.xlf Remove orphaned neutral XLF file.
src/Tasks/Resources/xlf/Strings.xlf Remove orphaned neutral XLF file.
src/Utilities/Resources/xlf/Strings.xlf Remove orphaned neutral XLF file.

@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.

Review: Remove orphaned neutral and English .xlf localization files

Verdict: Looks good.

I verified that none of the removed .xlf files are referenced by any .csproj, .props, or .targets files in the repository. The XliffTasks tooling only operates on per-language files, confirming these neutral and English files have no consumer.

No issues found. This is a safe housekeeping change.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

Generated by Expert Code Review (on open) for #14491 · 49.9 AIC · ⌖ 7.44 AIC · ⊞ 5K

@DustinCampbell
DustinCampbell requested a deployment to copilot-pat-pool July 22, 2026 16:20 — with GitHub Actions Abandoned
@JanProvaznik
JanProvaznik merged commit fecd32c into dotnet:main Jul 23, 2026
18 of 19 checks passed
@DustinCampbell

Copy link
Copy Markdown
Member Author

Thanks @JanProvaznik!

Sign up for free to 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