Changed DiffText and Constant highlight groups
[MacVim/jjgod.git] / src / po / README_mvc.txt
blob293edf2d4fc3d352520daaa5312ff1c25e0aea0a
1 TRANSLATING VIM MESSAGES
3 This file explains how to create and maintain po files using
4 gnu-gettext.win32, a Windows port of gettext by Franco Bez
5 <franco.bez@gmx.de>.  You can find it at:
7         http://people.freenet.de/franco.bez/gettext/gettext_win32_en.html
9 First read the README.txt file in this directory for general remarks on
10 translating Vim messages.
13 SETUP
15 Set the environment variable LANGUAGE to the language code for the language
16 you are translating Vim messages to.  Language codes are typically two
17 characters and you can find a list of them at:
19         http://www.geocities.com/click2speak/languages.html
21 Another possibility is to use the gnuwin32 port of gettext. This is
22 recommended especially if you use already gnuwin32 tools to gunzip, bunzip,
23 patch etc. these files. You find the gnuwin32 version of gettext here:
25         http://gnuwin32.sourceforge.net/packages/gettext.htm
27 Yet another very strait forward way is to get the sources of gettext from
29         http://www.gnu.org/software/gettext/gettext.html
31 and build your own version of these tools. The documentation states that this
32 should be possible with MSVC4.0, MSVC5.0, MSVC6.0 or MSVC7.0, but you can
33 build it even successfully with MSVC8.0.
35 The LANGUAGE environment variable can be set from the command line, by adding
36 a line to your autoexec.bat file, or by defining a user variable from the
37 Advanced tab in the System control panel.
39 Next, edit Make_mvc.mak so that GETTEXT_PATH points the binary directory of
40 the installation.
43 CREATING A NEW TRANSLATION
45 When creating a new translation you must add your language code to the
46 Make_mvc.mak file in the lines defining LANGUAGES and MOFILES.  To create the
47 initial .po file for your language you must use the command:
49         make -f make_mvc.mak first_time
51 Note: You need to be in the po directory when using this makefile.
53 Once you have your new .po file load it into Vim and source cleanup.vim, this
54 will convert untranslated messages to comments.  If you have syntax
55 highlighting turned on then untranslated messages will stand out more easily.
57 You will also need to edit the file names in the comments in the .po file.
58 You need to remove the absolute directory specification (which has the form
59 c:\vim61\src\).  You can do this in Vim with the following command with the
60 appropriate directory specification for where you have installed the Vim
61 source:
63         %s/c:\\vim61\\src\\//g
66 UPDATING A TRANSLATION
68 If there are new or changed messages in Vim that need translating, then the
69 first thing to do is merge them into the existing translations.  This is done
70 with the following command:
72         nmake -f Make_mvc.mak xx.po
74 where xx is the language code for the language needing translations.  The
75 original .po file is copied to xx.po.orig.
78 DOING THE TRANSLATION
80 Now that you have a .po file you can do the translations for all messages that
81 need it.  See README.txt for specific instructions.
83 Once you have finished translating the messages you should make sure all
84 non-translated strings are commented out.  This can be done by sourcing
85 cleanup.vim once again.
88 CHECKING THE TRANSLATION
90 Check the translation with the following command:
92         nmake -f make_mvc.mak xx.mo
94 Correct any syntax errors reported.  When there are no more errors, the
95 translation is ready to be installed.
98 INSTALLING THE TRANSLATION
100 Install your translation with the following command:
102         nmake -f make_mvc.mak install
104 This will create the xx\LC_MESSAGES directory in runtime\lang if it does not
105 already exist.
108 vim:tw=78: