[Lazarus] i18n questions

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Jan 8 12:22:55 CET 2017


On Sun, 08 Jan 2017 02:21:29 +0100
Darius Blaszyk via Lazarus <lazarus at lists.lazarus-ide.org> wrote:

> Hi,
> 
> I have enabled i18n for my project and added the DefaultTranslator unit
> to the lpr file. Additionally I added a unit called ResourceStrings.pas
> to the project that centrally collects all the resourcestrings from my
> project code. However, when I compile, the strings from the LFM files
> are updated (now and then) in all .po files but the resourcestrings are
> not. 

Is the unit resourcestrings shown in the project inspector?


> I have enable the option "force update PO files on next compile"
> already a couple of times but nothing seems to work. Do I need to invoke
> a separate tool or script to merge the translation strings into my .po
> file? 

No.
When you compile the fpc 3.0+ compiler creates for each unit with
resourcestrings a file unitname.rsj in the unit output directory. The
IDE then checks for each unit of the PI the file dates of the .rsj and
the project's .po file. If an .rsj file is newer the IDE regenerates
the .po file.


> Or did I setup my project wrong?
> In general, should the "force update" setting not force an update of the
> .po file in any circumstance (compile/run/build or even save).

Since the process requires the compiler, it can only be updated after a
compile/build.

Mattias


More information about the Lazarus mailing list