• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..30-Apr-2014247

af.poH A D06-Sep-2010130.7 KiB

ca.poH A D06-Sep-2010158.5 KiB

check.vimH A D06-Sep-20102.3 KiB

cleanup.vimH A D06-Sep-2010586

cs.cp1250.poH A D06-Sep-2010108.4 KiB

cs.poH A D06-Sep-2010108.4 KiB

de.poH A D06-Sep-2010153.4 KiB

en_GB.poH A D06-Sep-20108.9 KiB

eo.poH A D06-Sep-2010161.5 KiB

es.poH A D06-Sep-2010199.6 KiB

fi.poH A D06-Sep-2010158.6 KiB

fr.poH A D06-Sep-2010179 KiB

ga.poH A D06-Sep-2010161 KiB

it.poH A D06-Sep-2010161 KiB

ja.poH A D06-Sep-2010150.4 KiB

ja.sjis.poH A D06-Sep-2010150.5 KiB

ko.poH A D06-Sep-2010147.4 KiB

ko.UTF-8.poH A D06-Sep-2010162.4 KiB

Make_cyg.makH A D06-Sep-20102.7 KiB

Make_ming.makH A D06-Sep-20102 KiB

Make_mvc.makH A D06-Sep-20101.7 KiB

MakefileH A D06-Sep-20106.2 KiB

nb.poH A D06-Sep-2010147.4 KiB

no.poH A D06-Sep-2010147.4 KiB

pl.cp1250.poH A D06-Sep-2010159.3 KiB

pl.poH A D06-Sep-2010159.3 KiB

pl.UTF-8.poH A D06-Sep-2010161.8 KiB

pt_BR.poH A D06-Sep-2010157.5 KiB

README.txtH A D06-Sep-20103.9 KiB

README_mingw.txtH A D06-Sep-20103.5 KiB

README_mvc.txtH A D06-Sep-20103.7 KiB

ru.cp1251.poH A D06-Sep-2010128.4 KiB

ru.poH A D06-Sep-2010162.3 KiB

sjiscorr.cH A D06-Sep-2010932

sk.cp1250.poH A D06-Sep-2010144.3 KiB

sk.poH A D06-Sep-2010144.3 KiB

sv.poH A D06-Sep-2010146.1 KiB

uk.cp1251.poH A D06-Sep-2010161.8 KiB

uk.poH A D06-Sep-2010199.3 KiB

vi.poH A D06-Sep-2010141.1 KiB

zh_CN.cp936.poH A D06-Sep-2010133.7 KiB

zh_CN.poH A D06-Sep-2010133.7 KiB

zh_CN.UTF-8.poH A D06-Sep-2010144.4 KiB

zh_TW.poH A D06-Sep-2010115 KiB

zh_TW.UTF-8.poH A D06-Sep-2010124.7 KiB

README.txt

