]> git.saurik.com Git - wxWidgets.git/blame - docs/tech/tn0002.txt
redraw forced for size changes (layout for measuring is simpler than word-wrapping...
[wxWidgets.git] / docs / tech / tn0002.txt
CommitLineData
f077f5c3
VZ
1 wxWindows translator guide
2 ==========================
3
4This note is addressed to wxWindows translators.
5
6First of all, here is what you will need:
7
81. GNU gettext package version 0.10.35 or later (NB: earlier versions were
9 known to have serious bugs)
10
552861bf
VZ
11 a) for Unix systems you can download gettext-0.10.tar.gz from any GNU
12 mirror (RPMs and DEBs are also available from the usual places)
f077f5c3 13
552861bf 14 b) for Windows you can download the precompiled binaries from
17a4e1f1
DS
15 www.wxwindows.org or install PoEdit (poedit.sourceforge.org) and
16 add <installdir>/poEdit/bin to your path (so it can find xgettext).
f077f5c3
VZ
17
182. A way to run a program recursively on an entire directory from the command
19 line:
20
552861bf
VZ
21 a) for Unix systems, this is done in locale/Makefile using the standard find
22 command and xargs which is installed on almost all modern Unices. If you
23 are unlucky enough to not have xargs, you can use the -exec option of find
f077f5c3
VZ
24 instead.
25
17a4e1f1
DS
26 b) for Win32 systems you can use either Cygwin or MinGW. If you don't have
27 those it is less trivial: if you have 4DOS/4NT/bash, that's
f077f5c3
VZ
28 fine, but you'd have to use some kind of "for /s" loop with the
29 command.com/cmd.exe.
30
313. (at least read) access to the cvs is not necessary strictly speaking, but
17a4e1f1 32 will make things a lot easier for you and others.
f077f5c3
VZ
33
34
35Now a brief overview of the process of translations (please refer to GNU
36gettext documentation for more details). It happens in several steps:
37
381. the strings to translate are extracted from the C++ sources using xgettext
39 program into a wxstd.po file which is a "text message catalog"
40
552861bf 412. this new wxstd.po file (recreated each time some new text messages are added
f077f5c3
VZ
42 to wxWindows) is merged with existing translations in another .po file (for
43 example, de.po) and replaces this file (this is done using the program
44 msgmerge)
45
463. the resulting .po file must be translated
47
484. finally, msgformat must be run to produce a .mo file: "binary message catalog"
49
50
17a4e1f1
DS
51How does it happen in practice? There is a Makefile in the "locale"
52directory which will do almost everything (except translations) for you. i.e.
f077f5c3
VZ
53just type "make lang.po" to create or update the message catalog for 'lang'.
54Then edit the resulting lang.po and make sure that there are no empty or fuzzy
552861bf 55translations left (empty translations are the ones with msgstr "", fuzzy
f077f5c3
VZ
56translations are those which have the word "fuzzy" in a comment just above
57them). Then type "make lang.mo" which will create the binary message catalog.
58
17a4e1f1
DS
59Under Windows (If you don't have Cygwin or MinGW), you should execute the
60commands manually, please have a look at Makefile to see what must be done.
f077f5c3
VZ
61
62=== EOF ===
63
64Author: VZ
65Version: $Id$
66
67$Log$
17a4e1f1
DS
68Revision 1.3 2003/11/18 16:37:11 DS
69Updated translation technote to mention Makefile usage under Windows.
70
552861bf
VZ
71Revision 1.2 2002/07/03 15:01:26 VZ
72typos and other doc corrections from Olly Betts (patch 573738)
73
f077f5c3
VZ
74Revision 1.1 2000/03/07 10:53:53 VZ
75technote about translations added
76