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

fix crash in fr-FR locale #9737

Merged
merged 1 commit into from
Jul 7, 2023
Merged

Conversation

k-yle
Copy link
Collaborator

@k-yle k-yle commented Jul 7, 2023

Closes #8673

dist/locales/fr-FR.min.json doesn't have languageNames or scriptNames, so we need to lookup these properties from the file for the base language (dist/locales/fr.min.json)

I can't add unit tests because the test suite deliberately only loads the en locale, and you can't override this for individual test cases

@tyrasd tyrasd merged commit 457a210 into openstreetmap:develop Jul 7, 2023
@k-yle k-yle deleted the 8673-sus-names-crash branch July 7, 2023 11:22
@tyrasd
Copy link
Member

tyrasd commented Jul 7, 2023

Thanks a lot!

A similar bug is also triggered on some other "rare" locales which don't have a base-language to fall back to. These are all locales in dist/locales which don't define any languagenames:

lij.min.json
cv.min.json
tum.min.json
lus.min.json
kbd.min.json
en-US.min.json
nso.min.json
ay.min.json
fa-IR.min.json
ba.min.json
fr-FR.min.json
kha.min.json
ts.min.json
skr.min.json
nl-NL.min.json
pa-PK.min.json
gan.min.json
ny.min.json
nr.min.json
nv.min.json
ve.min.json
jam.min.json
ss.min.json
oc.min.json
sm.min.json
pap.min.json
tn.min.json
st.min.json
dv.min.json
he-IL.min.json
tl.min.json
grt.min.json

db886f5 fixes these additional cases by using the fallback mechanism to use the language name in the respective native language, or the pure language code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug - let's fix this!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iD become unusable after selecting a polygon due to an Uncaught TypeError
2 participants