Skip to content

[release/v7.6.6] Update LocProject.json to list each English resource file directly - #27937

Merged
Patrick Meinecke (SeeminglyScience) merged 1 commit into
PowerShell:release/v7.6.6from
SeeminglyScience:backport/release/v7.6.6/27751-f9543fa3f
Sep 1, 2026
Merged

[release/v7.6.6] Update LocProject.json to list each English resource file directly#27937
Patrick Meinecke (SeeminglyScience) merged 1 commit into
PowerShell:release/v7.6.6from
SeeminglyScience:backport/release/v7.6.6/27751-f9543fa3f

Conversation

@SeeminglyScience

Copy link
Copy Markdown
Contributor

Backport of #27751 to release/v7.6.6

Triggered by Patrick Meinecke (@SeeminglyScience) on behalf of Dongbo Wang (@daxian-dbw)

Original CL Label: CL-BuildPackaging

/cc @PowerShell/powershell-maintainers

Impact

REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.

Tooling Impact

  • Required tooling change
  • Optional tooling change (include reasoning)

Lists each English resource file explicitly in LocProject.json instead of using a wildcard pattern that was recursively matching localized subfolders, causing translated resources to be incorrectly treated as source English resources by the localization pipeline (root cause of the BOM issue in #27921).

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Cherry-picked cleanly with no conflicts. Original PR added tests validating LocProject.json content stays in sync with actual resource files in the repo.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

Fixes an incorrect wildcard pattern in LocProject.json that caused localized .resx files to be recursively discovered and misidentified as default English resources, which is believed to be the root cause of a BOM generation failure seen in the #27756 backport (#27921). Change is limited to localization pipeline configuration and does not affect runtime code.

Copilot AI lite review requested due to automatic review settings September 1, 2026 15:20
@SeeminglyScience Patrick Meinecke (SeeminglyScience) added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Sep 1, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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

Backports the localization configuration fix to release/v7.6.6 by replacing recursive/wildcard .resx discovery with an explicit, per-file list of English source resources, and adds a Pester validation test intended to keep LocProject.json in sync with the repo’s actual resource files.

Changes:

  • Replaces wildcard-based SourceFile entries in Localize/LocProject.json with an explicit list of English .resx files and corresponding CopyOption/OutputPath values.
  • Adds a Pester test suite to validate LocProject.json LocItems entries exist on disk and that the total count matches the repo’s English .resx inventory.

Reviewed changes

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

File Description
Localize/LocProject.json Expands LocItems to explicitly enumerate each English .resx file (no wildcards), aligning with localization pipeline expectations.
test/powershell/engine/ResourceValidation/LocProject.Tests.ps1 Adds CI validation intended to ensure LocProject.json stays synchronized with the repo’s resource files (currently has issues that need fixing).

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.


try {
Push-Location -Path $srcDir
$resDirs = Get-ChildItem 'resources' -Recurse -Directory | ForEach-Object FullName
Comment on lines +23 to +25
$realSourceFile = Join-Path $repoRoot $sourceFile

Test-Path -Path $realSourceFile | Should -BeTrue
@SeeminglyScience
Patrick Meinecke (SeeminglyScience) merged commit 2da5785 into PowerShell:release/v7.6.6 Sep 1, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants