Closed Bug 16206 (Default-Quotes) Opened 25 years ago Closed 16 years ago

Initial value for 'quotes' property could be nicer [GC]

Categories

(Core :: CSS Parsing and Computation, enhancement, P5)

enhancement

Tracking

()

RESOLVED WONTFIX
Future

People

(Reporter: ian, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: css2, testcase, Whiteboard: [Hixie-PF])

Attachments

(3 files, 1 obsolete file)

The initial value of the 'quotes' property at the moment appears to be
   quotes: '"' '"';
This is quite boring. I would suggest the initial value be changed to:
   quotes: "\201C" "\201D" "\2018" "\2019";
...as recommended in the spec. This would result in some much nicer looking
quotes. See the last test of the first section of this test page:
   http://www.bath.ac.uk/%7Epy8ieh/internet/eviltests/content/2.html

Note that for a slightly more i18n-aware version, we may require some styles in
the html.css resource along the lines of:

   :root:lang(de), :lang(de) > Q { quotes: '»' '«' '\2039' '\203A' }
   :root:lang(en), :lang(en) > Q { quotes: "\201C" "\201D" "\2018" "\2019"; }
   :root:lang(fr), :lang(fr) > Q { quotes: '« ' ' »' }
   :root:lang(no), :lang(no) > Q { quotes: "«" "»" "<" ">" }

...or some such. (Note that we can't use the universal selector or it will
mess up inheritance!) This issue should probably be broken off and sent off
for some more research...
Status: NEW → ASSIGNED
Target Milestone: M16
Assignee: peterl → troy
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
*** Bug 22882 has been marked as a duplicate of this bug. ***
The URL given in bug 22882 also has some good test cases.
One small comment. For Norwegian, this is more typographically correct:

:root:lang(no), :lang(no) > Q { quotes: "\AB" "\BB" "\2039" "\203A"; }
Keywords: css2
Migrating from {css2} to css2 keyword. The {css1}, {css2}, {css3} and {css-moz}
radars should now be considered deprecated in favour of keywords.
I am *really* sorry about the spam...
Summary: {css2} Initial value for 'quotes' property could be nicer → Initial value for 'quotes' property could be nicer
Target Milestone: M15 → M17
this can wait until M18
Assignee: troy → buster
Status: ASSIGNED → NEW
Target Milestone: M17 → M18
Notes from troy:
Today, the quote character is hard coded, generated content in the frame 
construction code.  We should remove this hard coding (there are comments in the 
code), so for example we could handle quote set to "none" or to any arbitrary 
string.
Status: NEW → ASSIGNED
redistributing bugs across future milestones, sorry for the spam
Target Milestone: M18 → M19
*** Bug 41778 has been marked as a duplicate of this bug. ***
Since we need this to make <Q> fully supported for HTML4, marking that this bug
blocks meta-bug 7954.
Blocks: html4.01
Keywords: testcase
As per meeting with ChrisD today, taking QA.
QA Contact: chrisd → py8ieh=bugzilla
Some comments to this attachement:
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=4733

German:
> There is ,,another method of quoting&ldquo;, but it would be harder to 
> implement properly, and it's usually only used with Fraktur (Gothic       
> black-letter) lettering styles.)
Well in newspapers, handwritten etc. this quoting ,,Peter sagt: ,Ich gehe ins
,Delphi'.' '' is most comon. (The >>Peter says: >I go to the >Delphi<.< << is
the style mostly used in books.) I would prefer the ,,...'' quotes in a browser.
Note: The quotation marks are inversed French ones: >foo< instead of <foo>.
(an extra rule applys to de-CH which uses for Antiqua typesetting the French qm:
<<foo <bar> foo>>)

* Spacing. If two quotion marks follow each other a small space must be inserted
(see above, between the <«)

* In Germany we use _double_ quotation marks as outer and _single_ q.m. as
inner. If we nest more q.m. we still use single q.m. (see above example)
As far as I know the same is true for Frensh, Italian etc.

* As far as I know there is a difference between en-GB and en-US.
en-GB uses `outer ``inner'' outer' and en-US uses ``outer `inner' outer''

