-
-
Notifications
You must be signed in to change notification settings - Fork 35
Creating a Translation
This is a step-by-step guide which will help you to create your own translation of vane. We value all efforts going into translation of this plugin into more languages, and would highly appreciate a pull request if you like to share your work!
To prevent having to compile the plugin each time a change is made, we will develop the new translation by creating it in the configuration folder on server running vane. It might be convenient if the server is a local test server that doesn't has resource pack distribution configured. This makes the testing procedure easier.
- Have a server ready with all vane plugins, so you can generate a resource pack to when you want to test your translation.
The server should have been started at least once, so all the configuration files were created. Each module saves it's language files under
plugins/vane-<something>/
. - In each of these folders, you need to copy
lang-en.yml
tolang-xx.yml
, wherexx
should be the language code of your desired language. This code is never used semantically, so if you are writing e.g. a french-canadian translation, you may chooselang-fr-ca.yml
to not clash with the default french version. - Replace the country code
en_us
at the top of the file with the corresponding locale code from here (e.g.fr_fr
for french). This is important, as it decides which language of Minecraft it corresponds to, and this is the language the user has to select in Minecraft to use your translation. - Translate all messages in the file, and be sure to inform yourself about the language file structure before.
Depending on the target language, DeepL can really help in doing most of the heavy lifting. You then mostly have to fix the grammar or some weird word choices if you did use it.
As I've just noticed, there currently is an inconsistency that makes the generated resource pack only contain the translations that were present in the original project (so -en
and -de
), but ignore all new custom language files. I'm working to fix this, but will probably release it with the update to 1.17.
Until then, the easiest way to develop is to just change the translations in the english language file. Basically don't override the language code at the top and just change all message strings. When you are absolutely sure you are finished, you can then rename the file, change the language code to fr_fr
and submit that one to the repository instead. You can always come back to me if anything is unclear.
To test the new translation do the following:
- Start the server
- Run
/vane generate_resource_pack
- Copy the resource pack directly into your client's resource pack folder and activate it, and don't let the server distribute it.
- Join the server and see if everything works as expected.
- Fork this repository
- Each vane module
vane-<something>
contains a foldervane-<something>/src/main/resources/
(except for vane-waterfall which has no localization). This folder contains the default english language filelang-en.yml
, as well as any additional languages. - In each of these folders, you need to place your corresponding
lang-xx.yml
file. - Commit to your fork and submit a pull request, I will then verify that everything is correct, give feedback, and if everything is alright I might merge your pull request.