perl-i18n

long strings and xgettext.pl

2005-11-03 10:56:59
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

<Prev in Thread] Current Thread [Next in Thread>