Skip to content

Script to auto-translate JSON files for DQX.

Notifications You must be signed in to change notification settings

dqx-translation-project/auto_translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

auto_translate

Uses machine translation to translate all json files found in the files directory.

Setup

  • Create a virtual environment:
    • python -m venv venv
  • Activate your virtual environment
    • .\venv\Scripts\activate
  • Install requirements
    • pip install -r requirements.txt
  • Make a copy of the env file in this directory and name it .env
  • Put any json files you want translated into the files directory (from weblate's en directory)
  • Inside of the .env file, fill out a list of strings containing your DeepL key(s)
    • Note that the order in which each key is chosen is randomized for each string translated. Helpful when translating multiple files. If you don't want this behavior, just specify a single key
    • example:
DEEPL_KEYS = ["my_key:fx", "my_key2:fx", "my_key3:fx"]
  • Run the program: python main.py

About

Script to auto-translate JSON files for DQX.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages