Skip to content

Localization

LenweSaralonde edited this page May 8, 2021 · 19 revisions

How can I contribute to the add-on localization ?

If you want to contribute to the project and translate Musician in your language, you can do so by forking the project on GitHub or using the localization tab on CurseForge.

For now, the add-on and its Optional modules have been translated in the following languages:

  • English
  • French
  • Simplified Chinese (by Grayson Blackclaw)

The translation in the following languages was made using Google Translate so they need to be reworked by humans:

  • German
  • Spanish
  • Italian
  • Korean
  • Portugese
  • Russian
  • Traditional Chinese (Taiwan)

The localization tab on CurseForge is the most straightforward way to edit translations. However its UI is very limited and it might be a hassle to translate a large amount of strings. We may recommend using the GitHub method instead. If you are not familiar with any of those methods, feel free to get in touch with the dev team on Discord so we can find out what is the easiest solution for you.

You may also like to translate the Optional modules.

Contribute using GitHub

The git localization process is very straightforward. All you need is a GitHub account:

  1. Fork the project on your account ;
  2. Pull the latest changes from the main repo into your forked repo ;
  3. Perform the modifications in the locale file of your language (see guide below) ;
  4. Commit and push changes ;
  5. Issue a pull request to the main project.

Localization guide

The translation files are located under the add-on locale folder. These are .lua files named after the add-on and locale code. For example, Musician's spanish locale file is Musician.es.lua. You can edit them with any text editor or even directly on GitHub so you don't need to install anything on your machine.

Translation strings always begin with msg. as follows:

msg.SOME_NAME = "Some text"

or

msg.SOME_LIST_NAME["some-list-key"] = "Some value"
  • Only the text after the = sign should be modified.
  • Untranslated strings are in English and are commented out by a double dash --. Remove the -- when you're done.
  • The text is always within double quotes " (ie "text"). If you need to put double quotes inside your string, you should escape them with a backslash (\), as follows "Get the \"Musician\" add-on to become a bard!"
  • Text between curly braces { and } are placeholders and should not be translated.
  • Always keep your text as a single line. You can use the \n character for carriage returns.
  • You can add a comment after your string using a double dash --
  • Comments on a single line that start with -- or --- are sections. Don't edit them.

Clone this wiki locally