Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 44750

Summary: French typography imposes a space before colons
Product: [OLD] Docs-user Reporter: Xavier Neys (RETIRED) <neysx>
Component: OtherAssignee: Sven Vermeulen (RETIRED) <swift>
Status: VERIFIED LATER    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Trivial patch

Description Xavier Neys (RETIRED) gentoo-dev 2004-03-15 09:23:26 UTC
After some discussions on IRC and via email, we reached the conclusion that this would be the simplest way to add the required space between number and colon preceding caption in <figure> and <pre> elements.
We add a text element in {LANG}/insert-{LANG}.xml named "SpaceBeforeColon"
Only the English and French versions need to be changed. The English one is empty and the French one adds a &#160;
Comment 1 Xavier Neys (RETIRED) gentoo-dev 2004-03-15 09:24:56 UTC
Created attachment 27402 [details, diff]
Trivial patch

2 lines in guide.xsl need to be changed and 1 element needs to be added to
inserts-en.xml and inserts-fr.xml
Comment 2 Sven Vermeulen (RETIRED) gentoo-dev 2004-03-15 12:51:35 UTC
Thanks! I've committed the patch. I'll keep this bug open though to investigate further hacking on the stylesheets (or any other resolution) to make it possible for the french translators to translate documentation without having to add &amp;nbsp;'s to the doc every time a " :" is used.
Comment 3 Xavier Neys (RETIRED) gentoo-dev 2004-03-15 13:09:04 UTC
Thanks. I suppose it would be OK with all languages if any space immediately preceding a double punctuation mark could be mde non-breakable.
When a lang does not require any space, don't put any and none will be inserted.
If a space is required, put a normal one and let it be made non-breakable automagically. It would not get us totally rid of those &nbsp;, but it would help a lot.

FYI, it is not only the colon, but all double punctuation marks preceded by a space, i.e.
 !
 ?
 
Comment 4 Xavier Neys (RETIRED) gentoo-dev 2004-03-15 13:09:04 UTC
Thanks. I suppose it would be OK with all languages if any space immediately preceding a double punctuation mark could be mde non-breakable.
When a lang does not require any space, don't put any and none will be inserted.
If a space is required, put a normal one and let it be made non-breakable automagically. It would not get us totally rid of those &nbsp;, but it would help a lot.

FYI, it is not only the colon, but all double punctuation marks preceded by a space, i.e.
 !
 ?
 «
 »
 ;
 :
Comment 5 Xavier Neys (RETIRED) gentoo-dev 2004-03-30 02:45:46 UTC
I suggest this bug be closed unless you want to code some kind of s/ ([:?!;])/&nbsp;\1/ into guide.xsl
Comment 6 Sven Vermeulen (RETIRED) gentoo-dev 2004-03-30 04:22:36 UTC
Unless the bug is a thorn in the eye, I'd like to keep it open to remind me to search for such substitution magic. Afaik it needs to be put mainly in the <p> entity, so substitutions shouldn't be placed everywhere. Just in <xsl:template match="p">... or something like that.

I just hope I can do substitutions before the other templates inside <p> (such as <e>, <b>, <i>, <c>, <brite>, ...) are parsed, otherwise the substitutions need to happen there too (which is less beautiful).
Comment 7 Xavier Neys (RETIRED) gentoo-dev 2004-03-30 04:41:59 UTC
This bug is yours ;-) Keep it open as long as you want/need.

<p> will not be enough. What about <note> <impo> <warn> and in comments inside <pre> and <title> ?
Comment 8 Sven Vermeulen (RETIRED) gentoo-dev 2004-03-30 05:39:21 UTC
Agreed on the impo|warn|note, but do we have title's that use reading marks? I have to check, but I thought reading marks inside titles wasn't according to the English policy (not that we ever tried to have our documents to some writing standard yet). I'll need to check on that.

Stuff inside <pre> is automatically non-wrapped.
Comment 9 Xavier Neys (RETIRED) gentoo-dev 2004-03-30 06:36:56 UTC
Sorry about the <pre>, I should have known as I told the same thing to my translators.

We don't care what the English policy is about marks in titles. If the French one requires one, we put one. We do have question marks in titles. The FAQ comes to mind, but there must be others as well.
You can add the <li> and <ti> to the list.

BTW, French quotes 
Comment 10 Xavier Neys (RETIRED) gentoo-dev 2004-03-30 06:36:56 UTC
Sorry about the <pre>, I should have known as I told the same thing to my translators.

We don't care what the English policy is about marks in titles. If the French one requires one, we put one. We do have question marks in titles. The FAQ comes to mind, but there must be others as well.
You can add the <li> and <ti> to the list.

BTW, French quotes « » require non-breakable spaces _inside_, i.e. after opening one and before closing one. Add s/« /«&nbsp;/ and s/ »/&nbsp;»/ to your list of substitutions ;-)
Comment 11 Sven Vermeulen (RETIRED) gentoo-dev 2004-08-01 06:23:14 UTC
Crap; I'll probably never get into this hacking (unless I'm rewriting the entire XSLT). Marking as LATER.
Comment 12 Marcelo Goes (RETIRED) gentoo-dev 2006-01-26 10:23:28 UTC
Closing this bug as per Josh's request in gentoo-doc's ML.