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
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
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 First read the README.txt file in this directory for general remarks on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 translating Vim messages.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 SETUP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
29 Set the environment variable LANGUAGE to the language code for the language
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
30 you are translating Vim messages to. Language codes are typically two
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
31 characters and you can find a list of them at:
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
40
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
41 http://gnuwin32.sourceforge.net/packages/gettext.htm
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
42
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
43 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
44
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
45 http://www.gnu.org/software/gettext/gettext.html
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
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
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
48 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
49 build it even successfully with MSVC8.0.
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
50
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 The LANGUAGE environment variable can be set from the command line, by adding
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 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
59 the installation.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 CREATING A NEW TRANSLATION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 Note: You need to be in the po directory when using this makefile.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 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
76 will convert untranslated messages to comments. If you have syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 highlighting turned on then untranslated messages will stand out more easily.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 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
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
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
82 appropriate directory specification for where you have installed the Vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 source:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
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 UPDATING A TRANSLATION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 If there are new or changed messages in Vim that need translating, then the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 first thing to do is merge them into the existing translations. This is done
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 with the following command:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
96 where xx is the language code for the language needing translations. The
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 original .po file is copied to xx.po.orig.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 DOING THE TRANSLATION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 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
103 need it. See README.txt for specific instructions.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 Once you have finished translating the messages you should make sure all
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 non-translated strings are commented out. This can be done by sourcing
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 cleanup.vim once again.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 CHECKING THE TRANSLATION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 Check the translation with the following command:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 INSTALLING THE TRANSLATION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 Install your translation with the following command:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 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
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 vim:tw=78: