Skip to content

Normalize standalone English error message punctuation - #6654

Open
Daniel (dB.) Doubrovkine (dblock) wants to merge 2 commits into
microsoft:masterfrom
dblock:dblock/error-message-punctuation
Open

Daniel (dB.) Doubrovkine (dblock) wants to merge 2 commits into
microsoft:masterfrom
dblock:dblock/error-message-punctuation

Conversation

@dblock

@dblock Daniel (dB.) Doubrovkine (dblock) commented Nov 4, 2026 •

Copy link
Copy Markdown

📖 Description

Normalize 91 standalone English error resources to sentence case and terminal periods. Existing translator comments are unchanged. Preserve diagnostic prefixes, argument-value templates, questions, help descriptions, and literal command spelling. Translated resources are untouched. The 86 corresponding compiled-in error descriptions and the unknown-error fallback in src/AppInstallerSharedLib/Errors.cpp match the updated English resources.

Document the rule and exceptions in the existing Resource Strings section of doc/Standards.md. Existing spelling checks do not enforce punctuation; no new linter or dependencies are introduced because exceptions depend on the resource's use.

Branched from upstream master.

Current state before this change

Among the 239 resources with Error in their name in the English source resource file on the base branch:

Format Count Percentage
Capitalized, ending in . 126 52.7%
Capitalized, no terminal . 111 46.4%
Other starts 2 0.8%

This is a literal count of resource values, not a classification of errors requiring changes: terminal periods include ellipses, and intentional exceptions include diagnostic prefixes, argument-value templates, questions, help descriptions, and literal command spelling. Percentages are rounded independently.

🔗 References

Resolves #6653.

🔍 Validation

  • Windows SDK makepri compiled all 1,072 English named resources successfully.
  • XML checks confirmed all 91 changed values start capitalized, end with a period, and preserve formatting placeholders.
  • Exact comparisons confirmed all 86 changed compiled-in error descriptions and the unknown-error fallback match the English resources; error codes, table order, and implementation are unchanged. The new consistency test also reconciles four pre-existing compiled-in/resource wording differences.
  • Release-note merger and git diff --check passed.
  • Added ErrorDescriptionsMatchEnglishResources: forces en-US, checks every compiled-in WinGet description against its resource, requires resource availability, and restores the language override.
  • Restored native dependencies and built the real ARM64 production library and error-test object. The full test executable is blocked by the pre-existing missing AppInstallerSHA256.h include in WorkflowCommon.h; a temporary focused runner links the existing error-test/PCH objects with the production library and Catch2.
  • The focused native [errors] run passed all 3 test cases (613 assertions). Compiled PRI variants with an intentional missing period and missing error resource each failed the expected assertion.
  • Localization pipeline will pick up text changes.

✅ Checklist

  • Signed the Contributor License Agreement
  • Linked to an issue
  • Added a release note fragment
  • Updated documentation
  • Added or updated tests (whole-table English resource consistency test; native focused validation passed)
  • Updated Copilot instructions (not applicable; documented in developer standards)

🤖 AI Assistance

  • AI assistance was used and has been disclosed in this PR
  • No AI assistance was used

AI assisted edits and validation; author confirmed review before submission.

📋 Issue Type

  • Bug fix
  • Feature
  • Task
Microsoft Reviewers: Open in CodeFlow

@azure-pipelines

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

@JohnMcPMS

Copy link
Copy Markdown
Member

We've had similar discussions about sentence or not-sentence in the past (#5279 , #5281). Grammar is one area I'm just not pedantic about. I think there are several changes here that would be non-controversial, but there are others that will be.

One thing that I will be pedantic about is that the error messages are both in the resources and in the compiled in table in https://github.com/microsoft/winget-cli/blob/master/src/AppInstallerSharedLib/Errors.cpp and they should remain consistent.

@dblock

Copy link
Copy Markdown
Author

I am an AI posting on behalf of Daniel (dB.) Doubrovkine (@dblock). JohnMcPMS Addressed in 6f63802: synchronized all 86 error descriptions changed by this PR in src/AppInstallerSharedLib/Errors.cpp, plus the unknown-error fallback, with the English resources. Documented that the two representations must stay consistent. Exact string comparisons and git diff --check passed; error codes and table order are unchanged. No native build was run because build tools are unavailable here.

@dblock

Copy link
Copy Markdown
Author

I am an AI posting on behalf of Daniel (dB.) Doubrovkine (@dblock). Added the consistency test in separate signed commit f58564a. It compares all 203 compiled-in WinGet descriptions with en-US resources, requires every resource to exist, and restores the language override. Reconciled the four pre-existing wording differences so there are no exclusions. Native focused validation passed all 3 [errors] tests (613 assertions); intentional punctuation and missing-resource regressions each failed correctly. The full test executable has an unrelated missing AppInstallerSHA256.h include, so validation used the actual compiled error-test object linked against the real production library and Catch2.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 92a6065f-7ee8-4254-bcb7-2c5c2ae0a14b

Sync compiled-in error messages with English resources

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

Copilot-Session: 4a279cdb-93b6-4fa6-beb9-7d97c8f38b14
Compare every unlocalized WinGet error description with its en-US resource, require resource loading, and restore the language override after the test. Align four existing compiled-in descriptions with their resource values.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4a279cdb-93b6-4fa6-beb9-7d97c8f38b14
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.

Normalize punctuation in standalone English error messages

2 participants