Remove orphaned neutral and English .xlf localization files#14491
Conversation
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.
There was a problem hiding this comment.
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)
.xlffiles across Build/MSBuild/Tasks/Utilities/MSBuildTaskHost. - Delete the remaining English
.xlffile (Strings.en.xlf) insrc/Build. - Leave the per-language
*.<lang>.xlffiles 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. |
There was a problem hiding this comment.
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.allowedlist 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
|
Thanks @JanProvaznik! |
Summary
Removes 7 stale
.xlflocalization 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.xlfsrc/MSBuild/Resources/xlf/Strings.xlfsrc/MSBuildTaskHost/Resources/xlf/SR.xlfsrc/Tasks/ManifestUtil/Resources/xlf/Strings.ManifestUtilities.xlfsrc/Tasks/Resources/xlf/Strings.xlfsrc/Utilities/Resources/xlf/Strings.xlfEnglish:
src/Build/Resources/xlf/Strings.en.xlfWhy
The
UpdateXlftask 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 byErrorOnOutOfDateXlf. They are pre-existing orphans that only stayed roughly correct through occasional manual edits, and silently drift out of sync with the source.resxotherwise. 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:
ConvertToNeutralXlftask and aCreateNeutralXlftarget.English file — leftover from a languages-list change:
*.en.xlffiles.src/Build/Resources/xlf/Strings.en.xlfvia a stale branch; that PR was unrelated to localization.Validation
A full
build.cmdwith 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>.xlffiles are untouched.