Thanks to visit codestin.com
Credit goes to github.com

Skip to content

OwnerPlugins/TranslationProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

69 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Translation Tool v2.2 – C# & Enigma2 Plugin Manager

Version License Download

Views

Donate Ko-fi Donate PayPal

Translation Tool is a Windows desktop application that simplifies the translation workflow for C# projects and Enigma2 plugins. It extracts translatable strings, translates them using Google Translate, and compiles them into the required format – all with a user-friendly GUI.


✨ Features

πŸ”Ή C# Project Mode

  • Scans .cs files recursively for GetTranslation("...") keys.
  • Translates keys into 95+ languages using Google Translate API.
  • Generates .lng files ready for use in your application.
  • Preserves existing translations and removes obsolete keys.

πŸ”Ή Enigma2 Plugin Mode

  • Extracts strings from .py files and setup.xml.
  • Generates/updates .pot and .po files.
  • Auto-translates empty msgstr entries.
  • Compiles .mo files ready for Enigma2 devices.

πŸ”Ή General Features

  • Dual Mode: Switch between C# and Enigma2 modes.
  • Language Selection: Choose from over 90 languages.
  • Select / Unselect All: Quickly manage language selection.
  • Smart Cache: Saves translations locally to avoid repeated API calls.
  • Import Cache: Import translations from Python scripts.
  • Delete Cache: Clear the cache to force re-translation.
  • Progress Monitor: Real-time progress, status, and elapsed time.
  • Stop Button: Cancel operations at any time.
  • Save Log: Export the log to a text file.
  • Custom Output Folder: Choose where to save translated files.
  • Logo Click: Click the logo to open the GitHub repository.

πŸ“Έ Screenshots


Preview 1

Preview 2

Preview 3

πŸ“₯ Requirements

  • Windows (7, 8, 10, 11)
  • .NET 10.0 Runtime (or newer)
  • No Python required – everything is self-contained in C#.

πŸš€ How to Use

For C# Projects

  1. Launch the tool and select "C# Translation Project" from the Mode dropdown.
  2. Click "Browse..." and select your project folder (containing .cs files).
  3. (Optional) Choose a custom output folder.
  4. Click "Select Languages" and choose the languages you need.
  5. Click "Start" to begin extraction and translation.
  6. Find your .lng files in the output folder.

For Enigma2 Plugins

  1. Launch the tool and select "Enigma2 Plugin Manager" from the Mode dropdown.
  2. Click "Browse..." and select your plugin folder (containing __init__.py and locale/).
  3. Select the languages you want.
  4. Use the buttons:
    • Extract Strings – Scan Python and XML files.
    • Auto Translate – Translate empty msgstr entries.
    • Compile .mo – Compile .po files to .mo.
    • Full Update – Run all steps in one click.
  5. Monitor progress and wait for completion.

πŸ”§ Custom Plugin Name (Enigma2)

By default, the tool uses the folder name as the plugin name for .pot, .po, and .mo files.

However, Enigma2 plugins often have a PluginLanguageDomain defined in __init__.py that does not match the folder name.

Example:

  • Plugin folder: WeatherPlugin
  • PluginLanguageDomain: foreca

If you don't change the name, the tool will generate:

locale/foreca.pot        # ❌ Wrong
locale/it/LC_MESSAGES/foreca.po

But the plugin expects:

locale/WeatherPlugin.pot  # βœ… Correct
locale/it/LC_MESSAGES/WeatherPlugin.po

To fix this:

  1. In the Enigma2 Plugin Manager panel, locate the "Plugin name (optional)" text box.
  2. Enter the exact name used in your __init__.py (e.g., WeatherPlugin).
  3. Leave it empty to use the folder name.

The tool will then generate all files with your custom name.

Note: This setting is applied during:

  • Auto Translate
  • Compile .mo
  • Full Update

If you change the name after translating, you must Delete Cache and re-translate to avoid mismatches.


βš™οΈ Output Format

C# Projects

Each language gets its own .lng file (e.g., Italiano.lng, Deutsch.lng) with the format:

Key1: Translated text
Key2: Another translation

Enigma2 Plugins

The tool generates the standard gettext structure:

plugin/locale/
β”œβ”€β”€ it/
β”‚   └── LC_MESSAGES/
β”‚       β”œβ”€β”€ plugin.po
β”‚       └── plugin.mo
└── de/
    └── LC_MESSAGES/
        β”œβ”€β”€ plugin.po
        └── plugin.mo

πŸ› οΈ Cache Management

  • Use Cache: Enable/disable the translation cache.
  • Delete Cache: Remove all cached translations (forces re-translation).
  • Import Cache: Import translations from a Python script's translation_cache.json file. This is useful if you already have translations from the Python version.

πŸ“ Project Structure

TranslationProject/
β”œβ”€β”€ TranslationProject.exe        # Main executable
β”œβ”€β”€ Google-AI.png                 # Logo (optional)
β”œβ”€β”€ app.ico                       # Application icon
β”œβ”€β”€ translation_cache.json        # Cache file (auto-generated)
└── locale/                       # Enigma2 translation files
    β”œβ”€β”€ it/
    β”‚   └── LC_MESSAGES/
    β”‚       β”œβ”€β”€ plugin.po
    β”‚       └── plugin.mo
    └── ...

πŸ”§ Changelog

Version 2.2 – 2026-06-18

  • Fix: Issue on .po utf code.

Version 2.1 – 2026-06-18

  • Fix: Issue on .po utf code.

Version 2.0 – 2026-06-18

  • Added: Full Enigma2 plugin support (extract, translate, compile).
  • Added: Dual mode selector (C# / Enigma2).
  • Added: Language selection dialog with Select All / Unselect All.
  • Added: Progress monitor with status, counter, and timer.
  • Added: Stop button to cancel operations.
  • Added: Import/Delete cache functionality.
  • Added: Save log to file.
  • Added: Logo with clickable link to GitHub.
  • Improved: Cache handling and performance.
  • Fixed: Various UI and stability issues.

Version 1.0 – Initial Release

  • Extract GetTranslation("...") keys from C# projects.
  • Translate into 95+ languages using Google Translate.
  • Generate .lng files.
  • Persistent cache to avoid repeated translations.
  • GUI with real-time log and progress bar.

πŸ’¬ Support


πŸ“œ License

This project is licensed under the GPLv3 License – see the LICENSE file for details.


πŸ™ Credits

Special thanks to the Enigma2 community, CORVOBOYS, and all testers for their support and feedback.


Enjoy! 😊

– Lululla Β© 2026

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages