Mercurial > vim
annotate src/po/README_mvc.txt @ 34641:b41af4b613da v9.1.0206
patch 9.1.0206: unused display_text_first boolean var in win_line()
Commit: https://github.com/vim/vim/commit/c8b47f26d8ae0db2d65a1cd34d7e34a2c7a6b462
Author: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Date: Tue Mar 26 18:05:01 2024 +0100
patch 9.1.0206: unused display_text_first boolean var in win_line()
Problem: unused display_text_first boolean var in win_line()
Solution: Remove unused display_text_first boolean variable
(Dylan Thacker-Smith)
The only place it is used, uses its initial constant value, then the
following conditionally values set to the variable are unused.
Specifically, it was commit 234c3fab28c14846b962c90097496b27ee1b4df8
that changed the use of display_text_first such that it doesn't have any
effect.
closes: #14305
Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 26 Mar 2024 18:15:05 +0100 |
parents | c5a10c03afb8 |
children | c21bafafb59d |
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 |
34178
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
5 January 2024 the versions known to work are gettext 0.14.4, libiconv 1.9.2-1 |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
6 and expat 2.5.0. Gettext and libiconv can be found at: |
2472
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/ |
34178
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
13 or |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
14 https://github.com/libexpat/libexpat |
2472
3567e0d56891
Updated version of gettext for use with MVC. (Mike Williams)
Bram Moolenaar <bram@vim.org>
parents:
1121
diff
changeset
|
15 |
3567e0d56891
Updated version of gettext for use with MVC. (Mike Williams)
Bram Moolenaar <bram@vim.org>
parents:
1121
diff
changeset
|
16 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
|
17 the bin directory created from the gettext/libiconv packages. |
33823
45c0a5330758
patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
7374
diff
changeset
|
18 Or Michele Locati kindly provides precompiled binaries gettext 0.21 and |
45c0a5330758
patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
7374
diff
changeset
|
19 iconv 1.16 for Windows on his site: |
45c0a5330758
patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
7374
diff
changeset
|
20 |
45c0a5330758
patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
7374
diff
changeset
|
21 https://mlocati.github.io/articles/gettext-iconv-windows.html |
45c0a5330758
patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
7374
diff
changeset
|
22 |
7 | 23 First read the README.txt file in this directory for general remarks on |
24 translating Vim messages. | |
25 | |
26 | |
27 SETUP | |
28 | |
1121 | 29 Set the environment variable LANGUAGE to the language code for the language |
30 you are translating Vim messages to. Language codes are typically two | |
31 characters and you can find a list of them at: | |
7 | 32 |
34178
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
33 https://www.loc.gov/standards/iso639-2/php/code_list.php |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
34 https://www.science.co.il/language/Codes.php |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
35 https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes |
7 | 36 |
34178
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
37 Another possibility is to use the GnuWin32 port of gettext. This is |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
38 recommended especially if you use already GnuWin32 tools to gunzip, bunzip, |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
39 patch etc. these files. You find the GnuWin32 version of gettext here: |
1121 | 40 |
41 http://gnuwin32.sourceforge.net/packages/gettext.htm | |
42 | |
43 Yet another very strait forward way is to get the sources of gettext from | |
44 | |
45 http://www.gnu.org/software/gettext/gettext.html | |
46 | |
34178
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
47 and build your own version of these tools. The documentation states that this |
1121 | 48 should be possible with MSVC4.0, MSVC5.0, MSVC6.0 or MSVC7.0, but you can |
49 build it even successfully with MSVC8.0. | |
50 | |
7 | 51 The LANGUAGE environment variable can be set from the command line, by adding |
52 a line to your autoexec.bat file, or by defining a user variable from the | |
34178
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
53 Advanced tab in the System control panel. If the LANGUAGE environment |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
54 variable has not been set in any of the above ways, the value of this variable |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
55 will be set automatically according to the language used in the OS. This |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
56 value will be valid until the "nmake.exe" program terminates. |
7 | 57 |
58 Next, edit Make_mvc.mak so that GETTEXT_PATH points the binary directory of | |
1121 | 59 the installation. |
7 | 60 |
61 | |
62 CREATING A NEW TRANSLATION | |
63 | |
64 When creating a new translation you must add your language code to the | |
34178
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
65 Make_all.mak file in the lines defining LANGUAGES and MOFILES, POFILES and |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
66 CHECKFILES. If the encoding of the translation text differs from the default |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
67 UTF-8, add a corresponding entry in MOCONVERTED, specifying the required |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
68 encoding. |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
69 To create the initial .po file for your language you must use the command: |
7 | 70 |
34178
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
71 nmake.exe -f Make_mvc.mak first_time |
7 | 72 |
73 Note: You need to be in the po directory when using this makefile. | |
74 | |
75 Once you have your new .po file load it into Vim and source cleanup.vim, this | |
76 will convert untranslated messages to comments. If you have syntax | |
77 highlighting turned on then untranslated messages will stand out more easily. | |
78 | |
79 You will also need to edit the file names in the comments in the .po file. | |
80 You need to remove the absolute directory specification (which has the form | |
33823
45c0a5330758
patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
7374
diff
changeset
|
81 c:\vim91\src\). You can do this in Vim with the following command with the |
1121 | 82 appropriate directory specification for where you have installed the Vim |
7 | 83 source: |
84 | |
33823
45c0a5330758
patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
7374
diff
changeset
|
85 %s/c:\\vim91\\src\\//g |
7 | 86 |
87 | |
88 UPDATING A TRANSLATION | |
89 | |
90 If there are new or changed messages in Vim that need translating, then the | |
91 first thing to do is merge them into the existing translations. This is done | |
92 with the following command: | |
93 | |
34178
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
94 nmake.exe -f Make_mvc.mak xx |
7 | 95 |
1121 | 96 where xx is the language code for the language needing translations. The |
7 | 97 original .po file is copied to xx.po.orig. |
98 | |
99 | |
100 DOING THE TRANSLATION | |
101 | |
102 Now that you have a .po file you can do the translations for all messages that | |
103 need it. See README.txt for specific instructions. | |
104 | |
105 Once you have finished translating the messages you should make sure all | |
106 non-translated strings are commented out. This can be done by sourcing | |
107 cleanup.vim once again. | |
108 | |
109 | |
110 CHECKING THE TRANSLATION | |
111 | |
112 Check the translation with the following command: | |
113 | |
34178
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
114 nmake.exe -f Make_mvc.mak xx.ck |
7 | 115 |
34178
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
116 Correct any errors reported. When there are no more errors, the translation |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
117 is ready to be installed. |
7 | 118 |
119 | |
120 INSTALLING THE TRANSLATION | |
121 | |
122 Install your translation with the following command: | |
123 | |
34178
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
124 nmake.exe -f Make_mvc.mak install |
7 | 125 |
126 This will create the xx\LC_MESSAGES directory in runtime\lang if it does not | |
127 already exist. | |
7374
7e367104f6b6
commit https://github.com/vim/vim/commit/013806229a1e15480592f6bc8453130685ec750b
Christian Brabandt <cb@256bit.org>
parents:
2472
diff
changeset
|
128 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
|
129 |
34178
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
130 nmake.exe -f Make_mvc.mak install-all |
7 | 131 |
132 | |
34178
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
133 AFTER ALL OF THESE STEPS |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
134 |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
135 Clean the "po" directory of all temporary and unnecessary files. Execute the |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
136 command: |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
137 |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
138 nmake.exe -f Make_mvc.mak clean |
c5a10c03afb8
patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents:
33823
diff
changeset
|
139 |
7 | 140 vim:tw=78: |