37 |
37 |
38 For example in an Arch Linux box the path is `/usr/share/Hedgewars/Data/Locale`. |
38 For example in an Arch Linux box the path is `/usr/share/Hedgewars/Data/Locale`. |
39 In a Windows 8 box the path is `C:\Program Files (x86)\Hedgewars 0.9.19\Data\Locale`. |
39 In a Windows 8 box the path is `C:\Program Files (x86)\Hedgewars 0.9.19\Data\Locale`. |
40 |
40 |
41 == Translation files == |
41 == Translation files == |
42 |
|
43 Here is a list of the different localization files of the English language that you should use as your translation reference/template as it should be the most accurate and up to date. The file locations are relative to the top directory of the Hedgewars source code. You can edit all these files with a text editor, but for some files special editors are available. |
42 Here is a list of the different localization files of the English language that you should use as your translation reference/template as it should be the most accurate and up to date. The file locations are relative to the top directory of the Hedgewars source code. You can edit all these files with a text editor, but for some files special editors are available. |
44 |
43 |
45 * `/share/hedgewars/Data/Locale/en.txt`—This is the engine's strings |
44 === Engine (in-game stuff) === |
46 * `/share/hedgewars/Data/Locale/hedgewars_en.ts`—This is the front-end's strings and you can edit it with Qt Linguist |
45 * `/share/hedgewars/Data/Locale/en.txt`—This contains the core in-game strings, such as the mission panel, the messages at the top, ammo names and descriptions |
|
46 * `/share/hedgewars/Data/Locale/stub.lua`—Strings used by Lua scripts, which includes campaigns, missions and game styles |
|
47 |
|
48 === Frontend (main menu) === |
|
49 * `/share/hedgewars/Data/Locale/hedgewars_en.ts`—Contains most strings of the frontend and you can edit it with Qt Linguist |
47 * `/share/hedgewars/Data/Locale/missions_en.txt`—This is the [Missions mission] description strings |
50 * `/share/hedgewars/Data/Locale/missions_en.txt`—This is the [Missions mission] description strings |
48 * `/share/hedgewars/Data/Locale/campaigns_en.txt`—This is the campaign description strings |
51 * `/share/hedgewars/Data/Locale/campaigns_en.txt`—This is the campaign description strings |
49 * `/share/hedgewars/Data/Locale/stub.lua`—This is all the Lua files (Missions, mission maps etc.) strings |
|
50 * `/share/hedgewars/Data/Locale/tips_en.xml`—This contains the tips shown in the main menu. This file is *not* in XML format! |
52 * `/share/hedgewars/Data/Locale/tips_en.xml`—This contains the tips shown in the main menu. This file is *not* in XML format! |
51 |
53 |
52 The following files are not used by Hedgewars itself, but they contain translatable metadata about Hedgewars: |
54 ==== Mission map descriptions ==== |
53 |
55 The map selection shows brief descriptions for mission maps below the preview image. Those can be translated and you find those texts in: |
54 * `/share/hedgewars/Data/misc/hedgewars.desktop`—[https://wiki.freedesktop.org/www/Specifications/desktop-entry-spec/ Desktop Entry] file for the Hedgewars application |
|
55 * `/share/hedgewars/Data/misc/hwengine.desktop.in`—Desktop Entry file for the Hedgewars engine for playing savegames and demos |
|
56 * `/share/hedgewars/Data/misc/hwengine.desktop`—*Do not translate*! This file will be automatically generated from `hwengine.desktop.in` when building Hedgewars |
|
57 * `/share/hedgewars/Data/misc/hedgewars-mimeinfo.xml`—Description of Hedgewars file types |
|
58 |
|
59 The map selection shows brief descriptions for mission maps. Those can be translated and you find those texts in: |
|
60 |
56 |
61 * `/share/hedgewars/Data/Maps/<map name>/desc.txt` |
57 * `/share/hedgewars/Data/Maps/<map name>/desc.txt` |
62 |
58 |
63 Replace “`<map name`>” with the name of any mission map. To translate these, add a line of the format `language code=description` (e.g. “en=This is an example.” for English). Since version 0.9.23, you must use the following special character sequences for new lines, commas and underscores: |
59 Replace “`<map name`>” with the name of any mission map. To translate these, add a line of the format `language code=description` (e.g. “en=This is an example.” for English). Since version 0.9.23, you must use the following special character sequences for new lines, commas and underscores: |
64 |
60 |
65 || *Written text* || *Is replaced by* || |
61 || *Written text* || *Is replaced by* || |
66 || `_n` || New line || |
62 || `_n` || New line || |
67 || `_c` || Comma || |
63 || `_c` || Comma || |
68 || `__` || Underscore || |
64 || `__` || Underscore || |
|
65 |
|
66 === Metadata === |
|
67 The following files are not used by Hedgewars itself, but they contain translatable metadata about Hedgewars: |
|
68 |
|
69 * `/share/hedgewars/Data/misc/hedgewars.desktop`—[https://wiki.freedesktop.org/www/Specifications/desktop-entry-spec/ Desktop Entry] file for the Hedgewars application |
|
70 * `/share/hedgewars/Data/misc/hwengine.desktop.in`—Desktop Entry file for the Hedgewars engine for playing savegames and demos |
|
71 * `/share/hedgewars/Data/misc/hwengine.desktop`—*Do not translate*! This file will be automatically generated from `hwengine.desktop.in` when building Hedgewars |
|
72 * `/share/hedgewars/Data/misc/hedgewars-mimeinfo.xml`—Description of Hedgewars file types |
69 |
73 |
70 == Updating an existing translation == |
74 == Updating an existing translation == |
71 |
75 |
72 That is relatively easy. Just edit the existing file. You can edit every file with your favorite editor and the `.ts` file with Qt Linguist. |
76 That is relatively easy. Just edit the existing file. You can edit every file with your favorite editor and the `.ts` file with Qt Linguist. |
73 |
77 |