Drop unused printing code templates
[TortoiseGit.git] / Languages / README.txt
blob11f55975155cb1ad82a5dc89d10f42b3602c6214
1 Translations\r
2 ============\r
3 \r
4 TortoiseGit is still in development so translations of all resources is\r
5 also a work 'in progress'.\r
6 \r
7 General\r
8 -------\r
9 The TortoiseGit project uses the web-based Transifex platform for\r
10 managing translations:\r
11 https://www.transifex.com/projects/p/tortoisegit/\r
13 This should make it easier for new translators to get started. If you\r
14 want to help to translate TortoiseGit, please register an account a\r
15 transifex.com (you can also login using your google account), then\r
16 request membership of one of our translation teams or request to create\r
17 a new team, if your language is not yet listed. If you want to\r
18 translate into a language that has different locales and you *really*\r
19 need the second locale, add the two letter ISO-3166 locale code. If\r
20 you're not sure about your country code, look here:\r
21 http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html.\r
22 Please keep in mind that we would like to have as few translations as\r
23 possible that cover as many languages as possible (in order to reduce\r
24 the work needed for keeping all translations up to date).\r
26 For most (unlisted) languages you do not need to start all over. A large\r
27 amount of translated strings can be reused from the TortoiseSVN project:\r
28 Just request a new language team and contact the TortoiseGit developers!\r
30 Translating\r
31 -----------\r
32 There are some notes and hints for translating:\r
34 When translating please try to adapt the naming conventions used by the\r
35 Git team. Their translations can be found here:\r
36 https://github.com/gitster/git/tree/master/po\r
38 When translating on transifex.com there you might see red symbols in the\r
39 original text such as "⇥", "⏎", "↩" and "»" (you need an UTF-8 aware\r
40 editor to see the the three different symbols here). DO NOT COPY these\r
41 into the translated text as this might break certain semantics. "»" and\r
42 "⇥" mean that a tabulator is needed at that position. "⏎" and "↩" indicate\r
43 that a new line should be inserted there. For "⏎" just press enter, "↩"\r
44 needs special attention as well as the tabulator character.\r
45 ATTENTION: Right now there is a bug on transifex so that the tabulator\r
46 character and the "↩" new line character cannot be inserted using the\r
47 keyboard. Workaround: Click on "Copy source string" and then carefully\r
48 replace the text before and after the tabulator resp. the "↩" new line\r
49 character.\r
51 Character sequences such as "%i", "%d", "%ld", "%I64d", "%u" and "%.1f"\r
52 (will be substituted by a number each) and "%s" (will be substituted by\r
53 a string/text) MUST be included in the SAME ORDER as in the original\r
54 text (otherwise the program will crash at run-time). These sequences are\r
55 called "format specifiers" (see\r
56 https://msdn.microsoft.com/en-us/library/75w45ekt.aspx for more\r
57 information).\r
58 There is only one exception: Only if a number, an exclamation mark, a\r
59 format specifier and another exclamation mark (such as "1!s!") is after\r
60 the per cent sign (such as "%!1!s" or "%!3!d") then the order can be\r
61 exchanged (the number before the first exclamation mark indicates which\r
62 input will be inserted at run-time).\r
64 An ampercent (&) before a letter such as "&Open" indicates that "O" is\r
65 an accelerator key in the current context (e.g., in a menu or in a\r
66 window) which can be accessed by pressing the key or ALT+key (depending\r
67 on the context; open a menu with ALT+key choosing an option within the\r
68 menu just press the key). These should be unique in their contexts\r
69 otherwise they won't work - try to use the same letters as in the\r
70 original text or test which other keys don't conflict (and are common in\r
71 your language).\r
72 In order to see them, just press the ALT key then the respecting\r
73 characters will be shown underlined.\r
75 There is also a second type of accelerator keys (such as CTRL+F). These\r
76 are represented as specially formatted strings which look like\r
77 "ID:xxxxxx:VACS+X" and are designed for localized accelerator keys.\r
78 Format is: "ID:xxxxxx:VACS+X" where:\r
79    ID:xxxxx = the menu ID corresponding to the accelerator\r
80    V = Virtual key (or blank if not used) - nearly always set!\r
81    A = Alt key     (or blank if not used)\r
82    C = Ctrl key    (or blank if not used)\r
83    S = Shift key   (or blank if not used)\r
84    X = upper case character\r
85 e.g. "V CS+Q" == Ctrl + Shift + 'Q'\r
86 ONLY Accelerator Keys with corresponding alphanumeric characters can be\r
87 updated, i.e. function keys (F2), special keys (Delete, HoMe) etc. will\r
88 not.\r
89 Below the translation textbox, there is a field "Developer note:". There\r
90 you can find further information for accelerator keys, e.g.:\r
91 "Accelerator Entry for Menu ID:57636; 'Find' Accelerator Entry for Menu\r
92 ID:57636; '&Find\tCtrl+F'". This means that this accelerator is used\r
93 for the menu entry "&Find" (which also has a local accelerator key "F"\r
94 within the menu; there is no need that both accelerator keys include\r
95 the key - e.g. it's common to use 'x' for "E&xit" within the "File"\r
96 menu and CTRL+W as global accelerator key).\r
98 We hope that these hints will answer most questions. If you have any\r
99 further question, feel free to ask (e.g., on the mailing lists)!\r
101 What now?\r
102 ---------\r
103 That's all you have to do. We'll take care of creating the resource\r
104 dlls and installers for the different language packs.\r
106 Our goal is to provide language packs starting with the next releases\r
107 as soon as more than 50 % of the strings are translated on the offical\r
108 TortoiseGit download page (https://tortoisegit.org/download).\r
110 Technical details\r
111 -----------------\r
112 The TortoiseGit project uses gettext PO (portable object) files for its\r
113 translation. PO files are plain text, so you can even translate using a\r
114 normal text editor. The only thing you have to take care of is that the\r
115 editor can handle the UTF-8 charset. There is a wide range of specialized\r
116 tools out there that can handle and manipulate PO files (such as poEdit,\r
117 http://poedit.sourceforge.net).\r
119 You can also create your personal translations. Just use the\r
120 "Languages/Tortoise.pot" file as a template for your own "Tortoise_CC.po"\r
121 file and start translating it.\r
123 Building your own dlls\r
124 ----------------------\r
125 If you want to test the translations you made yourself, you need three things:\r
127 - The "raw" resource dlls for your version of TortoiseGit. Other dlls\r
128   won't work. The TortoiseGit teams provides those for every stable release.\r
129   You can find them in the release folder on https://download.tortoisegit.org/tgit/\r
130   named "TortoiseGit-LanguageDlls-X.X.X.X-(32|64)bit.7z" (you might need 7-Zip for unpacking)\r
131 - A po file containing the translations for your language.\r
132 - The ResText utility that is used to insert the data from the po file\r
133   into your resource dlls. This tool is also included in the archive in which the "raw"\r
134   resource dlls are included.\r
136 Once you got all needed files, you run:\r
138     restext apply TortoiseProcLang.dll TortoiseProcNNNN.dll Tortoise_CC.po\r
139     restext apply TortoiseMergeLang.dll TortoiseMergeNNNN.dll Tortoise_CC.po\r
140     restext apply TortoiseIDiffLang.dll TortoiseIDiffNNNN.dll Tortoise_CC.po\r
141     restext apply TortoiseGitUDiffLang.dll TortoiseGitUDiffNNNN.dll Tortoise_CC.po\r
142     restext apply TortoiseGitBlameLang.dll TortoiseGitBlameNNNN.dll Tortoise_CC.po\r
144 where NNNN is your four digit country code (1031 for germany)\r
145 and CC is your 2 letter country code (de for germany)\r
147 You can find the four digit country code at\r
148 https://msdn.microsoft.com/goglobal/bb964664.aspx\r
149 under the column LCID dec or on\r
150 https://docs.microsoft.com/windows/desktop/intl/language-identifier-constants-and-strings\r
151 unter the column "Language identifier". In both cases it has to be\r
152 converted to decimal first (e.g., 0x0407 -> 1031 for de-DE).\r
154 After successfully creating your dlls, copy them into\r
155 "C:\Program Files\TortoiseGit\Languages".\r
156 Now you should be able to select your language from the combobox on the\r
157 TortoiseGit main setting page.\r