Mercurial > vim
comparison src/po/README_mvc.txt @ 34178:c5a10c03afb8 v9.1.0044
patch 9.1.0044: po Makefiles can be improved
Commit: https://github.com/vim/vim/commit/76ba724e1d56b00e72834a9203855f0656dcbb58
Author: RestorerZ <restorer@mail2k.ru>
Date: Mon Jan 22 20:28:12 2024 +0100
patch 9.1.0044: po Makefiles can be improved
Problem: po Makefiles can be improved
Solution: Improve the style of the Makefiles, update
Makefile variables, update documentation
(RestorerZ)
closes: #13858
closes: #13857
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 22 Jan 2024 20:45:03 +0100 |
parents | 45c0a5330758 |
children |
comparison
equal
deleted
inserted
replaced
34177:72aee06c1d78 | 34178:c5a10c03afb8 |
---|---|
1 TRANSLATING VIM MESSAGES | 1 TRANSLATING VIM MESSAGES |
2 | 2 |
3 This file explains how to create and maintain po files using a number of | 3 This file explains how to create and maintain po files using a number of |
4 GnuWin packages. You will need gettext, libiconv and libexpat. As of | 4 GnuWin packages. You will need gettext, libiconv and libexpat. As of |
5 August 2010 the versions known to work are gettext 0.14.4, libiconv 1.9.2-1 | 5 January 2024 the versions known to work are gettext 0.14.4, libiconv 1.9.2-1 |
6 and expat 2.0.1. gettext and libiconv can be found at: | 6 and expat 2.5.0. Gettext and libiconv can be found at: |
7 | 7 |
8 http://gnuwin32.sourceforge.net/ | 8 http://gnuwin32.sourceforge.net/ |
9 | 9 |
10 expat can be found at: | 10 expat can be found at: |
11 | 11 |
12 http://sourceforge.net/projects/expat/ | 12 http://sourceforge.net/projects/expat/ |
13 or | |
14 https://github.com/libexpat/libexpat | |
13 | 15 |
14 expat will install into its own directory. You should copy libexpat.dll into | 16 expat will install into its own directory. You should copy libexpat.dll into |
15 the bin directory created from the gettext/libiconv packages. | 17 the bin directory created from the gettext/libiconv packages. |
16 | |
17 Or Michele Locati kindly provides precompiled binaries gettext 0.21 and | 18 Or Michele Locati kindly provides precompiled binaries gettext 0.21 and |
18 iconv 1.16 for Windows on his site: | 19 iconv 1.16 for Windows on his site: |
19 | 20 |
20 https://mlocati.github.io/articles/gettext-iconv-windows.html | 21 https://mlocati.github.io/articles/gettext-iconv-windows.html |
21 | 22 |
27 | 28 |
28 Set the environment variable LANGUAGE to the language code for the language | 29 Set the environment variable LANGUAGE to the language code for the language |
29 you are translating Vim messages to. Language codes are typically two | 30 you are translating Vim messages to. Language codes are typically two |
30 characters and you can find a list of them at: | 31 characters and you can find a list of them at: |
31 | 32 |
32 http://www.geocities.com/click2speak/languages.html | 33 https://www.loc.gov/standards/iso639-2/php/code_list.php |
34 https://www.science.co.il/language/Codes.php | |
35 https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes | |
33 | 36 |
34 Another possibility is to use the GnuWin32 port of gettext. This is | 37 Another possibility is to use the GnuWin32 port of gettext. This is |
35 recommended especially if you use already gnuwin32 tools to gunzip, bunzip, | 38 recommended especially if you use already GnuWin32 tools to gunzip, bunzip, |
36 patch etc. these files. You find the GnuWin32 version of gettext here: | 39 patch etc. these files. You find the GnuWin32 version of gettext here: |
37 | 40 |
38 http://gnuwin32.sourceforge.net/packages/gettext.htm | 41 http://gnuwin32.sourceforge.net/packages/gettext.htm |
39 | 42 |
40 Yet another very strait forward way is to get the sources of gettext from | 43 Yet another very strait forward way is to get the sources of gettext from |
41 | 44 |
42 http://www.gnu.org/software/gettext/gettext.html | 45 http://www.gnu.org/software/gettext/gettext.html |
43 | 46 |
44 and build your own version of these tools. The documentation states that this | 47 and build your own version of these tools. The documentation states that this |
45 should be possible with MSVC4.0, MSVC5.0, MSVC6.0 or MSVC7.0, but you can | 48 should be possible with MSVC4.0, MSVC5.0, MSVC6.0 or MSVC7.0, but you can |
46 build it even successfully with MSVC8.0. | 49 build it even successfully with MSVC8.0. |
47 | 50 |
48 The LANGUAGE environment variable can be set from the command line, by adding | 51 The LANGUAGE environment variable can be set from the command line, by adding |
49 a line to your autoexec.bat file, or by defining a user variable from the | 52 a line to your autoexec.bat file, or by defining a user variable from the |
50 Advanced tab in the System control panel. | 53 Advanced tab in the System control panel. If the LANGUAGE environment |
54 variable has not been set in any of the above ways, the value of this variable | |
55 will be set automatically according to the language used in the OS. This | |
56 value will be valid until the "nmake.exe" program terminates. | |
51 | 57 |
52 Next, edit Make_mvc.mak so that GETTEXT_PATH points the binary directory of | 58 Next, edit Make_mvc.mak so that GETTEXT_PATH points the binary directory of |
53 the installation. | 59 the installation. |
54 | 60 |
55 | 61 |
56 CREATING A NEW TRANSLATION | 62 CREATING A NEW TRANSLATION |
57 | 63 |
58 When creating a new translation you must add your language code to the | 64 When creating a new translation you must add your language code to the |
59 Make_all.mak file in the lines defining LANGUAGES and MOFILES. To create the | 65 Make_all.mak file in the lines defining LANGUAGES and MOFILES, POFILES and |
60 initial .po file for your language you must use the command: | 66 CHECKFILES. If the encoding of the translation text differs from the default |
67 UTF-8, add a corresponding entry in MOCONVERTED, specifying the required | |
68 encoding. | |
69 To create the initial .po file for your language you must use the command: | |
61 | 70 |
62 make -f make_mvc.mak first_time | 71 nmake.exe -f Make_mvc.mak first_time |
63 | 72 |
64 Note: You need to be in the po directory when using this makefile. | 73 Note: You need to be in the po directory when using this makefile. |
65 | 74 |
66 Once you have your new .po file load it into Vim and source cleanup.vim, this | 75 Once you have your new .po file load it into Vim and source cleanup.vim, this |
67 will convert untranslated messages to comments. If you have syntax | 76 will convert untranslated messages to comments. If you have syntax |
80 | 89 |
81 If there are new or changed messages in Vim that need translating, then the | 90 If there are new or changed messages in Vim that need translating, then the |
82 first thing to do is merge them into the existing translations. This is done | 91 first thing to do is merge them into the existing translations. This is done |
83 with the following command: | 92 with the following command: |
84 | 93 |
85 nmake -f Make_mvc.mak xx.po | 94 nmake.exe -f Make_mvc.mak xx |
86 | 95 |
87 where xx is the language code for the language needing translations. The | 96 where xx is the language code for the language needing translations. The |
88 original .po file is copied to xx.po.orig. | 97 original .po file is copied to xx.po.orig. |
89 | 98 |
90 | 99 |
100 | 109 |
101 CHECKING THE TRANSLATION | 110 CHECKING THE TRANSLATION |
102 | 111 |
103 Check the translation with the following command: | 112 Check the translation with the following command: |
104 | 113 |
105 nmake -f make_mvc.mak xx.mo | 114 nmake.exe -f Make_mvc.mak xx.ck |
106 | 115 |
107 Correct any syntax errors reported. When there are no more errors, the | 116 Correct any errors reported. When there are no more errors, the translation |
108 translation is ready to be installed. | 117 is ready to be installed. |
109 | 118 |
110 | 119 |
111 INSTALLING THE TRANSLATION | 120 INSTALLING THE TRANSLATION |
112 | 121 |
113 Install your translation with the following command: | 122 Install your translation with the following command: |
114 | 123 |
115 nmake -f make_mvc.mak install | 124 nmake.exe -f Make_mvc.mak install |
116 | 125 |
117 This will create the xx\LC_MESSAGES directory in runtime\lang if it does not | 126 This will create the xx\LC_MESSAGES directory in runtime\lang if it does not |
118 already exist. | 127 already exist. |
119 You can also use the following command to install all languages: | 128 You can also use the following command to install all languages: |
120 | 129 |
121 nmake -f make_mvc.mak install-all | 130 nmake.exe -f Make_mvc.mak install-all |
122 | 131 |
123 | 132 |
133 AFTER ALL OF THESE STEPS | |
134 | |
135 Clean the "po" directory of all temporary and unnecessary files. Execute the | |
136 command: | |
137 | |
138 nmake.exe -f Make_mvc.mak clean | |
139 | |
124 vim:tw=78: | 140 vim:tw=78: |