πŸ“¦ hwangdev97 / Rosetta

Vibe Coding with Cursor - Modern iOS localization file translator with beautiful CLI

β˜… 0 stars β‘‚ 0 forks πŸ‘ 0 watching βš–οΈ MIT License
πŸ“₯ Clone https://github.com/hwangdev97/Rosetta.git
HTTPS git clone https://github.com/hwangdev97/Rosetta.git
SSH git clone git@github.com:hwangdev97/Rosetta.git
CLI gh repo clone hwangdev97/Rosetta
Hwang Hwang doc: update readme 2e4344a 6 months ago πŸ“ History
πŸ“‚ main View all commits β†’
πŸ“ .github
πŸ“ assets
πŸ“ docs
πŸ“ scripts
πŸ“ src
πŸ“ tests
πŸ“„ .gitignore
πŸ“„ build.sh
πŸ“„ Cargo.lock
πŸ“„ Cargo.toml
πŸ“„ LICENSE
πŸ“„ README.md
πŸ“„ README.zh-CN.md
πŸ“„ rosetta.rb
πŸ“„ README.md

Rosetta 🌍

δΈ­ζ–‡θ―΄ζ˜Ž (Chinese)


Introduction

🎯 This is a vibe coding project β€” A personal passion project built with modern Rust for iOS localization. Feel free to fork, modify, and make it your own! If you find it useful, give it a star ⭐

A modern, blazing-fast CLI tool for translating iOS .xcstrings files using multiple AI providers with a beautiful terminal interface.


Features

  • πŸš€ Blazing Fast: Written in Rust for maximum performance
  • 🎨 Beautiful Interface: Clean terminal UI with progress tracking
  • πŸ€– Multi-AI Support: OpenAI GPT, Anthropic Claude, Google Gemini
  • πŸ“± iOS Native: Specifically designed for .xcstrings localization files
  • ⚑ Interactive Mode: Choose what to translate with real-time feedback
  • πŸ”„ Batch Processing: Translate multiple keys at once
  • πŸ’Ύ Auto-Backup: Automatically backs up your files before translation
  • πŸ” Smart Detection: Auto-detects project structure and files
  • 🌐 Multi-Language: Supports 30+ languages including CJK languages

Installation

Download from Releases (Recommended)

# Download the latest binary from GitHub releases
# https://github.com/hwangdev97/Rosetta/releases

Via Homebrew

brew tap hwangdev97/tools
brew install rosetta

Build from Source

git clone https://github.com/hwangdev97/Rosetta.git
cd Rosetta
chmod +x build.sh
./build.sh

Via Cargo

cargo install --git https://github.com/hwangdev97/Rosetta.git


Quick Start

Setup

  • Configure AI Provider
rosetta setup
Choose your preferred AI provider and enter your API key:
  • Verify Setup
rosetta config  # View current configuration
rosetta test    # Test AI provider connection


Usage

Basic Translation

# Translate to Japanese
rosetta translate ja

# Translate to Simplified Chinese
rosetta translate zh-Hans

# Translate to Korean
rosetta translate ko

Advanced Options

# Specify custom .xcstrings file path
rosetta translate ja --file /path/to/Localizable.xcstrings

# Fresh translation (retranslate all keys)
rosetta translate ja --mode fresh

# Auto-translate all keys without interaction
rosetta translate ja --auto

# Use specific AI model
rosetta translate ja --model gpt-4

Interactive Mode (Default)

Translation Task
  Target: ja
  Mode: Supplement (skip existing)
  Keys: 25

Key: "Good morning, how are you today?"
❯ Translate
  Mark as no translation needed
  Batch translate next 30
  Skip
  Save and exit


Supported Languages

CodeLanguageCodeLanguage
jaJapanesefrFrench
zh-HansSimplified ChinesedeGerman
zh-HantTraditional ChineseesSpanish
koKoreanpt-PTPortuguese (Portugal)
itItalianpt-BRPortuguese (Brazil)
ruRussianarArabic
hiHinditrTurkish
nlDutchplPolish
svSwedishnoNorwegian
daDanishfiFinnish
csCzechroRomanian
ukUkrainianelGreek
heHebrewidIndonesian
thThaiviVietnamese
mlMalayalamen-USEnglish (US)
en-GBEnglish (UK)en-AUEnglish (Australia)

Commands

rosetta translate

Translate .xcstrings files to your target language. See above for options.

rosetta clean

Easily remove backup files:
rosetta clean
  • Scans for all .xcstrings.backup_* files in the current (or specified) directory (recursively).
  • Lists all found backup files with size and date.
  • You can:
  • Delete all backups at once
  • Select files to delete interactively (use ↑↓ to move, space to select, enter to confirm, and a final confirmation before deletion)
  • Cancel the operation
Optional:
rosetta clean --directory /path/to/your/project


Contributing

Want to contribute or customize?

  • Fork the repository
  • Make your changes
  • Submit a pull request or keep it for yourself!
The codebase is well-structured and documented, making it easy to:
  • Add new AI providers
  • Implement custom translation logic
  • Extend language support
  • Improve the UI

License

MIT License β€” see LICENSE for details.

Acknowledgements


Vibe coding with cursor πŸ§‘β€πŸ’» by Hwang