xbmc / Official-Kodi-Remote-iOS

Full-featured remote control for XBMC Media Center. It features library browsing, now playing informations and a direct remote control.
Other
215 stars 104 forks source link

iOS17 settings bundle sub-localization not working #1058

Open wutschel opened 1 month ago

wutschel commented 1 month ago

As reported first time in this forum post, the sub-localization of settings.bundle does not work as expected running on iOS17 (simulator or target). In the reported case instead of en-us the default English en is used. This only impacts sub-localization, as switching to e.g. German (de) works. On iOS 15.5 simulation the sub.localization of settings.bundle works as expected.

Test case:

  1. Switch to English (GB)
  2. Go to Kodi App settings -> "Favourites" is shown
  3. Switch to English (US)
  4. Go to Kodi App settings -> "Favorites" should be shown
wutschel commented 1 month ago

This might be connected to the fact that Kodi App uses British English as default (en) and sublocalization for US English (en-us).

A test with iOS17 shows that when setting the device to US English the enlocalization is chosen for the settings, whereas the running App uses en-us. So, British translation is used for settings. On older iOS versions the used localization is same (en-us for both settings and application) when the device is set to US English.

Potential Change: Let the app use US English as default (en) and define British English as sublocalization (en-gb).

@kambala-decapitator, is there any general guidance on this? The App generally uses British English as root/default and all other translations are derived from it. If we change this, also Weblate needs to be updated.

kambala-decapitator commented 1 month ago

quite a nasty situation. Release notes don't seem to have any info about such change.

have you tested if the issue with localisation itself or with default text (i.e. key)? Change the same key to 2 different values for US and GB and see if the new value is picked.

wutschel commented 1 month ago

Just confirmed that not the default (key) is shown, but the en localization. I used "Favourites GB" for English UK and "Favorites US" for English US localization of the key "Favourites".

kambala-decapitator commented 1 month ago

thank you very much. I hoped that we could get away with a trivial fix :)

so, as I understand, we should rename lproj directories from en to en-GB?

wutschel commented 1 month ago

Wouldn't we need a non-sub-localized en directory as default? I thought of

  1. move current en to en-gb
  2. move current en-us to en
  3. Now can decide whether to keep en-us or to remove as we have en using English US

If we do this change w/o changing Weblate the automated translations will screw up as Weblate maps en to English UK and uses this as reference for all others.

You see any chance that this might be fixed in future iOS?

wutschel commented 1 month ago

iOS 17 Release notes at least point to fixes around localization ("Fixed: Some content might appear in English. Some strings might appear clipped. (109393568)"), could be a regression.

kambala-decapitator commented 1 month ago

iOS 17 Release notes at least point to fixes around localization ("Fixed: Some content might appear in English. Some strings might appear clipped. (109393568)"), could be a regression.

I saw that, but it says that the issue had actually been fixed :) Difficult to tell what it's about without seeing the original issue.

wutschel commented 1 month ago

For now I personally don't think reworking this on App/Weblate side is worth the hassle. It is quite a minor issue ("Favorites" vs. "Favourites"), but of course such glitch looks like not taking care as settings and app menu now differ for English US. This is clearly an iOS bug, as the en-us translation exists.

PS: I also tried to use different variants for the naming (en-US, en_US, en_us, even English (US)). No impact.

wutschel commented 1 month ago

@gade01, can you share your thoughts on this? The change on the App side is quite simple, but a change to the Weblate logic is needed. Is it worth to reconfigure Weblate to move English UK to en-gb and English US to en? Question is what to with the default / leading language in this case: keep UK leading (en-gb) or make US leading (en).

gade01 commented 1 month ago

@gade01, can you share your thoughts on this? The change on the App side is quite simple, but a change to the Weblate logic is needed. Is it worth to reconfigure Weblate to move English UK to en-gb and English US to en? Question is what to with the default / leading language in this case: keep UK leading (en-gb) or make US leading (en).

I definitely recommend keeping en_gb as source language (en).

All addons, Kodi core, all components, web interface and everything else use en_gb as source language. Changing to en_us would break consistency and confuse a lot of users.

wutschel commented 1 month ago

Thanks. So we should for sure keep UK as leading language. You also recommend to keep using 'en' for English UK? Or is it ok to use 'en' for US and move English UK to 'en-gb'?