Contribute translations: Difference between revisions
No edit summary |
(fix) |
||
Line 1: | Line 1: | ||
There are two ways you can contribute a translation: with a pull request or at [https://webtranslateit.com WebTranslateIt]. But lets start with some general notes first. | There are two ways you can contribute a translation: with a pull request or at [https://webtranslateit.com WebTranslateIt]. But lets start with some general notes first. | ||
= General | == General notes == | ||
== Languages with high inflection and grammar different to English == | === Languages with high inflection and grammar different to English === | ||
We integrated the awesome extensions [https://github.com/siefca siefca] made for Rails and the [https://github.com/svenfuchs/i18n i18n gem]: [https://github.com/siefca/i18n-inflector i18n-inflector] and [https://github.com/siefca/i18n-inflector-rails i18n-inflector-rails]. Based on what the user has written into the gender field and our [https://github.com/diaspora/diaspora/tree/master/config/locales/inflections 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 [https://webtranslateit.com WebTranslateIt] if you want to do so. However if you want to contribute a definition please make a [[Git Workflow|pull request]]. | We integrated the awesome extensions [https://github.com/siefca siefca] made for Rails and the [https://github.com/svenfuchs/i18n i18n gem]: [https://github.com/siefca/i18n-inflector i18n-inflector] and [https://github.com/siefca/i18n-inflector-rails i18n-inflector-rails]. Based on what the user has written into the gender field and our [https://github.com/diaspora/diaspora/tree/master/config/locales/inflections 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 [https://webtranslateit.com WebTranslateIt] if you want to do so. However if you want to contribute a definition please make a [[Git Workflow|pull request]]. | ||
== Choose the correct language code == | === Choose the correct language code === | ||
First look if you could find an existing translation. | First look if you could find an existing translation. | ||
Line 27: | Line 27: | ||
* <tt>fr_informal</tt> for the informal one | * <tt>fr_informal</tt> for the informal one | ||
= Pull request = | == Pull request == | ||
{{Note|If you want to take the responsibility for your language then this method is completely fine, however using both methods at the same time is complicated and likely destroys work done by others. So please provide constant updates if you want to do it this way. Do keep in mind that you have to watch for changes yourself, there's no automatism that updates everything with this way. Also be sure that you are the person to be contacted about the translation in your local community and add a way to contact you/contribute to the translation to the ''Languages handled outside of WebTranslateIt'' section below.}} | {{Note|If you want to take the responsibility for your language then this method is completely fine, however using both methods at the same time is complicated and likely destroys work done by others. So please provide constant updates if you want to do it this way. Do keep in mind that you have to watch for changes yourself, there's no automatism that updates everything with this way. Also be sure that you are the person to be contacted about the translation in your local community and add a way to contact you/contribute to the translation to the ''Languages handled outside of WebTranslateIt'' section below.}} | ||
Line 45: | Line 45: | ||
If you want to fix an untranslatable strings or something feel free, but only add the new key to <tt>en.yml</tt>/<tt>devise.en.yml</tt>/<tt>javascript.en.yml</tt>. | If you want to fix an untranslatable strings or something feel free, but only add the new key to <tt>en.yml</tt>/<tt>devise.en.yml</tt>/<tt>javascript.en.yml</tt>. | ||
== Permanent Pull Request == | === Permanent Pull Request === | ||
If you want to give constant updates you can also notify me ([[User:MrZYX|MrZYX]]) and give me the URL to a Git repository and I'll do regular pulls in my update workflow. | If you want to give constant updates you can also notify me ([[User:MrZYX|MrZYX]]) and give me the URL to a Git repository and I'll do regular pulls in my update workflow. | ||
= WebTranslateIt = | == WebTranslateIt == | ||
== Languages handled | === Languages handled outside of WebTranslateIt ==== | ||
* ca [https://gitorious.org/diaspora-l10n-ca/diaspora-l10n-ca repository] | * ca: [https://gitorious.org/diaspora-l10n-ca/diaspora-l10n-ca repository] | ||
* es-VE [https://github.com/ruby-ve team] | * es-VE: [https://github.com/ruby-ve team] | ||
* gl [http://trasno.net/ team] | * gl: [http://trasno.net/ team] | ||
* sq [https://github.com/ujdhesa maintainer] | * sq: [https://github.com/ujdhesa maintainer] | ||
== Translating with WebTranslateIt == | === Translating with WebTranslateIt === | ||
[[Image:WTI_Join.png|thumb| | [[Image:WTI_Join.png|thumb|right|Join the team!]] | ||
[[Image:WTI_Invite.png|thumb| | [[Image:WTI_Invite.png|thumb|right|Request an invite]] | ||
[[Image:WTI_Accept_invite.png|thumb| | [[Image:WTI_Accept_invite.png|thumb|right|Accept the invitation]] | ||
[[Image:WTI_Translate.png|thumb| | [[Image:WTI_Translate.png|thumb|right|Start translating!]] | ||
# First go to [https://webtranslateit.com/en/sign_up WebTranslateIt] and create/sign-in to your account. | # First go to [https://webtranslateit.com/en/sign_up WebTranslateIt] and create/sign-in to your account. |
Revision as of 09:27, 17 August 2013
There are two ways you can contribute a translation: with a pull request or at WebTranslateIt. But lets start with some general notes first.
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.
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
Pull request
First read and follow our Git Workflow.
Files
- 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.
If you want to create a new translation copy the en files, choose the correct language code (see above) and change every occurrence of en with your code. Don't forget the root element in the files!
If you want to fix an untranslatable strings or something feel free, but only add the new key to en.yml/devise.en.yml/javascript.en.yml.
Permanent Pull Request
If you want to give constant updates you can also notify me (MrZYX) and give me the URL to a Git repository and I'll do regular pulls in my update workflow.
WebTranslateIt
Languages handled outside of WebTranslateIt =
- ca: repository
- es-VE: team
- gl: team
- sq: maintainer
Translating with WebTranslateIt
- First go to WebTranslateIt and create/sign-in to your account.
- Then go to Diaspora's project site 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. Note that this can take one or two days since I have to manually approve your request ;) 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.
Thank you for contributing!