diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-21 22:49:08 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-21 22:51:02 +0100 |
commit | e92a1cf436b99757e82d0234ca54b6c41b7ddb16 (patch) | |
tree | 0d646aa33721271ebe76db7124ba509e6fa1a570 /docs/Contributing-to-Mastodon | |
parent | 500278eb4c73506cd965c3abc06a2449c8071e1e (diff) |
Add wiki contents to docs/ instead
Diffstat (limited to 'docs/Contributing-to-Mastodon')
-rw-r--r-- | docs/Contributing-to-Mastodon/Sponsors.md | 31 | ||||
-rw-r--r-- | docs/Contributing-to-Mastodon/Translating.md | 48 |
2 files changed, 79 insertions, 0 deletions
diff --git a/docs/Contributing-to-Mastodon/Sponsors.md b/docs/Contributing-to-Mastodon/Sponsors.md new file mode 100644 index 000000000..5916ceb45 --- /dev/null +++ b/docs/Contributing-to-Mastodon/Sponsors.md @@ -0,0 +1,31 @@ +Sponsors +======== + +These people make the development of Mastodon possible through [Patreon](https://www.patreon.com/user?u=619786): + +**Extra special Patrons** + +- [World'sTallestLadder](https://mastodon.social/users/carcinoGeneticist) +- [glocal](https://mastodon.social/users/glocal) +- [Jimmy Tidey](https://mastodon.social/users/jimmytidey) +- [Kurtis Rainbolt-Greene](https://mastodon.social/users/krainboltgreene) +- [Kit Redgrave](https://socially.constructed.space/users/KitRedgrave) + +**Thank you to the following people** + +- [Sophia Park](https://mastodon.social/users/sophia) +- [WelshPixie](https://mastodon.social/users/WelshPixie) +- [John Parker](https://mastodon.social/users/Middaparka) +- [Christina Hendricks](https://mastodon.social/users/clhendricksbc) +- [Jelle](http://jelv.nl) +- [Harris Bomberguy](https://mastodon.social/users/Hbomberguy) +- [Martin Tithonium](https://mastodon.social/users/tithonium) +- [Edward Saperia](https://nwspk.com) +- [Yoz Grahame](http://yoz.com/) +- [Jenn Kaplan](https://gay.crime.team/users/jkap) +- [Natalie Weizenbaum](https://mastodon.social/users/nex3) +- [Matteo De Micheli](http://matteodem.ch/) +- [BirdMachine](https://mastodon.social/users/BirdMachine) +- [Jessica Hayley](https://mastodon.social/users/jayhay) +- [Niels Roesen Abildgaard](http://hypesystem.dk/) +- [Zatnosk](https://github.com/Zatnosk) diff --git a/docs/Contributing-to-Mastodon/Translating.md b/docs/Contributing-to-Mastodon/Translating.md new file mode 100644 index 000000000..d47e83e7e --- /dev/null +++ b/docs/Contributing-to-Mastodon/Translating.md @@ -0,0 +1,48 @@ +Translating +=========== + +If you want to localise Mastodon into your language, here is how. + +There are two parts to Mastodon, the server and the web client. The translations for the web client are in `app/assets/javascripts/components/locales`. For the server-side, the translations live in `config/locales` and are divided into different files. Here are all the files you’ll need to translate: + +| Original file (English) | Location | Description | +|---|---|---| +| [`en.jsx`](/Gargron/mastodon/tree/master/app/assets/javascripts/components/locales/en.jsx) | `app/assets/javascripts/components/locales/en.jsx` | Strings for the web client | +| [`en.yml`](/Gargron/mastodon/tree/master/config/locales/en.yml) | `config/locales/en.yml` | Strings for general use | +| [`simple_form.en.yml`](/Gargron/mastodon/tree/master/config/locales/simple_form.en.yml) | `config/locales/simple_form.en.yml` | Strings for the settings area | +| [`devise.en.yml`](/Gargron/mastodon/tree/master/config/locales/devise.en.yml) | `config/locales/devise.en.yml` | Generic strings for Devise | +| [`doorkeeper.en.yml`](/Gargron/mastodon/tree/master/config/locales/doorkeeper.en.yml) | `config/locales/doorkeeper.en.yml` | Generic strings for Doorkeeper | + +## Translating + +If you use Github, first clone the Mastodon repository to your account. + +1. Duplicate the files in their folder and replace `en` in the filenames by your language’s standard two-letters code ([ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)). + For instance `simple_form.en.yml` becomes `simple_form.es.yml` in the Spanish translation. +2. Also replace the language code in the first lines of all the files, and the last line of the `.jsx` file. +3. Translate the right-side values from English to your language. Keep the indentation and punctuation. + +Since Devise and Doorkeeper are popular libraries, there may already be translation files for your language available on the Internet. + +## Declaring the language + +The locales are mentioned in several other files. To activate your translation, add your language code to the different lists present in these files: + +| File | Location | Comment | +|---|---|---| +| [`index.jsx`](/Gargron/mastodon/tree/master/app/assets/javascripts/components/locales/index.jsx) | `app/assets/javascripts/components/locales/index.jsx` | 2 lines to add | +|[`mastodon.jsx`](/Gargron/mastodon/tree/master/app/assets/javascripts/components/containers/mastodon.jsx) | `app/assets/javascripts/components/containers/mastodon.jsx` | 1 line to add + 1 list to complete | +| [`settings_helper.rb`](/Gargron/mastodon/tree/master/app/helpers/settings_helper.rb) | `app/helpers/settings_helper.rb` | 1 line to add + your language’s name | +| [`application.rb`](/Gargron/mastodon/tree/master/config/application.rb) | `config/application.rb` | 1 list to complete | + +## Sending the translation + +You can then push the files to git and submit a pull request. + +## Testing the translation + +Once the pull request is accepted, wait for the code to be deployed on a Mastodon instance. Log-in with your account there, and change the locale in the settings. Browse and use the website. See if everything makes sense in context and if anything seems out of place or breaks the layout. Invite other Mastodon users speaking your language to try it and give feedback. Make changes accordingly and update the translation. + +## Updating the translation + +Keep an eye on the original English files in `app/assets/javascripts/components/locales` and `config/locales`. When they are updated, pass on the changes to your language files. For new strings, add the new lines to the same position and translate them. Once you’re finished with the updates, you can submit a new pull request. |