onesky / plugin-ios-ota

Over the air plugin
50 stars 8 forks source link

How to define that always falls back to locale without region #15

Closed luicm closed 8 years ago

luicm commented 8 years ago

Hi, It is happening that the app sometimes "falling back to locale without region" and others "falling back to development region language". This means that some times the app is in English when it should be in Chinese. I have check and the translations are correct, both in the .strings files and in OneSky service.

is there a way to control this?

bretdabaker commented 8 years ago

The OTA should always fall back to "locale without region" first before falling back to "development region language", it could be due to the translation data is not downloaded in the app yet.

Can you please turn on debug messages and copy and paste the console log?

luicm commented 8 years ago

Hello, Our app is localised in 14 languages, I have checked and this issue is only happening in Chinese(Simplified) and Chinese(Traditional). Here is the log:

2016-04-05 17:22:59.476 OneSkyOTAPlugin - checking for update.

2016-04-05 17:22:59.914 OneSkyOTAPlugin - localized string not found for key: QardioArm, locale: zh-Hans-NL, falling back to locale without region: zh

2016-04-05 17:22:59.914 OneSkyOTAPlugin - localized string not found for key: QardioArm, locale: zh-Hans-NL, falling back to development region language: en

2016-04-05 17:22:59.915 OneSkyOTAPlugin - localized string found for key: QardioArm, value: QardioArm, developmentLocale: en

2016-04-05 17:22:59.921 OneSkyOTAPlugin - localized string not found for key: QardioCore, locale: zh-Hans-NL, falling back to locale without region: zh

2016-04-05 17:22:59.921 OneSkyOTAPlugin - localized string not found for key: QardioCore, locale: zh-Hans-NL, falling back to development region language: en

2016-04-05 17:22:59.921 OneSkyOTAPlugin - localized string found for key: QardioCore, value: QardioCore, developmentLocale: en

Thanks for your help

luicm commented 8 years ago

I think I may find the issue. Since Chinese made differences in between: Chinese(Simplified) and Chinese(Traditional), when it fall back into the region it take out the post-fix and instead of looking for zh-Hans or zh-Hant is trying to looking for zh and obviously it doesn't find it.

here you can see the logs for french and for portuguese:

2016-04-05 17:40:26.859 OneSkyOTAPlugin - localized string not found for key: QardioArm, locale: fr-NL, falling back to locale without region: fr

2016-04-05 17:40:26.860 OneSkyOTAPlugin - localized string found for key: QardioArm, value: QardioArm, locale without region: fr

2016-04-05 17:40:26.866 OneSkyOTAPlugin - localized string not found for key: QardioCore, locale: fr-NL, falling back to locale without region: fr

2016-04-05 17:40:26.866 OneSkyOTAPlugin - localized string found for key: QardioCore, value: QardioCore, locale without region: fr
2016-04-05 17:44:46.831 OneSkyOTAPlugin - checking for update.

2016-04-05 17:44:47.235 OneSkyOTAPlugin - localized string found for key: QardioArm, value: QardioArm, locale: pt-PT

2016-04-05 17:44:47.241 OneSkyOTAPlugin - localized string found for key: QardioCore, value: QardioCore, locale: pt-PT

2016-04-05 17:44:47.244 OneSkyOTAPlugin - localized string found for key: Friends & Family, value: Amigos & Família, locale: pt-PT

Please let me know if this is something that i can fix myself or it needs an update of the OTA plugin. Kind regards Luisa

luicm commented 8 years ago

Hello, do you have any update?

bretdabaker commented 8 years ago

We will update the OTA plugin to fix the problem, hopefully by tomorrow.

luicm commented 8 years ago

great, thank you very much

bretdabaker commented 8 years ago

Fixed in v0.9.9