Sign in Join

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

Mailing lists / lazarus / 2012-08

i18n and Format()

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Mark Morgan Lloyd

I note from
http://wiki.lazarus.freepascal.org/Getting_translation_strings_right#The_format.28.29_function that "Since format() does not interpret escaped control characters" is struck out and "In the current lazarus version, \n and \t in translated strings are replaced by newline and tab" is appended.

Does this refer to the Lazarus IDE's handling of i18n candidates, or is it saying that \n etc. handling has been added to Format()? In the latter case, what (FPC) version does this apply to?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Michael Van Canneyt
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 9 lines
I note from http://wiki.lazarus.freepascal.org/Getting_translation_strings_right#The_format.28.29_function that "Since format() does not interpret escaped control characters" is struck out and "In the current lazarus version, \n and \t in translated strings are replaced by newline and tab" is appended. Does this refer to the Lazarus IDE's handling of i18n candidates, or is it saying that \n etc. handling has been added to Format()? In the latter case, what (FPC) version does this apply to?

Format does not handle escape sequences.

Escape sequences are for C-style languages. Pascal does not need it, it has #NN support.

Michael.

Reply by email

Mark Morgan Lloyd
to Michael Van Canneyt
Michael Van Canneyt wrote 17 lines
On Wed, 15 Aug 2012, Mark Morgan Lloyd wrote: > I note from > http://wiki.lazarus.freepascal.org/Getting_translation_strings_right#The_format.28.29_function > that "Since format() does not interpret escaped control characters" is > struck out and "In the current lazarus version, \n and \t in > translated strings are replaced by newline and tab" is appended. > > Does this refer to the Lazarus IDE's handling of i18n candidates, or > is it saying that \n etc. handling has been added to Format()? In the > latter case, what (FPC) version does this apply to? Format does not handle escape sequences. Escape sequences are for C-style languages. Pascal does not need it, it has #NN support.

Thanks, so the text is saying that this is an IDE feature.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Vincent Snijders
to Mark Morgan Lloyd

2012/8/15 Mark Morgan Lloyd :

Show quoted text 23 lines
Michael Van Canneyt wrote: > > On Wed, 15 Aug 2012, Mark Morgan Lloyd wrote: > >> I note from >> http://wiki.lazarus.freepascal.org/Getting_translation_strings_right#The_format.28.29_function >> that "Since format() does not interpret escaped control characters" is >> struck out and "In the current lazarus version, \n and \t in translated >> strings are replaced by newline and tab" is appended. >> >> Does this refer to the Lazarus IDE's handling of i18n candidates, or is >> it saying that \n etc. handling has been added to Format()? In the latter >> case, what (FPC) version does this apply to? > > > Format does not handle escape sequences. > > Escape sequences are for C-style languages. Pascal does not need it, it > has #NN > support. Thanks, so the text is saying that this is an IDE feature.

Maybe a feature of the function that loads the po file and uses it to translate the resource strings. This is part of the LCL, not the IDE, IIRC.

Vincent

Reply by email

Mark Morgan Lloyd
to Vincent Snijders
Vincent Snijders wrote 25 lines
2012/8/15 Mark Morgan Lloyd : > Michael Van Canneyt wrote: >> On Wed, 15 Aug 2012, Mark Morgan Lloyd wrote: >> >>> I note from >>> http://wiki.lazarus.freepascal.org/Getting_translation_strings_right#The_format.28.29_function >>> that "Since format() does not interpret escaped control characters" is >>> struck out and "In the current lazarus version, \n and \t in translated >>> strings are replaced by newline and tab" is appended. >>> >>> Does this refer to the Lazarus IDE's handling of i18n candidates, or is >>> it saying that \n etc. handling has been added to Format()? In the latter >>> case, what (FPC) version does this apply to? >> >> Format does not handle escape sequences. >> >> Escape sequences are for C-style languages. Pascal does not need it, it >> has #NN >> support. > > Thanks, so the text is saying that this is an IDE feature. Maybe a feature of the function that loads the po file and uses it to translate the resource strings. This is part of the LCL, not the IDE, IIRC.

Thanks, noted. But I think I'm safe in interpreting Michael's response as that it's not part of the language/compiler/RTL, and that absolutely definitely never under any circumstances will it be :-)

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email