Contribute translations: Difference between revisions
(Completely reorganized the page) |
No edit summary |
||
Line 28: | Line 28: | ||
=== Github === | === Github === | ||
Some languages are not handled inside WebTranslateIt. You will need to use Github to contribute to those. | Some languages are not handled inside WebTranslateIt. You will need to use Github and open a pull request to contribute to those. | ||
==== diaspora/diaspora ==== | ==== diaspora/diaspora ==== |
Revision as of 16:00, 5 July 2017
Tools used to translate
WebTranslateIt
We use WebTranslateIt to manage translation.
There are two projects for Diaspora on WebTranslateIt.
- diaspora/Diaspora for translating the software.
- diaspora/Website for translating diasporafoundation.org.
If you want to contribute to translation, you need to register to WebTranslateIt.
- First go to WebTranslateIt and create/sign-in to your account.
- Then go to the project site for Diaspora, JSXC (Chat frontend) and/or the project site for diasporafoundation.org and join the team.
- Choose your language or suggest a new one and request an invitation.
- You'll receive an email containing a link to accept your invitation. Once you have gotten the mail and clicked on the link you'll see something like this:
- After you accepted it you can click on the "Translations" tab and start translating.
Github
Some languages are not handled inside WebTranslateIt. You will need to use Github and open a pull request to contribute to those.
diaspora/diaspora
- es-VE: team
- gl: team
- sq: maintainer
diaspora/diaspora-project-site
Complete me!
diaspora/jsxc
Complete me!
I want to add a new language to diaspora*!
Choose the correct language code
First look if you could find an existing translation.
If you have to create a new one look here and check which code is used there for your language.
If your language isn't available there choose the right code according to ISO 639-1 (or ISO 639-2/3 if your language has no ISO 639-1 code) in lowercase letters. If you want to create a country-specific one, that is not the most spoken type of it, append - and your country code according to ISO 3166-1 in uppercase letters.
Examples:
- de for German
- de-AT for German specific to Austria
If you want to create formal or informal versions of your translation append _informal or _formal to the version that is less common for social networks.
Examples:
- fr for the French formal one and
- fr_informal for the informal one
Write the code and open a pull request
First read and follow our Git Workflow. However since resolving conflicts in a language you don't understand is almost impossible for us, please make sure to base your pull request on the next-minor branch, not develop.
Copy the en files (listed below), choose the correct language code (see above) and rename every occurrence of "en" in the files names and in the code. Don't forget the root element in the files!
Diaspora
https://github.com/diaspora/diaspora
- config/locales/devise/devise.<code>.yml
- config/locales/diaspora/<code>.yml
- config/locales/javascript/javascript.<code>.yml
- Only add something to config/locales/inflections/<code>.yml if you know what you're doing, look at the note about inflected languages above for more information. If you're unsure just ignore that directory.
- config/locales/cldr/ is an upstream resource. You shouldn't need to touch it.
JSXC (chat frontend)
https://github.com/diaspora/jsxc
- locales/<code>.json
diasporafoundation.org
https://github.com/diaspora/diaspora-project-site
- config/locales/devise.<code>.yml
- config/locales/<code>.yml
Then translate the keys in the files. If you want to give constant updates you can also notify me (jhass) and give me the URL to a Git repository and I'll do regular pulls in my update workflow.
General notes
Languages with high inflection and grammar different to English
We integrated the awesome extensions siefca made for Rails and the i18n gem: i18n-inflector and i18n-inflector-rails. Based on what the user has written into the gender field and our definitions the gender is guessed. Look at the readme of i18n-inflector for more documentation on how to use them. You can use the named patterns easily via WebTranslateIt if you want to do so. However if you want to contribute a definition please make a pull request.
Hardcoded string
There is probably some missing strings which are still untranslatable in diaspora*. If you want to fix those feel free, but only add the new key to en.yml/devise.en.yml/javascript.en.yml.
Translating the wiki
If you want to translate a page in the wiki make sure to include Template:Languages at the top. Then click on the red link for your language and start translating. If your language isn't yet in the template, feel free to add it.
For more discussion around translating the wiki please have a look at this Discourse discussion.
Thank you for contributing!