Re: DDTP: Word wrap in package descriptions
On Thu, Sep 21, 2006 at 12:31:06PM +0200, Martijn van Oosterhout wrote:
> On 9/21/06, Jens Seidel <firstname.lastname@example.org> wrote:
> >detect whether it's OK to consider a paragraph as floating text or not?
> >I now noticed that this is defined in the Policy:
> 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
You mean the style could differ in one paragraph? I first assumed it's not
allowed but the policy seems not to forbid it. This could make your
implementation a littler bit more complex.
floating text floating
verbatim, no break allowed
and again floating
> will take care of wrapping for display, but I will need to code
> something up to send to the DDTS.
> This also explains the <space><space>Homepage: <long url> I've seen in
> some descriptions. The extra space stops display programs wrapping the
Yep. But it's also mentioned in the Developer's Reference.
> 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.
Maybe, but at least the description from the Packages.bz2 file will not always
rewrap. "apt-cache show" doesn't wrap IIRC, aptitude does.
> >PS: Also check for TABs in translations (and English descriptions) as
> >these should
> >be avoided.
> Strip them, or replace with spaces?
Maybe it's better to display a warning together with a substitution by
"Your text contained TABs. This is invalid and they were replaced by spaces.
Please check your translation for proper indentation."
But what about all the buggy English descriptions? In the (now slightly
outdated :-)) DDTP documentation I wrote it may be a good idea to consider
English as another language and allow corrections to descriptions this
way. If you have any good idea and want to allow fixing English description
as well ...