浏览代码

Make our HelpTextNote work under other languages as well. The idea to make it localizable without having a translation for all languages doesn't work.

Martijn Laan 6 年之前
父节点
当前提交
b91ca4d5fd
共有 5 个文件被更改,包括 13 次插入32 次删除
  1. 0 9
      Files/Languages/Setup/Default.isl
  2. 0 14
      Files/Languages/Setup/Italian.isl
  3. 3 1
      ISHelp/isetup.xml
  4. 9 7
      setup.iss
  5. 1 1
      whatsnew.htm

+ 0 - 9
Files/Languages/Setup/Default.isl

@@ -1,9 +0,0 @@
-; *** Inno Setup version 5.7.0+ English installer messages ***
-;
-; Note: When translating this text, do not add periods (.) to the end of
-; messages that didn't have them already, because on those messages Inno
-; Setup adds the periods automatically (appending a period would result in
-; two periods being displayed).
-
-[Messages]
-HelpTextNote=/PORTABLE=1%nEnable portable mode.

+ 0 - 14
Files/Languages/Setup/Italian.isl

@@ -1,14 +0,0 @@
-; *** Inno Setup version 6.0.0+ Italian installer messages ***
-;
-; Note: When translating this text, do not add periods (.) to the end of
-; messages that didn't have them already, because on those messages Inno
-; Setup adds the periods automatically (appending a period would result in
-; two periods being displayed).
-;
-; Italian.isl - Last Update: 03.07.2018  by bovirus ([email protected])
-;
-; Translator name:   bovirus
-; Translator e-mail: [email protected]
-
-[Messages]
-HelpTextNote=/PORTABLE=1%nAbilita modo portatile.

+ 3 - 1
ISHelp/isetup.xml

@@ -2170,7 +2170,7 @@ ButtonNext=&Forward >
 en.ButtonNext=&Forward >
 </precode>
 
-<heading>Special-purpose IDs</heading>
+<heading>Special-purpose messages</heading>
 
 <p>The <a name="BeveledLabel"><tt>BeveledLabel</tt></a> message can be used to specify a line of text that is shown in the lower left corner of the wizard window and uninstaller window. The following is an example:</p>
 
@@ -2186,6 +2186,8 @@ BeveledLabel=Inno Setup
 HelpTextNote=/PORTABLE=1%nEnable portable mode.
 </precode>
 
+<p>These special-purpose messages default to an empty string so make sure to provide a non-empty default for all languages from your main script if you want to use these messages.</p>
+
 </body>
 </topic>
 

+ 9 - 7
setup.iss

@@ -44,13 +44,14 @@ SignedUninstaller=yes
   #if MatchingExtension(FileName, FindBaseExtension) ; Some systems also return .islu files when asked for *.isl
     #define Name LowerCase(RemoveFileExt(FileName))
     #define MessagesFile FindPathName + FileName
-    #define CustomMessagesFile FindPathName + 'Setup\' + Name + '.' + FindBaseExtension
-    #pragma message "Generating [Languages] entry with name " + Name + ": " + MessagesFile + ', ' + CustomMessagesFile
-    #if FileExists(CustomMessagesFile)
-      Name: {#Name}; MessagesFile: "{#MessagesFile},{#CustomMessagesFile}"
-    #else
+    //#define CustomMessagesFile FindPathName + 'Setup\' + Name + '.' + FindBaseExtension
+    //#if FileExists(CustomMessagesFile)
+    //  #pragma message "Generating [Languages] entry with name " + Name + ": " + MessagesFile + ' & ' + CustomMessagesFile
+    //  Name: {#Name}; MessagesFile: "{#MessagesFile},{#CustomMessagesFile}"
+    //#else
+      #pragma message "Generating [Languages] entry with name " + Name + ": " + MessagesFile
       Name: {#Name}; MessagesFile: "{#MessagesFile}"
-    #endif
+    //#endif
   #endif
 #endsub
 
@@ -79,11 +80,12 @@ SignedUninstaller=yes
   DoFindFiles
 
 [Languages]
-Name: english; MessagesFile: "files\Default.isl,files\Languages\Setup\Default.isl"
+Name: english; MessagesFile: "files\Default.isl"
 ; Generate [Languages] entries for all official translations
 #expr FindFiles("files\Languages\", "isl")
 
 [Messages]
+HelpTextNote=/PORTABLE=1%nEnable portable mode.
 ; Two "Setup" on the same line looks weird, so put a line break in between
 english.WelcomeLabel1=Welcome to the Inno Setup%nSetup Wizard
 

+ 1 - 1
whatsnew.htm

@@ -69,7 +69,7 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
 <ul>
   <li>Using event attributes it is now possible to have multiple implementations of the same event function in your script. This is especially useful in included scripts implementing an event function to avoid conflicts with the main script. See the help file for more information and the <i>CodeExample1.iss</i> example script for an example.</li>
   <li>[Setup] section directives <tt>ChangesAssociations</tt> and <tt>ChangesEnvironment</tt> may now be set to a boolean expression, which may contain calls to check functions.</li>
-  <li>Added new special-purpose <i>HelpTextNote</i> message that can be used to specify one or more lines of text that are added to the list of parameters in the summary shown when passing /HELP on the command line.</li>
+  <li>Added new special-purpose <i>HelpTextNote</i> message that can be used to specify one or more lines of text that are added to the list of parameters in the summary shown when passing /HELP on the command line. This message defaults to an empty string so make sure to provide a non-empty default for all languages from your main script if you want to use it.</li>
   <li>Added new <tt>SameStr</tt> and <tt>SameText</tt> support functions.</li>
   <li>Renamed the <tt>IsAdminLoggedOn</tt> support function to <tt>IsAdmin</tt>. The old name is still supported, but it is recommended to update your scripts to the new name.</li>
 </ul>