On Wed, 13 Dec 2006 18:12:30 +0100
tanila <[EMAIL PROTECTED]> wrote:
> Am Dienstag, den 12.12.2006, 23:09 +0100 schrieb Mattias Gaertner:
> > This has already been started some time ago. Search for {$IFDEF
> > TRANSLATESTRING} in the lazarus code.
> > The code is in a very early state, although the author Vasily
> > Volchenko
> > said, he already used it.
> > It has the clever idea to hook into TReader/TWriter, so that
> > everytime the .lfm file is changed the .lrt file is updated and the
> > strings are translated on creation at runtime. This reduces the
> > overhead. Although the current implementation need some
> > optimizations to make use of these
> > advantages.
>
> Very Good idea by Vasily. I checked his code but i didn't understand
> everything he has done there.
> Isnt he working on it any more ?
>
>
> My approach would be like this:
> - 1. Locate available Resource-Strings
Hook into TWriter.
> - 2. Scanning the Application ContainerClasses TForm, TDataModule and
> the included Tcomponents which has TTranslateString Properties by RTTI
This is not needed when using TWriter.
> - 3. Generating an XML - File with these ResourceStrings, Components
> and properties (with optional context comments for the Translators,
> etc)
Since many prefer .po files (because there are a lot of translation
tool for them already), it would be nice, if the output is done via an
abstract interface.
> - 4. Translating the XML-File in other Languages
> - 5. Provide a funktion or a mechanism to Translate the Forms,
> Datamodules by reading back the Properies of the translated xml-files.
Hook into TReader.
> I would prefere XML because of the ability to have a hirarchical
> structure similar to the Component.owner structure.
>
> But there are the issues of the overhead and Performance.
> Another Problem would appear if the component-names change or adding
> new Components, removing Components in further versions of the
> Application. Therefore I thought it would be better to have it
> integrated inside of the IDE to make it easier for developers to keep
> the XML-Files up to date.
Good point.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives