Skip to content

Commit f877040

Browse files
RestorerZchrisbra
authored andcommitted
nsis: added support for pt-BR to installer and update README.txt
Prepare for PR #16692 which will eventually bring pt-br translation to the installer and add some clarification on how to test the installer with different languages closes: #16725 Signed-off-by: RestorerZ <restorer@mail2k.ru> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 25b16d6 commit f877040

2 files changed

Lines changed: 32 additions & 2 deletions

File tree

nsis/gvim.nsi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NSIS file to create a self-installing exe for Vim.
22
# It requires NSIS version 3.0 or later.
3-
# Last Change: 2025 Jan 05
3+
# Last Change: 2025 Feb 24
44

55
Unicode true
66

@@ -806,7 +806,8 @@ Function .onInit
806806
ClearErrors
807807
System::Call 'kernel32::GetUserDefaultLocaleName(t.r19, *i${NSIS_MAX_STRLEN})'
808808
StrCmp $R9 "zh-cn" coincide 0
809-
StrCmp $R9 "zh-tw" 0 part
809+
StrCmp $R9 "zh-tw" coincide 0
810+
StrCmp $R9 "pt-br" 0 part
810811
coincide:
811812
System::Call 'User32::CharLower(t r19 r19)*i${NSIS_MAX_STRLEN}'
812813
${StrRep} $lng_usr "$R9" "-" "_"

nsis/lang/README.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ allowable length of strings. For example:
1818
drop-down lists on the .vimrc page - 55 characters.
1919
Characters in this case mean characters of the English alphabet.
2020

21+
Once the message translation file is ready, it must be included in the
22+
"gvim.nsi" file.
23+
Find the line "# Include support for other languages:" in the file "gvim.nsi"
24+
and specify the name of the file with your translation below the line
25+
!if ${HAVE_MULTI_LANG}, similar to the entries already there. File names are
26+
specified in alphabetical order.
27+
2128
If you do not yet have a translated "LICENSE" file and/or a main "README.txt"
2229
file, set the following values:
2330

@@ -32,3 +39,25 @@ variables similarly to what is done in the other translation files.
3239
Translation files should be located in the "lang" subdirectory of the root
3340
directory. The name of the files is as follows: "README.xx.txt", where xx is the
3441
language code according to ISO639.
42+
43+
44+
There are two ways to test the installer in different languages:
45+
46+
1. Find and uncomment the "!define MUI_LANGDLL_ALWAYSSHOW" line in the
47+
"gvim.nsi" file and rebuild the installer.
48+
Now every time you run it, you will see a dialog box with the possibility to
49+
select the language of the installer.
50+
51+
2. If the Vim editor is already installed in your system, delete the
52+
"Installer Language" parameter in the Windows registry under
53+
"HKEY_CURRENT_USER\Software\Vim".
54+
Or you can create a file "NoLangInstallerVim.reg" with the following content:
55+
56+
Windows Registry Editor Version 5.00
57+
58+
[HKEY_CURRENT_USER\Software\Vim]
59+
"Installer Language"=-
60+
61+
and apply it by double-clicking on it.
62+
After these steps, when you start the installer, a window with the installer
63+
language selection will also be displayed.

0 commit comments

Comments
 (0)