Pakete, Repositories und App-Kategorien suchen

Paketdetailsv1.1.0

arb_translate

Ein Befehlszeilenwerkzeug zur automatischen Generierung fehlender Übersetzungen für ARB-Dateien mithilfe von Google Gemini oder OpenAI ChatGPT von LeanCode.

AndroidiOSmacOSWindowsLinux
30-Tage-Downloads
719
Likes
143
Pub-Punkte
140

Paket installieren

flutter pub add arb_translate

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

arb_translate ist ein Befehlszeilenwerkzeug, das die automatische Generierung fehlender Übersetzungen in ARB-Dateien (App Resource Bundle) mithilfe von KI-Modellen von Google Gemini oder OpenAI ChatGPT ermöglicht. Von LeanCode entwickelt, vereinfacht dieses Werkzeug Lokalisierungsworkflows durch präzise Übersetzungsvorschläge basierend auf vorhandenen Zeichenketten und reduziert manuelle Arbeit. Das Tool lässt sich nahtlos in Flutter-Projekte auf mehreren Plattformen wie Android, iOS, macOS, Windows und Linux integrieren. Es unterstützt sowohl Echtzeitübersetzungen als auch Stapelverarbeitung und ist daher ideal für Teams, die multilinguale App-Inhalte effizient verwalten.

Anwendungsfälle

  • Automatisierung der Generierung fehlender Übersetzungen
  • Internationalisierungsworkflows optimieren
  • Verringern des manuellen Übersetzungsaufwands
  • Unterstützung mehrsprachiger Flutter-Apps
  • Integration von künstlicher Intelligenz-gestützter Übersetzung in CI/CD-Pipelines

Hauptmerkmale

  • KI-gestützte Übersetzung über Google Gemini oder OpenAI
  • Befehlszeilen-Schnittstelle für Automatisierung
  • Unterstützt ARB-Dateiformat
  • Plattformübergreifende Kompatibilität
  • Batchverarbeitung von Übersetzungs-Schlüsseln
  • Einfache Integration in Flutter-Projekte

Geeignet für

  • Flutter-Entwickler, die mehrere Sprachen verwalten
  • Teams, die ARB für Lokalisierung verwenden
  • Projekte, die eine schnelle Übersetzungsiteration erfordern
  • CI/CD-Pipelines mit Lokalisierungsanforderungen
  • Entwickler, die nach künstlich-intelligenten Übersetzungstools suchen

Hinweise

  • API-Zugriff auf Google Gemini oder OpenAI erforderlich
  • Abhängig von der Internetverbindung für AI-Anrufe
  • Potenzieller Kosten für hohe Nutzung
  • Die Übersetzungsqualität hängt von der Genauigkeit des Prompts ab
  • Kein Ersatz für menschliche Überprüfung

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

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

Kategorien

Abhängigkeiten

Abhängigkeiten 9 Einträge

Quell-Repository

Projekte, die dieses Paket verwenden

Noch keine Daten verfügbar.