Skip to content
Permalink
Browse files

migrate guides from Taiga and move terminology guides in their own fo…

…lder
  • Loading branch information...
erciccione committed Oct 6, 2018
1 parent 50088f9 commit 544bf86422d448be54678198f0dd90ffbe6e2eab
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,36 @@
# How to translate the GUI

Before starting tranlating, take a look at the general guidelines and the available glossaries on the [main page](https://taiga.getmonero.org/project/erciccione-monero-localization/wiki/home) of this wiki

## Add a new language

Adding a new language requires some more steps compared to updating one.
1\. Check if your language is [already listed](https://github.com/monero-project/monero-gui/tree/master/translations)
2\. if it's not, fork the repository, so that you get a perfect clone of it
3\. now use the file [monero-core.ts](https://github.com/monero-project/monero-gui/blob/master/translations/monero-core.ts "monero-core.ts") as base for your translation
You will find a document containing many blocks with this structure:

```
<message>
<location filename="../pages/AddressBook.qml" line="52"/>
<source>Add new entry</source>
<translation type="unfinished"></translation>
</message>
```

You need to make a copy of this file and rename it adding your language's code (eg. the Italian translation is named _monero-core_it.ts_).
4\. Now that you have the copy ready for your language, it's time to start!
Between `<source></source>` there is the original sentence, you have to put the translation between `<translation>/<translation>`. Be careful, if you forget to remove `type="unfinished"` the source text will be used. Make sure you are sticking as much as possible to the structure of the original line (eg. if a sentence is ending with a `.` your translation should end with `.`)
5\. Check and double check everything
6\. Upload the translation in your remote repository on GitHub
7\. Before making the Pull Request we need to edit a couple of files. At the end your PR [must look similar to this one](https://github.com/monero-project/monero-gui/pull/836/files) to work, this means you need to add the same lines in the same files, but referred to your language(you also need to add a round flag 100x100 px , [Open a Issue](https://taiga.getmonero.org/project/erciccione-monero-localization/issues) or contact us on #monero-translations if you don't know where to find one)
8\. Make the PR and open a new task here with the status "ready for tests" , remember to include the link of your PR in the description. If you prefer you can open a new task while still working on the translation, this can be useful if you wish to receive feedbacks or attract collaborators. In this case use the status "in progress"

**Note:** You can use a GUI to edit the file instead of doing it manually. One of the most common is _linguist_ of the QT package (installed by default in some Linux distro, like Ubuntu. to use it just type on terminal `linguist monero-core_[languagecode].ts`)

If you never used GitHub or need some help, please [Open a Issue asking for help](https://taiga.getmonero.org/project/erciccione-monero-localization/issues) or contact us on #monero-translations (IRC channel we use for coordination and support)

## Refresh a language
The Monero codebase is in constant developement, this means sometimes new strings will be added and some will be removed from the GUI. To keep your language file syncronized with the code, you can run this command when inside the monero-gui repository:
`lupdate -pro monero-wallet-gui.pro -ts translations/monero-core_[languagecode].ts -no-obsolete`.
ErCiccione will try to keep all language files updated so you generally won't need to use it, but some advanced users may want to make sure they are working on an updated file. If you don't know how to run this command, but want to make sure you are working on an update language file, ask ErCiccione to update it for you.
@@ -0,0 +1,50 @@
# Translate Kovri website (kovri.io)

Before starting to translate, read our [general guidlines for translators](https://taiga.getmonero.org/project/erciccione-monero-localization/wiki/home) here on Taiga. If you find any issue or need help with any of the following steps, Click the 'MEET UP' button on the menu on the left, to be redirected on our support chat, or feel free to contact ErCiccione anytime.

Kovri website is based on two repositories: [kovri-site](https://github.com/monero-project/kovri-site) and [kovri-docs](https://github.com/monero-project/kovri-docs), we will need to work on both of them. If you need help with any of these steps, contact ErCiccione, he can help you get the work done and can do the most tricky parts for you.

## Update a translation

Let's start from `kovri-site`, where the core of the website is. To update a translation navigate to the `kovri-site/kovri.i2p/_i18n` folder. There you'll find a list of folders and `.yml` files. The folders contain the actual documents which need to be translated, the `.yml` files are the voices of the menus.

What you have to do is just find the folder of the language relevant to you and start translating the text you find. For the `.yml` files, translate only the text on the right (e.g: in `building: Building Instructions`, only `building instructions` must be translated.)

Same procedure for `kovri-docs`: just navigate to the [i18n section](https://github.com/monero-project/kovri-docs/tree/master/i18n), open the folder with the language code relevant to you and start translating the untranslated strings/files.

### example

You are an Italian translator. Navigate to the `/_i18n/` folder in `kovri-site`. You'll find the `it.yml` file, open it and translate all the strings on the right, as explained in the section above. When done, it's time to translate the actual files! go inside the `/it/` folder and check which files need to be translated. If any text is still in English, translate it. That's it.

Same for `kovri-docs`: navigate to the `/i18n/it/` section and check which files need to be translated.

## Add a new language

Adding a new language is very easy. What you need to do is navigate to [kovri-site/kovri.i2p/_i18n](https://github.com/monero-project/kovri-site/tree/master/kovri.i2p/_i18n), make a copy of the `en.yml` file and rename it with the language code corresponding to the language you want to translate into. Same for the `en` folder: copy it and rename it.
When done you need to edit your new `[LANG].yml` file and also edit the other ones, so that your language will be correctly listed on every localized page. What you have to do is add your language at the end of the `langs` section inside the `.yml` file, along with the respective language code (see the example in the next section).

Now navigate to `_data/lang`, copy the folder `en`, rename it using the code of the language you are working on and translate the strings.

That's it. All the files you need are ready and you only need to start translating!

### example

You are a Japanese speaker. Go to kovri-site/kovri.i2p/_i18n/ and make a copy of the `en.yml` file, rename it to `ja.yml` and translate it. At the end of the `langs` section add `ja: Japanese`. The section should look like this:
```
en: English
es: Español
ru: Русский
fr: Français
it: Italiano
de: Deutsch
da: Dansk
ja: Japanese <-- You shuld use the corresponding translation for 'Japanese'
```
Remember to add `ja: Japanese` also in all the other `.yml` files.
Make a copy of the `en` folder and rename it `ja` (leaving the original `en` intact). Translate all the files inside.
Now navigate to `_data/lang`, copy the `en` folder, rename it `ja` and translate the strings cointained in `navigation.yml`.
That's it, your translations are ready!
@@ -0,0 +1,80 @@
To translate [getmonero.org](http://getmonero.org) in your language follow this instructions. Remember that if you need help during any of these steps or with git GitHub, ask support on our chat `#monero-translations`(we are on IRC/Freenode, MatterMost and riot/matrix) or [send a PM to ErCiccione on reddit](https://www.reddit.com/message/compose/?to=erciccione), we will guide you through the whole process if necessary. Also, remember to take a look at our **[General guidlines for translators](https://taiga.getmonero.org/project/erciccione-monero-localization/wiki/home)**

## Translate a page

### Get the repository

First of all you need your copy of the website. Go to [github.com/monero-project/monero-site](https://github.com/monero-project/monero-site) and click the "Fork" button on the top right. Now you have your personal copy of the repository and you can start working on it. Clone it locally and start translating

### Navigate to the correct file

Go to the /i18n folder and find the two letter code for the language you wish to translate for (if your language is not already listed, go to the section "Add a new language"). Enter that folder and find the file you wish to translate. The filenames are all in English and MUST NOT BE CHANGED.

### Translate the files

Here you can do your translation. Depending on the page, you may have to maneuver around some HTML or markdown. In general, anything between two tags (such as `<p>TRANSLATE THIS</p>`) should be fine.
Remember to check your page after translating it, to make sure nothing is broken

### Remove the 'untranslated' snippet

Somewhere on the page (usually the top) should be a snippet that says `{% include untranslated.html %}`. Simply delete this completely from the file. This will remove the orange bar from the bottom saying the page is untranslated.

### Test your translation (not mandatory, ErCiccione will test every translation before it gets merged)

Build your website using jekyll serve if it's not rebuilding automatically.

If the build is successful, go to the correct page in the correct language and check to see that everything is translated, and that the page looks identical to the original English page (besides the translated text).

### Submit a Pull Request

You're all done. Submit a PR and wait for it to be reviewed and merged. Be sure to make any changes if requested.

## Add a new language

### _config.yml file
Navigate to the root folder of the whole website and find the file labeled `_config.yml`. Open it and find the line that says `languages:`. Add your two letter language code (Google it if you don't know it) in between the brackets after the others already present. You will need to put a comma after the previous last one.
Example:
```
languages: ["en", "es", "NEW LANG HERE"]
```
Save and exit the file.
### _data folder
Navigate to the `_data/lang` folder and copy the `template` folder. Paste it into the same folder and the copy renamed to the two letter language code of the language you will be translated to.
**The template folder itself should still be there. It should not be renamed. There should be a new folder in addition to the ones that were already there.**
Translate the content of the files. Do not touch anything labeled `url`, and in the roadmap.yml ONLY translate the `name:` content.
### _i18n folder
Navigate to the _i18n folder and duplicate the `en.yml` file. Rename the duplicate to the two letter language code of your language with a `.yml` at the end. Repeat this process with the `en` folder as well.
**The `en` folder and yml file themselves should still be there. They should not be renamed. There should be a new folder and yml file in addition to the ones that were already there.**
Enter the .yml file and translate everything there.
### File Priorities
the /i18n folder contains many files and folders and can take a fairly big amount of time to translate them all, so we need to work on the most importants one fist. The first files you see, with the extension `.yml`, are the highest priority and should be done first, so start editing the one with the code of your language.
When done with the .yml file, go inside the `resources` folder of your language and work on these files (from the highest priority):
1. Folder`user-guides`
2. Folder `developer-guides`
3. Folder `moneropedia` (**note:** the moneropedia need to be fixed, please ignore it for now)
## Example
Let's say you want to add the German language
1. Clone your forked repository locally
2\. Edit the `_config.yml` file adding the two letter code for German: `de`
3\. Navigate to the `_data` folder, then `lang`. Create a copy of the `template` folder and name it `de`
4\. Go inside the `de` folder and translate all the documents as explained above
5\. Go to the `_i18n` folder and make a copy of the files `en` and `en.yml`, then rename them to `de` and `de.yml`
6\. Start translating the files according to their priority (as explained in the secion above "File Priorities")
7\. Commit your changes an make a Pull Request on GitHub
Contact us as explained at the beginning of this wiki if you need help/info/support!
@@ -0,0 +1,30 @@
Follow the instructions to translate Monerujo, the android wallet developed by the Monero community.

Monerujo's repository can be found [here](https://github.com/m2049r/xmrwallet), the 3 files that need to be translated are inside [this](https://github.com/m2049r/xmrwallet/tree/master/app/src/main/res/values) folder.

Also, remember to take a look at our **[General guidlines for translators](https://taiga.getmonero.org/project/erciccione-monero-localization/wiki/home)**

## Add a new language

Follow these steps to add a new translation:

1. Create an account on github
2. create a new folder under `xmrwallet/app/src/main/res` named `values-LANGCODE` (e.g the Italian folder will be named `values-it`)
3. copy from the folder `xmrwallet/app/src/main/res/values` the 3 needed files: `about.xml` `help.xml` `strings.xml` and put them in the `values-LANGCODE` folder
4. Now everything is ready and you only need to translate the files inside the folder

## Update an already existing language

Monerujo is actively developed which means that sometimes new strings are added to the codebase. When a new string is added it will be enclosed in squared brackets (e.g `<string name="menu_changepw">[Change Passphrase]</string>`) so that a translator can easily find it by searching for `]</string>`. See [this issue](https://github.com/m2049r/xmrwallet/pull/234#issuecomment-383051195) on GitHub for reference.

_Example:_
You speak Spanish and you want to make sure all strings in `values-es/strings.xml` are translated. So you open the file, open the 'search' field and paste `]</string>`and you'll see some highlighted fields. Those need to be translated, and the square brackets `[ ]` removed.
Also, remember to check the other localizable file: `help.xml`, if you find some english parts, those need to be translated

## Note

There are a couple of things to keep in mind when working on a translation:

* **Do not** translate Monerujo's license, but the 'privacy policy' should be translated
* Keep the translated strings as short as possible. _Remember monerujo is a mobile wallet, the space is very limited_
* some strings have the attribute `translatable="false">`, they must **not** be translated. You **have to remove them** (the entire <string `translatable="false">text</string> + newline) from the translated file

0 comments on commit 544bf86

Please sign in to comment.
You can’t perform that action at this time.