obsidian-i18n  by Obsidian-Forge

Obsidian plugin for i18n of other Obsidian plugins

created 1 year ago
306 stars

Top 88.6% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a one-stop solution for internationalizing Obsidian plugins, specifically targeting Chinese users seeking translated interfaces for third-party plugins. It automates the process of extracting translatable strings, applying translations via local files, cloud repositories, or machine translation, and injecting them into plugins, thereby enhancing the user experience for non-English speakers.

How It Works

The core mechanism involves modifying the source code of target Obsidian plugins to inject translated strings. It uses regular expressions to identify translatable content, extracts this into a dictionary format, and then offers three translation methods: cloud files (community-maintained dictionaries), local files (manual editing), and machine translation (via Baidu Translate or OpenAI-compatible APIs). The plugin dynamically injects and unloads these dictionaries, with built-in backup and restore functionality for modified plugin files.

Quick Start & Requirements

  • Installation:
    • BRAT: Ctrl + P -> BRAT: Plugins: Add a beta plugin for testing -> https://github.com/0011000000110010/obsidian-i18n
    • Manual: Download main.js, manifest.json, style.css from GitHub Releases and place in Obsidian's plugins directory (.obsidian/plugins/i18n).
  • Prerequisites: Obsidian desktop client. Machine translation requires API keys for Baidu Translate or OpenAI-compatible services.
  • Resources: Machine translation may require API key configuration.
  • Links: GitHub Releases

Highlighted Details

  • Supports translation for the top 100 most downloaded Obsidian plugins.
  • Offers machine translation integration with Baidu Translate and OpenAI-compatible APIs.
  • Includes a built-in editor for local dictionary file modification.
  • Provides backup and restore functionality for modified plugin source files.

Maintenance & Community

The project is maintained by a single author, with a request for plugin developers not to submit issues directly to the Gitee mirror. Discussion is encouraged on the GitHub repository.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: The plugin is explicitly stated to be desktop-only and uses APIs not supported on mobile/iPad. Translations applied on desktop can be synced to mobile.

Limitations & Caveats

The plugin modifies plugin source files, carrying inherent risks despite backup mechanisms. Machine translation may introduce errors, requiring manual correction of non-translatable code elements (e.g., function names, variable names). The project is not yet available on the official Obsidian plugin marketplace.

Health Check
Last commit

1 day ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.