V10.0.8/fix mac os culture mapping#27
Conversation
Add extended script/language aliases, regional fallbacks for English and Spanish, and geographic fallbacks for ICU-only cultures newly surfaced by macOS 26. Covers mappings like ber-Latn-MA, kk-Arab-CN, en-AL, es-003, ain-JP, and others with their respective NLS/ICU fallback targets.
Generate and include embedded resource binaries (.bin) for 148 ICU-only culture locales newly supported by macOS 26. Includes script/language variants, regional fallbacks for English and Spanish, and geographic locale surrogates. Updates project file to register all surrogate resources for compilation.
Greptile SummaryThis PR extends localization support for ICU-only cultures surfaced by macOS 26, adding ~113 new surrogate
Confidence Score: 5/5This PR is safe to merge — it adds new culture mappings and embedded resources without modifying any existing logic. The changes are purely additive: new dictionary entries appended to an existing map, new .bin files registered as embedded resources. The runtime loop and file-copy code paths are untouched. Every new ICU→NLS target (en-001, es-419, ja-JP, etc.) was already reachable via existing entries, so missing-file edge cases are already handled by the File.Exists guards in place. No existing behavior is altered. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[gse Program.cs runs] --> B[WriteSurrogate for each NLS CultureInfo]
B --> C[Writes .bin + .yml per culture]
A --> D[WriteIcuNamedNlsAlternatives]
D --> E{For each ICU→NLS mapping}
E --> F[TryWriteNlsSurrogate ICU name]
F -->|Windows NLS supports it| G[Write native surrogate for ICU name]
F -->|ICU-only - not in NLS| H{NLS fallback .bin exists?}
H -->|Yes| I[Copy fallback .bin to ICU name .bin]
H -->|No| J[Skip silently]
I --> K[ICU name surrogate ready]
G --> K
K --> L[Embedded in .csproj as EmbeddedResource]
Reviews (1): Last reviewed commit: "🍱 add locale surrogate resources for ma..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 4
Lines 184 184
Branches 4 4
=========================================
Hits 184 184 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This pull request enhances support for additional ICU-only cultures, particularly those surfaced by macOS 26, by updating both the project file and the ICU-to-NLS mapping logic. It ensures that new surrogate culture files are included as embedded resources and that appropriate fallback mappings are defined for these cultures, improving compatibility and localization handling across platforms.
ICU surrogate file management:
.binfiles to theEmbeddedResourcelist inCodebelt.Extensions.Globalization.csprojto support ICU-only cultures, and removed them from theNonelist to ensure they are packaged with the assembly.ICU-to-NLS mapping improvements:
WriteIcuNamedNlsAlternatives()to include:ber-Latn-MA→tzm-Latn-MA.en-AL→en-001,es-003→es-419).ain-JP→ja-JP).