]> git.saurik.com Git - wxWidgets.git/blob - docs/tech/tn0002.txt
Attempt to fix buggy menus.
[wxWidgets.git] / docs / tech / tn0002.txt
1 wxWindows translator guide
2 ==========================
3
4 This note is addressed to wxWindows translators.
5
6 First of all, here is what you will need:
7
8 1. GNU gettext package version 0.10.35 or later (NB: earlier versions were
9 known to have serious bugs)
10
11 a) for Unix systems you can download gettext-0.10.tar.gz from any of GNU
12 mirrors (RPMs and DEBs are also available from the usual places)
13
14 b) for Windows you can grab the precompiled binaries from www.wxwindows.org
15
16 2. A way to run a program recursively on an entire directory from the command
17 line:
18
19 a) for Unix systems, this is done in locale/Makefile using standard find
20 command and xargs which is installed on almost all modern Unices, if you
21 are unhappy enough to not have it you can use -exec option of find
22 instead.
23
24 b) for Win32 systems this is less trivial: if you have 4DOS/4NT/bash, that's
25 fine, but you'd have to use some kind of "for /s" loop with the
26 command.com/cmd.exe.
27
28 3. (at least read) access to the cvs is not necessary strictly speaking, but
29 will make the things a lot easier for you and others.
30
31
32 Now a brief overview of the process of translations (please refer to GNU
33 gettext documentation for more details). It happens in several steps:
34
35 1. the strings to translate are extracted from the C++ sources using xgettext
36 program into a wxstd.po file which is a "text message catalog"
37
38 2. this new wxtd.po file (recreated each one some new text messages are added
39 to wxWindows) is merged with existing translations in another .po file (for
40 example, de.po) and replaces this file (this is done using the program
41 msgmerge)
42
43 3. the resulting .po file must be translated
44
45 4. finally, msgformat must be run to produce a .mo file: "binary message catalog"
46
47
48 How does it happen in practice? Under Unix there is a Makefile under "locale"
49 directory which will do almost everything (except translations) for you, i.e.
50 just type "make lang.po" to create or update the message catalog for 'lang'.
51 Then edit the resulting lang.po and make sure that there are no empty or fuzzy
52 translations left (empty translations are the one with msgstr "", fuzzy
53 translations are those which have the word "fuzzy" in a comment just above
54 them). Then type "make lang.mo" which will create the binary message catalog.
55
56 Under Windows, you should execute the commands manually, please have a look at
57 Makefile to see what must be done.
58
59 === EOF ===
60
61 Author: VZ
62 Version: $Id$
63
64 $Log$
65 Revision 1.1 2000/03/07 10:53:53 VZ
66 technote about translations added
67