Buscar pacotes, repositórios e categorias de apps

Detalhes do pacotev1.1.0

arb_translate

Uma ferramenta de linha de comando para gerar automaticamente traduções ausentes em arquivos ARB usando o Google Gemini ou o OpenAI ChatGPT, por LeanCode.

AndroidiOSmacOSWindowsLinux
Downloads em 30 dias
719
Curtidas
143
Pontos Pub
140

Instalar pacote

flutter pub add arb_translate

Visão geral do pacote

Orientação gerada a partir de informações públicas. Apenas para referência.

arb_translate é uma ferramenta de linha de comando que automatiza a geração de traduções ausentes em arquivos ARB (App Resource Bundle) usando modelos de IA do Google Gemini ou OpenAI ChatGPT. Desenvolvida pela LeanCode, ela simplifica os fluxos de trabalho de localização sugerindo traduções precisas com base em strings existentes, reduzindo o esforço manual. A ferramenta se integra perfeitamente a projetos Flutter em múltiplas plataformas, incluindo Android, iOS, macOS, Windows e Linux. Suporta tradução em tempo real e processamento em lote, tornando-a ideal para equipes que gerenciam conteúdo multilíngue de forma eficiente.

Casos de uso

  • Automatizando a geração de traduções ausentes
  • Simplificando fluxos de trabalho de internacionalização
  • Reduzindo o esforço de tradução manual
  • Apoiar aplicativos multilíngues do Flutter
  • Integrando tradução com inteligência artificial em pipelines CI/CD

Principais recursos

  • Tradução com inteligência artificial via Google Gemini ou OpenAI
  • Interface de linha de comando para automação
  • Suporta o formato de arquivo ARB
  • Compatibilidade multiplataforma
  • Processamento em lote de chaves de tradução
  • Integração fácil com projetos Flutter

Indicado para

  • Desenvolvedores Flutter gerenciando múltiplos idiomas
  • Equipes usando ARB para localização
  • Projetos que exigem iterações rápidas de tradução
  • pipelines de CI/CD com necessidades de localização
  • Desenvolvedores procurando ferramentas de tradução assistidas por IA

Considerações

  • Requer acesso à API do Google Gemini ou OpenAI
  • Dependente da conexão com a internet para chamadas de IA
  • Custo potencial para uso em grande volume
  • A qualidade da tradução depende da precisão do prompt
  • Não é substituto da revisão humana

README original

Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.

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

Categorias

Dependências

Lista de dependências 9 itens

Repositório-fonte

Projetos que usam este pacote

Ainda não há dados.