## Translations instructions

- I want to translate into my own language
- What can I translate?
- Translating WinMerge
  - Add new language to WinMerge
  - Update existing language
- Translating ShellExtension

- Update existing ShellExtension translation
- Add new ShellExtension translation

- Translating Installer
- Translating ReadMe.txt
- Translating Website

### I want to translate into my own language

If you are interested in translating WinMerge to your own language, we'd be happy to include your language as well.

WinMerge executable translations are based on per-language PO files. PO files are text files which have original English string and translated strings listed together.

We have a list with the status of current translations, so you can check if your language is already available and/or it needs to be updated.

There is also a mailing list intended for WinMerge translators in SourceForge.net: Translators mailing list. Please consider joining to the list if you are interested in translating WinMerge. Developers send translation related information and notices to this list.

### What can I translate?

Listings below show what you can actually translate for WinMerge. And what is not useful to translate.

You can translate:

- WinMerge program (visible strings, dialogs, messageboxes)
- Explorer integration component (ShellExtension)
- Installer
- Read-me text shown in installer and in Start-menu
- Website

Currently you cannot translate:

- User manual
- Various other documentation

Yes, we know, translating user manual would be a good thing. But currently we don't have a way to compile and show translated manual to users. If somebody can help us with this, we are of course interested.

### Translating WinMerge

We use gettext PO files for the translation of the WinMerge program. PO files are plain text, so you can even translate using a normal text editor. But we recommend that you use poEdit or other tools that can handle and manipulate PO files.

NOTE: We are not using gettext itself as a translation system, we only use PO- and POT-files as files to have translations. Our translation system is custom-made for WinMerge.

#### The Quick Way

The easiest and fastest way to improve existing translation is to edit `LanguageName.PO` file from `Languages/` -subfolder from WinMerge program folder (e.g. `C:\Program Files\WinMerge\Languages`). The PO files are text files so most editor programs can be used. Edit the file, save it and start WinMerge. The changes should be visible in WinMerge.

This is the fastest way to improve and fix translations. And we of course accept changes done this way. However there is a better way too, but it is more work.

#### The Recommended Way

Grab a copy of the source code from Subversion or go to our download site and download the latest archive with sources. If you can't find it, then please ask us and we will send the file to you.

The PO template `English.pot` and the `LanguageName .po` translation files are located under the`Translations\WinMerge` folder in the source code.

#### Add new language to WinMerge

1. Copy and rename `English.pot` to `YourLanguage .po`, where YourLanguage is the english name of your language.

2. Now translate what you can using poEdit. If you are not sure with one or the other translation, mark it as fuzzy. You can enter a comment in poEdit to give some information about your thoughts to other translators.

3. Once you have translated all the strings, then you need to upload your PO file to our patch tracker (please leave your contact information in case there are any problems that need to be resolved). In case you have problems uploading the patch, you can also send it to us by e-mail.

4. One of the developers will review your translation; if there are problems, we will contact you to get them resolved. When everything is working your translation will be committed to the source control and included in the next release of WinMerge.

5. When the next major release is imminent, we will notify you again to give you a chance to update the translation with any new/changed strings.

#### Update existing language

1. Get the `English.pot` template and the `YourLanguage .po` file you want to improve.
2. Start poEdit with `YourLanguage.po` and select Update from .pot file from the "Catalog" menu.
3. Select `English.pot` and wait until poEdit has finished merging the template and the current translation.
4. The untranslated strings (and fuzzy translations) are always at the top of the list.
5. Translate what you can and upload the resulting PO file to SF.net as a patch.

### Translating ShellExtension

ShellExtension can be translated by translating PO file in the `WinMerge\Translations\ShellExtension`-folder in the WinMerge source tree.

After updating one or more PO files the updated `RC` files are generated by the script `CreateTranslatedRcFiles.vbs`.

#### Update existing ShellExtension translation

1. Get the `English.pot` template and the `YourLanguage .po` file you want to improve.
2. Start poEdit with `YourLanguage.po` and select Update from .pot file from the "Catalog" menu.
3. Select `English.pot` and wait until poEdit has finished merging the template and the current translation.
4. The untranslated strings (and fuzzy translations) are always at the top of the list.
5. Translate what you can and upload the resulting PO file to SF.net as a patch.

#### Add new ShellExtension translation

1. Copy and rename `English.pot` to `YourLanguage .po`, where YourLanguage is the english name of your language.

2. Now translate what you can using poEdit. If you are not sure with one or the other translation, mark it as fuzzy. You can enter a comment in poEdit to give some information about your thoughts to other translators.

3. Once you have translated all the strings, then you need to upload your PO file to our patch tracker (please leave your contact information in case there are any problems that need to be resolved). In case you have problems uploading the patch, you can also send it to us by e-mail.

4. One of the developers will review your translation; if there are problems, we will contact you to get them resolved. When everything is working your translation will be committed to the source control and included in the next release of WinMerge.

### Translating Installer

Installer translation files are in `WinMerge\Translations\InnoSetup\` folder. Look for a file named by your language. If one does not yet exist, you should look for InnoSetup translations in http://www.jrsoftware.org/files/istrans/.

After you open the file, scroll to end of it, there are few custom strings you need to translate. Look for a header `[CustomMessages]` and strings after it.

If you want to change other strings in file, please consider submitting those changes upstream to InnoSetup translators so all InnoSetup users may benefit from your improvements. We'll pick those updates then also.

There is one exception: For Hungarian InnoSetup translation we need to use version downloadable from http://www.kornelpal.hu/ishu/. As the author put it:

    If you want you update the isl file I suggest to use the one with "a" definite
    articles because that is the appropriate one for the name WinMerge.

### Translating ReadMe.txt

Please consider translating also `ReadMe.txt` file - it is shown in end of installer and is added to Start-menu. Translated versions of `ReadMe.txt` are in `WinMerge\Translations\Docs\Readme\` folder. And master `ReadMe.txt` is in `WinMerge\Docs\Users\ReadMe.txt`.

### Translating Website

We use PO files for the website too. But the source are in a own Bitbucket project:

https://bitbucket.org/winmerge/website/