パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.1.0

arb_translate

LeanCodeによるGoogle GeminiまたはOpenAI ChatGPTを使用して、ARBファイルの欠落した翻訳を自動生成するコマンドラインツール。

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
719
いいね数
143
Pub ポイント
140

パッケージをインストール

flutter pub add arb_translate

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

arb_translate は、Google Gemini や OpenAI ChatGPT の AI モデルを使用して、ARB(App Resource Bundle)ファイル内の欠落した翻訳を自動生成するコマンドラインツールです。LeanCode によって開発され、既存の文字列に基づいて正確な翻訳を提案することで、ローカライゼーションワークフローを簡素化し、手作業の負担を軽減します。このツールは、Android、iOS、macOS、Windows、Linux を含む複数のプラットフォームで Flutter プロジェクトにシームレスに統合できます。リアルタイム翻訳とバッチ処理の両方をサポートしており、多言語アプリコンテンツを効率的に管理するチームに最適です。

用途

  • 不足翻訳の生成の自動化
  • 国際化ワークフローの最適化
  • 手動翻訳作業の削減
  • マルチリンガルなFlutterアプリのサポート
  • AI駆動翻訳をCI/CDパイプラインに統合する

主な機能

  • Google Gemini や OpenAI を通じた AI ベースの翻訳
  • 自動化のためのコマンドラインインターフェース
  • ARB ファイル形式をサポートしています
  • クロスプラットフォーム互換性
  • 翻訳キーのバッチ処理
  • Flutter プロジェクトとの簡単な統合

適している対象

  • 複数の言語を管理するFlutter開発者
  • ローカリゼーションに ARB を使用するチーム
  • 迅速な翻訳反復を必要とするプロジェクト
  • ローカライズの必要がある CI/CD パイプライン
  • AI補助翻訳ツールを探している開発者

注意事項

  • Google Gemini または OpenAI の API アクセスが必要です
  • AIコールにインターネット接続に依存しています
  • 大量使用時の潜在的なコスト
  • 翻訳の品質はプロンプトの正確さに依存します
  • 人間のレビューの代替ではありません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

arb_translate

arb_translate on pub.dev

A command-line tool for automatically generating missing translations to ARB files using Google Gemini or OpenAI ChatGPT by LeanCode

Installation

$ dart pub global activate arb_translate

Configuration

arb_translate has been designed to seamlessly integrate with Flutter apps using flutter_localizations for code generation from ARB files. Thanks to this integration, the setup process for arb_translate can be completed in just a few steps:

  1. Generate your API key. You can create your Gemini key here or your OpenAI key here

  2. Save your API token in the environment variable ARB_TRANSLATE_API_KEY or add arb-translate-api-key: {your-api-key} to l10n.yaml in your project.

  3. (Optional) Select model used for translation. To do it add arb-translate-model to l10n.yaml or use command argument --model. The default model is gemini-2.5-flash. For all available models see arb_translate --help.

  4. (Optional) Add context of your application arb-translate-context: {your-app-context} eg. "sporting goods store app"

All other required parameters match flutter_localizations parameters and will be read from l10n.yaml file. You can override them using command arguments if necessary. See arb_translate --help for more information.

Configuration without l10n.yaml

If you project doesn't include l10n.yaml configuration you have to provide configuration using environment variables and command arguments. You also have to provide:

  1. --arb-dir The directory where the template and translated ARB files are located

  2. --template-arb-file The template ARB file that will be used as the basis for translation

See arb_translate --help for more information.

Custom model configuration

You can use arb_translate with any model with an OpenAI-compatible API. To configure a custom model:

  1. Add arb-translate-custom-model: {your-model-name} to l10n.yaml or specify as command argument custom-model: {your-model-name}
  2. Add arb-translate-custom-model-provider-base-url: {your-model-url} to l10n.yaml or specify as command argument: --custom-model-provider-base-url: {your-model-url}
  3. (Optional) Set target batch size appropriately to model token count limits by adding arb-translate-batch-size: {size} to your l10n.yaml or specify as command argument batch-size: {size}. Batch size is the number of characters of ARB messages in a single batch and does not include the prompt or app context.

Usage

To generate translations, simply call arb_translate. All messages included in the template ARB file but missing from other files will be translated. To add a new locale, simply add an empty ARB file.

$ arb_translate

Or without l10n.yaml file

$ arb_translate --arb-dir...

Read more

If you want to know how we made this tool and what challenges we had, read the story.

LeanCode

Built with ☕️ by LeanCode

カテゴリー

依存関係

依存関係一覧 9 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。