Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

NSBundle: fix es.lproj path not generated #493

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hmelder
Copy link
Contributor

@hmelder hmelder commented Mar 16, 2025

The conversion between BCP 47 language tags and
the old-style language names ('English', 'German', etc) is quite complex, mapping ISO 639-1 language tags to the old-style names, and the result back to ISO 639-1 (-ish).

The ISO 639-1 tag for spanish 'es' maps to 'Spanish', which in turn maps back to 'sp'. The original input is not added to the list of possible names for 'lproj' folders.

We fix this by operating on the official input, when splitting language, variant, and region. The "mapped" tag is always added just to keep 'sp.lproj' working.

@hmelder hmelder requested a review from rfm as a code owner March 16, 2025 15:16
@hmelder hmelder force-pushed the nsbundle-lang-canonical branch from c7059a2 to fe03fac Compare March 16, 2025 15:18
The conversion between BCP 47 language tags and
the old-style language names ('English', 'German', etc) is quite
complex, mapping ISO 639-1 language tags to the old-style names, and
the result back to ISO 639-1 (-ish).

The ISO 639-1 tag for spanish 'es' maps to 'Spanish', which in turn
maps back to 'sp'. The original input is not added to the list
of possible names for 'lproj' folders.

We fix this by operating on the official input, when splitting
language, variant, and region. The "mapped" tag is always added
just to keep 'sp.lproj' working.
@hmelder hmelder force-pushed the nsbundle-lang-canonical branch from fe03fac to d3090e2 Compare March 16, 2025 15:42
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant