Skip to content

test: enforce complete zh-CN language key coverage - #848

Closed
quanfanpro-code wants to merge 2 commits into
Raphire:masterfrom
quanfanpro-code:test/zh-cn-key-coverage
Closed

quanfanpro-code wants to merge 2 commits into
Raphire:masterfrom
quanfanpro-code:test/zh-cn-key-coverage

Conversation

@quanfanpro-code

@quanfanpro-code quanfanpro-code commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add a regression assertion using the existing Test-LanguageKeyCoverage helper to require shipped zh-CN catalogs to match the English key set in both directions. Verify that zh-CN resolves to its own folder, so English fallback cannot mask a missing catalog.
  • Preserve all language resources from upstream master bc093ebabf7208bfdbcdfc3ddb1b412990b3a949, including the maintainer's three WinGet deferred-uninstall translations. The diff against master is limited to nine added lines in Tests/Import-LanguageFile.Tests.ps1.
  • Leave partial translations and English fallback behavior for other languages unchanged.

Validation

  • GitHub Actions full suite after the merge: 923 passed, 0 failed, 0 skipped (run).
  • After merging current master: Windows PowerShell 5.1 / Pester 5.9.0, Tests/Import-LanguageFile.Tests.ps1 and Tests/LanguageCatalogs.Tests.ps1: 85 passed, 0 failed, 0 skipped.
  • Shipped zh-CN resolves to its own folder: 1,128 keys, matching English with 0 missing and 0 extra keys, including the latest backup-validation resource keys.
  • Existing missing-translation and missing-language English fallback tests passed; shipped-catalog placeholder and UTF-8 checks passed for all six languages.
  • Language resources and runtime scripts match upstream master; the original regression test is unchanged.
  • git diff --check passed.

Follow-up to #799 and the CodeRabbit review.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ececb8bc-f457-4685-80e8-e8223ced635b
📥 Commits

Reviewing files that changed from the base of the PR and between 762bc00 and 887d2df.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 53e98620-162e-411e-8e01-1229c151a804
📥 Commits

Reviewing files that changed from the base of the PR and between a2d63c7 and 762bc00.

📒 Files selected for processing: 2
  • Config/Languages/zh-CN/Chrome.json
  • Tests/Import-LanguageFile.Tests.ps1

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The zh-CN Chrome catalog adds messages for deferred WinGet uninstall outcomes. A test checks that the shipped zh-CN catalogs resolve to zh-CN and have no missing or extra keys.

Changes: Chinese WinGet uninstall messages

Layer / File(s) Summary
Add messages and verify catalog coverage
Config/Languages/zh-CN/Chrome.json, Tests/Import-LanguageFile.Tests.ps1
The zh-CN catalog adds messages for reboot-required and deferred WinGet uninstall outcomes. A test checks language resolution and confirms the catalogs have no missing or extra keys.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Suggested reviewers: sashankbhamidi

Merge Risk: ⚪ Minimal · up to 762bc

The localization additions and coverage assertions present no identified merge-blocking risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title is concise and directly describes the main change: enforcing complete zh-CN language key coverage. It is exactly 50 characters and meets the stated length preference.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Powershell Docstrings Passed The pull request changes only Config/Languages/zh-CN/Chrome.json and adds a Pester test block in Tests/Import-LanguageFile.Tests.ps1. It adds or changes no PowerShell functions. Therefore, no func…
Full details: Powershell Docstrings

Explanation

The pull request changes only Config/Languages/zh-CN/Chrome.json and adds a Pester test block in Tests/Import-LanguageFile.Tests.ps1. It adds or changes no PowerShell functions. Therefore, no function docstrings require review.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Raphire

Raphire commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Heya,

Thanks for taking the time to contribute. While I appreciate this additional test, I don't (yet) want to force require any specific languages (other than English) via tests.

Instead I want to have something like #860, a script that generates a report of any missing keys. That allows me or other contributors to add them separately from the actual feature.

@Raphire Raphire closed this Oct 25, 2026
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.

2 participants