SillyTranslator translates SillyTavern presets and character cards metadata automatically
SillyTranslator is a collection of two tools available to download, containing two utilities:
-
Preset translator script
- Translates .json presets automatically and saves them in the specified location.
-
Card translator script
- Monitors the SillyTavern's
characters
folder for character cards, translates and saves them in thecharacters
folder.
- Monitors the SillyTavern's
-
Basic Interface: You have an easy way of setting up the tools mentioned above, having a simple terminal interface.
-
Automatic: The tool translates presets and .png character cards automatically and saves them for you.
-
Supported languages:
- 🇷🇺 Russian
- 🇧🇷 Portuguese
- 🇯🇵 Japanese
- 🇨🇳 Chinese
- 🇰🇷 Korean
- 🇮🇹 Italian
- 🇫🇷 French
- 🇬🇧 English
- 🇩🇪 German
- 🇪🇸 Spanish
ImageMagick:
Requires ImageMagick to be installed and configure the PATH variable.--
ImageMagick installation is not necessary anymore, just have the requirements.txt
packages listed there
To use the preset translator, first you need to follow these steps:
0. Run preset_translator.py
.
1. Set up the SillyTavern folder (optional) or use custom folder (IMPORTANT!).
2. If you want to use LLM to translate: mark the checkbox Translate using LLM
.
- Select your provider (Currently only supports openrouter/groq) and insert the API Key and model name from the provider. (IMPORTANT!).
3. Select the language that will translate the preset.
- There is an optional box to select if want to translate content inside <>:
- Translate wrapped
<>
: this one is experimental, you can translate any content inside <>, for example,<think>
can be translated to<考える>
4. Select the .JSON files to be translated.
5. Name the file (if not saving in SillyTavern folder) and save it.
To use the card translator, first you need to follow these steps:
0. Run card_translator.py
.
1. Select the SillyTavern folder in 3. Configure Settings
(IMPORTANT!).
2. Set up the translator.
Setting up the translator is important, customizations for Non-LLMs and LLMs:
Google Translate
- Translate name: you can translate, the character card name from, for example,
James
(en) toジェームズ
(ja) if the option is enabled. - Translate alternate greetings: you can disable or enable the translation of alternate greetings.
- Use character's name instead of {{char}} during translation: Enabling the character's may improve translation coherence
LLMs
- Translate name: you can translate, the character card name from, for example,
James
(en) toジェームズ
(ja) if the option is enabled. - Translate alternate greetings: you can disable or enable the translation of alternate greetings.
- Use character's name instead of {{char}} during translation: Enabling the character's may improve translation coherence
3. For Non-LLMs: Select the translation service.
4. For LLMs: Select the provider, model and insert the API key
5. Enable monitoring.
After enabling the monitoring, it will scan any file inside SillyTavern's character folder to translate, backing up the original file in Original
folder where the tool is located, if you want to restore the original files you can press the number 4
in your keyboard and it will restore the files. The restored original files will not be translated until the fifth option, 5
is selected, to clean all the translated files status.
Contributions are very welcome! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Submit a pull request to the branch.
Feel free to open an issue on GitHub or send me a direct message on Discord:
- Discord: sonic_8783
This project is licensed under the MIT License - see the LICENSE
file for details.