tree: 5f0d4a3fa8657c1101536aa4d3c9594a2f5e5873 [path history] [tgz]
  1. intl_messages.arb
  2. intl_messages_he.arb
  3. messages_all.dart
  4. messages_ar-XB.dart
  5. messages_en-XA.dart
  6. messages_en-XC.dart
  7. messages_he.dart
  8. messages_nl.dart
  9. messages_sr-Latn.dart
  10. messages_sr.dart
  11. README.md
examples/localized_flutter/localized_flutter_localization/lib/README.md

localized_mod/lib/localization

Most of the files in this directory were generated. Here's how:

intl_messages.arb

This is generated from localized_mod/localized_mod_strings.dart using

localized_mod$ $FUCHSIA/third_party/dart-pkg/git/flutter/bin/flutter \
packages pub run \
intl_translation:extract_to_arb \
--output-dir=lib/localization \
lib/localized_mod_strings.dart

This file should be checked in.

intl_messages_*.arb

These are the result of manually translating intl_messages.arb into each target locale.

One option for generating these more easily is the Google Translator Toolkit.

In production code, these would be imported from a translation pipeline.

These files should be checked in.

messages_*.dart

These are generated from the .arb files. The command is

localized_mod$ $FUCHSIA/third_party/dart-pkg/git/flutter/bin/flutter \
packages pub run \
intl_translation:generate_from_arb \
--output-dir=lib/localization \
lib/localized_mod_strings.dart lib/localization/intl_*.arb

These are checked into the repo only as a temporary workaround.

In the future, there should be a GN build rule that will generate these code files at build time, so as to not pollute the source tree (fxbug.dev/8750).