pyUGT is a pure-python universal game translator: it takes screenshots from a region you select on your screen, uses OCR (via Tesseract v5) to extract the characters, then feeds it to a machine translator to then show you a translated text. It can use online machine translator for higher accuracy such as Google Translate or DeepL, but it also includes an offline translator called Argos, so that this app can fully run offline.
Since it works directly on images, there is no need to hack the game or anything to access the text. It is also cross-platform (support for Windows and Linux - experimental support for MacOSX).
In this major release, the first stable release, we overhauled the machine translation backend, so that we now offer 3 different backends, including an offline opensource machine translator directly bundled with the app, so that it is future-proof!
Changes:
* fix: googletrans module stopped working. Replaced by translators module, which provides many other public free API endpoints to various online machine translators.
* add: DeepL online machine translator via the official deepl module with free or paid API subscription. This provides the currently best in class japanese->english machine translator, and it is not throttled, but the number of translations in the free plan is limited per month, then a paid plan can be subscribed for more.
* add: Argos Translate open-source free offline machine translator based on OpenNMT and the Opus dataset. This provides a machine translator that is less reliable than online services but works without an internet connection and will always work (although the language files must first be fetched online), so this future-proof pyugt, as now pyugt does not rely solely on (free) online services that may close someday!
* fix: separate config_internal.ini to store internal variables that must be memorized between multiple app's runs, from config.ini which stores user-defined parameters, so that we do not overwrite config.ini and hence leave the user config file untouched (this preserves comments for example!).
* add: reload config parameters at each translation, so that config parameters can be modified on-the-fly and changes are reflected in the app in realtime.
* fix: various small bugfixes and refactoring (eg, translate_any() reused in the two methods/functions allowing a translation).
* misc: bump software status from alpha to stable/production > v1.0.0 !
To install on Windows:
* First, install Tesseract v5, installers are provided by [UB Mannheim](https://github.com/UB-Mannheim/tesseract/wiki). Make sure to install the additional languages you want to translate from (eg, Japanese, there is support for both horizontal and vertical Kanji).
* Then download the pyugt_v1.0.3_bin_win64.zip file attached below, which contains the pre-bundled binary. Unzip this folder anywhere.
* Inside the unzipped pyugt_v1.0.3_bin_win64 folder, execute pyugt.exe, then follow the instructions in the console window that appears. Essentially, press CTRL+F2 for the first translation, to select the region to translate, then CTRL+F3 for next translations.
* Edit config.ini inside this folder to change parameters. You can change the parameters on-the-fly while the app is launched, they will be used for the next translations in realtime.
Tested on Windows 10 x64 with Python 3.10.8 Miniconda3.
Note that due to the inclusion of the offline machine translator Argos, the filesize has dramatically increased, from 11MB before to 200MB zipped and 1GB unzipped! Although this is much bigger than before, we believe that it's worth including the Argos translator given the huge benefits. But for those who do not need it, it's possible to repack with pyinstaller and exclude Argos.
Note that the language packs for the OCR nor for the offline translator Argos are included, you have to download them separately, which increase further the storage space requirements, so expect to need about 2GB to 3GB of free space in total.
Argos language packs can be downloaded from [this index](https://www.argosopentech.com/argospm/index/) (and note that IPFS links are provided, hence Argos is very future-proof! Kudos to the devs for thinking about everything and providing such a wonderful tool in open-source!).