Skip to content

Commit 5208108

Browse files
authored
Merge pull request #923 from yfdyh000/innosetupi18n
Add localization support for Plus Installer
2 parents 050dbc8 + 4dbc620 commit 5208108

File tree

4 files changed

+841
-20
lines changed

4 files changed

+841
-20
lines changed

Installer/Languages.iss

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
; English is default language and can be translated to any
2+
; of the languages listed in the languages section.
3+
; The translations can be added to the CustomMessages section.
4+
; The content of this script will be included by Sandboxie-Plus.iss,
5+
; so please edit with care.
6+
7+
8+
[Languages]
9+
10+
Name: "english"; MessagesFile: "compiler:Default.isl"
11+
Name: "ChineseSimplified"; MessagesFile: "isl\ChineseSimplified.isl"
12+
Name: "ChineseTraditional"; MessagesFile: "isl\ChineseTraditional.isl"
13+
Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl"
14+
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
15+
Name: "Italian"; MessagesFile: "compiler:Languages\Italian.isl"
16+
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl"
17+
Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl"
18+
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
19+
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
20+
Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl"
21+
;Name: "armenian"; MessagesFile: "compiler:Languages\Armenian.isl"
22+
;Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
23+
;Name: "bulgarian"; MessagesFile: "compiler:Languages\Bulgarian.isl"
24+
;Name: "catalan"; MessagesFile: "compiler:Languages\Catalan.isl"
25+
;Name: "corsican"; MessagesFile: "compiler:Languages\Corsican.isl"
26+
;Name: "czech"; MessagesFile: "compiler:Languages\Czech.isl"
27+
;Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl"
28+
;Name: "finnish"; MessagesFile: "compiler:Languages\Finnish.isl"
29+
;Name: "french"; MessagesFile: "compiler:Languages\French.isl"
30+
;Name: "hebrew"; MessagesFile: "compiler:Languages\Hebrew.isl"
31+
;Name: "icelandic"; MessagesFile: "compiler:Languages\Icelandic.isl"
32+
;Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl"
33+
;Name: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl"
34+
;Name: "slovak"; MessagesFile: "compiler:Languages\Slovak.isl"
35+
;Name: "slovenian"; MessagesFile: "compiler:Languages\Slovenian.isl"
36+
;Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl"
37+
38+
39+
[CustomMessages]
40+
41+
; If you are going to provide a new translation in your language,
42+
; please add it after the last one in this section.
43+
44+
; English
45+
english.AddSandboxedMenu=Add "Run Sandboxed" to context menu
46+
english.CustomPageLabel1=Select Installation Type
47+
english.CustomPageLabel2=How should be installed
48+
english.CustomPageLabel3=Choose the installation mode
49+
english.CustomPageInstallMode=Install {#MyAppName} on this computer
50+
english.CustomPageUpgradeMode=Update existing {#MyAppName} installation
51+
english.CustomPagePortableMode=Extract all files to a directory for portable use
52+
english.RequiresWin7OrLater=Sandboxie-Plus requires Windows 7 or later.
53+
english.ClassicFound=Sandboxie Classic installation detected, it must be uninstalled first, do you want to uninstall it now?
54+
english.RunSandboxedMenu=Run &Sandboxed
55+
56+
; Chinese Simplified
57+
ChineseSimplified.AddSandboxedMenu=添加“在沙盘中运行”菜单
58+
ChineseSimplified.CustomPageLabel1=选择安装方式
59+
ChineseSimplified.CustomPageLabel2=应当如何安装
60+
ChineseSimplified.CustomPageLabel3=选择安装模式
61+
ChineseSimplified.CustomPageInstallMode=在这台计算机上安装 {#MyAppName}
62+
ChineseSimplified.CustomPageUpgradeMode=更新当前已安装的 {#MyAppName}
63+
ChineseSimplified.CustomPagePortableMode=提取全部文件到指定目录供便携化使用
64+
ChineseSimplified.RequiresWin7OrLater=Sandboxie-Plus 需要 Windows 7 或更高版本。
65+
ChineseSimplified.ClassicFound=检测到已安装 Sandboxie 原版,继续安装必须先将其卸载,是否开始卸载?
66+
ChineseSimplified.RunSandboxedMenu=在沙盘中运行(&S)
67+
68+
; Italian
69+
Italian.AddSandboxedMenu=Aggiungi l'opzione "Avvia nell'area virtuale" al menu contestuale
70+
Italian.CustomPageLabel1=Seleziona tipo di installazione
71+
Italian.CustomPageLabel2=Come dovrebbe essere installato
72+
Italian.CustomPageLabel3=Scegli la modalità di installazione
73+
Italian.CustomPageInstallMode=Installa {#MyAppName} su questo computer
74+
Italian.CustomPageUpgradeMode=Aggiorna l'installazione esistente di {#MyAppName}
75+
Italian.CustomPagePortableMode=Estrai tutti i file in una directory per uso portabile
76+
Italian.RequiresWin7OrLater=Sandboxie-Plus richiede Windows 7 o superiore.
77+
Italian.ClassicFound=È stata rilevata una installazione di Sandboxie Classic che potrebbe causare incompatibilità. Rimuoverla ora?
78+
Italian.RunSandboxedMenu=Avvia nell'&area virtuale

Installer/Sandboxie-Plus.iss

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#define MyAppName "Sandboxie-Plus"
2+
#include "Languages.iss"
23
;
34
; use commandline to populate:
45
; ISCC.exe /ORelease Sandboxie-Plus.iss /DMyAppVersion=%SbiePlusVer% /DMyDrvVersion=%SbieVer% /DMyAppArch=x64 /DMyAppSrc=SbiePlus64
@@ -46,34 +47,23 @@ Source: ".\Sandboxie-Plus.ini"; DestDir: "{app}"; Flags: ignoreversion onlyifdoe
4647

4748
[Icons]
4849
Name: "{group}\Sandboxie-Plus"; Filename: "{app}\SandMan.exe"; MinVersion: 0.0,5.0;
49-
Name: "{group}\Sandboxie-Plus Website"; Filename: "http://sandboxie-plus.com/"; MinVersion: 0.0,5.0;
50-
Name: "{group}\Uninstall Sandboxie-Plus"; Filename: "{uninstallexe}"; MinVersion: 0.0,5.0;
50+
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "http://sandboxie-plus.com/"; MinVersion: 0.0,5.0;
51+
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; MinVersion: 0.0,5.0;
5152
Name: "{userdesktop}\Sandboxie-Plus"; Filename: "{app}\SandMan.exe"; Tasks: DesktopIcon; MinVersion: 0.0,5.0;
5253
;Name: "{userstartup}\Sandboxie-Plus"; Filename: "{app}\SandMan.exe"; Tasks: AutoStartEntry;
5354

5455
;[Registry]
5556
;Root: HKCU; Subkey: "Software\{#MyAppName}"; ValueName: "{#MyAppName}_Autorun"; ValueType: string; ValueData: "1"; Flags: uninsdeletekey; Tasks: AutoStartEntry
5657

5758
[Tasks]
58-
Name: "DesktopIcon"; Description: "Create a &desktop icon"; MinVersion: 0.0,5.0; Check: not IsPortable
59-
Name: "AutoStartEntry"; Description: "Start when Windows starts"; MinVersion: 0.0,5.0; Check: not IsPortable
60-
Name: "AddRunSandboxed"; Description: "Add Run Sandboxed"; MinVersion: 0.0,5.0; Check: not IsPortable
59+
Name: "DesktopIcon"; Description: "{cm:CreateDesktopIcon}"; MinVersion: 0.0,5.0; Check: not IsPortable
60+
Name: "AutoStartEntry"; Description: "{cm:AutoStartProgram,{#MyAppName}}"; MinVersion: 0.0,5.0; Check: not IsPortable
61+
Name: "AddRunSandboxed"; Description: "{cm:AddSandboxedMenu}"; MinVersion: 0.0,5.0; Check: not IsPortable
6162

6263
[Messages]
6364
; Include with commandline /? message.
6465
HelpTextNote=/PORTABLE=1%nEnable portable mode.%n
6566

66-
;[Languages]
67-
68-
[CustomMessages]
69-
CustomPageLabel1=Select Installation Type
70-
CustomPageLabel2=How should be installed
71-
CustomPageLabel3=Choose the installation mode
72-
CustomPageInstallMode=Install {#MyAppName} on this computer
73-
CustomPageUpgradeMode=Update existing {#MyAppName} installation
74-
CustomPagePortableMode=Extract all files to a directory for portable use
75-
76-
7767
[Code]
7868
var
7969
CustomPage: TInputOptionWizardPage;
@@ -218,7 +208,7 @@ begin
218208
219209
if (Version.NTPlatform = False) or (Version.Major < 6) then
220210
begin
221-
SuppressibleMsgBox('Sandboxie-Plus requires Windows 7 or later.', mbError, MB_OK, MB_OK);
211+
SuppressibleMsgBox(CustomMessage('RequiresWin7OrLater'), mbError, MB_OK, MB_OK);
222212
Result := False;
223213
exit;
224214
end;
@@ -229,7 +219,7 @@ begin
229219
230220
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Sandboxie', 'UninstallString', UninstallString) then begin
231221
232-
ExecRet := MsgBox('Sandboxie Classic installation detected, it must be uninstalled first, do you want to uninstall it now?', mbConfirmation, MB_YESNOCANCEL);
222+
ExecRet := MsgBox(CustomMessage('ClassicFound'), mbConfirmation, MB_YESNOCANCEL);
233223
if ExecRet = IDCANCEL then
234224
begin
235225
Result := False;
@@ -361,11 +351,11 @@ begin
361351
362352
if WizardIsTaskSelected('AddRunSandboxed') then
363353
begin
364-
RegWriteStringValue(HKEY_CURRENT_USER, 'software\classes\*\shell\sandbox', '', 'Run &Sandboxed');
354+
RegWriteStringValue(HKEY_CURRENT_USER, 'software\classes\*\shell\sandbox', '', CustomMessage('RunSandboxedMenu'));
365355
RegWriteStringValue(HKEY_CURRENT_USER, 'software\classes\*\shell\sandbox', 'Icon', ExpandConstant('"{app}\start.exe"'));
366356
RegWriteStringValue(HKEY_CURRENT_USER, 'software\classes\*\shell\sandbox\command', '', ExpandConstant('"{app}\SandMan.exe"') +' /box:__ask__ "%1" %*');
367357
368-
RegWriteStringValue(HKEY_CURRENT_USER, 'software\classes\Folder\shell\sandbox', '', 'Run &Sandboxed');
358+
RegWriteStringValue(HKEY_CURRENT_USER, 'software\classes\Folder\shell\sandbox', '', CustomMessage('RunSandboxedMenu'));
369359
RegWriteStringValue(HKEY_CURRENT_USER, 'software\classes\Folder\shell\sandbox', 'Icon', ExpandConstant('"{app}\start.exe"'));
370360
RegWriteStringValue(HKEY_CURRENT_USER, 'software\classes\Folder\shell\sandbox\command', '', ExpandConstant('"{app}\SandMan.exe"') +' /box:__ask__ C:\WINDOWS\Explorer.exe "%1"');
371361
end;

0 commit comments

Comments
 (0)