Skip to content

Localize authentication and pool validation error messages - #4805

Draft
cheenamalhotra wants to merge 1 commit into
mainfrom
dev/cheena/localize-error-messages
Draft

cheenamalhotra wants to merge 1 commit into
mainfrom
dev/cheena/localize-error-messages

Conversation

@cheenamalhotra

Copy link
Copy Markdown
Member

Description

Move the authority error from #4521, related authentication messages and wrappers, token validation, and pool validation errors into owning-assembly resources.

Preserve English wording and exception metadata. No public API changes or translations are added. Add regression tests and localization guidance, and update the code-review skill to flag hard-coded user-facing messages.

Issues

Related to #4521.

Testing

  • 89 focused tests passed on .NET 10; one Windows-only callback test skipped on macOS.
  • Azure and Abstractions test projects built for net462 with no warnings or errors. Windows/.NET Framework runtime testing was not performed.
  • Temporary satellite-resource smoke test verified UI-culture lookup and neutral fallback; fixtures were removed.

Guidelines

  • Tests added or updated
  • Public API changes documented (N/A: no API changes)
  • Verified against customer repro (N/A: string extraction only)
  • No breaking changes introduced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3d81d79a-b106-4b45-977e-28dc76b9507d

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.

🟢 Approval recommended

The resource extraction preserves wording and exception metadata with focused cross-assembly regression coverage.

0 open findings

What changed in this PR

Moves authentication, token, and pool validation errors into assembly-owned resources while preserving behavior and exception metadata.

Changes:

  • Added localized resource infrastructure for Azure and Abstractions extensions.
  • Replaced hard-coded validation/authentication messages with typed resources.
  • Added regression tests, documentation, and review guidance.
File Description
PoolValidationResourceTest.cs Tests pool validation resources and metadata.
Strings.resx (SqlClient) Adds pool validation messages.
Strings.Designer.cs Adds typed pool resource accessors.
DbConnectionPoolOptions.cs Uses the idle-timeout resource.
ConnectionPoolSlots.cs Uses capacity validation resources.
WamBrokerTests.cs Tests framework-specific callback errors.
AuthorityParsingTests.cs Verifies localized authority errors.
AuthenticationResourceTests.cs Tests Azure resources and exception metadata.
Azure/​src/​Resources/​Strings.resx Defines Azure authentication messages.
Azure.csproj Configures strongly typed resources.
AuthenticationException.cs Localizes authentication wrappers.
ActiveDirectoryAuthenticationProvider.Windows.cs Localizes invalid callback errors.
ActiveDirectoryAuthenticationProvider.cs Localizes provider errors.
SqlAuthenticationTokenTest.cs Tests token resource fallback.
SqlAuthenticationToken.cs Uses the token validation resource.
Abstractions/​src/​Resources/​Strings.resx Defines token validation text.
Abstractions.csproj Configures strongly typed resources.
Abstractions/​README.md Documents localization ownership.
sqlclient-code-review/​SKILL.md Adds localization review guidance.
driver-checks.md Defines user-facing string checks.
Files not reviewed (1)
  • src/Microsoft.Data.SqlClient/src/Resources/Strings.Designer.cs: Generated file

🧠 Review effort: Balanced


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

@cheenamalhotra
cheenamalhotra marked this pull request as draft October 7, 2026 22:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To triage

Development

Successfully merging this pull request may close these issues.

2 participants