You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code for validating name:*=* keys rejects extension syntaxes that are allowed under BCP 47.
For example, this peak in Hong Kong has name:en-t-zh=* set to an English translation of a Chinese name. While a user is unlikely to specifically ask for a map labeled by mode of derivation, they might be interested in labels that take one side or another in a geopolitical dispute. This lake whose name is disputed between two U.S. states. I’ve tagged each state’s recognized name in name:en-u-sd-usnc=* and name:en-u-sd-usva=*, using Unicode subdivision identifiers. This syntax is also being suggested for a more prominent dispute in current events.
These keys fail the test because it doesn’t account for the one-letter -t- or -u- extension marker:
Names in Gallo are tagged name:fr-x-gallo=* because no ISO 639 code has been assigned yet. This does pass because we’re specifically looking for -x-.
Instead of continuing to patch this homegrown regular expression, we could look around for more comprehensive ones such as this JavaScript implementation.
The text was updated successfully, but these errors were encountered:
1ec5
changed the title
Accept Unicode extensions in localized name subkeys
Accept extensions in localized name subkeys
Jan 29, 2025
1ec5
changed the title
Accept extensions in localized name subkeys
Accept Unicode extensions in localized name subkeys
Jan 29, 2025
The code for validating
name:*=*
keys rejects extension syntaxes that are allowed under BCP 47.For example, this peak in Hong Kong has
name:en-t-zh=*
set to an English translation of a Chinese name. While a user is unlikely to specifically ask for a map labeled by mode of derivation, they might be interested in labels that take one side or another in a geopolitical dispute. This lake whose name is disputed between two U.S. states. I’ve tagged each state’s recognized name inname:en-u-sd-usnc=*
andname:en-u-sd-usva=*
, using Unicode subdivision identifiers. This syntax is also being suggested for a more prominent dispute in current events.These keys fail the test because it doesn’t account for the one-letter
-t-
or-u-
extension marker:planetiler/planetiler-core/src/main/java/com/onthegomap/planetiler/util/LanguageUtils.java
Line 13 in 4ecb02d
Names in Gallo are tagged
name:fr-x-gallo=*
because no ISO 639 code has been assigned yet. This does pass because we’re specifically looking for-x-
.Instead of continuing to patch this homegrown regular expression, we could look around for more comprehensive ones such as this JavaScript implementation.
The text was updated successfully, but these errors were encountered: