[How-to] Translate the UM Start Page

official-guides

#1

Our Ubuntu MATE Start Page now supports locales, meaning those buttons have the potential to speak your system's language, and not be hardcoded to English.

This doesn't use Transifex - this one is a bit more "raw" to the code and will require a GitHub account.


How to translate

First, visit the ubuntu-mate/start.ubuntu-mate.org repository and edit the locale.js file.

This will present a JavaScript file with JSON data inside.

Copy and paste the "en" group, and make adjustments as nessacary:

  • en → Change to the desired locale, e.g. fr or de-de.
  • "discover" - Do not change the left value, as it's the key.
  • "Discover" - You can change this, as this is what is shown to the user.

Note that this will follow JSON syntax, and problems will happen when you are missing a comma. The syntax structure is like this:

{
    "dictionary1": {
        "data1": "Data 1",
        "data2": "Data 2"    ← Last values do not need a comma
    },                       ← Note a comma is needed here
    "dictionary2": {
        "data1": "Data 1",
        "data2": "Data 2"
    }                        ← Also the last one, so no comma here.
}
  

Be sure to review your changes in Preview Changes and check the syntax and translations are all correct, then go ahead and create a pull request:

A developer will then review and merge your changes -- as soon as that's done, they'll be live within minutes.

Thanks for helping us translate, even if it's a few lines of text for the start page. :slight_smile:


pinned #2