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