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

DDTP: Word wrap in package descriptions

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:

The lines in the extended description can have these formats: 
 * Those starting with a single space are part of a paragraph. Successive lines
   of this form will be word-wrapped when displayed. The leading space will
   usually be stripped off. 
 * Those starting with two or more spaces. These will be displayed verbatim. If
   the display cannot be panned horizontally, the displaying program will line
   wrap them "hard" (i.e., without taking account of word breaks). If it can they
   will be allowed to trail off to the right. None, one or two initial spaces may
   be deleted, but the number of spaces deleted from each line will be the same
   (so that you can have indenting work correctly, for example). 
 * Those containing a single space followed by a single full stop character.
   These are rendered as blank lines. This is the only way to get a blank
 * Those containing a space, a full stop and some more characters. These are
   for future expansion. Do not use them. 
Do not use tab characters. Their effect is not predictable.

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.

This has the advantage that users do no longer need to change linebreaks manually
just to ensure a consistent text width, because the webfrontend (or better: the
browser) cares about splitting the long lines.

Every description which violates the policy is bogus and users will start to
complain if the webfrontend shows them unexpectedly.

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


Reply to: