Sign in Join

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

Mailing lists / lazarus / 2015-08

POFile ommission

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

JuuS

Hi all,

Recently got into PO files and want to translate a program.

Turns out, however, that multi-line hints in lfm files are not brought over correctly - only the first line of the multi-line hint.

This is by design as can be seen in the Translations unit TPOFile.TranslateStrings procedure in the condition:

if SType=stLrt then (at around line 1217)

Multi-Line resourcestrings from the rst files are handled fine.

I was going to take a stab at writing some code for this but then was stopped because I saw that there was some utf8 (?) translation going on when the rst file is created. Seeing that the job was starting to entangle multiple units and methods I thought it better to just let out a FYI and let a master work on it.

This would also affect multi-line edits and so on, so I believe it was just a simple oversight.

In a related question: Combobox contents (and I presume listbox contents) are not written to the lrt files. I would find this useful also as currently I have to make the combobox contents a resourcestring and then maybe this is a limitation of the
po_file translation system itself?

Have a great day.

Julius

Reply by email

Mattias Gaertner
to JuuS
Show quoted text 11 lines
Hi all, Recently got into PO files and want to translate a program. Turns out, however, that multi-line hints in lfm files are not brought over correctly - only the first line of the multi-line hint. This is by design as can be seen in the Translations unit TPOFile.TranslateStrings procedure in the condition: if SType=stLrt then (at around line 1217)

Feel free to extend this to support multi line strings.

Show quoted text 6 lines
Multi-Line resourcestrings from the rst files are handled fine. I was going to take a stab at writing some code for this but then was stopped because I saw that there was some utf8 (?) translation going on when the rst file is created.

What do you mean?

Show quoted text 5 lines
In a related question: Combobox contents (and I presume listbox contents) are not written to the lrt files. I would find this useful also as currently I have to make the combobox contents a resourcestring and then maybe this is a limitation of the po_file translation system itself?

At the moment the IDE only translates string properties of type TTranslateString.
TComboBox.Items is TStrings, which is not supported.

Mattias

Reply by email

JuuS
to Mattias Gaertner
Mattias Gaertner wrote 16 lines
On Fri, 28 Aug 2015 16:22:28 +0200 JuuS wrote: > Hi all, > > Recently got into PO files and want to translate a program. > > Turns out, however, that multi-line hints in lfm files are not brought > over correctly - only the first line of the multi-line hint. > > This is by design as can be seen in the Translations unit > TPOFile.TranslateStrings procedure in the condition: > > if SType=stLrt then (at around line 1217) Feel free to extend this to support multi line strings.

I'd already fixed my local copy of Lazarus to deal with the multi=line hints.

After thinking about it I think I could submit a patch...just other things in the air right now.

This is on my todo list and I will be getting to it soon...after I figure out how to efficiently and properly deal with svn'ing and then learning the bug reporting / patching system.

Baby steps....

But I do (I believe) have the solution.

Show quoted text 10 lines
> Multi-Line resourcestrings from the rst files are handled fine. > > > I was going to take a stab at writing some code for this but then was > stopped because I saw that there was some utf8 (?) translation going on > when the rst file is created. What do you mean?

I think that means I was confused. Let me look at the code again.

Show quoted text 11 lines
> In a related question: Combobox contents (and I presume listbox > contents) are not written to the lrt files. I would find this useful > also as currently I have to make the combobox contents a resourcestring > and then maybe this is a limitation of the > po_file translation system itself? At the moment the IDE only translates string properties of type TTranslateString. TComboBox.Items is TStrings, which is not supported.

I will look at that also. If .po files handle contents of Tlist and TCombobox (I don't know, haven't made test yet) it seems that would be useful too.

Thanks Mattias,

Julius

Reply by email