On Tue, 12 Dec 2006 15:08:28 +0100
tanila <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I would like to write an app that takes all Forms and Datamodules of a
> Lazarus Project.
> I played arround with gnu gettext and the supported features in
> Lazarus. Everything is very fine but i would like to have a more
> useful and flexible solution.
>
> This app should generate a file with all Components that have
> TranslateStrings-Properties in it, which then can be translated by the
> translators.
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.
> But therefore need access to all Forms in the current opened
> Laz-Project inside the IDE. How can i lolve this Problem.
See the IDEIntf/projectintf.pas
> Has someone any tips i could do that ?
> Are some Prople interested in having such a translation tool inside
> Lazarus ?
>
> I could generate the file by runtime too, if the translation-file isnt
> existend, but i would like to have it as a seperate tool inside the
> IDE of Lazarus.
> Or is it better to make a component with a component editor to do it ?
A component editor is mainly for the designer menu of a component class.
> There i have the next problem. I know how to create Components but i
> don't know how to create a component-editor...
Create a package instead, which registers some new menu items.
If you need some new methods in the IDEIntf, just ask.
> What is the best format to store the Translation File. I don't know
> if i should use XML. Maybe it's senseful to make it transform to a po
> file to make it possible to edit by poEdit or similar applications.
Eventually the IDE will automatically collect and update .po files for
the .rst files. And it will collect them for the project. So, .po files
are a good idea.
> Should i use one file per Language or is it better to have one big
> file for all languages.
Better is one file per language. And if you need to collect them into
one file, then use any archive tool to do that.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives