Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

You put what in my canon(ical language)? #1368

Open
alerque opened this issue Apr 16, 2022 · 3 comments
Open

You put what in my canon(ical language)? #1368

alerque opened this issue Apr 16, 2022 · 3 comments
Labels
bug Software bug issue question Ask for advice or investigate solutions
Milestone

Comments

@alerque
Copy link
Member

alerque commented Apr 16, 2022

Having introduced a CLDR database in #675, I started using it to verify language settings.

Then I spotted the \font function does it's own form of verification. I'll let it speak for itself though because I have no idea what it thinks it is doing:

$ sile
SILE v0.12.4 (Lua 5.4)
> icu = require("justenoughicu")
> icu.canonicalize_language("jaberwalkie")
en
> icu.canonicalize_language("ukuaoeu")
ukuaoeu

c.f. #1367 for related brain teasers setting languages.

@alerque alerque added the bug Software bug issue label Apr 16, 2022
@alerque alerque added this to the v0.13.0 milestone Apr 16, 2022
@alerque alerque changed the title You put what in my cannon(ical language)? You put what in my canon(ical language)? Apr 16, 2022
@alerque
Copy link
Member Author

alerque commented Apr 16, 2022

Also we've short-circuited the distinction between languages and locales. To some extend we have scripts separated, but we cross-wire that with languages sometimes too.

@Omikhleia
Copy link
Member

jaberwalkie is not a valid (parsable) Locale format for ICU (... there are constraints on field lengths), so it fallbacks to "en".
ukuaoeu is valid. It perhaps doesn't exist, but it's canonical form. What was the expectation in this issue?

@alerque
Copy link
Member Author

alerque commented Nov 29, 2022

Interesting. I guess the expectation is that we always either get a KNOWN valid language code or "und" in the event it doesn't exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software bug issue question Ask for advice or investigate solutions
Projects
Development

No branches or pull requests

2 participants