Skip to content
This repository has been archived by the owner on Mar 23, 2018. It is now read-only.

Translation template

Particle edited this page Mar 27, 2017 · 16 revisions

Translation template

If you are interested in contributing to the translations (locales) please try to follow these points as they will make the process easier.

Creating a new locale from scratch

When creating a new locale please keep in mind these details:

  • The file name must be in the following format xx_XX.json where xx_XX is the respective locale code, for example en_US.
  • The respective locale code for the language you are translating must be exactly the same as the one being used by YouTube.
  • To find which code YouTube is using for the language you are working with open YouTube, go to the bottom of the page and click on the Language button, select the language you want if it isn't selected already, after YouTube changed to the new language open your browser's console by pressing Ctrl+Shift+K (Firefox) or Ctrl+Shift+J(Chrome), type yt.config_.GAPI_LOCALEand press Enter. In the console you should see the locale code for the currently selected language.
    For example, if you have selected the English (US) language then the console will show the locale code en_US.
  • When translating the labels avoid translating names and identifiers. For example YouTube+ settings should keep YouTube + intact because this is the name of the extension. Another example, 1080p or 4k should remain the same because these are the quality identifiers present in YouTube and they do not translate.
  • At the end of the file the label LOCALE must be exactly the same as the language name present in YouTube in its original form. If the language is Russian then the LOCALE label has to be Русский. This will make sure the users understand exactly which YT+ language is being used in its native form, not everyone can read in English.
  • Keep the current spacing format. The extra spaces are present to make maintenance and readability easier.

Merge request

  • Once the locale has been properly translated or updated, the commit title (usually where it reads Create new file or Update xx_XX.json) must be completely replaced with the language name in its native form. Using the previous example for a Russian locale, the commit title must have only the original name Русский and nothing else.
  • If you wish to include extended descriptions feel free to do as you wish. Usually I simply mention which label(s) have been added/removed/updated or file creation. This is not required, but could be helpful down the road.

Additional note

  • Do not include feature descriptions in the labels. Each feature is already linked to a detailed explanation available in the wiki. The labels should be as short as possible with enough information necessary for basic understanding. If users do not find that information enough they can click on the wiki link and read about the feature in more detail.

If everything is done correctly, YT+ should be able to automatically verify for new locales or updates to existing ones depending just on the current language the user has selected on YouTube. Having the locales organized with the original names also makes it easier to find the ideal language for others that want to contribute.

You can find all the locales currently available here: https://github.com/ParticleCore/Particle/tree/master/Locale

I always try to credit everyone that has contributed to the locales here: https://github.com/ParticleCore/Particle/wiki

Clone this wiki locally