-
-
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
Replace Flutter Intl plugin from localizely with new flutter internationalization #46
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stephanegigandet It looks OK to me.
My remarks:
- have you tried with 2 languages, just to be sure that the app shows the correct translated labels according to the phone's language?
- I think it is compatible with @teolemon's New Crowdin updates #13, though it looks like a tango step - we should merge this one first, then New Crowdin updates #13
I tried with English and French, it is working. |
ok to merge? (this repo is not set up to require approvals on PRs, but I think it would be a good idea not to merge PR before they are approved, as we do on the OFF server repo) |
- source: /packages/smooth_app/lib/l10n/intl_en.arb | ||
translation: /packages/smooth_app/lib/l10n/intl_%locale_with_underscore%.arb | ||
- source: /packages/smooth_app/lib/l10n/app_en.arb | ||
translation: /packages/smooth_app/lib/l10n/app_%two_letters_code%.arb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have proper locale support for
pt_PT, pt_BR, zh_CN, zh_TW…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flutter needs locales with just the language code, we can add "pt_BR", but "pt" has to be there:
flutter pub get
Arb file for a fallback, fr, does not exist, even though
the following locale(s) exist: [fr_FR].
When locales specify a script code or country code, a
base locale (without the script code or country code) should
exist as the fallback. Please create a {fileName}_fr.arb
file.
Generating synthetic localizations package has failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested yesterday: #43 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- source: /packages/smooth_app/lib/l10n/app_en.arb
translation: /packages/smooth_app/lib/l10n/app_%two_letters_code%.arb
can we have proper locale support for
pt_PT, pt_BR, zh_CN, zh_TW…
ok, good to merge |
merge conflicts |
As @monsieurtanuki mentions, this is clearly not the simplest way to do things, but apparently it is the new recommended way (at least that's what is in the Flutter 1.22 announcement https://medium.com/flutter/announcing-flutter-1-22-44f146009e5f#f2cb and the Flutter internationalization guide: https://docs.google.com/document/d/10e0saTfAv32OZLRmONy866vnaw0I2jwL8zukykpgWBc/edit# )
I removed all the mostly empty .arb files from CrowdIn, once we have a more stable version of the app, we can upload app_en.arb to CrowdIn to get new translations for the actual strings we will need. At this time the app is so much in flux that it's probably not worth having anything translated yet.
Fixes #45 and #43