zed-globalization  by x6nux

AI-powered localization for code editors

Created 2 months ago
259 stars

Top 97.7% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides AI-driven, automated localization for the Zed code editor, specifically targeting Chinese (Simplified and Traditional), Japanese, and Korean languages. It offers a ready-to-use, translated version of Zed, benefiting users who prefer non-English interfaces and developers seeking to integrate Zed into multilingual workflows. The core innovation lies in its fully automated translation and build pipeline, significantly reducing the manual effort required for software internationalization.

How It Works

The project employs an AI-powered translation pipeline that automates the localization process. It begins by scanning Zed's Rust source files to identify translatable strings, primarily those enclosed in double quotes. These strings, along with their code context, are extracted into a JSON format. AI models then translate these strings, featuring a three-level fallback strategy (JSON -> XML CDATA -> numbered format) to ensure translation even if primary methods fail. A critical component is the robust source code replacement mechanism, which includes filtering to avoid breaking syntax, skipping protected regions like byte strings and attribute macros, and automatically correcting punctuation. This ensures the integrity of the Rust codebase during localization.

Quick Start & Requirements

Installation is streamlined across major platforms:

  • macOS: brew tap x6nux/zedg && brew install --cask zedg. For manual installation of unsigned builds, download the DMG and run sudo xattr -rd com.apple.quarantine /Applications/ZedG.app.
  • Windows: scoop bucket add zedg https://github.com/x6nux/scoop-zedg && scoop install zedg.
  • Linux: Download pre-compiled .tar.gz or .deb packages from the releases page.

Local development and building require Python and pip. Installing with pip install ".[ai]" or pip install ".[all]" enables AI translation and full features, respectively. Building Zed itself requires the Rust toolchain (cargo build --release).

Highlighted Details

  • Features an AI-driven, end-to-end localization pipeline orchestrated via GitHub Actions for automated scanning, translation, building, and publishing.
  • Includes a patch_agent_env.py script that addresses limitations in Zed's original agent server, specifically fixing the handling of API keys like ANTHROPIC_API_KEY and ensuring they are correctly passed to AI models.
  • Supports bidirectional conversion between JSON translation files and Excel spreadsheets, facilitating manual review and editing by translators.
  • Provides cross-platform pre-compiled binaries for macOS (Universal, Intel, Apple Silicon), Windows (x64, ARM64), and Linux (x64, ARM64).

Maintenance & Community

The repository is maintained by x6nux. No specific community channels (like Discord or Slack) or details on notable contributors or sponsorships are provided in the README.

Licensing & Compatibility

The project is released under the MIT License, which is highly permissive and allows for commercial use, modification, and distribution, including integration into closed-source applications.

Limitations & Caveats

macOS builds are not signed by Apple, necessitating a manual step to bypass the "app is damaged" security warning upon first launch. The project's patch_agent_env.py script implies that the base Zed editor has issues with API key propagation for its AI agent features, which this project rectifies.

Health Check
Last Commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
7
Star History
136 stars in the last 30 days

Explore Similar Projects

Starred by Peter Norvig Peter Norvig(Author of "Artificial Intelligence: A Modern Approach"; Research Director at Google).

codev by cluesmith

0.4%
257
AI-powered OS for human-agent software co-development
Created 7 months ago
Updated 1 day ago
Starred by Alex Yu Alex Yu(Research Scientist at OpenAI; Cofounder of Luma AI), Will Brown Will Brown(Research Lead at Prime Intellect), and
7 more.

avante.nvim by yetone

0.2%
18k
Neovim plugin emulating Cursor AI IDE for AI-driven code assistance
Created 1 year ago
Updated 2 days ago
Feedback? Help us improve.