Giter VIP home page Giter VIP logo

translationhelper's Introduction

TranslationHelper

A tool to help me review pending Wurst Client translations. Not sure if anyone else will find this useful. Maybe some translators will want to analyze their own translations before submitting them. But if you do, please note running all the OpenAI stuff is not free. Analyzing a full translation with the default settings costs about $0.16. You will get a more accurate estimate for each analysis when you run the script.

A screenshot of TranslationHelper analyzing an early draft of the Korean translations in Wurst-Imperium/Wurst7#872

Features

  • Google-translates the translation back to English, so I can review translations in languages I don't speak. (I used to do this manually for every string, so this is a huge time saver.)

  • Uses ChatGPT to quickly highlight strings where the reverse translation differs from the original. (Not perfect, but it helps.)

  • Uses ChatGPT to find mentions of Minecraft blocks, items, etc. Then checks those against Minecraft's official translations to find inconsistencies. (I used to not do this at all since it would take too long to do manually.)

  • Checks for common mistakes like untranslated strings, miscapitalized Wurst features, and issues with the color codes.

  • Highlights names and color codes so it's easier to spot issues with them.

  • Includes a "bookmark" (red outline around a row), which can be moved up and down with the arrow keys and keeps its position when the page is reloaded. This helps me keep track of where I left off when I take a break from reviewing a translation.

  • Includes shortcuts to quickly open Google Translate (G) or DeepL (D) for any selected text.

Example Analysis

https://wurst-imperium.github.io/TranslationHelper/872_ko_kr

This example shows an early draft of the Korean translations in Wurst-Imperium/Wurst7#872.

Installation

Be warned that this is an internal tool, so not much effort was put into making it beginner-friendly. You will need command line experience, a Python installation, an OpenAI API key, a Wurst Client installation, and knowledge of how to use Wurst's WikiDataExport feature. The installation steps are as follows:

  1. Clone this repository.

  2. Create a venv with Python 3.12 and install the dependencies:

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
  3. Create a wiki data export in Wurst (open Navigator and search "WikiDataExport") and either put it in the root directory of this project or set the WURST_FOLDER environment variable to the path of your Wurst folder.

Usage

python make_table.py

And then open table.html in your browser.

If you want to analyze a translation that isn't a pull request yet, save it as pending.json in the root directory of this project and create a file called pending_lang.txt with the language code (e.g. en_us) in it. Then run the script.

translationhelper's People

Contributors

alexander01998 avatar dependabot[bot] avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.