flutter_i18n_translator 0.1.8
flutter_i18n_translator: ^0.1.8 copied to clipboard
A Flutter/Dart CLI tool that detects missing keys in JSON localization files, auto-translates them, and can regenerate Dart i18n helpers.
Changelog #
All notable changes to this project will be documented in this file.
0.1.8 - 2025-09-29 #
Added #
--enhanceGeneratedFile
and--no-enhanceGeneratedFile
CLI flags- Enhances the generated
I18n
file by:- Modifying the
locale
setter to automatically reload and update callingonLocaleChanged
automatically - Adding a static
current
instance ofI18n
so you can access translations withoutBuildContext
- Modifying the
- Default is
--enhanceGeneratedFile
enabled; can be explicitly disabled with--no-enhanceGeneratedFile
.
- Enhances the generated
- New example in
example.dart
for--enhanceGeneratedFile
.
0.1.7 - 2025-09-25 #
- Added
--autoDartFixGeneratedFile
and--no-autoDartFixGeneratedFile
CLI flags- Allows automatically running
dart fix --apply
on generated files after code generation - Enabled by default, can be disabled with
--no-autoDartFixGeneratedFile
- Allows automatically running
0.1.6 - 2025-09-25 #
Fixed #
- Corrected all key case conversion functions:
_toCamelCase
,_toPascalCase
,_toSnakeCase
,_toKebabCase
.- Now accurately converts any input without breaking internal capitalization or producing incorrect outputs.
0.1.5 - 2025-09-25 #
Added #
- Steps in README for adding
flutter_i18n_translator
as an External Tool in Android Studio. - Example shortcuts via Keymap for quick access.
Changed #
i18PrintNormal
now prints tostdout
instead ofstderr
so normal messages are no longer displayed in red.i18PrintError
still prints tostderr
in red.i18PrintDebug
prints tostderr
in green (if debug is enabled).
0.1.4 - 2025-09-25 #
Added #
--key-case
flag to automatically convert all JSON keys to a specific case.- Supported key case styles:
camel
,camelcase
,camel_case
→ camelCasepascal
,pascalcase
,pascal_case
→ PascalCasesnake
,snakecase
,snake_case
→ snake_casekebab
,kebabcase
,kebab_case
,dash
,dashcase
,dash_case
→ kebab-case
- New examples in
example.dart
for each--key-case
style. - Updated README with
--key-case
documentation.
Changed #
- Updated CLI help to show all supported
--key-case
options.
0.1.3 - 2025-09-25 #
Added #
--autoGenerate
flag to automatically regenerate i18n files (runsdart run i18n_json
).--no-autoGenerate
flag to explicitly disable automatic generation.--addMissingOverrides
flag to ensure missingWidgetsLocalizations
overrides are injected into the rootI18n
class after generation.--no-addMissingOverrides
flag to skip injecting missing overrides.
Changed #
- Updated CLI help message to include the new options.
0.1.0 - 2025-09-24 #
- Initial release of i18n_translator CLI tool.
- Features:
- Detects missing keys in JSON localization files.
- Supports automatic translation using Google Translator.
- Allows batching translations with a configurable character limit.
- Options to auto-translate and apply without manual confirmation.
- Debug logging with
--show-debug
and--no-debug
. - CLI help with
--help
.