OSDN Git Service

ImgMergeFrm.cpp: Fix the header bar widths not being calculated properly when the...
[winmerge-jp/winmerge-jp.git] / Translations / README.md
1 # Translations instructions
2
3 If you are interested in translating WinMerge to your own language, we'd be happy to include your language as well.
4
5 We have a list with the [status of current translations](https://winmerge.org/translations/), so you can check if your language is already available and/or it needs to be updated.
6
7 ## Translating WinMerge
8
9 We use [gettext](https://en.wikipedia.org/wiki/Gettext) PO files for the translation of the WinMerge program.
10
11 PO files are plain text, so you can even translate using a normal text editor. But we recommend that you use [poEdit](http://www.poedit.net/) or other tools that can handle and manipulate PO files.
12
13 **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.
14
15 The PO template `English.pot` and the language translation files are located under the `Translations\WinMerge\` folder in the source code.
16
17 ### Add new language to WinMerge
18
19  1. Copy and rename `English.pot` to `YourLanguage.po`, where *YourLanguage* is the english name of your language.
20
21  2. Now translate what you can using [poEdit](http://www.poedit.net/). 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.
22
23  3. Compile WinMerge to test your changes.
24
25 ### Update existing language
26
27  1. Get the `English.pot` template and the `YourLanguage.po` file you want to improve.
28  2. Start [poEdit](http://www.poedit.net/) with `YourLanguage.po` and select *Update from .pot file* from the *Catalog* menu.
29  3. Select `English.pot` and wait until poEdit has finished merging the template and the current translation.
30  4. The *untranslated* strings (and *fuzzy* translations) are always at the top of the list.
31  5. Compile WinMerge to test your changes.
32
33 ## Translating ShellExtension
34
35 ShellExtension (Explorer integration component) can be translated by translating PO file in the `Translations\ShellExtension\`-folder in the WinMerge source tree.
36
37 After updating one or more PO files the updated `RC` files are generated by the script `CreateTranslatedRcFiles.vbs`.
38
39 ### Add new ShellExtension translation
40
41  1. Copy and rename `English.pot` to `YourLanguage.po`, where *YourLanguage* is the english name of your language.
42
43  2. Now translate what you can using [poEdit](http://www.poedit.net/). 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.
44
45  3. Add a resource definition to file `ShellExtension\ShellExtension.rc`: 
46
47 ```
48 "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_XXX)\r\n"
49 "#ifdef _WIN32\r\n"
50 "LANGUAGE LANG_XXX, SUBLANG_DEFAULT\r\n"
51 "#pragma code_page(65001)\r\n"
52 "#include ""Languages\\ShellExtensionYourLanguage.rc""\r\n"
53 "#endif //_WIN32\r\n"
54 "#endif\r\n"
55 "\r\n"
56 ```
57
58 ### Update existing ShellExtension translation
59
60  1. Get the `English.pot` template and the `YourLanguage.po` file you want to improve.
61  2. Start [poEdit](http://www.poedit.net/) with `YourLanguage.po` and select *Update from .pot file* from the *Catalog* menu.
62  3. Select `English.pot` and wait until poEdit has finished merging the template and the current translation.
63  4. The *untranslated* strings (and *fuzzy* translations) are always at the top of the list.
64
65 ## Translating Installer
66
67 Installer translation files are in `Translations\InnoSetup\` folder. Look for a file named by your language.
68
69 If one does not yet exist, copy and rename `English.isl` to `YourLanguage.isl`, where *YourLanguage* is the english name of your language.
70
71 Translate the text after the `=` character:
72
73 ```
74 OptionalFeatures=Optional Features:
75 CompanyName=Thingamahoochie Software
76
77 ```
78
79 ## Translating ReadMe.txt
80
81 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 `Translations\Docs\Readme\` folder. And master `ReadMe.txt` is in `Docs\Users\ReadMe.txt`.
82
83 ## Translating Website
84
85 We use PO files for the website too. But the source files are in its own [GitHub project](https://github.com/winmerge/website/).