DecimalFormatter: Add locale-aware formatting - #23888
Conversation
|
Claude finished @morning4coffe-dev's task in 4m 3s —— View job Code Review
Overall this is a well-structured port. The Findings: 3 (1 style, 1 style/comment-length, 1 convention)Inline:
Not inline (pre-existing code, couldn't be anchored to a diff line):
Cross-cutting notes
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23888/wasm-skia-net9/index.html |
|
|
|
Claude finished @morning4coffe-dev's task in 5m 30s —— View job Code Review
Verdict: ✅ ship (1 style nit)All three findings from the previous review pass are resolved:
Findings: 1 (style only)Inline:
Cross-cutting notes
|
|
Claude finished @morning4coffe-dev's task in 6m 26s —— View job Code Review
Verdict: ✅ ship (1 docs nit, 1 test-coverage suggestion)All three findings from the previous round are confirmed resolved:
The Findings: 2 (1 docs, 1 test-coverage)Inline:
Cross-cutting notes
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23888/wasm-skia-net9/index.html |
|
Claude finished @morning4coffe-dev's task in 2m 26s —— View job Code Review
Verdict: ✅ ship (0 new findings)Latest commit
All three previous blocking findings are confirmed resolved:
Carried-forward (non-blocking, pre-existing)
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23888/wasm-skia-net9/index.html |
|
Claude finished @morning4coffe-dev's task in 6m 26s —— View job Code Review
Verdict: ✅ ship (2 findings: 1 test-quality, 1 correctness-minor)All findings from the four previous review passes are confirmed resolved in Findings: 2Inline:
Cross-cutting notes
|
|
Claude finished @morning4coffe-dev's task in 4m 45s —— View job Code Review
Verdict: ✅ ship (0 new findings)Both findings from the previous review pass (commit
All findings from the four earlier review passes are also confirmed resolved in this branch:
Cross-cutting notes
|
| #endif | ||
| #if __ANDROID__ || __IOS__ || __TVOS__ || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ | ||
| [global::Uno.NotImplemented("__ANDROID__", "__IOS__", "__TVOS__", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__")] | ||
| #if false || false || false || false || false || __NETSTD_REFERENCE__ |
| #endif | ||
| #if false || false || __TVOS__ || __WASM__ || false || __NETSTD_REFERENCE__ | ||
| [global::Uno.NotImplemented("__TVOS__", "__WASM__", "__NETSTD_REFERENCE__")] | ||
| #if false || false || false || false || false || __NETSTD_REFERENCE__ |
| #endif | ||
| #if __ANDROID__ || __IOS__ || __TVOS__ || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ | ||
| [global::Uno.NotImplemented("__ANDROID__", "__IOS__", "__TVOS__", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__")] | ||
| #if false || false || false || false || false || __NETSTD_REFERENCE__ |
| #endif | ||
| #if false || false || __TVOS__ || __WASM__ || false || __NETSTD_REFERENCE__ | ||
| [global::Uno.NotImplemented("__TVOS__", "__WASM__", "__NETSTD_REFERENCE__")] | ||
| #if false || false || false || false || false || __NETSTD_REFERENCE__ |
| #endif | ||
| #if __ANDROID__ || __IOS__ || __TVOS__ || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ | ||
| [global::Uno.NotImplemented("__ANDROID__", "__IOS__", "__TVOS__", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__")] | ||
| #if false || false || false || false || false || __NETSTD_REFERENCE__ |
| #endif | ||
| #if false || false || __TVOS__ || __WASM__ || false || __NETSTD_REFERENCE__ | ||
| [global::Uno.NotImplemented("__TVOS__", "__WASM__", "__NETSTD_REFERENCE__")] | ||
| #if false || false || false || false || false || __NETSTD_REFERENCE__ |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23888/wasm-skia-net9/index.html |
|
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 838452d3-d864-4283-8690-7260d18c0672
|
Claude finished @morning4coffe-dev's task in 3m 41s —— View job Code Review
Verdict: ✅ ship (1 style nit carried forward)Commit
M49 region whitelist — Findings: 1 (style, carried forward)Inline:
Cross-cutting notes
|
| /// for a null/empty/unrecognized region (mirrors <see cref="NumeralSystemTranslator"/>'s validation | ||
| /// conventions for <c>languages</c>). | ||
| /// </summary> | ||
| public static void ValidateGeographicRegion(string geographicRegion) |
There was a problem hiding this comment.
Minor (nullable annotation): geographicRegion is declared string (non-nullable) but the method body defensively checks is null. This means callers must use null! to probe the null path — visible in the test: new DecimalFormatter(new[] { "en-US" }, geographicRegion: null!). Annotating the parameter as string? would make the null guard statically visible to nullable analysis and remove the forced cast at the test call site:
| public static void ValidateGeographicRegion(string geographicRegion) | |
| public static void ValidateGeographicRegion(string? geographicRegion) |
(Non-blocking; this pattern was flagged in prior passes and is still present.)
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23888/wasm-skia-net9/index.html |
|
|
GitHub Issue: related to #6908
Related to #6908
PR Type:
✨ Feature
What changed? 🚀
Ports the locale-aware
DecimalFormatter(IEnumerable<string>, string)constructor and geographic-region properties, makes formatting/parsing culture-aware, and implementsGlobalizationPreferences.LanguagesandHomeGeographicRegionacross active Uno targets. This supplies the public globalization prerequisite used by NumberBox, with native WinRT contract probes and deterministic locale, grouping, numeral-system, and platform-preference coverage.PR Checklist ✅
Source fidelity status
DecimalFormatterandGlobalizationPreferencesare Windows.Globalization/Windows.System.UserProfile WinRT APIs rather thanmicrosoft-ui-xamlimplementation files. Their public behavior was verified against native WinRT probes (including region validation,ZZresolution, M49/pseudo regions, and signed grouping) and 112 focused tests. This prerequisite remains draft because it is not a literal microsoft-ui-xaml source port.