annotate src/po/README_mvc.txt @ 1810:5d84650b569c v7.2.108

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