attranslate  by fkirc

CLI tool for translating JSON, YAML, CSV, ARB, XML files

created 4 years ago
344 stars

Top 81.6% on sourcepulse

GitHubView on GitHub
Project Summary

This tool addresses the challenge of synchronizing and translating localization files across multiple formats, targeting developers and localization teams. It offers automated translation via various services while preserving manual edits and allowing custom prompts for nuanced control.

How It Works

The tool operates as a command-line interface (CLI) that reads source localization files (JSON, YAML, XML, ARB, CSV, etc.), translates specified content using configured services (OpenAI, Google Translate, Azure), and writes the output to target files. A key design principle is preserving manual translations; any user-defined text in target files is protected from being overwritten in subsequent runs. It also supports format conversion and custom prompts to guide AI translation quality.

Quick Start & Requirements

  • Install: npm install --global attranslate or npm install --save-dev attranslate for JavaScript projects.
  • Prerequisites: Node.js.
  • Usage: attranslate --srcFile=<source> --srcLng=<source_lang> --srcFormat=<format> --targetFile=<target> --targetLng=<target_lang> --targetFormat=<format> --service=<service_name>
  • Documentation: Usage Options

Highlighted Details

  • Supports multiple translation services: OpenAI, Google Translate, Azure, and a manual option.
  • Preserves manual translations, preventing overwrites of user-corrected text.
  • Allows custom prompts to guide AI translation quality and specify untranslated terms.
  • Handles various file formats including JSON (flat/nested), YAML, XML, ARB, CSV, PO, and iOS strings.

Maintenance & Community

  • Active development, with recent addition of a prompt parameter feature.
  • Community contributions are acknowledged.

Licensing & Compatibility

  • The README does not explicitly state a license.

Limitations & Caveats

  • The specific license is not mentioned, which may impact commercial use or integration into closed-source projects.
Health Check
Last commit

2 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.