1TRANSLATING VIM MESSAGES
2
3In this directory you will find xx.po files, where "xx" is a language code.
4Each file contains the translation of English Vim messages for one language.
5The files are in "po" format, used by the gettext package.  Please refer to
6the gettext documentation for more information.
7
8The GNU gettext library, starting with version 0.10.37, supports converting
9messages from one encoding to another.  This requires that it was compiled
10with HAVE_ICONV.  The result is that the messages may be in any encoding
11supported by iconv and will be automatically converted to the currently used
12encoding.
13
14The GNU gettext library, starting with version 0.10.36, uses a new format for
15some encodings.  This follows the C99 standard for strings.  It means that
16when a multi-byte character includes the 0x5c byte, this is not recognized as
17a backslash.  Since this format is incompatible with Solaris, Vim uses the old
18format.  This is done by setting the OLD_PO_FILE_OUTPUT and OLD_PO_FILE_INPUT
19environment variables.  When you use the Makefile in this directory that will
20be done for you.  This does NOT work with gettext 0.10.36.  Don't use it, get
210.10.37.
22
23
24ON MS-WINDOWS
25
26The distributed files are generated on Unix, but this should also be possible
27on MS-Windows.  Download the gettext packages, for example from:
28
29	http://sourceforge.net/projects/gettext
30
31You might have to do the commands manually.  Example:
32
33   cd c:\vim\vim71
34   mkdir runtime\lang\ja\LC_MESSAGES
35   msgfmt -o runtime\lang\ja\LC_MESSAGES\vim.mo src\po\ja.po
36
37
38WHEN THERE IS A MISTAKE
39
40If you find there is a mistake in one of the translations, please report this
41to the maintainer of the translation.  His/her E-mail address is in the
42comments at the start of the file.  You can also see this with the ":messages"
43command in Vim when the translation is being used.
44
45
46CREATING A NEW PO FILE
47
48We will use "xx.po" as an example here, replace "xx" with the name of your
49language.
50
51- Edit Makefile to add xx to LANGUAGES and xx.mo to MOFILES.
52- Copy the header of an existing file, e.g., de.po, to xx.po.  Do not copy any
53  of the translated messages, delete everything after the "msgstr".
54- The remaining work is like updating, see the next section.
55
56
57UPDATING A PO FILE
58
59If you are the maintainer of a .po file, this is how you update the file.  We
60will use "xx.po" as an example here, replace "xx" with the name of your
61language.
62
63(1) Add new and changed messages from the Vim sources:
64
65	make xx
66
67    This will extract all the strings from Vim and merge them in with the
68    existing translations.  Requires the GNU gettext utilities.  Also requires
69    unpacking the extra archive.
70    Your original xx.po file will be copied to xx.po.orig
71
72    -- After you do this, you MUST do the next three steps! --
73
74(2) Translate
75    See the gettext documentation on how to do this.  You can also find
76    examples in the other po files.
77    Search the po file for items that require translation:
78
79	/fuzzy\|^msgstr ""\(\n"\)\@!
80
81    Remove the "#, fuzzy" line after adding the translation.
82
83    There is one special message:
84	msgid "Messages maintainer: Bram Moolenaar <Bram@vim.org>"
85    You should include your name and E-mail address instead, for example:
86	msgstr "Berichten �bersetzt bei: John Doe <john@doe.org>"
87
88(3) Clean up
89    This is very important to make sure the translation works on all systems.
90    Comment-out all non-translated strings.  There are two types:
91    - items marked with "#, fuzzy"
92    - items with an empty msgstr
93    You can do this with the cleanup.vim script:
94
95	:source cleanup.vim
96
97    Background: on Solaris an empty msgstr results in an empty message; GNU
98    gettext ignores empty strings and items marked with "#, fuzzy".
99
100    This also removes the line numbers from the file, so that patches are not
101    messed up by changes in line numbers and show the actual changes in the
102    text.
103
104(4) Check:
105
106	vim -S check.vim xx.po
107	make xx.mo
108
109    Look out for syntax errors and fix them.
110

README_mingw.txt

1TRANSLATING VIM MESSAGES
2
3This file explains how to create and maintain po files using
4gnu-gettext.win32, a MINGW32 Windows port of gettext by Franco Bez
5<franco.bez@gmx.de>.  You can find it at:
6
7	http://home.a-city.de/franco.bez/gettext/gettext_win32_en.html
8
9First read the README.txt file for the general remarks
10
11
12The file that does the work is Make_ming.mak in the po directory. It is an
13adaptation of the Unix Makefile, but it does NOT test the presence of any po,
14pot, or mo files, so use it at your own risk but with care: it could even kill
15your canary. It has been tested by me several times (and with different
16languages) with success.
17
18The make utility must be run from the po directory.
19
20First of all you must set the environment variable LANGUAGE to xx, where xx is
21the name of your language. You can do it from the command line or adding a
22line to your autoexec.bat file: set LANGUAGE=xx. You must also add your
23language to the Make_ming.mak file in the lines LANGUAGES, MOFILES, AND
24POFILES.
25
26If you don't have a xx.po file, you must create it with the command:
27
28	make -f Make_ming.mak first_time
29
30This will produce a new brand xx.po file with all the messages in Vim ready
31for translation. Then you must source the cleanup.vim script from inside Vim;
32it will comment the untranslated messages (now, all). I recommend to use
33syntax highlighting so you can identify the untranslated messages easily.
34You also must remove the '..\' that prepends the name of the source files.
35(I don't no why, but make is unable to change the directory from po to src and
36back to po, so all the work must be done from the po dir, hence the '..\')
37
38Then you must go step (2) below.
39
40If you are updating a po file you must follow the next steps (they are nearly
41the same as in the Unix case, only the commands change):
42
43(1) Add new and changed messages from the Vim sources:
44
45	make -f Make_ming.mak xx
46
47    This will extract all the strings from Vim and merge them in with the
48    existing translations.  Requires the GNU gettext utilities.  Also requires
49    unpacking the extra archive.
50    Your original xx.po file will be copied to xx.po.orig
51
52    -- After you do this, you MUST do the next three steps! --
53
54(2) Translate
55    See the gettext documentation on how to do this.  You can also find
56    examples in the other po files.
57    Search the po file for items that require translation:
58	/\#\~   and also the fuzzy translations, /\#, fuzzy
59    Remove "#~" and "#, fuzzy" after adding the translation.
60
61    There is one special message:
62	msgid "Messages maintainer: Bram Moolenaar <Bram@vim.org>"
63    You should include your name and E-mail address instead, for example:
64	msgstr "Berichten �bersetzt bei: John Doe <john@doe.org>"
65
66(3) Clean up
67    This is very important to make sure the translation works on all systems.
68    Comment-out all non-translated strings.  There are two types:
69    - items marked with "#, fuzzy"
70    - items with an empty msgstr
71    You can do this with the cleanup.vim script:
72
73	:source cleanup.vim
74
75(4) Check:
76
77	vim -S check.vim xx.po
78	make -f Make_ming.mak xx.mo
79
80    Look out for syntax errors and fix them.
81
82(5) This is an extra step, ;-). If you want the vim.mo file installed in your
83    system you must run:
84
85	make -f Make_ming.mak install
86
87    This will create the xx\LC_MESSAGES directory (if it does not exist) and
88    will copy vim.po to it.
89
90(6) Another extra step ;-)). The command:
91
92	make -f Make_ming.mak clean
93
94    will delete the temp files created during the process.
95
96Suggestions will be welcomed.
97
98Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
99
100Happy Vimming with NLS!!
101
102vim:tw=78:
103

README_mvc.txt

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