long strings and xgettext.pl
[email protected] (Sava Chankov) Thu, 03 Nov 2005 19:52:13 +0200
| Newsgroups | perl.i18n |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I've written an i18n-ed web application which has some quite long strings in the code like this one:
"If you want to receive mail in the folder, add addresses.
A message sent to an address that you add will be delivered to the folder.
If you don't want to receive mail in the folder, click 'Next' button
You will still be able to drag'n'drop messages into it."
However, they doesn't look good in indented code. So I split them in smaller strings, as C gettext allows:
_( "If you want to receive mail in the folder, add addresses."
"A message sent to an address that you add will be delivered to the folder."
"If you don't want to receive mail in the folder, click 'Next' button"
"You will still be able to drag'n'drop messages into it."
);
Unfortunately, xgettext.pl [or Locale::Maketext::Extract::extract, to be precise] doesn't understand that gettext is variadic function and the result looks like this (comment
line truncated by me to 80 characters):
#. ("A message sent to an address that you add will be delivered to the folder." "If you don't want to receive mail in the folder, click 'Next' button."
"You will still be able to drag'n'drop messages into it.")
msgid "If you want to receive mail in the folder, add addresses."
msgstr ""
I think that Locale::Maketext::Extract::extract() should be patched to deal with the case. What's your opinion?
best wishes,
Sava Chankov