Skip to content

Adding a new translation

titinko edited this page Aug 27, 2018 · 2 revisions

Instructions for adding a new translation

  1. Create a Github account. Here is a 10-minute tutorial on all the Git knowledge you'll need to be able to submit your own translations.
  2. Create a branch of UTSU on your Github account. You can make any changes you want to this branch before merging them back into the main UTSU project on my account. You should be able to make all the changes you need using just the native text editor on the Github website--no need to use the command line!
  3. Add new translations. All messages and translations for UTSU are stored in a single message directory at src/main/resources/messages. To start the translation process, look at one of the existing .properties files and make a copy of it in your language of choice. Each properties file contains a short description + a translated version of each message. If you're fluent in English, you can start by looking at messages_en.properties. Note: Please make sure your new .properties file is written in Unicode!
  4. Modify existing translations. If you want to change an existing translation, look at the .properties file for your chosen language and make the changes you want using Github's text editor. Don't worry about overwriting/losing old translations, since Github will keep track of them for you.
  5. Submit a pull request containing your new .properties file and/or any changes you make to existing .properties files. I'll check it over for any issues, then add the new language to UTSU's language chooser. You'll be listed as an official contributor to the project!
  6. Check back every now and then, as I will sometimes add new message types to messages_en.properties. (If no translation in the chosen language exists for these messages, UTSU will show the English versions by default.)

FAQ

Do I need to contact you before submitting a translation?
lol nope, just go ahead and do it

What languages am I allowed to make translations for?
I'll accept translations for any language that has an official locale code.

What if I want to translate to another variant of the same language? (such as simplified vs. traditional Chinese)
You can absolutely do that! Just make sure your .properties file has the region code of the language as well as the language code. For example, translations in Chinese (simplified) are in messages_zh_CN.properties while translations in Chinese (traditional) are in messages_zh_TW.properties

Is there any way to add translations without making a Github account?
Sure! If you don't feel comfortable using Git and making pull requests, you can just look at a list of messages here, translate everything, and directly message me those translations. I can take care of adding them to the Github project, but keep in mind that if you do this, Github won't list you as an official contributor!

What do I do if I think an existing translation is wrong?
Make a pull request fixing the error and explaining why the new translation is better. The only screening for translations I do is checking them on Google translate, so I'll probably accept your changes without question.

Why does everything have to be in Unicode? Github doesn't render Unicode properly!
Java's native encoding is Unicode and making the translation system support multiple encodings is tricky.

I have another question!
Message me on Github or on Uta-forum. Thanks for offering to help!