Skip to content

A repo containing scripts, CSV, JSON files to play BOTC in your own language

Notifications You must be signed in to change notification settings

RealVidy/botc-translations

Repository files navigation

BotcTranslations

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).

Adding a new locale

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.

Google Sheet / CSV

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.

Running the scripts

From CSV to JSON

Full roles JSON

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

Generating translated basic and custom scripts

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:

To generate new custom scripts, simply add a script definition file in assets/script_definitions and run mix run generate_scripts.exs again

From JSON to CSV

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

Using the generated JSON

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)

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.

About

A repo containing scripts, CSV, JSON files to play BOTC in your own language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published