-
Notifications
You must be signed in to change notification settings - Fork 207
Objects translations
As noted in this wiki's Overview In objects JSON files, original strings are denoted by reference- prefix, translation goes into non-prefixed fields. For example, "reference-description": "Original text", "description": "Translated text"
Since structure of files with translations presented in OpenRCT2/Localisation repository is not directly compatible with copy of the game one would run to test and check translations, it is possible to use Workflow for JSON dump files as described in objects repo wiki.
Every translatable object in .json object language file is denoted by it's name. It is possible to display a list of almost all objects available in game, while having "Cheats" icon enabled in settings:
This opens objects selection, where all currently available objects can be browsed. Note that for purposes of translation, it is wise to disable displaying custom object in upper right corner.
In lower right corner can be observed object name, such as rct2.footpath_surface.queue_blue.parkobj in the example. Dropping the .parkobj suffix reveals name of the object which can be sought in the localisation .json file.
Following example shows exempt from objects localisation file:
Being brought to life in pt-BR localisation:
Translator can create Pull Request the same way as if creating Pull Request for .txt file, either using web browser or command line tools.
Process of merging translations from this (OpenRCT2/Localisation) repository into main (OpenRCT2/OpenRCT2) is divided into two parts.
- For
data/languagedirectory, translations in.txtfiles are automatically merged into development branch every morning (European time). - For
objectsdirectory, there is no automated process and propagating translations has to be done manually.
Note that objects definitions are not stored in main repository OpenRCT2/OpenRCT2, but reside in their own - OpenRCT2/objects. The OpenRCT2/objects structure is different from OpenRCT2/Localisation/objects.
The objects directory in Localisation repository consist of files suited for translation, hence there is one file for each language used. However in OpenRCT2/objects repository, object definitions are stored per object, meaning one object file has all translation for given object.
As described above, since it is not possible to simply copy files from Localisation/objects repository to objects repository, a few easy steps are needed.
- In terminal
- obtain a up-to-date local copy of both repositories
- It is possible using gh command line tool
- Run scripts from objects repo
- Currently, since OpenRCT2/objects pull 402 there are scripts present in objects repository to assist. Using these scripts as described in pull 402 and as desribed in objects wiki is the way to propagate changes in objects. Only entry-level of knowledge how to use command line is needed.
- push/pull updated version to github
- obtain a up-to-date local copy of both repositories
- In web browser
- Make a PR