Fix DefaultConverter.DefaultCulture#9045
Merged
henon merged 3 commits intoMudBlazor:devfrom May 24, 2024
Merged
Conversation
` ` `Changed the DefaultCulture in the Converters class from a static field to a static property with a getter only. This update ensures that DefaultCulture always reflects the current UI culture at the time it is accessed, instead of being set once and never updated.`
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #9045 +/- ##
==========================================
+ Coverage 89.82% 90.62% +0.79%
==========================================
Files 412 398 -14
Lines 11878 12372 +494
Branches 2364 2403 +39
==========================================
+ Hits 10670 11212 +542
+ Misses 681 621 -60
- Partials 527 539 +12 ☔ View full report in Codecov by Sentry. |
ScarletKuro
approved these changes
May 23, 2024
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes: #9043
Changed the
DefaultCulturein theConvertersclass from a static field to a static property with a getter only. This update ensures thatDefaultCulturereflects the current UI culture at the time of access, providing a more accurate representation of the UI culture.How Has This Been Tested?
Used the fixed version in our production project and the localization was reflected in the components using the
DefaultConverter.Type of Changes
It is potentially a breaking change if someone was setting the DefaultCulture manually.
Checklist
dev).