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

Norwegian Bokmål has "no" code in iD and presets imported from iD, Android expects "nb" code and fails to use iD preset data #3890

Closed
matkoniecz opened this issue Mar 19, 2022 · 8 comments · Fixed by #3896
Labels

Comments

@matkoniecz
Copy link
Member

https://poeditor.com/projects/po_edit?id=97843&term=273463027&id_language=127#showComments273463027

The search field only accept english (for instance "bakery" instead of the Norwegian word "bakeri"

after this is fixed

so I "translated" this to "A(n)… (på engelsk)", which means "A(n)... (in english)". A bit longer than the source, but I think it should be OK...

should be changed back/reset

@matkoniecz matkoniecz added the bug label Mar 19, 2022
@westnordost
Copy link
Member

Can you elaborate? What search field?

@matkoniecz
Copy link
Member Author

matkoniecz commented Mar 19, 2022

  1. in currently deployed iD presets shop=bakery is shown with label Bakeri when preferred language is set to no code in OSM account setting/preferences (forgot which one)

  2. when you set phone to Norsh bokmal then StreetComplete will not use Norwegian iD preset data - it will use English ones (shown in object descriptions, impacting "this object does not exist anymore" as reported here)

  3. When you set phone to Polish it works fine ("piekarnia" is found, presumable also in German)


Norwegian may be a problem here - see https://en.wikipedia.org/wiki/Norwegian_language_conflict

There are at least two Norwegian languages https://en.wikipedia.org/wiki/Bokm%C3%A5l (nb code) and https://en.wikipedia.org/wiki/Nynorsk (nn code)

There are several possibilities, the most likely are:

(1) Norwegian is not yet translated or was translated recently for iD presets, SC should reimport this data. Disproved by rg bakeri finding it in app/src/main/assets/osmfeatures/default/no.json

(2) Norwegian multilanguage mess is impacting SC

Bakeri is listed in app/src/main/assets/osmfeatures/default/no.json - note no language code used by iD (https://www.transifex.com/openstreetmap/id-editor/ has "Norwegian" and "Norwegian Nynorsk") which may be mismatching languages used by Android which has "Norwegian Bokmål" and "Norwegian Nynorsk"

Note that iD appears to not have "Bakery" translated in Nynorsk so it will remain affected by (1) problem no matter what SC will do until translation of iD presets is improved (see https://github.com/openstreetmap/id-tagging-schema#translations )

@matkoniecz
Copy link
Member Author

app/src/main/assets/osmfeatures/default has no and nn - maybe it should have nb and nn?

It fixes problem in Android version which I used for tests

As bonus, it may depend on Android version, I am trying to check has handling of Norwegian changed in past...

@matkoniecz matkoniecz changed the title translator claims that Norwegian language version requires using English name of presets Norwegian Bokmål has no code in iD and presets imported from iD, Android expects nb code and fails to use iD preset data Mar 19, 2022
@matkoniecz matkoniecz changed the title Norwegian Bokmål has no code in iD and presets imported from iD, Android expects nb code and fails to use iD preset data Norwegian Bokmål has "no" code in iD and presets imported from iD, Android expects "nb" code and fails to use iD preset data Mar 19, 2022
@matkoniecz
Copy link
Member Author

As browsers use no code I would not consider iD using it as a bug.

But using in Android is a bug.

I think that optimal solution is to add an extra step in https://github.com/streetcomplete/StreetComplete/blob/master/buildSrc/src/main/java/UpdatePresetsTask.kt that would move no file to nb file.

@matkoniecz
Copy link
Member Author

Looking at: https://github.com/streetcomplete/StreetComplete/blob/6aca0dc9476034466d04949ffe870075932edb96/buildSrc/src/main/java/Utils.kt

It is possible that either bcp47LanguageTagToJavaLanguageTag should be changed or javaLanguageTagToAndroidResCodes used somehow. Note that there are also some other special cases, I tested and British English is working fine right now.

Serbian cyrillic is not listed at all in https://github.com/streetcomplete/StreetComplete/tree/master/app/src/main/assets/osmfeatures/default - but iD preset right now are not being translated into it at all (see https://www.transifex.com/openstreetmap/presets/dashboard/ - it has "request language" at the bottom)

I tried testing Chinese but due to fact that small part of iD presets is translated I was unable to find a good test case.

matkoniecz added a commit to matkoniecz/Zazolc that referenced this issue Mar 20, 2022
this is a bit ugly special case but istuation itself is also an ugly special case

fixes streetcomplete#3890
matkoniecz added a commit to matkoniecz/Zazolc that referenced this issue Mar 20, 2022
this is a bit ugly special case but istuation itself is also an ugly special case

fixes streetcomplete#3890
@westnordost
Copy link
Member

So the solution should be that in the update presets tasks, the "no" or "nb" translation is just copied to "no" and "nb". So whatever the system wants to use, it will find it.

@matkoniecz
Copy link
Member Author

#3896 is doing this so I merged it, but Bokmål/Nynorsk may be also triggering other bugs (though I have not spotted anything)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants