i18n_builder 1.1.3 copy "i18n_builder: ^1.1.3" to clipboard
i18n_builder: ^1.1.3 copied to clipboard

A builder to automatically update i18n translation files for Flutter projects

i18n_builder #

A Dart builder that automatically updates i18n translation files.

Features #

  • Automatically detects .i18n keys in your Dart files
  • Updates translation JSON files
  • Maintains existing translations
  • Removes obsolete keys
  • based on format of translations in i18n_extension

Usage #

  1. Add to your pubspec.yaml:
dev_dependencies:
    i18n_builder: ^1.1.3
  1. (Optional) Add to your build.yaml or create a i18n_builder.yaml file:
builders:
    i18n_builder:
        enabled: true
        base_locale: en-US # default
        translations_dir: assets/translations # default
        key_is_base_text: true # default - if true, the key will be set to the base locale text

Suggestions #

  • You can use the BabelEdit to make easy translate your files.
  • The builder preserves distinct keys that differ only by case, for example Tank and tank.

To run standalone #

Usage: dart run bin/i18n_standalone.dart <source_dir> <translations_dir> [options]
Options:
  --base-locale <locale>     Base locale (default: en)
  --key-is-base-text    Use key as base text (default: false)
  --remove-obsolete     Remove obsolete keys (default: false)

License #

MIT

0
likes
140
points
245
downloads

Documentation

API reference

Publisher

verified publisheraquarino.com.br

Weekly Downloads

A builder to automatically update i18n translation files for Flutter projects

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

build, path, source_gen

More

Packages that depend on i18n_builder