flutter_localisation_cli 1.2.1
flutter_localisation_cli: ^1.2.1 copied to clipboard
Terminal CLI (fl) and MCP server (fl_mcp) for FlutterLocalisation — add, edit, delete and AI-translate localization keys from the shell or from Claude, then pull the ARBs. Pure Dart; pairs with the fl [...]
Changelog #
1.2.1 - 2026-07-21 #
Fixed #
import --language <code>now writes ONLY that locale. It was sendingapply_to_all_languages=trueregardless, so a targeted per-locale import clobbered every other language with the file's values. A base-language import (no--language) still seeds all locales so fresh keys stay translatable.
1.2.0 - 2026-07-21 #
Added #
- ARB
@keymetadata now round-trips through the API.add/fl addandadd_string(MCP) gained--placeholder name:type[:format](repeatable) and--description, so a key can be created with typed placeholders (e.g.count:int:decimalPattern) and an ICU@key.description.edit/fl editandedit_string(MCP) gained--description.TranslationEntrynow readsdescription+placeholdersback from the backend.
Fixed #
edit_string(MCP) no longer drops placeholders. The edit dispatch previously omitted placeholder metadata entirely; it now forwardsplaceholders+is_placeholders_enabledalongside the newdescription.
1.1.0 - 2026-07-14 #
Fixed #
--translateno longer over-reports success.add/translate/import --translatetrusted the backend'ssuccess_count, which countssource == outputas translated (a silent false success). The CLI now re-fetches after translating and flags any locale whose value still equals its key's non-empty base text as failed, sotranslated N/Nnever lies.import --translate'sfailedfield is now a list (matchingadd/translate).
Added #
- Bulk ARB import —
import_arbMCP tool +fl importCLI command. Instead of many per-keyadd_string/fl addcalls, put all strings in an ARB JSON and import it in a single request (pathto a file or inlinecontentfor the MCP tool;fl import <file.arb>for the CLI).translate=true/-tthen batch-translates the other locales in one pass;overwrite/--overwritereplaces existing values;--language <code>sets the file's locale (default: base). Preview by default (apply=true/ no--dry-runto write). Backed byManagementClient.importArb()(multipart to/api/project/{id}/import-arb/) andOperations.importArb(). Requires astrings:writetoken. fl guardcommand — lock the backend-managed files against AI edits. Writespermissions.denyrules into the project's.claude/settings.jsonso Claude Code refuses toEdit/Writethe ARB directory (arb_dir+l10n.yamlarb-dir/output-dir) andlib/generated_translation_methods.dart— files that only ever change via the SaaS tooling +git pull, and whose hand-edits are otherwise silently overwritten on the next sync. Idempotent; merges into existing settings;--dry-runpreviews.
1.0.1 - 2026-07-14 #
Fixed #
fl_mcpnow finds the token fromfl login. It previously read only$FL_API_TOKENand ignored~/.config/flutterlocalisation/credentials.json, forcing users to duplicate the token into their MCP client config. It now uses the same resolution as theflCLI (explicit →$FL_API_TOKEN→ credentials file).Credentials.resolvegained an injectablecredentialsFilefor tests.
1.0.0 - 2026-07-07 #
Added #
- Initial release. The
flCLI andfl_mcpMCP server, extracted from theflutter_localisationpackage into a standalone pure-Dart package so they can be installed and run without the Flutter SDK (dart pub global runnow works, and the runtime library no longer carries CLI dependencies). flcommands:login,projects,add(--translate),edit,delete,translate,status,pull; global--project,--flavor,--config,--dry-run,--json.fl_mcp: stdio MCP server exposinglist_projects,list_status,add_string,edit_string,delete_string,translate_key— preview-by-default (only writes withapply: true), project selection by name.- Auth via a scoped
flk_live_API token; project config file is optional (workspace-level commands and--project <name>work token-only).