[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DDTP: Word wrap in package descriptions



On 9/21/06, Jens Seidel <jensseidel@users.sf.net> wrote:
Hi Martijn,

do you remember that we once discussed for the DDTP webfrontend about how to
detect whether it's OK to consider a paragraph as floating text or not?

I now noticed that this is defined in the Policy:
http://www.debian.org/doc/debian-policy/ch-controlfields#s-f-Description

<snip>

Aha! So it is defined somewhere.

So it should be simple to recognize non wrapable text such as lists by counting
the spaces. Simple, isn't it?

I suggest you remove all the \n introduced by the browser for these paragraphs
and save these internally in one long line. The graphical diff should not be
confused this way by changed line breaks (no need to display these!?). Once you
send a translation to the DDTP you can ensure a proper text length again.

Right. Reading this has given the solution. If successive lines begin
with only one space (or no space as seem by the DDTSS), treat them as
a single block of text and wrap them as appropriate. Now, the browser
will take care of wrapping for display, but I will need to code
something up to send to the DDTS.

Some languages don't use spaces but I remember seeing a module
somewhere that did multilingual wrapping, so I'll see if that can
work.

This also explains the <space><space>Homepage: <long url> I've seen in
some descriptions. The extra space stops display programs wrapping the
url.

You realise of course the flipside: that it doesn't matter how the
translation is formatted for display on the DDTSS, client program will
rewrap them anyway.

PS: Also check for TABs in translations (and Enlgish descriptions) as these should
be avoided.

Strip them, or replace with spaces?

Have a nice day,
--
Martijn van Oosterhout <kleptog@gmail.com> http://svana.org/kleptog/



Reply to: