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

Requiring trailing spaces in slices (was: Debian WWW CVS: dmartinez)



Martin Schulze wrote:
> Josip Rodin wrote:
> > On Sat, May 26, 2001 at 11:08:02AM +0200, Martin Schulze wrote:
> > > > > CVSROOT:	/cvs/webwml
> > > > > Module name:	webwml
> > > > > Changes by:	dmartinez	01/05/25 15:34:15
> > > > > 
> > > > > Modified files:
> > > > > 	english/MailingLists: mklist.tags 
> > > > > 
> > > > > Log message:
> > > > > Added several spaces at the end of German, Spanish and Swedish translations. It seems that WML doesn't treat newlines as blank spaces, and the final word in several sentences is joint with the next one.
> > > 
> > > These changes are evil since they're difficult to maintain (about nobody
> > > cares about trailing whitespaces).
> > 
> > They're easy to fix, at least. It's either that or having 200-column lines,
> > which is plain ugly and almost as unmaintainable...
> 
> Both are ugly and unmaintainable.
> 
> We already have slices that look like:
> 
> 	[EN:
> some blurb and more blurb, and guess what, even more blurb
> and it even continues with more blurb in the second line
> 	:]
> 
> Not sure if whitespace=delete is activated there.

Apparently it wasn't activated or there are trailing spaces.

I'd like to improve maintability (sp?).
 . 200-column lines are not maintainable
 . multi-line slices with the requirement to have trailing spaces
   are not maintainable (all wrapping mechanisms normally eat these
   spaces and you can't see them normally)

Thus what do you think about this patch for such situations?
In short, slices will be added a space at the end of a line when
the a slice is splitted.

Index: template/debian/footer.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/template/debian/footer.wml,v
retrieving revision 1.73
diff -u -r1.73 footer.wml
--- template/debian/footer.wml	2001/05/24 22:34:23	1.73
+++ template/debian/footer.wml	2001/05/28 09:16:40
@@ -1,6 +1,8 @@
 #use wml::debian::ctime
 
 <define-tag sendcomments whitespace=delete>
+<:
+my $slices = q{
 	[EN:See the Debian <A href="$(HOME)/contact">contact page</A> for information on contacting us.:]
 	[EL:Äåßôå ôçí óåëßäá <A href="$(HOME)/contact"> åðéêïéíùíßáò ìå ôï Debian</A> ãéá ðëçñïöïñßåò åðéêïéíùíßáò ìáæß ìáò.:]
 	[RO:Vedeþi <A href="$(HOME)/contact">pagina de contacte Debian</A> pentru mai multe informaþii.:]
@@ -26,6 +28,10 @@
 	[HU:Ha fel akarod venni velünk a kapcsolatot, látogass el <A href="$(HOME)/contact">ide</A>!:]
 	[AR:ÔÝ<A href="$(HOME)/contact">ÕÝÍÉ ÅÊøÕÇáÇÊ</A> ÏÈíÇä ááãÒíÏ ãä ÇáãÚáæãÇÊ æ ÇáÅÊøÕÇá ÈäÇ.:]
 	[RU:óÍÏÔÒÉÔÅ ËÁË Ó ÎÁÍÉ Ó×ÑÚÁÔØÓÑ ÎÁ ÓÔÒÁÎÉÃÅ <A href="$(HOME)/contact">ËÁË Ó ÎÁÍÉ Ó×ÑÚÁÔØÓÑ</A>.:]
+};
+$slices =~ s/([^:][^ \]])\n/$1 \n/g;
+print $slices;
+:>
 </define-tag>
 #<define-tag sendcomments whitespace=delete>
 #	[EN:Please send comments or corrections on these pages to:]

Regards,

	Joey

-- 
If you come from outside of Finland, you live in wrong country.
	-- motd of irc.funet.fi

Please always Cc to me when replying to me on the lists.



Reply to: