-
Notifications
You must be signed in to change notification settings - Fork 0
Info for Translators
If you wish to translate TerraFirmaCraft into your language, there are multiple parts:
- The translation of the mod itself (Blocks, Items, Tooltips, etc.)
- The translation of the in-game and online Field Guide.
In both cases, the translation is done by creating/editing files which map keys to newly translated values. For example, if your language code was ab_cd
, you would copy en_us.json
, and rename it to ab_cd.json
, and edit your newly created file. The three files in question are:
- The Mod Language File - This translates the mod itself.
- The Field Guide Language File - This translates the in-game and online field guide.
- Extra Field Guide Language File - This translates a few unique bits of text that are only present on the online version of the Field Guide.
In order to submit your changes, you have a couple options. One, is to contact @AlcatrazEscapee (Hello!), via the TerraFirmaCraft discord, with your newly added files. The other is to submit a Pull Request to this repository, and/or the Field Guide repository. This is a way to submit your changes to our source code.
If you wish to test your translation of the Field Guide, you will need to generate the field guide data, which will require setting up, at least part of, the mod development environment. The instructions here are copied from /resources/generate_book.py
:
First, you will need to have a Python environment with the required dependencies installed (see /resources/requirements.txt
).
Then, in order to use, all you need to do is run
> python resources book --translate <lang>
Where <lang>
is your language, i.e. en_us
. This will do several things
- If a
<lang>.json
file does not already exist, create one - If a
<lang>.json
file already exists, it will read it and use it to translate text in the book - Finally, the
<lang>.json
will be updated with all text actually used by the book, and missing entries will be filled in.
If you then wish to view the book in-game, you will need an external Minecraft instance, setup with TFC to test the book in:
- Run
python resources book --local <.minecraft directory> --translate <lang>
with the parameter--local
set to the.minecraft/
directory of a local minecraft instance. It should say "copying into local instance at " - Launch Minecraft in this instance with TFC installed.
- There will now be two books (These can be found in the creative "Miscellaneous" tab):
-
/give @p patchouli:guide_book{"patchouli:book":"tfc:field_guide"}
// This is the TFC book, used by the inventory screen -
/give @p patchouli:guide_book{"patchouli:book":"patchouli:field_guide"}
// This it the Patchouli namespaced book, which is hot reloadable. It is loaded from/.minecraft/patchouli_books/
-
- The latter book can be hot reloaded at any time:
- Run the above command again.
- While in creative, go to the book main landing page, and shift-right-click the little pen/pencil icon.