Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-01

i18n questions

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Darius Blaszyk

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. 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? 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).

I'm using Lazarus SVN and FPC 3.0.0.

TIA!

Regards, Darius

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170108/389b247f/attachment.html>

Reply by email

José Mejuto
to Darius Blaszyk
Darius Blaszyk wrote
Hi,

[...]

Show quoted text 5 lines
a separate tool or script to merge the translation strings into my .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).

Hello,

Same problem here, but I think I was able to "workaround" the problem, change one form that uses the resourcestrings unit, change also the resourcestrings unit and "build", not "compile", before save the units.

The bug seems to be difficult to catch as it happens when it happens, without a clear way to reproduce it (that's the reason that I don't post a bug about it).

Reply by email

Darius Blaszyk
to José Mejuto

José Mejuto via Lazarus schreef op 8 jan '17:

Show quoted text 16 lines
El 08/01/2017 a las 2:21, Darius Blaszyk via Lazarus escribió: > Hi, [...] > a separate tool or script to merge the translation strings into my .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). Hello, Same problem here, but I think I was able to "workaround" the problem, change one form that uses the resourcestrings unit, change also the resourcestrings unit and "build", not "compile", before save the units. The bug seems to be difficult to catch as it happens when it happens, without a clear way to reproduce it (that's the reason that I don't post a bug about it).

Indeed, seems like a bug to me as well. However, as you explained I also figured out how to update the .po file with the LRS items (which works incidentally), but the resourcestrings do not appear in the .po at all, no matter what I try. Is there another known workaround by invoking commandline tools?

TIA, Darius
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170108/8388634c/attachment.html>

Reply by email

Mattias Gaertner
to Darius Blaszyk: I have enabled i18n for my project and added the DefaultTranslator unit to the lpr file.…
Show quoted text 8 lines
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

Reply by email