TL;DR: If you want to find translated scripts to play on clocktower.online or Nara, they are in assets/scripts.
This repo contains scripts to generate JSON files for use on clocktower.online or Nara as well as CSV files for the google sheet in which we keep translations for abilities, names, and various reminders.
You can find already generated script JSON files in assets/scripts and the google sheet is here.
The language we use is Elixir (see how to install it).
Open lib/constants.ex and add the locale to the @known_locales
module variable at the top of the file.
Then either genereate your CSV from a JSON file or the other way around. You'll find instructions on how to do that in this README.
We use a google sheet to edit, discuss, and maintain translations of the game, mainly for digital use on clocktower.online or Nara. This format should also be usable to generate translations for the physical copy of the game one day.
Take a look at the english tab which you will need to duplicate for your own language: EN. We download these tabs in CSV format and run our script on them to generate JSON files.
Once we have the CSV file for our language, we can run a script that will generate a JSON file in the clocktower.online format.
mix run generate_json_from_csv.exs
The result will be at assets/json/<LOCALE>.json
Simply run the following command to regenerate custom scripts in all locales:
mix run generate_scripts.exs
The files used to generate these custom scripts are:
- JSON files in assets/script_definitions to describe the content of each script (a simple role list)
- JSON files in assets/json which contains all translated roles for each locale
To generate new custom scripts, simply add a script definition file in assets/script_definitions and run mix run generate_scripts.exs
again
If you already have the JSON file containing all roles for your language, then you can also transform it into a CSV and import it in the google sheets
mix run generate_csv_from_json.exs
The result will be at assets/csv/<LOCALE>.csv
The generated json files match the format used on clocktower.online.
You can use them directly as custom scripts (but every role will be available in your game, which is maybe a bit much!) or you can remove the roles you don't want before using them as custom scripts.
We will work on helping you generate ready-made scripts soon (see Contributions)
The best way to help is to add your language to the google sheet (by duplicating EN) and then pinging RealVidy#2485 on Discord.
If you want to help with development, we need a way to generate custom scripts with the translations (which is actually easily done, ask RealVidy#2485 on Discord!)