Skip to content
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

Merged
merged 4 commits into from
Dec 29, 2020

Conversation

stephanegigandet
Copy link
Contributor

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

Copy link
Contributor

@monsieurtanuki monsieurtanuki left a 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

@stephanegigandet
Copy link
Contributor Author

  • 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 tried with English and French, it is working.

@stephanegigandet
Copy link
Contributor Author

Once this is merged, it would be a good opportunity to try the crowdin github actions: #47 cc @teolemon

@stephanegigandet
Copy link
Contributor Author

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
Copy link
Member

@teolemon teolemon Dec 27, 2020

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…

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested yesterday: #43 (comment)

Copy link
Member

@teolemon teolemon left a 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…

@teolemon
Copy link
Member

ok, good to merge

@teolemon
Copy link
Member

merge conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch from the localizely Flutter Intl plugin to the new Flutter internationalization / localization
3 participants