Contribute translations: Difference between revisions

From diaspora* project wiki
No edit summary
(cleanup)
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
__NOEDITSECTION__
__NOEDITSECTION__
{{Languages}}
== Tools used to translate ==


== Translating the wiki ==
=== WebTranslateIt ===


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.
[[Image:WTI_Join.png|thumb|Join the team!]]
[[Image:WTI_Invite.png|thumb|Request an invite]]
[[Image:WTI_Accept_invite.png|thumb|Accept the invitation]]
[[Image:WTI_Translate.png|thumb|Start translating!]]


For more discussion around translating the wiki please have a look at [https://discourse.diasporafoundation.org/t/translating-the-wiki/228 this Discourse discussion].
We use [https://webtranslateit.com WebTranslateIt] to manage translation.


== Translating other parts of the project ==
There are two projects for Diaspora on WebTranslateIt.


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.
* [https://webtranslateit.com/en/projects/3020-Diaspora diaspora/Diaspora] for translating the software.
* [https://webtranslateit.com/en/projects/7017-Website diaspora/Website] for translating diasporafoundation.org.


=== General notes ===
If you want to contribute to translation, you need to register to WebTranslateIt.


==== Languages with high inflection and grammar different to English ====
# First go to [https://webtranslateit.com/en/sign_up WebTranslateIt] and create/sign-in to your account.
# Then go to [https://webtranslateit.com/en/projects/3020-Diaspora the project site for Diaspora] and/or [https://webtranslateit.com/en/projects/7017-Website 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.


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]].
=== Github ===


==== Choose the correct language code ====
Some languages are not handled inside WebTranslateIt. You will need to use Github and open a pull request to contribute to those.


First look if you could find an existing translation.
==== diaspora/diaspora ====


If you have to create a new one look [https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale/ here] and check which code is used there for your language.
* es-VE: [https://github.com/ruby-ve team]
* gl: [http://trasno.net/ team]


If your language isn't available there choose the right code according to [http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ISO 639-1] (or [http://en.wikipedia.org/wiki/List_of_ISO_639-2_codes 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 [http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes ISO 3166-1] in uppercase letters.
== I want to add a new language to diaspora*! ==


Examples:
First look if you could find an existing translation.


* <tt>de</tt> for German
If you have to create a new one inform [https://webtranslateit.com/en/projects/3020-diaspora/people a project manager] so that they create the new language for you. As soon as the new language was created you can start translating.
* <tt>de-AT</tt> for German specific to Austria


If you want to create formal or informal versions of your translation append <tt>_informal</tt> or <tt>_formal</tt> to the version that is less common for social networks.
== General notes ==


Examples:
=== Languages with high inflection and grammar different to English ===


* <tt>fr</tt> for the French formal one and
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]].
* <tt>fr_informal</tt> for the informal one
 
=== 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.}}
 
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.
 
==== Files ====
 
===== Diaspora =====
 
https://github.com/diaspora/diaspora
 
* config/locales/devise/devise.''&lt;code&gt;''.yml
* config/locales/diaspora/''&lt;code&gt;''.yml
* config/locales/javascript/javascript.''&lt;code&gt;''.yml
* Only add something to config/locales/inflections/''&lt;code&gt;''.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/''&lt;code&gt;''.json
=== Hardcoded string ===


===== diasporafoundation.org =====
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 <tt>en.yml</tt>/<tt>devise.en.yml</tt>/<tt>javascript.en.yml</tt>. Or you can simply [https://github.com/diaspora/diaspora/issues/new create an issue on GitHub].
 
https://github.com/diaspora/diaspora-project-site
 
* config/locales/devise.''&lt;code&gt;''.yml
* config/locales/''&lt;code&gt;''.yml
 
==== New translation ====
 
If you want to create a new translation copy the <tt>en</tt> files, choose the correct language code (see above) and change every occurrence of <tt>en</tt> 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 <tt>en.yml</tt>/<tt>devise.en.yml</tt>/<tt>javascript.en.yml</tt>.
 
==== Permanent Pull Request ====
 
If you want to give constant updates you can also notify me ([[User:jhass|jhass]]) and give me the URL to a Git repository and I'll do regular pulls in my update workflow.
 
=== WebTranslateIt ===
 
There are two projects for Diaspora on WebTranslateIt.
 
* [https://webtranslateit.com/en/projects/3020-Diaspora diaspora/Diaspora] for translating the software.
* [https://webtranslateit.com/en/projects/7017-Website diaspora/Website] for translating diasporafoundation.org.
 
==== Languages handled outside of WebTranslateIt ====
 
===== diaspora/diaspora =====
 
* es-VE: [https://github.com/ruby-ve team]
* gl: [http://trasno.net/ team]
* sq: [https://github.com/ujdhesa maintainer]
 
==== Translating with WebTranslateIt ====
 
[[Image:WTI_Join.png|thumb|right|Join the team!]]
[[Image:WTI_Invite.png|thumb|right|Request an invite]]
[[Image:WTI_Accept_invite.png|thumb|right|Accept the invitation]]
[[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.
# Then go to [https://webtranslateit.com/en/projects/3020-Diaspora the project site for Diaspora], [https://webtranslateit.com/en/projects/10365-JSXC JSXC (Chat frontend)] and/or [https://webtranslateit.com/en/projects/7017-Website 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 &quot;Translations&quot; tab and start translating.


Thank you for contributing!
Thank you for contributing!

Latest revision as of 21:07, 13 June 2020

Tools used to translate

WebTranslateIt

Join the team!
Request an invite
Accept the invitation
Start translating!

We use WebTranslateIt to manage translation.

There are two projects for Diaspora on WebTranslateIt.

If you want to contribute to translation, you need to register to WebTranslateIt.

  1. First go to WebTranslateIt and create/sign-in to your account.
  2. Then go to the project site for Diaspora and/or the project site for diasporafoundation.org and join the team.
  3. Choose your language or suggest a new one and request an invitation.
  4. 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:
  5. 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

I want to add a new language to diaspora*!

First look if you could find an existing translation.

If you have to create a new one inform a project manager so that they create the new language for you. As soon as the new language was created you can start translating.

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. Or you can simply create an issue on GitHub.

Thank you for contributing!