zVictorium / minecraft_mod_translation_tool

This is a Python tool designed to assist in the translation of Minecraft mod files from one language to another. It unpacks mod JAR files, translates the language files within them, and converts the translated mod folders back to JAR files. The tool supports both JSON and LANG file formats for translations.
MIT License
6 stars 2 forks source link
minecraft minecraft-mod-translation minecraft-mod-translator minecraft-translation translation translation-management translation-manager translation-tool

⛏️ Minecraft Mod Translation Tool βš’οΈ

Translate your favorite Minecraft mods into your language! πŸ˜„πŸ‘

This is a Python tool designed to assist in the translation of Minecraft mod files from one language to another. It unpacks mod JAR files, translates the language files within them, and converts the translated mod folders back to JAR files. The tool supports both JSON and LANG file formats for translations.

β˜οΈπŸ€“ I searched for a long time for an automatic translator of Minecraft mods into my language, but I didn't succeed, so I created these scripts myself with my knowledge of Python. It can be improved, but it does the job.

πŸ’‘ Getting Started

  1. Clone this repository to your local machine.

  2. modify the config.json file to specify your source and target languages, paths, and other settings.

  3. Run the start.sh (Linux) or start.bat (Windows) files to start the translation process.

    If it does not work, follow the next steps:

    1. Install the required dependencies using the following command:

      pip install -r requirements.txt
    2. Run the main.py script to start the translation process:

      python main.py

βš™οΈ Configuration

The config.json file contains settings that control how the translation tool operates. Here's an example of the default configuration:

{
  "original_language": "en_us",
  "target_language": "es_es",
  "mods_path": "mods",
  "translation_path": "mods/translated",
  "replace_original_mods": false
}

πŸ“„ Project Structure

The project is organized into the following files and directories:

πŸ‘¨β€πŸ’» Usage

  1. The main.py script is the entry point. It reads the configuration settings, creates necessary folders, translates mod files, and performs the conversion.

  2. The settings.py file contains the Settings class, which handles configuration reading and processing.

  3. The translator.py file defines the Translator class used for text translation.

  4. The file_manager.py file contains the FileManager class that handles unpacking, translation, and conversion of mod files.

🀝 Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request. You could edit the Translator class to implement GPT translation... πŸ˜‰

βš–οΈ License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❀️ by zVictârium.

"Buy Me A Coffee"