Skip to content

Comments

Fix localization of ExtendedPropertyDescriptor.DisplayName#124771

Open
Zurisen wants to merge 1 commit intodotnet:mainfrom
Zurisen:fix/108422-extender-localization
Open

Fix localization of ExtendedPropertyDescriptor.DisplayName#124771
Zurisen wants to merge 1 commit intodotnet:mainfrom
Zurisen:fix/108422-extender-localization

Conversation

@Zurisen
Copy link

@Zurisen Zurisen commented Feb 23, 2026

Fixes #108422

Summary

ExtendedPropertyDescriptor.DisplayName was using a ternary that fell back to the hardcoded English string "{0} on {1}" when SR.UsingResourceKeys() returned true (e.g. in trimmed or WASM environments), bypassing the already-localized SR.MetaExtenderName resource.

Change

Removed the unnecessary ternary. SR.Format(SR.MetaExtenderName, ...) already handles all environments correctly and uses the localized string as intended.

Testing

  • All existing tests in System.ComponentModel.TypeConverter pass.

Copilot AI review requested due to automatic review settings February 23, 2026 23:10
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Feb 23, 2026
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-componentmodel
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes a localization bug where the "on" text in extender property display names (e.g., "Error on errorProvider") was not being translated in non-English locales. The issue occurred because the code was bypassing localized resource strings in certain environments (trimmed/WASM) by using a hardcoded English fallback string.

Changes:

  • Removed an unnecessary ternary expression that was checking SR.UsingResourceKeys() and providing a hardcoded English fallback string "{0} on {1}" instead of using the localizable SR.MetaExtenderName resource.

@Zurisen
Copy link
Author

Zurisen commented Feb 24, 2026

The failing System.Net.Http.Functional.Tests work item appears to be unrelated
to this change, which only modifies ExtendedPropertyDescriptor.cs in
System.ComponentModel.TypeConverter. Happy to rerun if needed.

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

Labels

area-System.ComponentModel community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[LOC]The "on" is not translated for Error on errorProvider property on all local languages

1 participant