Splitted messages

7 views
Skip to first unread message

León Domingo

unread,
Sep 21, 2011, 2:30:47 AM9/21/11
to Python Babel
Hi,
I've been experimenting something that I'd like to avoid.

The "no-wrap" option allows me to get the full-length string instead
of the splitted one. That's working properly in the extraction phase,
but when the catalog is updated those long strings are splitted in
the .PO file where they surpass the 80 items, included the "msgid" and/
or "msgstr".

Is this a bug? Is it ok and there is an option?

Thanks

León

Felix Schwarz

unread,
Sep 22, 2011, 4:33:03 AM9/22/11
to python...@googlegroups.com
León,

Am 21.09.2011 08:30, schrieb León Domingo:
> The "no-wrap" option allows me to get the full-length string instead
> of the splitted one. That's working properly in the extraction phase,
> but when the catalog is updated those long strings are splitted in
> the .PO file where they surpass the 80 items, included the "msgid" and/
> or "msgstr".
>
> Is this a bug? Is it ok and there is an option?

From what I see in the source code this is only supported in the extraction
phase. However IMHO it makes sense also supporting that while updating the
catalog.

Please file a ticket on http://babel.edgewall.org with the feature
description. However I'll work on Python 3 stuff first to get that into trunk
finally (I've been a pretty bad dev considering that several contributors
actually sent patches etc long ago for this). So your best bet to get that
implemented quickly is if you attach a patch to your new ticket :-)

fs

Wichert Akkerman

unread,
Sep 22, 2011, 4:50:08 AM9/22/11
to python...@googlegroups.com
On 09/22/2011 10:33 AM, Felix Schwarz wrote:
> Le�n,

>
> Am 21.09.2011 08:30, schrieb Le�n Domingo:
>> The "no-wrap" option allows me to get the full-length string instead
>> of the splitted one. That's working properly in the extraction phase,
>> but when the catalog is updated those long strings are splitted in
>> the .PO file where they surpass the 80 items, included the "msgid" and/
>> or "msgstr".
>>
>> Is this a bug? Is it ok and there is an option?
> From what I see in the source code this is only supported in the extraction
> phase. However IMHO it makes sense also supporting that while updating the
> catalog.

If someone is going to poke around in this code there is another thing
to look at: in my experience the splitting done by Babel introduces
problem when dealing with double-quotes in text that is being wrapped.
We saw so many PO-files breaking due to this that we switched to using
polib and the GNU gettext utilities, only using Babel for extraction
(which we'll probably eventually replace as well).

Wichert.

Felix Schwarz

unread,
Sep 22, 2011, 5:03:55 AM9/22/11
to python...@googlegroups.com
Am 22.09.2011 10:50, schrieb Wichert Akkerman:
> If someone is going to poke around in this code there is another thing to look
> at: in my experience the splitting done by Babel introduces problem when
> dealing with double-quotes in text that is being wrapped. We saw so many
> PO-files breaking due to this that we switched to using polib and the GNU
> gettext utilities, only using Babel for extraction (which we'll probably
> eventually replace as well).

uhh, that sounds bad. Do you have an example so I can reproduce this more easily?

fs

Wichert Akkerman

unread,
Sep 22, 2011, 5:08:58 AM9/22/11
to python...@googlegroups.com

I'm afraid I have nothing public I can share. My suspicion is that
things break if you encounter a double quote at a point where Babel
tries to split the line.

Wichert.

Reply all
Reply to author
Forward
0 new messages