-
Notifications
You must be signed in to change notification settings - Fork 228
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.
When creating a new locale please keep in mind these details:
- The file name must be in the following format
xx_XX.json
wherexx_XX
is the respective locale code, for exampleen_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) orCtrl+Shift+J
(Chrome), typeyt.config_.GAPI_LOCALE
and press Enter. In the console you should see the locale code for the currently selected language.
For example, if you have selected theEnglish (US)
language then the console will show the locale codeen_US
. - When translating the labels avoid translating names and identifiers. For example
YouTube+ settings
should keepYouTube +
intact because this is the name of the extension. Another example,1080p
or4k
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 isRussian
then theLOCALE
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.
- Once the locale has been properly translated or updated, the commit title (usually where it reads
Create new file
orUpdate 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.
- 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