[Initranslator-svncheckins] SF.net SVN: initranslator: [122] translator/trunk
Brought to you by:
peter3
|
From: <pe...@us...> - 2006-11-14 10:42:14
|
Revision: 122
http://svn.sourceforge.net/initranslator/?rev=122&view=rev
Author: peter3
Date: 2006-11-14 02:41:53 -0800 (Tue, 14 Nov 2006)
Log Message:
-----------
- More on plugins
- Added plugins to help file contents
- safecall added to ILocalizable method
Modified Paths:
--------------
translator/trunk/help/Index.hhk
translator/trunk/help/Index.html
translator/trunk/help/Plugins.html
translator/trunk/help/toc.hhc
translator/trunk/help/translator.hhp
translator/trunk/setup/IniTransCommon.iss
translator/trunk/setup/translator.fbp5
translator/trunk/src/MainFrm.pas
translator/trunk/src/TransIntf.pas
translator/trunk/src/XilisoftPlugin/XilisoftParserImpl.pas
Modified: translator/trunk/help/Index.hhk
===================================================================
--- translator/trunk/help/Index.hhk 2006-11-13 17:07:20 UTC (rev 121)
+++ translator/trunk/help/Index.hhk 2006-11-14 10:41:53 UTC (rev 122)
@@ -102,6 +102,26 @@
<param name="Local" value="Appendix B.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+ <param name="Name" value="ILocalizable">
+ <param name="Name" value="Plugins">
+ <param name="Local" value="Plugins.html">
+ </OBJECT>
+ <LI> <OBJECT type="text/sitemap">
+ <param name="Name" value="Writing plugins">
+ <param name="Name" value="Plugins">
+ <param name="Local" value="Plugins.html">
+ </OBJECT>
+ <LI> <OBJECT type="text/sitemap">
+ <param name="Name" value="Register plugin">
+ <param name="Name" value="Plugins">
+ <param name="Local" value="Plugins.html">
+ </OBJECT>
+ <LI> <OBJECT type="text/sitemap">
+ <param name="Name" value="IApplicationServices.">
+ <param name="Name" value="Plugins">
+ <param name="Local" value="Plugins.html">
+ </OBJECT>
+ <LI> <OBJECT type="text/sitemap">
<param name="Name" value="Beneath">
<param name="Name" value="The Preferences Dialog">
<param name="Local" value="Preferences dialog.html">
@@ -1555,6 +1575,21 @@
<param name="Local" value="..\MPL-1.1.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+ <param name="Name" value="Plugins">
+ <param name="Name" value="Plugins">
+ <param name="Local" value="Plugins.html">
+ </OBJECT>
+ <LI> <OBJECT type="text/sitemap">
+ <param name="Name" value="IFileParser">
+ <param name="Name" value="Plugins">
+ <param name="Local" value="Plugins.html">
+ </OBJECT>
+ <LI> <OBJECT type="text/sitemap">
+ <param name="Name" value="IToolItem">
+ <param name="Name" value="Plugins">
+ <param name="Local" value="Plugins.html">
+ </OBJECT>
+ <LI> <OBJECT type="text/sitemap">
<param name="Name" value="Portions">
<param name="Name" value="Mozilla Public License version 1.1">
<param name="Local" value="..\MPL-1.1.html">
Modified: translator/trunk/help/Index.html
===================================================================
--- translator/trunk/help/Index.html 2006-11-13 17:07:20 UTC (rev 121)
+++ translator/trunk/help/Index.html 2006-11-14 10:41:53 UTC (rev 122)
@@ -27,6 +27,7 @@
<img border="0" src="images/HelpItem.jpg" width="16" height="16"><a href="Configure%20Keyboard%20Dialog.html">The Configure Keyboard Dialog</a><br />
<img border="0" src="images/HelpItem.jpg" width="16" height="16"><a href="Icons%20in%20the%20ListView.html">Icons in the ListView</a><br />
<img border="0" src="images/HelpItem.jpg" width="16" height="16"><a href="Command-line%20interface.html">The Command-line Interface</a><br />
+ <img border="0" src="images/HelpItem.jpg" width="16" height="16"><a href="Plugins.html">Plugins</a><br />
<img border="0" src="images/HelpItem.jpg" width="16" height="16"><a href="Known%20issues.html">Known Issues</a>
</dl>
@@ -34,8 +35,9 @@
<dl>
<dd>
- <img border="0" src="images/HelpItem.jpg" width="16" height="16"><a href="MSTermBuild.html">MS Terminology Translations Builder</a>
<br />
-
+ <img border="0" src="images/HelpItem.jpg" width="16" height="16"><a href="MSTermBuild.html">MS Terminology Translations Builder</a>
+<br />
+
<img border="0" src="images/HelpItem.jpg" width="16" height="16"><a href="MSDictBuild.html">MS Dictionary Builder</a>
</dd>
</dl>
Modified: translator/trunk/help/Plugins.html
===================================================================
--- translator/trunk/help/Plugins.html 2006-11-13 17:07:20 UTC (rev 121)
+++ translator/trunk/help/Plugins.html 2006-11-14 10:41:53 UTC (rev 122)
@@ -21,53 +21,56 @@
tool that fulfills these requirements :</p>
<ol>
<li>it must understand interfaces </li>
- <li>it must create pure 32-bit Windows DLL files</li>
+ <li>it must be able to create pure 32-bit Windows DLL files</li>
</ol>
<p> </p>
<p>The following discussion assumes Delphi syntax, but you can use any tool that
supports the requirements above. </p>
<p> </p>
+<p class="InfoField"><b>Note</b> <br>
+<br>
+When a function or method returns a <b>HResult</b>, you should generally return
+<b>S_OK</b> if the method executed normally, <b>S_FALSE</b> otherwise. If any
+other return value is expected, it is described in the documentation.<br>
+ </p>
+<p> </p>
<h4>Writing a file parser</h4>
<p>A file parser imports and exports file data to/from IniTranslator. It doesn't
-matter to IniTranslator in what format the data is stored, as long as it can be
+matter to IniTranslator in what format the data is stored as long as it can be
translated to the concept of a Original-Translation pair. A file parser must
implement the IFileParser interface:</p>
<p> </p>
-<pre>type
+<pre><b>type</b>
IFileParser = <b>interface</b>(IInterface)
-<i><font color="#000080"> </font></i>function ExportItems(const Items, Orphans: ITranslationItems): HResult;
- function ImportItems(const Items, Orphans: ITranslationItems): HResult;
- function DisplayName(Capability: integer): WideString;
- function Capabilities: integer;
- function Configure(Capability: integer): HResult;
- procedure Init(const ApplicationServices: IApplicationServices);
- end;</pre>
+ <font color="#000080">['{3E556846-9B4D-4722-B48F-48D020715509}']</font>
+<i><font color="#000080"> </font></i><b>function</b> ExportItems(<b>const</b> Items, Orphans: ITranslationItems): HResult; <b>safecall</b>;
+ <b>function</b> ImportItems(<b>const</b> Items, Orphans: ITranslationItems): HResult; <b>safecall</b>;
+ <b>function</b> DisplayName(Capability: integer): WideString; <b>safecall</b>;
+ <b>function</b> Capabilities: integer; <b>safecall</b>;
+ <b>function</b> Configure(Capability: integer): HResult; <b>safecall</b>;
+ <b>procedure</b> Init(<b>const</b> ApplicationServices: IApplicationServices); <b>safecall</b>;
+ <b>end</b>;</pre>
<p><b>ExportItems </b>is called whenever the user has chosen to export the items
in IniTranslator using this file parser. You should provide a preview dialog
where the user can see the effect of his changes, provide additional options if
necessary and save the file if the user so chooses. A generic Delphi export form
is provided in the source sohould you need one or you could build your own.</p>
-<p> </p>
<p><b>ImportItems </b>is called whenever the user chooses to import a file using
this parser. You should provide a dialog where the user can select the file(s)
to import and provide any additional options required to succesfully improt a
file.</p>
-<p> </p>
<p><b>DisplayName </b>is called whenever IniTranslator needs to display info
about the plugin in the UI. Capability is either CAP_IMPORT or CAP_EXPORT
indicating which string is required.</p>
-<p> </p>
<p><b>Capabilities </b>is called by Initransaltor to determine if the file
parser supports importing, exporting or bith. Additionally, if your plugin
provide some type of configuration dialog you can return this capability as well.
The return value of Capabilities is a combination of the values CAP_IMPORT,
CAP_EXPORT and CAP_CONFIGURE</p>
-<p> </p>
<p><b>Configure </b>is called either when the user clicks the Configure button
in the UI or when he elects to import/export using this parser. Capability
indicates whether this request originated in the import (CAP_IMPORT) or export (CAP_EXPORT)
dialog.</p>
-<p> </p>
<p><b>Init</b> is called before any other methods of the plugin. You should
store an internal reference to the IApplicationServices interface if you plan to
use any of its services later on (like calling the Translate method). If you are
@@ -77,61 +80,104 @@
original ApplicationHandle. This ensures that any dialogs that your plugin
displays, will behave correctly with IniTranslator.</p>
<p> </p>
-<p> </p>
<h4>Writing a tool plugin</h4>
-<p> </p>
+<p>A tool plugin works on the items loaded into IniTranslator. Typical usage is
+performing a specific action on one or more items in the list, providing an
+alternative editing experience or viewing the data in another format. The IToolItem
+interface definition look like this:</p>
+<pre><b>type</b>
+ IToolItem = <b>interface</b>(IInterface)
+ <font color="#000080">['{E14F5620-0EC9-43B5-816C-1A265C3FF237}']
+</font> <b>function </b>DisplayName: WideString; <b>safecall</b>;
+ <b>function </b>About: WideString; <b>safecall</b>;
+ <b>function </b>Status(<b>const </b>Items, Orphans: ITranslationItems; <b>const </b>SelectedItem: ITranslationItem): Integer; <b>safecall</b>;
+ <b>function </b>Icon: LongWord; <b>safecall</b>;
+ <b>function </b>Execute(<b>const </b>Items, Orphans: ITranslationItems; <b>var </b>SelectedItem: ITranslationItem): HResult; <b>safecall</b>;
+ <b>procedure </b>Init(<b>const </b>ApplicationServices: IApplicationServices); <b>safecall</b>;
+ <b>end</b>;
+</pre>
+<p><b>DisplayName </b>should return the text to show in the UI (on a menu item
+or similar)</p>
+<p><b>About </b>should return a string that in more detail describes the plugin,
+information about the creator etc (currently not used)</p>
+<p><b>Status</b> should return the current status of the plugin. Use the passed
+in parameters to help you determine whether to enable or disable the plugin. The
+valid values you can return is a bit-wise combination of the constants <b>
+TOOL_VISIBLE, TOOL_ENABLED, TOOL_CHECKED</b>. You should treat the parameters as
+read-only in this method, i.e don\xE4t try to add, edit or delete items in the
+lists.</p>
+<p><b>Icon</b> should return a handle to an icon (not currently used). Return 0
+if there is no icon</p>
+<p><b>Execute</b> is called when the user activates the plugin (currently by
+clicking the menu item). This is where the plugin does its work. You can add,
+delete and modify the items in the Items and Orphans list and you can change the
+value of the SelectedItem if you like. The UI is frozen until you return from
+this method.</p>
+<p><b>Init</b> is called before any other methods of the plugin. You should
+store an internal reference to the IApplicationServices interface if you plan to
+use any of its services later on (like calling the Translate method). If you are
+planning on displaying dialogs of your own (most file parses do), you should at
+least store the DLL's current ApplicationHandle, change it to use IApplicationServices.AppHandle and, when the DLL is unloaded, restore the
+original ApplicationHandle. This ensures that any dialogs that your plugin
+displays, will behave correctly with IniTranslator.</p>
<h4>Registering a plugin</h4>
<p>Every plugin must export one or more functions from the DLL that tells
-IniTranslator that it is available. Due to the internal structure of
-IniTransaltor, a DLL can only contain one single file parser, but you can have
-as meny tool plugins as you like. </p>
+IniTranslator that a plugin available from the DLL. Due to the internal structure of IniTranslator, a DLL can only contain one single file parser, but you can have
+as meny tool plugins as you like.</p>
+<p> </p>
<p>To register a file parser, export a function named <font color="#000080"><i>
"RegisterTransFileParser001"</i> </font>with the following signature:</p>
-<pre>function (out Parser: IFileParser): HResult;
+<pre><b>function </b>(<b>out </b>Parser: IFileParser): HResult; <b>stdcall</b>;</pre>
+<pre>When this function is called, you should create an instance of a class that implements IFileParser and return it in the Parser variable.
</pre>
<p>To register your tool plugins, export a function named <i>
<font color="#000080">"RegisterTransToolItems001"</font></i> with the following
signature:</p>
-<pre>function (out ToolItems: IToolItems): HResult;
+<pre><b>function </b>(<b>out </b>ToolItems: IToolItems): HResult; <b>stdcall</b>;
</pre>
<p>Note that this function actually returns an interface that can hold a list of
-IToolItem and thus you can register more than one tool plugin per DLL.</p>
+IToolItem and thus you can register more than one tool plugin per DLL. When this
+function is called, you should create an instance of a class that implements
+IToolItems and return it in the ToolItems variable.</p>
<p> </p>
<h4>Supporting localization</h4>
<p>Not only is IniTranslator a translation tool, but it also supports having its
own UI translated. IniTranslator uses text files in ini file format with the
extension .lng for its own language files. These files can be edited with
-IniTranslator (this is a typical example of "eating your own dog food"). You can
-use the IniTranslator transaltion mechanism in your plugins by performing two
+IniTranslator itself. You can
+use the IniTranslator translation mechanism in your plugins by performing two
simple steps:</p>
<p> </p>
<ol>
<li>Implement the ILocalizable interface in each of your file parsers and/or
tool plugins</li>
- <li>Call IApplicationServices.Translate whenever you nned to display a text
+ <li>Call IApplicationServices.Translate whenever you need to display a text
in your plugins UI </li>
</ol>
<p> </p>
-<p>The ILocalizable interface is declared like this:</p>
-<pre>ILocalizable = interface(IInterface)
- function GetString(out Section:WideString; out Name:WideString; out Value:WideString):WordBool;
-end;</pre>
+<p>The ILocalizable interface looks like this:</p>
+<pre><b>type</b>
+ ILocalizable = <b>interface</b>(IInterface)
+ <font color="#000080">['{E10D0143-B334-4CCE-898A-F25384D79C6E}']
+</font> <b>function </b>GetString(<b>out </b>Section:WideString; <b>out </b>Name:WideString; <b>out </b>Value:WideString):WordBool;<b> stdcall</b>;
+ <b>end</b>;</pre>
<p>This is a very simple interface with only one method and the only thing you
need to do is to supply a new Name/Value pair every time the method is called.
You should also supply at least one Section name that is unique to you, your
company or your plugin (you can use several Section names if you like). Return
-true as long as Section, Name and Value contains valid values. </p>
+true as long as Section, Name and Value contains valid values. Do not include
+carriage returns or line feeds in the strings. Instead, encode these as "\r\n"
+or use another scheme you prefer.</p>
<p> </p>
-<p>This method is only ever called when the user wants to create a new
+<p>This method is only called when the user creates a new
translation template for IniTranslator. This is not something users do
regularily. In fact, most users never do it, opting to use default.lng or
another language file in the languages folder of their installation.</p>
<p> </p>
<p>To access the translated strings at runtime (they might not be translated;
-depends on whether the user has a UI language file loaded or not), use the <b>
+this depends on whether the user has a UI language file loaded or not), use the <b>
IApplicationServices.Translate(Section, Name, Value)</b> method, passing in the
-same Section and Name values as you used when <b>ILocalizable.GetString </b>was
-called. As for Value, use the default value for the string. If the user has an .lng
+same Section and Name as you returned from <b>ILocalizable.GetString</b>. As for Value, use the default value for the string. If the user has a .lng
file loaded and a translation for your string was found, the translation is
returned. If no string was found, the default Value is returned instead.<br>
</p>
Modified: translator/trunk/help/toc.hhc
===================================================================
--- translator/trunk/help/toc.hhc 2006-11-13 17:07:20 UTC (rev 121)
+++ translator/trunk/help/toc.hhc 2006-11-14 10:41:53 UTC (rev 122)
@@ -33,7 +33,6 @@
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Trimming">
<param name="Local" value="Trim.html">
- <param name="New" value="1">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Suspicious translations">
@@ -75,13 +74,17 @@
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Icons in the ListView">
<param name="Local" value="Icons in the ListView.html">
- <param name="New" value="1">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="The Command-line Interface">
<param name="Local" value="Command-line interface.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+ <param name="Name" value="Plugins">
+ <param name="Local" value="Plugins.html">
+ <param name="New" value="1">
+ </OBJECT>
+ <LI> <OBJECT type="text/sitemap">
<param name="Name" value="Known Issues">
<param name="Local" value="Known issues.html">
</OBJECT>
Modified: translator/trunk/help/translator.hhp
===================================================================
--- translator/trunk/help/translator.hhp 2006-11-13 17:07:20 UTC (rev 121)
+++ translator/trunk/help/translator.hhp 2006-11-14 10:41:53 UTC (rev 122)
@@ -33,6 +33,7 @@
Appendix C.html
Appendix D.html
Command-line interface.html
+Plugins.html
Known issues.html
Preferences dialog.html
..\MPL-1.1.html
Modified: translator/trunk/setup/IniTransCommon.iss
===================================================================
--- translator/trunk/setup/IniTransCommon.iss 2006-11-13 17:07:20 UTC (rev 121)
+++ translator/trunk/setup/IniTransCommon.iss 2006-11-14 10:41:53 UTC (rev 122)
@@ -1,6 +1,6 @@
#define AppName "Ini Translator"
-#define AppVersion "1.9.0.36"
-#define AppShortVersion "19036"
+#define AppVersion "1.9.0.37"
+#define AppShortVersion "19037"
#define GroupName "Ini Translator"
#define URL "http://initranslator.sourceforge.net"
#define AppPublisher "Peter Th\xF6rnqvist"
Modified: translator/trunk/setup/translator.fbp5
===================================================================
--- translator/trunk/setup/translator.fbp5 2006-11-13 17:07:20 UTC (rev 121)
+++ translator/trunk/setup/translator.fbp5 2006-11-14 10:41:53 UTC (rev 122)
@@ -124,7 +124,7 @@
<Property name="SelectAll" type="Boolean">False</Property>
</Object>
<Object Class="TPersistParam" XMLID="{61C26F12-53A5-41FA-8F60-F567944EDE65}"><Property MultiValue="0" name="Caption" type="string">&amp;Build:</Property>
- <Property MultiValue="0" name="DefaultValue" type="string">36</Property>
+ <Property MultiValue="0" name="DefaultValue" type="string">37</Property>
<Property name="InUse" type="Boolean">True</Property>
<Property name="List" type="TStrings"><![CDATA[]]>
</Property>
@@ -312,59 +312,74 @@
<Property name="PauseInterval" type="Cardinal">0</Property>
<Property name="RetryPauseInterval" type="Cardinal">1000</Property>
<Property name="SuppressStatusMessages" type="Boolean">False</Property>
- <Object Class="TDelphiCompilerAction" XMLID="{F618EF5F-0619-48B2-A32C-3CF46CF49577}"><Property MultiValue="0" name="ActionComment" type="string"></Property>
+ <Object Class="TGroupAction" XMLID="{F9908FF5-DFCB-4E24-93CA-60452635BAD9}"><Property MultiValue="0" name="ActionComment" type="string"></Property>
<Property name="ActionTextColor" type="Cardinal">0</Property>
<Property MultiValue="0" name="ActionTypeID" type="string"></Property>
- <Property name="AllowImplicitImport" type="Boolean">True</Property>
- <Property name="AlwaysUseConditionalsFromDOF" type="WordBool">False</Property>
- <Property name="AutoIncBuild" type="WordBool">False</Property>
- <Property name="AutoUpdateFileVersion" type="Boolean">True</Property>
- <Property name="BuildAll" type="WordBool">True</Property>
- <Property name="BuildVersion" type="Integer">36</Property>
- <Property name="CodePage" type="Integer">1252</Property>
- <Property name="CompilerVersion" type="Integer">4</Property>
- <Property name="DebugVersionNumbers" type="Boolean">False</Property>
- <Property MultiValue="0" name="Description" type="string">IniTranslator</Property>
+ <Property MultiValue="0" name="Description" type="string">Executables</Property>
<Property name="Enabled" type="WordBool">True</Property>
<Property name="ExpandActionLogTitle" type="Boolean">True</Property>
- <Property MultiValue="0" name="ExtraCommandline" type="WideString"></Property>
- <Property name="HintsAsError" type="Boolean">False</Property>
- <Property MultiValue="0" name="IconFile" type="WideString">%ROOTPATH%data\MichaelKoganIcon2.ico</Property>
<Property name="IgnoreFailure" type="WordBool">False</Property>
- <Property name="IncludeCompileDate" type="WordBool">True</Property>
- <Property name="IncludeVerInfo" type="WordBool">True</Property>
<Property name="IsAction" type="Boolean">True</Property>
<Property name="IsBreakPoint" type="WordBool">False</Property>
- <Property name="IsDebug" type="WordBool">False</Property>
- <Property name="IsDLL" type="WordBool">False</Property>
- <Property name="IsPreRelease" type="WordBool">False</Property>
- <Property name="IsPrivate" type="WordBool">False</Property>
- <Property name="IsSpecial" type="WordBool">False</Property>
- <Property name="KeepCFG" type="Boolean">False</Property>
- <Property name="LinkProductVersionToFileVersion" type="Boolean">False</Property>
- <Property name="Locale" type="Integer">1033</Property>
<Property MultiValue="0" name="LogToVariable" type="string"></Property>
- <Property name="MajorVersion" type="Integer">1</Property>
<Property name="MaxRetryAttempts" type="Cardinal">0</Property>
- <Property name="MinorVersion" type="Integer">9</Property>
<Property name="NodeCollapsed" type="Boolean">False</Property>
<Property name="PauseInterval" type="Cardinal">0</Property>
- <Property MultiValue="0" name="ProjectFile" type="WideString">%SRCPATH%translator.dpr</Property>
- <Property name="RegenerateResource" type="WordBool">True</Property>
- <Property name="ReleaseVersion" type="Integer">0</Property>
- <Property MultiValue="0" name="ResourceCompilerOptions" type="string"></Property>
- <Property MultiValue="0" name="ResourceCompilerPath" type="string"></Property>
- <Property name="ResourceCompilerType" type="TFBDelphiResourceCompiler">rcBorland</Property>
<Property name="RetryPauseInterval" type="Cardinal">1000</Property>
- <Property MultiValue="0" name="StartingDir" type="WideString">%SRCPATH%</Property>
<Property name="SuppressStatusMessages" type="Boolean">False</Property>
- <Property name="UpdateDofFile" type="Boolean">False</Property>
- <Property name="UpdatePackageSource" type="Boolean">False</Property>
- <Property name="UseEurekaLogCompiler" type="Boolean">False</Property>
- <Property name="UseProjectSettings" type="TFBUseProjectSettings">[]</Property>
- <Property name="UsePropertySet" type="Boolean">False</Property>
- <Property name="UseVersionFromDOF" type="Boolean">False</Property>
- <Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[CompanyName=Peter Thörnqvist
+ <Object Class="TDelphiCompilerAction" XMLID="{F618EF5F-0619-48B2-A32C-3CF46CF49577}"><Property MultiValue="0" name="ActionComment" type="string"></Property>
+ <Property name="ActionTextColor" type="Cardinal">0</Property>
+ <Property MultiValue="0" name="ActionTypeID" type="string"></Property>
+ <Property name="AllowImplicitImport" type="Boolean">True</Property>
+ <Property name="AlwaysUseConditionalsFromDOF" type="WordBool">False</Property>
+ <Property name="AutoIncBuild" type="WordBool">False</Property>
+ <Property name="AutoUpdateFileVersion" type="Boolean">True</Property>
+ <Property name="BuildAll" type="WordBool">True</Property>
+ <Property name="BuildVersion" type="Integer">36</Property>
+ <Property name="CodePage" type="Integer">1252</Property>
+ <Property name="CompilerVersion" type="Integer">4</Property>
+ <Property name="DebugVersionNumbers" type="Boolean">False</Property>
+ <Property MultiValue="0" name="Description" type="string">IniTranslator</Property>
+ <Property name="Enabled" type="WordBool">True</Property>
+ <Property name="ExpandActionLogTitle" type="Boolean">True</Property>
+ <Property MultiValue="0" name="ExtraCommandline" type="WideString"></Property>
+ <Property name="HintsAsError" type="Boolean">False</Property>
+ <Property MultiValue="0" name="IconFile" type="WideString">%ROOTPATH%data\MichaelKoganIcon2.ico</Property>
+ <Property name="IgnoreFailure" type="WordBool">False</Property>
+ <Property name="IncludeCompileDate" type="WordBool">True</Property>
+ <Property name="IncludeVerInfo" type="WordBool">True</Property>
+ <Property name="IsAction" type="Boolean">True</Property>
+ <Property name="IsBreakPoint" type="WordBool">False</Property>
+ <Property name="IsDebug" type="WordBool">False</Property>
+ <Property name="IsDLL" type="WordBool">False</Property>
+ <Property name="IsPreRelease" type="WordBool">False</Property>
+ <Property name="IsPrivate" type="WordBool">False</Property>
+ <Property name="IsSpecial" type="WordBool">False</Property>
+ <Property name="KeepCFG" type="Boolean">False</Property>
+ <Property name="LinkProductVersionToFileVersion" type="Boolean">False</Property>
+ <Property name="Locale" type="Integer">1033</Property>
+ <Property MultiValue="0" name="LogToVariable" type="string"></Property>
+ <Property name="MajorVersion" type="Integer">1</Property>
+ <Property name="MaxRetryAttempts" type="Cardinal">0</Property>
+ <Property name="MinorVersion" type="Integer">9</Property>
+ <Property name="NodeCollapsed" type="Boolean">False</Property>
+ <Property name="PauseInterval" type="Cardinal">0</Property>
+ <Property MultiValue="0" name="ProjectFile" type="WideString">%SRCPATH%translator.dpr</Property>
+ <Property name="RegenerateResource" type="WordBool">True</Property>
+ <Property name="ReleaseVersion" type="Integer">0</Property>
+ <Property MultiValue="0" name="ResourceCompilerOptions" type="string"></Property>
+ <Property MultiValue="0" name="ResourceCompilerPath" type="string"></Property>
+ <Property name="ResourceCompilerType" type="TFBDelphiResourceCompiler">rcBorland</Property>
+ <Property name="RetryPauseInterval" type="Cardinal">1000</Property>
+ <Property MultiValue="0" name="StartingDir" type="WideString">%SRCPATH%</Property>
+ <Property name="SuppressStatusMessages" type="Boolean">False</Property>
+ <Property name="UpdateDofFile" type="Boolean">False</Property>
+ <Property name="UpdatePackageSource" type="Boolean">False</Property>
+ <Property name="UseEurekaLogCompiler" type="Boolean">False</Property>
+ <Property name="UseProjectSettings" type="TFBUseProjectSettings">[]</Property>
+ <Property name="UsePropertySet" type="Boolean">False</Property>
+ <Property name="UseVersionFromDOF" type="Boolean">False</Property>
+ <Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[CompanyName=Peter Thörnqvist
FileDescription=Ini Language Translator
FileVersion=1.9.0.36
InternalName=translator.exe
@@ -377,94 +392,79 @@
License=Mozilla Public License 1.1
Comments=Latest version at http://initranslator.sourceforge.net
]]>
- </Property>
- <Property MultiValue="0" name="VersionInfoPropertySetName" type="string"></Property>
- <Property name="WarningsAsError" type="Boolean">False</Property>
- <Property name="WorkAroundD5Bug" type="WordBool">False</Property>
- <Object Class="TBuildScript" XMLID="{36D4C2F9-76D5-4B9A-8957-FB55F810F248}"><Property MultiValue="0" name="BreakPointsStore" type="string"></Property>
- <Property MultiValue="0" name="Name" type="string">BeforeAction</Property>
- <Property MultiValue="1" name="Script" type="string"><![CDATA[Action.MajorVersion = VERSION_MAJOR;
+ </Property>
+ <Property MultiValue="0" name="VersionInfoPropertySetName" type="string"></Property>
+ <Property name="WarningsAsError" type="Boolean">False</Property>
+ <Property name="WorkAroundD5Bug" type="WordBool">False</Property>
+ <Object Class="TBuildScript" XMLID="{36D4C2F9-76D5-4B9A-8957-FB55F810F248}"><Property MultiValue="0" name="BreakPointsStore" type="string"></Property>
+ <Property MultiValue="0" name="Name" type="string">BeforeAction</Property>
+ <Property MultiValue="1" name="Script" type="string"><![CDATA[Action.MajorVersion = VERSION_MAJOR;
Action.MinorVersion = VERSION_MINOR;
Action.ReleaseVersion = VERSION_RELEASE;
Action.BuildVersion = VERSION_BUILD;
Action.SetVersionInfoKey("ProductVersion",Action.GetVersionInfoKey("FileVersion"))
]]>
- </Property>
- <Property MultiValue="0" name="ScriptLanguage" type="string">JavaScript</Property>
- </Object>
- <Object Class="TDelphiCompilerOptions" XMLID="{895A379C-E395-454B-B87A-13CBD635CD3F}"><Property name="AlwaysUseConditionalsFromDOF" type="WordBool">False</Property>
- <Property name="AlwaysUseDelphiLibraryPath" type="WordBool">True</Property>
- <Property name="AlwaysUseDOFSearchPath" type="WordBool">False</Property>
- <Property name="Assertions" type="WordBool">True</Property>
- <Property name="AssignableConst" type="WordBool">False</Property>
- <Property name="BoolEval" type="WordBool">False</Property>
- <Property MultiValue="0" name="BPLOutputDir" type="WideString"></Property>
- <Property name="CompilerWarnings" type="TStrings"><![CDATA[-w-UNSAFE_TYPE=0
+ </Property>
+ <Property MultiValue="0" name="ScriptLanguage" type="string">JavaScript</Property>
+ </Object>
+ <Object Class="TDelphiCompilerOptions" XMLID="{895A379C-E395-454B-B87A-13CBD635CD3F}"><Property name="AlwaysUseConditionalsFromDOF" type="WordBool">False</Property>
+ <Property name="AlwaysUseDelphiLibraryPath" type="WordBool">True</Property>
+ <Property name="AlwaysUseDOFSearchPath" type="WordBool">False</Property>
+ <Property name="Assertions" type="WordBool">True</Property>
+ <Property name="AssignableConst" type="WordBool">False</Property>
+ <Property name="BoolEval" type="WordBool">False</Property>
+ <Property MultiValue="0" name="BPLOutputDir" type="WideString"></Property>
+ <Property name="CompilerWarnings" type="TStrings"><![CDATA[-w-UNSAFE_TYPE=0
-w-UNSAFE_CODE=0
-w-UNSAFE_CAST=0
]]>
- </Property>
- <Property MultiValue="0" name="Conditionals" type="WideString">USEADDICTSPELLCHECKER,USEOLDTBX</Property>
- <Property name="ConsoleApp" type="WordBool">False</Property>
- <Property MultiValue="0" name="DCPOutputDir" type="WideString"></Property>
- <Property name="DebugInfo" type="WordBool">True</Property>
- <Property MultiValue="0" name="DefaultNamespace" type="string"></Property>
- <Property name="DefinitionsOnly" type="WordBool">True</Property>
- <Property MultiValue="0" name="ExeDescription" type="WideString"></Property>
- <Property name="ExportAllSymbols" type="WordBool">False</Property>
- <Property name="ExtendedSyntax" type="WordBool">True</Property>
- <Property name="GenerateDocumentation" type="Boolean">False</Property>
- <Property name="GenerateHPP" type="WordBool">False</Property>
- <Property name="HugeStrings" type="WordBool">True</Property>
- <Property name="ImageBase" type="Cardinal">4194304</Property>
- <Property name="IncludeNamespaces" type="WordBool">False</Property>
- <Property name="IncludeRemoteSymbols" type="WordBool">False</Property>
- <Property name="IncludeTD32" type="WordBool">False</Property>
- <Property name="IOChecking" type="WordBool">True</Property>
- <Property MultiValue="0" name="LibraryPath" type="WideString">$(DELPHI)\Lib;$(DELPHI)\Bin;$(DELPHI)\Imports;$(DELPHI)\Projects\Bpl;$(DELPHI)\Rave5\Lib;F:\Program\Borland\Add\JEDI\JCL\source;F:\Program\Borland\Add\JEDI\dev\JVCL3\common;F:\Program\Borland\Add\JEDI\dev\JVCL3\run;F:\Program\Borland\Add\dunit\src;F:\Program\Borland\Add\Others;F:\Program\Borland\Add\Utils;F:\Program\Borland\Add\tntunicode</Property>
- <Property name="LinkerOutput" type="Integer">0</Property>
- <Property name="LocalSymbols" type="WordBool">True</Property>
- <Property name="Mapfile" type="Integer">3</Property>
- <Property name="MaxStackSize" type="Cardinal">1048576</Property>
- <Property name="MinStackSize" type="Cardinal">16384</Property>
- <Property MultiValue="0" name="NamespacePrefixes" type="string"></Property>
- <Property name="OpenStrings" type="WordBool">True</Property>
- <Property name="Optimisation" type="WordBool">True</Property>
- <Property MultiValue="0" name="OutputDir" type="WideString">..\bin</Property>
- <Property name="OverflowChecking" type="WordBool">False</Property>
- <Property MultiValue="0" name="Packages" type="WideString"></Property>
- <Property name="RangeChecking" type="WordBool">False</Property>
- <Property name="RecordFieldAlign" type="TFieldAlign">fa8</Property>
- <Property name="ReferenceInfo" type="WordBool">True</Property>
- <Property name="SafeDivide" type="WordBool">False</Property>
- <Property MultiValue="0" name="SearchPath" type="WideString"></Property>
- <Property name="ShowHints" type="WordBool">True</Property>
- <Property name="ShowWarnings" type="WordBool">True</Property>
- <Property name="StackFrames" type="WordBool">False</Property>
- <Property name="TypedPointers" type="WordBool">False</Property>
- <Property MultiValue="0" name="UnitAliases" type="WideString">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Property>
- <Property MultiValue="0" name="UnitOutputDir" type="WideString">..\dcu</Property>
- <Property name="UseDebugDCU" type="WordBool">False</Property>
- <Property name="UsePackages" type="WordBool">False</Property>
- <Property name="VarStringChecks" type="WordBool">True</Property>
+ </Property>
+ <Property MultiValue="0" name="Conditionals" type="WideString">USEADDICTSPELLCHECKER,USEOLDTBX</Property>
+ <Property name="ConsoleApp" type="WordBool">False</Property>
+ <Property MultiValue="0" name="DCPOutputDir" type="WideString"></Property>
+ <Property name="DebugInfo" type="WordBool">True</Property>
+ <Property MultiValue="0" name="DefaultNamespace" type="string"></Property>
+ <Property name="DefinitionsOnly" type="WordBool">True</Property>
+ <Property MultiValue="0" name="ExeDescription" type="WideString"></Property>
+ <Property name="ExportAllSymbols" type="WordBool">False</Property>
+ <Property name="ExtendedSyntax" type="WordBool">True</Property>
+ <Property name="GenerateDocumentation" type="Boolean">False</Property>
+ <Property name="GenerateHPP" type="WordBool">False</Property>
+ <Property name="HugeStrings" type="WordBool">True</Property>
+ <Property name="ImageBase" type="Cardinal">4194304</Property>
+ <Property name="IncludeNamespaces" type="WordBool">False</Property>
+ <Property name="IncludeRemoteSymbols" type="WordBool">False</Property>
+ <Property name="IncludeTD32" type="WordBool">False</Property>
+ <Property name="IOChecking" type="WordBool">True</Property>
+ <Property MultiValue="0" name="LibraryPath" type="WideString">$(DELPHI)\Lib;$(DELPHI)\Bin;$(DELPHI)\Imports;$(DELPHI)\Projects\Bpl;$(DELPHI)\Rave5\Lib;F:\Program\Borland\Add\JEDI\JCL\source;F:\Program\Borland\Add\JEDI\dev\JVCL3\common;F:\Program\Borland\Add\JEDI\dev\JVCL3\run;F:\Program\Borland\Add\dunit\src;F:\Program\Borland\Add\Others;F:\Program\Borland\Add\Utils;F:\Program\Borland\Add\tntunicode</Property>
+ <Property name="LinkerOutput" type="Integer">0</Property>
+ <Property name="LocalSymbols" type="WordBool">True</Property>
+ <Property name="Mapfile" type="Integer">3</Property>
+ <Property name="MaxStackSize" type="Cardinal">1048576</Property>
+ <Property name="MinStackSize" type="Cardinal">16384</Property>
+ <Property MultiValue="0" name="NamespacePrefixes" type="string"></Property>
+ <Property name="OpenStrings" type="WordBool">True</Property>
+ <Property name="Optimisation" type="WordBool">True</Property>
+ <Property MultiValue="0" name="OutputDir" type="WideString">..\bin</Property>
+ <Property name="OverflowChecking" type="WordBool">False</Property>
+ <Property MultiValue="0" name="Packages" type="WideString"></Property>
+ <Property name="RangeChecking" type="WordBool">False</Property>
+ <Property name="RecordFieldAlign" type="TFieldAlign">fa8</Property>
+ <Property name="ReferenceInfo" type="WordBool">True</Property>
+ <Property name="SafeDivide" type="WordBool">False</Property>
+ <Property MultiValue="0" name="SearchPath" type="WideString"></Property>
+ <Property name="ShowHints" type="WordBool">True</Property>
+ <Property name="ShowWarnings" type="WordBool">True</Property>
+ <Property name="StackFrames" type="WordBool">False</Property>
+ <Property name="TypedPointers" type="WordBool">False</Property>
+ <Property MultiValue="0" name="UnitAliases" type="WideString">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Property>
+ <Property MultiValue="0" name="UnitOutputDir" type="WideString">..\dcu</Property>
+ <Property name="UseDebugDCU" type="WordBool">False</Property>
+ <Property name="UsePackages" type="WordBool">False</Property>
+ <Property name="VarStringChecks" type="WordBool">True</Property>
+ </Object>
</Object>
- </Object>
- <Object Class="TGroupAction" XMLID="{F9908FF5-DFCB-4E24-93CA-60452635BAD9}"><Property MultiValue="0" name="ActionComment" type="string"></Property>
- <Property name="ActionTextColor" type="Cardinal">0</Property>
- <Property MultiValue="0" name="ActionTypeID" type="string"></Property>
- <Property MultiValue="0" name="Description" type="string">Tools</Property>
- <Property name="Enabled" type="WordBool">True</Property>
- <Property name="ExpandActionLogTitle" type="Boolean">True</Property>
- <Property name="IgnoreFailure" type="WordBool">False</Property>
- <Property name="IsAction" type="Boolean">True</Property>
- <Property name="IsBreakPoint" type="WordBool">False</Property>
- <Property MultiValue="0" name="LogToVariable" type="string"></Property>
- <Property name="MaxRetryAttempts" type="Cardinal">0</Property>
- <Property name="NodeCollapsed" type="Boolean">False</Property>
- <Property name="PauseInterval" type="Cardinal">0</Property>
- <Property name="RetryPauseInterval" type="Cardinal">1000</Property>
- <Property name="SuppressStatusMessages" type="Boolean">False</Property>
<Object Class="TDelphiCompilerAction" XMLID="{64256701-9DBC-49F5-991D-8DEE05D7D02E}"><Property MultiValue="0" name="ActionComment" type="string"></Property>
<Property name="ActionTextColor" type="Cardinal">0</Property>
<Property MultiValue="0" name="ActionTypeID" type="string"></Property>
@@ -743,7 +743,7 @@
<Object Class="TGroupAction" XMLID="{E1FA3259-044D-4710-B904-40F18F69AC4B}"><Property MultiValue="0" name="ActionComment" type="string"></Property>
<Property name="ActionTextColor" type="Cardinal">0</Property>
<Property MultiValue="0" name="ActionTypeID" type="string"></Property>
- <Property MultiValue="0" name="Description" type="string">Plugins</Property>
+ <Property MultiValue="0" name="Description" type="string">File Parsers</Property>
<Property name="Enabled" type="WordBool">True</Property>
<Property name="ExpandActionLogTitle" type="Boolean">True</Property>
<Property name="IgnoreFailure" type="WordBool">False</Property>
Modified: translator/trunk/src/MainFrm.pas
===================================================================
--- translator/trunk/src/MainFrm.pas 2006-11-13 17:07:20 UTC (rev 121)
+++ translator/trunk/src/MainFrm.pas 2006-11-14 10:41:53 UTC (rev 122)
@@ -2446,7 +2446,8 @@
function TfrmMain.SelectOriginal(ShowDialog, ShowTransDialog: boolean): boolean;
begin
- if not CheckModified then
+ Result := CheckModified;
+ if not Result then
Exit;
OpenOrigDlg.FileName := GetFilename(GlobalAppOptions.OriginalFile);
OpenOrigDlg.FilterIndex := GlobalAppOptions.FilterIndex;
Modified: translator/trunk/src/TransIntf.pas
===================================================================
--- translator/trunk/src/TransIntf.pas 2006-11-13 17:07:20 UTC (rev 121)
+++ translator/trunk/src/TransIntf.pas 2006-11-14 10:41:53 UTC (rev 122)
@@ -192,7 +192,7 @@
// Value - can be anything
//
// Multiple calls do not have to use the same Section
- function GetString(out Section:WideString; out Name:WideString; out Value:WideString):WordBool;
+ function GetString(out Section:WideString; out Name:WideString; out Value:WideString):WordBool; stdcall;
end;
// An item that can reside on the "Plugins" menu
Modified: translator/trunk/src/XilisoftPlugin/XilisoftParserImpl.pas
===================================================================
--- translator/trunk/src/XilisoftPlugin/XilisoftParserImpl.pas 2006-11-13 17:07:20 UTC (rev 121)
+++ translator/trunk/src/XilisoftPlugin/XilisoftParserImpl.pas 2006-11-14 10:41:53 UTC (rev 122)
@@ -35,7 +35,7 @@
function Translate(const Value: WideString): WideString;
{ ILocalizable }
- function GetString(out Section: WideString; out Name: WideString; out Value: WideString): WordBool;
+ function GetString(out Section: WideString; out Name: WideString; out Value: WideString): WordBool; stdcall;
public
constructor Create;
destructor Destroy; override;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|