-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
All .arb translations files from CrowdIn have an invalid "@@locale": "en" and are not loaded #43
Comments
In fact when trying to switch to the new Flutter internationalization introduced in Flutter 1.22, I get this:
|
Interesting, if I have one app_en.arb + app_fr_FR.arb, Flutter complains I don't have app_fr.arb
|
For the record, in my other flutter projects I use simply one json translation file per language. {
"version": "version #versionNo#",
"website_menu": "Website",
"feedback_subject": "About the “#app#” app",
"feedback_menu": "Contact us",
"fallback_email": "No mail app found!",
"fallback_url": "No web browser found!",
"share_app_subject": "“#app#” app for smartphone and tablet",
...
} Then, I just call something like |
Right, all the .arb files etc. certainly seem like overkill now. They'll be useful once we have a cool working app that we want to ship in 200 countries. When we add new translations then, using CrowdIn translators will be able to add them, and they won't have to use git. |
I'm not against the concept of translations. I'm again painful processes, and I guess the CrowdIn process could generate json files. Such a suggestion, I won't fight about that. |
It can, we use a json file through Crowdin for another sub-project: https://github.com/openfoodfacts/openfoodfacts-hungergames/blob/master/src/i18n/common.json At this point I'm just trying to do whatever is the recommended way of doing things in Flutter, in the hope that it will be easier for newcomers going forward. To be honest there are tons of things that I find painful in Flutter (like defining all those nested classes to read a JSON file instead of just accessing values with a syntax like some_hash{some_key}{some_other_key_for_an_array}[10]{another_key} like I'm used to do in Perl or JS). So I do find the internationalization things painful, but not more than the rest. :) |
Of course I'm barely scratching the surface of discovering Flutter, so I'm sure there are good reasons for most of the things that I find painful, and hopefully they won't be painful once I understand more about how things work in Flutter. |
Of course that's the normal way to access Map fields; I mean, in flutter/dart too. And I don't think there are good reasons for painful programing. For instance I would always discourage people from starting Android/java (Kotlin would be the same I guess). |
Thanks, I started it. |
Fixed by PR #46 |
e.g.
l10n/intl_fr_FR.arb:
{
"@@Locale": "en",
[..]
If this cannot be fixed in the CrowdIn setup, one option could be to have a script to fix the files, that we would run whenever we check-in new translations.
The text was updated successfully, but these errors were encountered: