intl_localizable 0.1.1 copy "intl_localizable: ^0.1.1" to clipboard
intl_localizable: ^0.1.1 copied to clipboard

unlisted

Intl localizable dart/flutter command-line application (PRIVATE PROJECT).

intl_localizable #

pub package Dart SDK Version License

A command-line tool for Dart and Flutter that streamlines synchronizing, generating, and distributing localization files from the Localizable platform directly into your codebase.


Features #

  • 🚀 One-Command Sync: Fetch and unpack the latest localization exports with localizable update.
  • 🔍 Automatic Project Detection: Automatically detects whether your project is Flutter or Pure Dart and exports the corresponding localization files.
  • 📁 Smart Path Resolution: Intelligently places generated files into lib/src/ (if present) or lib/.
  • 📦 Automated Dependency Management: Automatically checks your pubspec.yaml and adds or updates the intl dependency if needed.
  • gRPC-Powered: Fast and secure streaming export delivery via gRPC.

Installation #

Activate the CLI globally using the Dart SDK:

dart pub global activate intl_localizable

Tip

Ensure that your global pub cache bin directory is in your system's PATH:

  • macOS / Linux: ~/.pub-cache/bin
  • Windows: %LOCALAPPDATA%\Pub\Cache\bin

Configuration #

In the root of your Dart or Flutter project, Download the localizable_project.json configuration file by using the "Download CLI config" in the "Exports" section button of the localization-platform project:

{
  "id": "<YOUR_PROJECT_ID>",
  "jws": "<YOUR_JWS_AUTH_TOKEN>"
}
Field Description
id The unique identifier of your project in the Localizable platform.
jws The JSON Web Signature (JWS) authentication token used to authorize export requests.

Usage #

Run the tool from the root directory of your project:

localizable update

Commands #

Command Description
update Request a new localization export from the server and extract it into your project.

Global Options #

Option Shorthand Description Default
--input-path -i Target project directory containing localizable_project.json and pubspec.yaml. Current directory (.)
--output-path -o Output directory where extracted localization files will be saved. Same as --input-path
--version -v Display the current CLI tool version.
--help -h Display usage instructions and options.

Examples #

Run in current directory #

localizable update

Specify custom project directory #

localizable update --input-path ~/workspace/my_flutter_app

Specify custom output location #

localizable update -i ./ -o ./packages/core_ui

How It Works #

  1. Detects Project Type: Inspects pubspec.yaml to determine whether the target application is a Flutter app or a Pure Dart package.
  2. Authenticates & Exports: Reads localizable_project.json and connects via gRPC to request an export archive for the given project ID.
  3. Extracts Code: Extracts the relevant Dart/Flutter localization files directly into lib/ or lib/src/.
  4. Validates Dependencies: Checks pubspec.yaml and ensures the required intl dependency is present.
  5. Cleans Up: Deletes temporary export archives and finishes execution.

Troubleshooting #

  • Could not find pubspec.yaml in this directory: Make sure you run localizable update from your project root or provide --input-path.
  • Unable to read/locate localizable_project.json config file: Ensure localizable_project.json is located in your project root or the specified --input-path.
  • command not found: localizable: Verify that Dart's global bin path (~/.pub-cache/bin) is added to your environment's PATH.

License #

This project is licensed under the terms described in the LICENSE file.

0
likes
0
points
645
downloads

Publisher

unverified uploader

Weekly Downloads

Intl localizable dart/flutter command-line application (PRIVATE PROJECT).

Homepage

License

unknown (license)

Dependencies

archive, args, async, fixnum, grpc, path, protobuf, pub_semver, riverpod, yaml_edit

More

Packages that depend on intl_localizable