10-22-2019 21:44
10-22-2019 21:44
@JonFitbit Is anyone using i18n? I found when I try to load more than six .po files in the app\i18n directory, the app fails to sideload. It doesn't seem to matter which six and the companion\i18n directory is not so limited.
I'm using a javascript method to support the 11 languages Fitbit generally supports, but supporting 11 languages even when loaded from the companion, invariably takes up more javascript memory than I think the i18n should be capable of.
I'd like to use the i18n, it looks really useful, and a whole lot cleaner than javascripting it, but I don't want to limit my app to 6 languages.
The watchface I'm talking about has translations supported in the device, the settings page, and the help file, but after the i18n problem, it's all pretty much javascript.
Watchface is at https://gallery.fitbit.com/details/bda6f514-3946-49ba-a4ed-75e8470ab034
Thanks,
Reign
Answered! Go to the Best Answer.
10-23-2019 11:44
10-23-2019 11:44
Yes, I regularly use more than 6 languages. The sample app also does https://github.com/Fitbit/sdk-i18n/tree/master/app/i18n
It's hard to know what's wrong without seeing the project.
10-23-2019 11:44
10-23-2019 11:44
Yes, I regularly use more than 6 languages. The sample app also does https://github.com/Fitbit/sdk-i18n/tree/master/app/i18n
It's hard to know what's wrong without seeing the project.
10-23-2019 19:25
10-23-2019 19:25
Thanks @JonFitbit, that actually does answer my question, the problem is with my app. That actually seemed likely, but when I searched for i18n I found very few entries other than your introduction of it.
Considering that my watchface fails to install and that it is large in both js and resources, it seems likely it is running into some limit.
I think I will set up i18n on the companion and settings. That is where most the most need for translation is anyway. And,... if it is a memory or resource limit, the companion app is unlikely to be so limited.
Regards,
10-24-2019 11:28
10-24-2019 11:28
Had some issues with i18n lately, too. I am using all avaliable languages in my clock faces, but sometimes some of my clock faces refuse to start. I tracked the problem down to chinese i18n files. If I remove those, the clock faces start to work again. Maybe you have the same issues.
Regards,
Maxim
10-24-2019 11:44
10-24-2019 11:44
@Maxim_ do you have a sample of that file?
10-24-2019 13:21
10-24-2019 13:21
@JonFitbitI will send you a pm with a project that fails with chinese language files. If you rename/remove the i18n files, the watch face runs fine. Otherwise an error is thrown directly after install with cli tools (see screenshot in provided .zip). Does not seem to be a memory issue.
10-24-2019 19:28 - edited 10-24-2019 19:30
10-24-2019 19:28 - edited 10-24-2019 19:30
If you can remove any 2 other language files instead of the Chinese 2, it may be the same problem.
10-25-2019 14:16
10-25-2019 14:16
Ok, I found the issue. You seem to be hitting a file size limit which is on the manifest.json file generated in the build.
If you reduce the size of your package.json file, the app installs fine with all languages selected.
I removed the i18n section for the clockface name, since you weren't really using it.
{
"fitbit": {
"appUUID": "06d7f82c-ff0d-457b-962a-4bf917b7ed11",
"appType": "clockface",
"appDisplayName": "Halloween Analog",
"iconFile": "resources/icon.png",
"requestedPermissions": [
"access_internet",
"access_activity",
"access_heart_rate",
"access_location"
],
"buildTargets": [
"meson",
"higgs",
"gemini"
]
},
"devDependencies": {
"@fitbit/sdk": "~4.0.0",
"@fitbit/sdk-cli": "^1.7.0"
},
"scripts": {
"build": "fitbit-build"
}
}
10-25-2019 15:28
10-25-2019 15:28
Thanks for looking into it! I thought the locale definitions where needed, because Fitbit Studio said "Supported Locales". Good to know that I can dismiss them.
Guess it's time for a bulk update, finished my batch update script just in time 🙂