{"id":13548725,"url":"https://github.com/leancodepl/arb_translate","last_synced_at":"2026-03-12T11:02:57.550Z","repository":{"id":222681504,"uuid":"752787929","full_name":"leancodepl/arb_translate","owner":"leancodepl","description":"A command-line tool for automatically adding missing message translations to ARB files using Google Gemini LLM by LeanCode","archived":false,"fork":false,"pushed_at":"2024-11-14T13:13:32.000Z","size":163,"stargazers_count":62,"open_issues_count":11,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-26T14:54:02.993Z","etag":null,"topics":["dart","flutter","gemini","l10n","localization"],"latest_commit_sha":null,"homepage":"https://leancode.co","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leancodepl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-04T19:56:54.000Z","updated_at":"2024-12-22T14:22:17.000Z","dependencies_parsed_at":"2024-04-07T20:29:29.703Z","dependency_job_id":"654155bc-49de-4b80-9797-46d8a6a208ae","html_url":"https://github.com/leancodepl/arb_translate","commit_stats":null,"previous_names":["leancodepl/arb_translate"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancodepl%2Farb_translate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancodepl%2Farb_translate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancodepl%2Farb_translate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancodepl%2Farb_translate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leancodepl","download_url":"https://codeload.github.com/leancodepl/arb_translate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253164182,"owners_count":21864206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","flutter","gemini","l10n","localization"],"created_at":"2024-08-01T12:01:13.698Z","updated_at":"2025-09-20T22:09:46.913Z","avatar_url":"https://github.com/leancodepl.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"# arb_translate\n\n[![arb_translate on pub.dev][pub_badge]][pub_link]\n\nA command-line tool for automatically generating missing translations to ARB\nfiles using Google Gemini or OpenAI ChatGPT by\n[LeanCode](https://leancode.co/?utm_source=readme\u0026utm_medium=arb_translate_package)\n\n## Installation\n\n```console\n$ dart pub global activate arb_translate\n```\n\n## Configuration\n\n`arb_translate` has been designed to seamlessly integrate with Flutter apps\nusing `flutter_localizations` for code generation from ARB files. Thanks to this\nintegration, the setup process for arb_translate can be completed in just a few\nsteps:\n\n1. Generate your API key. You can create your Gemini key\n   [here](https://makersuite.google.com/app/apikey) or your OpenAI key\n   [here](https://platform.openai.com/api-keys)\n\n2. Save your API token in the environment variable `ARB_TRANSLATE_API_KEY` or\n   add `arb-translate-api-key: {your-api-key}` to `l10n.yaml` in your project.\n\n3. (Optional) Select model used for translation. To do it add\n   `arb-translate-model` to `l10n.yaml` or use command argument `--model`. The default model is\n   gemini-2.5-flash. For all available models see `arb_translate --help`.\n\n4. (Optional) Add context of your application\n   `arb-translate-context: {your-app-context}` eg. \"sporting goods store app\"\n\nAll other required parameters match `flutter_localizations` parameters and will\nbe read from `l10n.yaml` file. You can override them using command arguments if\nnecessary. See `arb_translate --help` for more information.\n\n### Configuration without l10n.yaml\nIf you project doesn't include `l10n.yaml` configuration you have to provide\nconfiguration using environment variables and command arguments. You also have\nto provide:\n\n1. `--arb-dir` The directory where the template and translated ARB files are\n   located\n\n2. `--template-arb-file` The template ARB file that will be used as the basis\n   for translation\n\nSee `arb_translate --help` for more information.\n\n### Custom model configuration\nYou can use `arb_translate` with any model with an OpenAI-compatible API. To configure a custom model:\n\n1. Add `arb-translate-custom-model: {your-model-name}` to `l10n.yaml` or specify\n   as command argument `custom-model: {your-model-name}`\n2. Add `arb-translate-custom-model-provider-base-url: {your-model-url}` to \n   `l10n.yaml` or specify as command argument: `--custom-model-provider-base-url: {your-model-url}`\n3. (Optional) Set target batch size appropriately to model token count limits by\n   adding `arb-translate-batch-size: {size}` to your `l10n.yaml` or specify as\n   command argument `batch-size: {size}`. Batch size is the number of characters\n   of ARB messages in a single batch and does not include the prompt or app\n   context.\n\n## Usage\nTo generate translations, simply call arb_translate. All messages included in\nthe template ARB file but missing from other files will be translated. To add a\nnew locale, simply add an empty ARB file.\n\n```console\n$ arb_translate\n```\n\nOr without `l10n.yaml` file\n\n```console\n$ arb_translate --arb-dir...\n```\n\n[pub_badge]: https://img.shields.io/pub/v/arb_translate.svg\n[pub_link]: https://pub.dartlang.org/packages/arb_translate\n\n## Read more\nIf you want to know how we made this tool and what challenges we had,\n[read the story](https://leancode.co/blog/flutter-app-localization-with-ai?utm_source=readme\u0026utm_medium=arb_translate_package).\n\n##\n\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"https://leancode.co/?utm_source=readme\u0026utm_medium=arb_translate_package\"\u003e\n      \u003cimg alt=\"LeanCode\" src=\"https://leancodepublic.blob.core.windows.net/public/wide.png\" width=\"300\"/\u003e\n   \u003c/a\u003e\n   \u003cp align=\"center\"\u003e\n   Built with ☕️ by \u003ca href=\"https://leancode.co/?utm_source=readme\u0026utm_medium=arb_translate_package\"\u003eLeanCode\u003c/a\u003e\n   \u003c/p\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleancodepl%2Farb_translate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleancodepl%2Farb_translate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleancodepl%2Farb_translate/lists"}