Skip to content

Adding translation

requinDr edited this page Jul 4, 2024 · 10 revisions

Guidelines

  • No UI translation without VN translation. But the reverse is possible.
  • VN translation should be complete
  • If still actives, the authors of the translation should grant permission for their translation to be used
  • Assets aren't provided on this repo, only json files

You made a translation and wan't to make it available but don't know how? Please get in touch

How to add a translation

Here is the general structure of a translation:

.
└── static/
    └── en-mm/
        ├── game.json
        ├── lang.json
        ├── image/
        │   └── tachi/
        │       └── osiete.webp
        ├── image_x2/
        │   └── tachi/
        │       └── osiete.webp
        └── scenes/
            ├── 201.txt
            ├── 202.txt
            └── ...

Required:
en-mm: the translation id. Sould be prefixed by two letters for the language, a - and then the author.
game.json: contains the translation for game related translation (scenes title arc.nsa -> image/word, credits).
lang.json: translation for the web UI. Can also specify the assets to overwrite (it's often just osiete.webp).
Optional:
image: folder for the image used to overwrite the default (orginal size, in .webp preferably).
image_x2: two times upscaled image (existing assets have been upscaled using waifu2x).
Not needed for a PR:
scenes: all translated scenes. They are easily obtained by automatically splitting the full script (make sure it's in UTF-8!) using https://github.com/requinDr/tsukiweb-public/blob/main/script-convert/script-convert.js

Make the translation visible by the app

Edit public/static/languages.json and add something like this:

  "it-riffour": {
    "locale": "it-IT",
    "display-name": "Italiano",
    "authors": "Riffour",
    "dir": "it-riffour",
    "last-update": "2024-03-23",
    "fallback": "en-mm"
  }

locale: the locale of the translation. List of locales
display-name: the language name, in its native language.
authors: specify the name of the amazing group or person that made the translation. Should be kept short.
dir: the name of your translation directory (in latin, non accentuated characters).
last-update: change it to refresh the browser cache if needed.
fallback: Optional, for latin translation you probably wan't to fallback to a language like english when something is missing, rather than Japanese.

What files should be included in your PR

    └── en-mm/
        ├── game.json
        ├── lang.json
        └── fullscript_en-mm.txt
    └── languages.json

You can see that instead of the generated scenes used by the game, we are asking for their source as fullscript_folder-name.txt. By doing so we are able to update the scenes by ourselves if changes are made on the preprocessing.

Usually the only overwritten image is tachi/Osiete.jpg. Due to the work it requires (masking, upscaling and conversion), you can attach the file in the PR conversation and we will take care of it