* Some more quotation signs:
GERMAN: 
   OUTER: ,,...`` -- [,,]<- one sign [&ldquo;]
   INNER: , ...`  -- [,] [&lsquo;]
or
   OUTER: »...« [»][«]
   INNER: >..<  
 Swiss (,, is also common):
   OUTER: «..» [«][»]
   INNER: <..>

FRENSH:  As Swiss (<<)
ITAlIAN: Like in Frensh (there is also `foo, but this is rarely used one for
some headlines)
DUTSH: Such as ,,foo ,bar' bar'' (the upperquote looks like a nine: 
                                  &rsquo;&rdquo;)
> * Spacing. If two quotion marks follow each
> other a small space must be inserted
> (see above, between the <«)

Yes, this should be a non-breaking 'thin space' (the thin space is U+2009).

> * In Germany we use _double_ quotation marks as outer
> and _single_ q.m. as inner. If we nest more q.m. we
>  still use single q.m. (see above example)
> As far as I know the same is true for Frensh, Italian etc.

In Norwegian we alternate: «foo <faa «fi <fo> fi» faa> foo» (where the <> 
aren't <> but U+2039 and U+203A).

> * As far as I know there is a difference between en-GB
> and en-US. en-GB uses `outer ``inner'' outer' and
> en-US uses ``outer `inner' outer''

That's correct (`` and '' should be real 66 and 99 curly quotes).
Summary: Initial value for 'quotes' property could be nicer → Initial value for 'quotes' property could be nicer [GC]
Viewing the test case with build 2000093020, I note that the outer quotes are
used but the inner quotes are not.
Blocks: robin's
P3 bugs will not make NS6 rtm.  Milestone ->Future.  There are two distinct
pieces of work that need to be done here.  First, the layout team (me!) needs to
remove troy's hard-coding of the quote character as described in an earlier
comment.  That's a very small amount of work.  Second, the I18N team needs to
spec out the quote semantics for all supported languages and add them to the
html.css style sheet.

cc-ing some I18N guys so they can add this to their NS6.0x release plans.  It
wouldn't hurt to write this up as a request for help to the I18N newsgroups, and
see if we can get some volunteers to research each of the interesting languages.
 I've already noticed some pretty detailed comments in this and related bugs.
It's be nice to merge all these comments into a single spec.
Target Milestone: M19 → Future
1. I don't think :lang(xx) is working yet. Pierre- Is that true ? When do we
plan to make it work ?
2. I think we should consider backward compatability also.
buster, Should information about different languages be added as comment to this bug 
or collected in some other way?

ftang, What do you mean by backward compatibility in this case? The <q> element is 
inherently incompatible with legacy browsers.
> 2. I think we should consider backward compatability also.

What do you mean?
The :lang pseudo is not implemented yet (look for "nsCSSAtoms::langPseudo" in 
nsCSSStyleSheet.cpp).
> There are two distinct pieces of work that need to be done here.  First, the
> layout team (me!) needs to remove troy's hard-coding of the quote character as
> described in an earlier comment.  That's a very small amount of work.
> Second, the I18N team needs to spec out the quote semantics for all supported
> languages and add them to the html.css style sheet.
I think those two parts are rather independend. You could remove the hard-coding
and add the same quote via html.css. The lang() part can be done later when it
is supported, but this wouldn't then requite step one.
(note: inner quotes don't work neither so there are more bugs than just the
hard-coding and the missing lang().)
lang() is bug 35768 so we may want to add a dependency.
Depends on: 35768
Whiteboard: [Hixie-PF]
Build reassigning Buster's bugs to Marc.
Assignee: buster → attinasi
Status: ASSIGNED → NEW
This bug depends on bug 35768 which will soon be fixed.

Pay attention to performance if you apply fairly generic style rules in html.css 
as Ian suggested when he opened the bug.
<URL:http://www.evertype.com/alphabets/> contains an extensive collection of PDFs detailing orthography of European languages. Yiddish apparently uses characters 201C and 201E for its purposes (inline, anyway; book titles are often delimited by 201C and 201D, according to <URL:http://www.shoshke.net/yuyip/unicodechrt.htm>). I'm not familiar with Asian languages, or if they even have characters that correspond to these semantics.
*** Bug 106258 has been marked as a duplicate of this bug. ***
If this is done, there *needs* to be an easy way for users to 
disable it and get plain ASCII quotes.  This is vital for a 
significant minority of power users, for copy/paste operations 
in situations where esoteric characters (read: anything but 7-bit
ASCII) are not acceptable.  Besides, curly quotes just look very 
very wrong, to the point of being an extreme distraction, to some
few of us (mostly the same kind of old-timers who insist on a 
fixed-width font for email and usenet).  

How can I set my language environment to accept only ASCII 
characters?    

Jonadab: your concerns would best be handled by a separate bug in the
DOM-to-text conversion component.  Note that the same issues could just as well
occur cut-and-pasting, say, a European name with an ISO-8859-1 character.
Blocks: 147983
Taking those of attinasi's style system bugs that are really style system bugs
and still look valid.
Assignee: attinasi → dbaron
Reconfirmed using FizzillaCFM/2002071208. Setting All/All.

I think this depends on bug 24861.
Depends on: nested-quotes
OS: Windows 98 → All
Hardware: PC → All
Comment on attachment 95443 [details] [diff] [review]
Patch html.css for de, en, fr, it, nl and no

de and nl should use "\201A" rather than ",", right?

The performance effect of these selectors (in particular, the middle one) is a
problem, although I see what you're trying to do.
For reference, http://www.unicode.org/charts/PDF/U2000.pdf contains information
about the characters used here.
For Spanish (es) would be the same as for US English (en):

It could be expressed this way:

:root:lang(en), [LANG|=en],    :lang(en)     > q ,
:root:lang(es), [LANG|=es],    :lang(es)     > q
{ quotes: "\201C"  "\201D" "\2018" "\2019" }
Would there be any difference between European Spanish and Mexican or Latin
American Spanish?
The Spanish I learned in school used quotes like what's in the patch for de-ch,
except with the last two reversed.  (Was that order intentional?)  And I've
certainly seen books printed that way.

I don't know if I'm out of date or if it's a regional difference, although I can
say that http://www.abc.es/ (Spanish) seems to use a mix of quoting styles,
while all the other Spanish and Latin American newspaper sites I can find (see
http://www.library.upenn.edu/resources/news/newspapers/language/spanish-papers.html
) seem to use American-style quotes.  (Newspapers are good because they have
lots of quotes.)
Actually, see comment 23 for a helpful URL about punctuation in European languages.
I now have updated information for the Norwegian quotation marks. These should use:

{ quotes: "\AB" "\BB" "\2018" "\2019"; }

(The marks I mentioned earlier are still sometimes used, but these are the most
common and preferred used.)

Note that these quotation marks should be used for *three* language codes, 'no',
'nn' and 'nb' (Norwegian consists of two official written languages, which has
separate ISO 639 language codes). To summarize, the following style rules should
be added/changed:

:root:lang(no), :lang(no) > Q { quotes: "\AB" "\BB" "\2018" "\2019"; }
:root:lang(nn), :lang(nn) > Q { quotes: "\AB" "\BB" "\2018" "\2019"; }
:root:lang(nb), :lang(nb) > Q { quotes: "\AB" "\BB" "\2018" "\2019"; }

(Feel free to combine them into one rule if that's better for performance.
Oh, by the way, the 'Q' in all the style rules should be changed to 'q', to
match the XHTML (served as 'application/xhtml+xml' or 'text/xml') element too.
I.e., change:

:root:lang(xx), :lang(xx) > Q

to

:root:lang(xx), :lang(xx) > q
I use now this type of selector:
  :lang(en),	:lang(en)     > q
This should take care of <blockquote> and <q>.
But maybe we could even dump the :lang() > q part since e.g. in German we use
for <q> the quotes from the language from being quoted - if one quotes a
complete sentence. (If only a (few) word(s) are quoted the quotes of the
surrounding text are used.) Don't know which case is more common.
(Now I understand why XHTML's <quote> doesn't automatically add quotation
marks)

http://www.evertype.com/ is not really helpful since it frequently states:
'single' and "double" quote without telling which comes in which order.

Further Changes: Added es (copied from de-ch), es-es (according to evertype);
nn , nb and no have now the new quotes from comment 36.

> The performance effect of these selectors is a problem
This will unfortunally become even worse as the number of supported languages
increases. A radical solution would be keep the current behaviour, add a note
to the release notes that one can put such selectors in one's user.css and let
the sites which use <q> take care of this, i.e. let them write appropriate
selectors.
Attachment #95443 - Attachment is obsolete: true
Those selectors will also have performance issues.  I really can't think of a
good way to set a reasonable default for quotes on all elements so that we'll do
the right thing for open-quote and close-quote.  Doing the q element is easy
enough, though.  Perhaps just the first and third rules from your first patch
would be good enough?

I think the es-ES still has the wrong thing for the second pair, although styles
seem to be changing and the rule could probably be omitted altogether.

It's also conventional to write the country codes in uppercase, e.g., en-GB,
es-ES, etc.
Here's the correct quotation marks for Danish:

:lang(da), :lang(da) > q { quotes: "\BB" "\AB" "\203A" "\2039"; }
Karl, out of curiosity, what reference are you using to determine these?
Finnish:
Outer left & right quotation mark: U+201D 
Inner left & right quotation mark: U+2019
> I think the es-ES still has the wrong thing for the second pair, although 
> styles seem to be changing and the rule could probably be omitted altogether.
I have no idea what they have to look like in Spanish actually (you usually see
only the first pair), but this is what
http://www.evertype.com/alphabets/spanish.pdf says. I can also remove es-es
altogether.

> It's also conventional to write the country codes in uppercase, e.g., en-GB,
> es-ES, etc.
Hmm. I thought that lowercase was more common (e.g. language preference in
Mozilla) and RFC 2616 (3.10+14.4) use lowercase. RFC 1766 uses "en-US". Should I
fill a bug to for changing the Mozilla preference?
Swedish:

:root:lang(sw), :lang(sw) > q { quotes: "”" "”" "’" "’" }

or (less common)

:root:lang(sw), :lang(sw) > q { quotes: "»" "»" "›" "›" }

This really sucks, but that is how it is...
Please give unicode code points, not actual characters, since Bugzilla is served
without a character set header and therefore it is impossible to tell what the
character is supposed to be.

Regarding the patch, why do we bother to set the 'quotes' property on the <q>
elements? 'quotes' is inherited, so if we just set it on :root and :lang(), we
should be ok, no?
> since Bugzilla is served without a character set header

Is there a bug filed for this?
Matching :lang() for every element in the document is likely to be slow, and
will also introduce an extra rule matching every single element. 
:-moz-different-lang() might not be so bad, and could be faster, although we'd
still have to attempt to match for every element.
well, only doing it on Q works for me too, although it seems kinda wrong. I
prefer the :-moz-different-lang() idea. My point really was just that we
shouldn't have _both_ Q _and_ * as the selectors.
Status: NEW → ASSIGNED
The last patch seems incorrect for the french quotes. u2039 (like '<') and u203a
(like '>') are NOT used as nested quotes in french. In fact, french nested
quotes are just like double english quotes (see
http://listetypo.free.fr/ortho/guillemets.html (in french)). Note that the
testcase given in comment 5 as well as the example given in the CSS 2 
http://www.w3.org/TR/REC-CSS2/generate.html#quotes-insert are both wrong.

+:lang(fr), :lang(fr) > q { quotes: "\AB\2009" "\2009\BB" "\2039\2009" "\2009\203A"}

This line should be:
+:lang(fr), :lang(fr) > q { quotes: "\AB\A0" "\A0\BB" "\201C" "\201D"}

Well, maybe it would look better with a thin space (2009) instead of a
non-breaking space (A0) tough, since in HTML the latter seems justifiable where
it should not.

So it should really be:
+:lang(fr), :lang(fr) > q { quotes: "\AB\2009" "\2009\BB" "\201C" "\201D"}
*** Bug 210457 has been marked as a duplicate of this bug. ***
"how user agents should render quotation marks"
"it is customary to quote the text with the quote marks of the language of the
surrounding text, not the language of the quotation itself."
http://www.w3.org/TR/REC-CSS2/generate.html#quotes

in reply to comment #38
 Bug 16206#38
Here's a crazy, crazy idea:

Some people prefer black text on a white background, while other people prefer
yellow text on a black background. Mozilla allows these all of these people to
get what they want.

By analogy:

Some people prefer &ldquo; left and right double quotes &rdquo;
while other people prefer &laquo; left and right guillemets &raquo;. Perhaps
Mozilla could allow all of those people to get what they want ?

(There's no need for yet another special "preferences" setting; Mozilla would
set the appropriate quote style automatically when the user changes the
"languages" settings).

The crazy idea is that a French-speaking Mozilla user would always see <q>quote
tags</q> rendered with guillemets, ignoring the language used by the web page's
author. (Is this what Mozilla should do when no LANG attribute or CSS occurs on
the web page ?)

p.s.: Bug 7954 depends on this bug (Bug 16206) because we need at least a
partial fix for full HTML 4 compliance --
see
http://www.w3.org/TR/html4/struct/text.html#h-9.2.2
*** Bug 213617 has been marked as a duplicate of this bug. ***
In response to #51: No, W3C is wrong here (as it also gives us bad/false
examples of French and German quotation marks). #31 is more close to correct
typography.

Please don't read RECs and RFCs about that stuff but common typography books.

If a quote is an expression by itself, the marks accord to that quote (in
language). If it is only a part of an expression (sentence or the like), the
surrounding language counts.

This is common practice for centuries now. And even more it's just reasonable.
This is wrong:
:lang(de-ch), :lang(de-ch) > q { quotes: "\AB" "\BB"  "\2039" "\203A" }
It should be: { quotes: "\BB" "\AB" "\203A" "\2039" }

This is nonsense:
:lang(nl), :lang(nl) > q { quotes: "\201E" "\2019" "\201A" "\201D" }
(Just look at the results.)
I read trough the discussions on W3C. Although the examples by Bert Bos tell us
that :lang(xy) > q should be used because quotation marks would usually set up
according to the surrounding text's language rules, this is not only
semantically wrong (for quotes that are complete sentences, which I counted most
in various kinds of documents and books), it's also vialating the spec of the
<q> tag as it was ment by his i18n inventors.

Within the W3C discussion that went on while the <q> tag and the quotes:
property were created, it was clearly stated (by those who created/invented it)
that the standard case for <q></q> should be full-sentence-quotes and that <q
lang="xy"></q> should be synonymous for xy-style quotation marks. (And so
smaller-than-a-sentence quotes which are typically surrounded by quotation marks
as usual in the surrounding language would need usage of <q><span
lang="xy"></span></q> instead of <q lang="xy"></q>.)

So this means q:lang(xy) and (as long as the bug lives on) q q:lang(xy) would be
quite enough. (Inheritance is not vialated by assigning everything directly to
the q elements only.)

This would give us the following examples:
q:lang(cs), q:lang(nl), q:lang(pl), q:lang(ro) { quotes: "\201E" "\201D" "\201A"
"\2019" }
q q:lang(cs), q q:lang(nl), q q:lang(pl) { quotes: "\201A" "\2019" }
(That's what is usual in the Netherlands, among others. I guess this is also
true for some more languages, e.g. q:lang(sk).)

q:lang(de), q:lang(sr) { quotes: "\201E" "\201C" "\201A" "\2018" }
q q:lang(de), q q:lang(sr) { quotes: "\201A" "\2018" }

q:lang(de-ch), q:lang(de-it) { quotes: "\BB" "\AB" "\203A" "\2039" }
q q:lang(de-ch), q q:lang(de-it) { quotes: "\203A" "\2039" }

q:lang(en), q:lang(en-gb) { quotes: "\2018" "\2019" "\201C" "\201D" }
q q:lang(en), q q:lang(en-gb) { quotes: "\201C" "\201D" }

q:lang(en-us) { quotes: "\201C" "\201D" "\2018" "\2019" }
q q:lang(en-us) { quotes: "\2018" "\2019" }

q:lang(es), q:lang(nn) { quotes: "\AB" "\BB" "\2018" "\2019" }
q q:lang(es), q q:lang(nn) { quotes: }
(This is standard for all variants of Spanish and Nynorsk.)

q:lang(fi), q:lang(sv) { quotes: "\201D" "\201D" "\2019" "\2019" }
q q:lang(fi), q q:lang(sv) { quotes: "\2019" "\2019" }

q:lang(fr) { quotes: "\AB\2009" "\2009\BB" "\201C" "\201D" "\2018" "\2019" }
q q:lang(fr) { quotes: "\201C" "\201D" }
q q q:lang(fr) { quotes: "\2018" "\2019" }
(This is the official French way of quoting. The levels!!)

q:lang(it) { quotes: "\AB" "\BB" "\201C" "\201D" }
q q:lang(it) { quotes: "\201C" "\201D" }
(Not "\2039" "\203A"!)

q:lang(ja), q:lang(zh) { quotes: "\300C" "\300D" "\300E" "\300F" }
q q:lang(ja), q q:lang(zh) { quotes: "\300E" "\300F" }
(Does anyone know about Korean?)

q:lang(nb), q:lang(no), q:lang(ru) { quotes: "\AB" "\BB" "\2039" "\203A" }
q q:lang(nb), q q:lang(no), q q:lang(ru) { quotes: "\2039" "\203A" }
(The official Bokmål version. Also usual in Russian. Not in Italian!)

Just for a start ...

Could someone put this into an updated patch/attachment? Thanks.
Sorry, vi_o_lated ... ;)
Oops, for French I meant: "Three levels!" ...
I was wrong: Czech does't use the Polish/Dutch but the German tradition. The
same seems true for Romanian, Slovak and Slovenian, which would give this:

q:lang(cs), q:lang(de), q:lang(ro), q:lang(sk), q:lang(sl), q:lang(sr) { quotes:
"\201E" "\201C" "\201A" "\2018" }
q q:lang(cs), q q:lang(de), q q:lang(ro), q q:lang(sk), q q:lang(sl), q
q:lang(sr) { quotes: "\201A" "\2018" }

q:lang(nl), q:lang(pl) { quotes: "\201E" "\201D" "\201A" "\2019" }
q q:lang(nl), q q:lang(pl) { quotes: "\201A" "\2019" }

Well, there should also be official national standards for these languages like
there are for Norway, Germany, Netherlands, France etc.
Back again: According to a Romanian Grammar schoolbook it proved right as I
wrote in the first place, same way as in Poland and the Netherlands (which have
official national standards):

q:lang(nl), q:lang(pl), q:lang(ro) { quotes: "\201E" "\201D" "\201A" "\2019" }
q q:lang(nl), q q:lang(pl), q q:lang(ro) { quotes: "\201A" "\2019" }

And while the German curved tradition is valid in Slovenia, the
Swiss-German/Italian-German (Tiroler) tradition (Guillemets pointing inwards) is
more common there, so it's:

q:lang(de-ch), q:lang(de-it), q:lang(sl) { quotes: "\BB" "\AB" "\203A" "\2039" }
q q:lang(de-ch), q q:lang(de-it), q q:lang(sl) { quotes: "\203A" "\2039" }

And (all proven), whereas Serbian means only the Kyrill version (the Latin is
sr@Latn and uses the French way but without spaces):

q:lang(cs), q:lang(de), q:lang(sk), q:lang(sr) { quotes: "\201E" "\201C" "\201A"
"\2018" }
q q:lang(cs), q q:lang(de), q q:lang(sk), q q:lang(sr) { quotes: "\201A" "\2018" }
*** Bug 144853 has been marked as a duplicate of this bug. ***
Blocks: 56362
Well, both blockers for this bug have been fixed, so there's nothing stopping
this from being implemented now.
This page may be a very useful reference point for various languages:
http://en.wikipedia.org/wiki/Quotation_mark

This may help with differences of nested quotations between American and British:
http://www.grammartips.homestead.com/quotationmarks.html

(In reply to comment #49)
> The last patch seems incorrect for the french quotes. u2039 (like '<') and u203a
> (like '>') are NOT used as nested quotes in french. In fact, french nested
> quotes are just like double english quotes (see
> http://listetypo.free.fr/ortho/guillemets.html (in french)). Note that the
> testcase given in comment 5 as well as the example given in the CSS 2 
> http://www.w3.org/TR/REC-CSS2/generate.html#quotes-insert are both wrong.

As I understand in some languages there may be alternative quotation marks used
for handwriting that difer from typographic quotes, so let's be very careful not
to confuse 2 different styles.

(In reply to comment #51)
> "how user agents should render quotation marks"
> "it is customary to quote the text with the quote marks of the language of the
> surrounding text, not the language of the quotation itself."
> http://www.w3.org/TR/REC-CSS2/generate.html#quotes

CSS 2.1 no longer makes such recommendation:
http://www.w3.org/TR/CSS21/generate.html#quotes

I think this should be specific to the rules of host language, so different
languages would have different CSS selectors used.

But I personally lean towards q:lang(xy) being used as selector to avoid any
slowness. Authors can always provide their preferred quotation rules through CSS
- à la XHTML 2.0 <quote> - if they don't like Mozilla rendering.
(In reply to comment #62)
> > The last patch seems incorrect for the french quotes. u2039 (like '<') and u203a
> > (like '>') are NOT used as nested quotes in french. In fact, french nested
> > quotes are just like double english quotes (see
> > http://listetypo.free.fr/ortho/guillemets.html (in french)). Note that the
> > testcase given in comment 5 as well as the example given in the CSS 2 
> > http://www.w3.org/TR/REC-CSS2/generate.html#quotes-insert are both wrong.
> 
> As I understand in some languages there may be alternative quotation marks used
> for handwriting that difer from typographic quotes, so let's be very careful not
> to confuse 2 different styles.
That comment was from me. The link I gave is of course about typographical
quotes (see "listetypo" in the address). 

An alternative way /may/ be used with handwriting in some regions, but none that
I know of looks like the example given above. And I should be more aware of that
since I'm from Belgium and not from France, so I know more about the little
differences that may exist between french-speaking countries. In fact, I've
never seen single chevrons used anywhere in French, only double "guillemets",
which makes me wonder why they are called "french" at all :)

Anyway, from your wikipedia article: "[In French,] English quotes are also used
for nested quotations, as American English uses single quotes", and an example
follows.
People worried about performance for multiple language selectors should probably
think about optimizing language selectors in CSS implementation, not about
quoting.  Separate issues.  Don't mess up quoting to hide inefficiency elsewhere.
Alias: DefaultQuotes
Alias: DefaultQuotes → Default-Quotes
For danish we use lower 66 quotes for start-quotation and upper 99 (201D) for 
end-quotation. I can't remember the rules for embedded quotations. For some 
silly reason unicode have not included a lower 66 quote yet.  
 
As a stop gap we could use lower 99 (201e) or upper reversed-99  (201f) or 
upper 66 (201c).  
 
I should also not that in Konqueror we so far just stick to the CSS 
recommandations of using "quotes: "\"" "\"", but since it is only Opera and 
Konqueror that so far have been supporting quotes no one are actually using 
them. We welcome Mozilla 1.8 to join the club ;) 
*** Bug 287299 has been marked as a duplicate of this bug. ***
*** Bug 300621 has been marked as a duplicate of this bug. ***
*** Bug 304762 has been marked as a duplicate of this bug. ***
*** Bug 338056 has been marked as a duplicate of this bug. ***
*** Bug 354356 has been marked as a duplicate of this bug. ***
Hey Dave,
shouldn't this "senior" bug be reconsidered and changed its target to 1.9?
Now, when FF supports spell-check feature, it'd be a logical step to improve FF's support of grammar. Yes, I'm talking about opening and closing question marks support within textfields, see the Basic Latin Unicode chart (http://www.unicode.org/charts/PDF/U0000.pdf)for example, plus respecting language specificities.
This bug has nothing to do with textfields.
Priority: P3 → P5
Is anyone working on this? Nested quotations look really weird currently. I was translating a press-release for Mozilla today, and I used quoted names, like „Mozilla“ inside a <q> element. The result looks really weird in Firefox.

For reference: in Lithuanian, quotes are „like this“. Inner quotes are like that too, I believe.
Blocks: 373733
Assignee: dbaron → nobody
Status: ASSIGNED → NEW
QA Contact: ian → style-system
In that v3 attachment, the values for Dutch are wrong for sure. They should be:

"\201E" "\201D" "\201A" "\2019"
For Polish (which is missing from this patch) comment #60 is formally correct, but there are three styles of quoting in Polish (see http://pl.wikipedia.org/wiki/Cudzys%C5%82%C3%B3w), of which the second one is more common, though.

So, for Polish I would suggest:

q:lang(pl) { quotes: "\201E" "\201D" "\00AB" "\00BB" }

which should render as:

„Cytat «wewnątrz» cytatu”
(In reply to comment #75)
> Created an attachment (id=258331) [details]
>  v3: Updated patch; added cs
> 

As far as I can guide you, those lang(en) entries should only be for lang(en-us),  en-us is but one of the dialects of English, and their quotation preference shouldn’t be inherited by the rest.
Could we have this by 3.1? Or maybe even by 3.0x?

I could probably even combine a patch using the info in the comments here...
Flags: wanted1.9.1?
Flags: wanted1.9.0.x?
This alternative patch takes Jörg Hartmann's approach of setting the property directly on q (and blockquote) tags rather than the :lang > q approach favored by others.  I find the argument in comment 56 compelling.  Hartmann's lists of rules appear to be a superset of those in attachment 258331 [details] [diff] [review].  I used them, plus corrections by later posters.  It does not appear to be necessary to include "q q:lang(foo)" rules anymore.

This is, of course, not a comprehensive set of rules.  I wonder if it would be possible to get assistance from our localization teams for this - unfortunately, absent cleverness in the core, all this stuff does have to wind up in html.css, so it won't fit into their existing workflow.

Note that if you don't have the patch for bug 389406 in your tree, one hunk of this patch will fail to apply; this is harmless.  All the significant changes are to html.css.
I don't think we should do this unless there's a cross browser spec for the desired behavior with commitments from other vendors to implement as well.  I'd also prefer not to do it at all because of performance and complexity.
(In reply to comment #80)
> This is, of course, not a comprehensive set of rules.  I wonder if it would be
> possible to get assistance from our localization teams for this -
> unfortunately, absent cleverness in the core, all this stuff does have to wind
> up in html.css, so it won't fit into their existing workflow.

It should be fairly easy. You (or I) can announce on mozilla.dev.l10n that some help is needed (or cc Pike on this bug and ask his help in spreading the word).

(In reply to comment #81)
> I don't think we should do this unless there's a cross browser spec for the
> desired behavior with commitments from other vendors to implement as well.  I'd
> also prefer not to do it at all because of performance and complexity.

We shouldn't do what exactly? I don't think some language matching would significantly degrade our performance or make html.css too complex. Instead, it would just make quotes look nicer for non-en-US texts.
Not wanted for 1.9.0.x.
Flags: wanted1.9.0.x? → wanted1.9.0.x-
Flags: wanted1.9.1?
Flags: wanted1.9.1-
Flags: blocking1.9.1-
(In reply to comment #82)
> We shouldn't do what exactly? I don't think some language matching would
> significantly degrade our performance or make html.css too complex. Instead, it
> would just make quotes look nicer for non-en-US texts.

It doesn't do authors any good to have better language-dependent defaults in some browsers; it only helps if they're present in all browsers.  Otherwise authors are better off just avoiding the Q element or specifying the 'quotes' property themselves.

So unless there's a standard for what the defaults should be that will be implemented across browsers, we shouldn't fix this bug.  We certainly shouldn't "refine" the values from release to release, since that would cause even more confusion for authors.

Marking WONTFIX (although given comment 0, FIXED might actually be more appropriate).
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: