Skip to content

Set basic i18n framework #275

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

Closed
gnprice opened this issue Aug 17, 2023 · 0 comments · Fixed by #302
Closed

Set basic i18n framework #275

gnprice opened this issue Aug 17, 2023 · 0 comments · Fixed by #302
Assignees
Labels
a-i18n Translation, localization, internationalization a-tools Our own development tooling, scripts, and infrastructure
Milestone

Comments

@gnprice
Copy link
Member

gnprice commented Aug 17, 2023

Naturally we'll want the app to be internationalized and offer translations in many languages, just like zulip-mobile and Zulip web.

This issue is not for actually doing that. Rather this issue is for setting some of the code patterns we'll need in order to support that internationalization. Doing so sooner will be useful because it will affect many places in our UI code, and so the sooner we do it the fewer places we'll have to sweep back over to fix into the new pattern (and the more places we can instead write in the desired pattern in the first place).

Specifically, the scope of this issue is:

  • We'll set up Flutter to localize its own UI elements, with flutter_localizations. (This is mostly observable when using a screen-reader or other accessibility tool.) See tutorial: https://docs.flutter.dev/ui/accessibility-and-localization/internationalization#setting-up

  • We'll enable one or two other locales besides en, enough to demo the functionality.

  • We'll internationalize a handful of our own messages: set our UI code to use a translated form of them, and set up the infrastructure for that code to find that form.

    The tutorial page seems to offer a couple of ways to structure this: the gen_l10n way where you write ARB files and a tool generates a Dart class, or the intl way where you write a Dart class and a tool generates ARB files.

    Both approaches lead to essentially the same idiom in UI code that needs a translated message: we'd write ZulipLocalizations.of(context).helloWorld, where that identifier helloWorld is a name we pick for the given message. So we can pick one approach, later decide we like the other better, and switch without scattering much if any disruption across the app code.

Out of scope are:

@gnprice gnprice added the a-i18n Translation, localization, internationalization label Aug 17, 2023
@gnprice gnprice added this to the Alpha milestone Aug 17, 2023
@gnprice gnprice added the a-tools Our own development tooling, scripts, and infrastructure label Aug 17, 2023
sirpengi added a commit to sirpengi/zulip-flutter that referenced this issue Sep 5, 2023
Set up `flutter_localizations` integration and add initial
test bundle of ARB files to support some strings found
in the profile page. The bindings are autogenerated on
`flutter run`.

Fixes zulip#275
sirpengi added a commit to sirpengi/zulip-flutter that referenced this issue Sep 5, 2023
Set up `flutter_localizations` integration and add initial
test bundle of ARB files to support some strings found
in the profile page. The bindings are autogenerated on
`flutter run`.

Fixes zulip#275
sirpengi added a commit to sirpengi/zulip-flutter that referenced this issue Sep 7, 2023
Set up `flutter_localizations` integration and add initial
test bundle of ARB files to support some strings found
in the profile page. The bindings are autogenerated on
`flutter run`.

Fixes zulip#275
sirpengi added a commit to sirpengi/zulip-flutter that referenced this issue Sep 7, 2023
Set up `flutter_localizations` integration and add initial
test bundle of ARB files to support some strings found
in the profile page. The bindings are autogenerated on
`flutter run`.

Fixes zulip#275
sirpengi added a commit to sirpengi/zulip-flutter that referenced this issue Sep 8, 2023
Set up `flutter_localizations` integration and add initial
test bundle of ARB files to support some strings found
in the profile page. The bindings are autogenerated on
`flutter run`.

Fixes zulip#275
sirpengi added a commit to sirpengi/zulip-flutter that referenced this issue Sep 8, 2023
Set up `flutter_localizations` integration and add initial
test bundle of ARB files to support some strings in
different contexts. The bindings are autogenerated on
`flutter run`.

Fixes zulip#275
sirpengi added a commit to sirpengi/zulip-flutter that referenced this issue Sep 8, 2023
Set up `flutter_localizations` integration and add initial
test bundle of ARB files to support some strings in
different contexts. The bindings are autogenerated on
`flutter run`.

Fixes zulip#275
sirpengi added a commit to sirpengi/zulip-flutter that referenced this issue Sep 11, 2023
Set up `flutter_localizations` integration and blank
test bundle of ARB files.

Fixes zulip#275
sirpengi added a commit to sirpengi/zulip-flutter that referenced this issue Sep 14, 2023
Set up `flutter_localizations` integration and blank
test bundle of ARB files.

Fixes zulip#275
sirpengi added a commit to sirpengi/zulip-flutter that referenced this issue Sep 14, 2023
Set up `flutter_localizations` integration and blank
test bundle of ARB files.

Fixes zulip#275
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-i18n Translation, localization, internationalization a-tools Our own development tooling, scripts, and infrastructure
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants