Page MenuHomePhabricator

Mobile should equip blockquote with language dependent quotation marks
Closed, ResolvedPublic

Description

On mobile style sheets, <blockquote> is decorated by

blockquote::before {
   content: open-quote; }
blockquote::after {
   content: close-quote; }

That should be completed by language dependant definition of quotation marks. Project language (fallback to English) might be starting point, but could be based on page content or even section language.

End result:

Screen Shot 2016-11-30 at 9.33.12 AM.png (110×830 px, 33 KB)

See http://www.w3.org/TR/CSS2/generate.html#quotes-specify for required code.

Please find some major language customs here or as code.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

I think there are other cases where this infrastructure would be useful. I'm actually having a chat today with @Volker_E and @violetto around improving i18n of css and will bring this up.

Jdlrobson triaged this task as Medium priority.Oct 8 2015, 5:14 PM

Thanks @PerfektesChaos that's super helpful! We'll need to fix T101936 in the process

Jdlrobson raised the priority of this task from Medium to High.Dec 15 2015, 5:34 PM

Ehm. it be nice and all, but before we just do something, can we consider if this is even wanted ?

I mean the en.wp manual of style explicitly says: "Do not enclose block quotations in quotation marks (and especially avoid decorative quotation marks in normal use [..] which should only be used for pull quotes".

I find this a typical editorial decision honestly.

@TheDJ Regarding your comment the usage of quotes for blockquotes is discussable. But this task should consider q element styles as well, where the rules would be similar.
See https://github.com/necolas/normalize.css/issues/493 for a breakdown of quotes and smart quote support (Chrome for example still doesn't support smart quotes in v53)

The opinionated solution is considerably useful:

q {
  quotes: "“" "”" "‘" "’";
}
pre q,
code q,
kdb q,
samp q {
  quotes: "\"" "\"" "'" "'";
}
[lang="de"] q {
  quotes: "„" "“" "‚ " "‘";
}
[lang="fr"] q,
[lang="es"] q {
  quotes: "«" "»";
}

https://de.wikipedia.org/wiki/Anf%C3%BChrungszeichen#Andere_Sprachen gives a nice overview on the different quotation marks in several languages.

Interestingly though, [WP:EN] uses in its MediaWiki:Common.css

/* Straight quote marks for <q> */
q {
    quotes: '"' '"' "'" "'";
}

Would be interesting to find out why this decision was made? @Edokter, could you shine a light here? https://en.wikipedia.org/w/index.php?title=MediaWiki:Common.css&oldid=618390349

@Volker Edokter has left the community unfortunately.

It was done because user-agents were using different user-agent styling defaults

English Wikipedia has a Manual of Style dictating straight quotation marks for inline quotes, and this allows for consistent usage of this element.

What's your question? I think https://de.wikipedia.org/wiki/Anf%C3%BChrungszeichen#FN_3 gives a good overview. I personally use „ and “ exclusively.

@Physikerwelt My question was if there is a clear position for or against typographically correct quotation marks in German language Wikipedia as I was surprised to find out that English Wikipedia has ruled them out? https://de.wikipedia.org/wiki/Wikipedia:Typografie#Anf.C3.BChrungszeichen provides me the answer needed though.

Since project start, at least for a dozen years now, German Wikipedia has very clear position:

  1. Typographic quotation (among others) is preferred against ASCII chars.
  2. Authors won't get decapitated, if they type ASCII on keyboard, but later editors will upgrade that into typographic silently, if they like to do so, and may use script support.
MBinder_WMF renamed this task from Mobile should equip blockquote with language dependant quotation marks to Mobile should equip blockquote with language dependent quotation marks.Nov 30 2016, 5:30 PM

If we're going for a CSS language-dependent solution we might end up with quite some code. Please compare one more time the table with all different quotation marks at https://en.wikipedia.org/wiki/Quotation_mark#Summary_table
I've also not seen websites other than in English/French/German language with the “graphical” blockquote solution shown in the task description screenshot.
It would be interesting to understand usage in languages like simplified Chinese or Hindi (which is missing in the summary table).

@Volker_E, I guess indentation + gray bar on the left is probably more common for Chinese block quote as shown below. People use the “graphical” blockquote you mentioned as well. I don't see a lot of discussion about this problem on Chinese websites, so I guess people are okay either way.

Screen Shot 2016-12-01 at 1.15.13 PM.png (180×719 px, 55 KB)

In some browsers, the block quoted text will be italicized automatically. Chinese users are not happy about that. Also, for traditional Chinese, I've never seen people use big "graphical" quotation mark like 「…」or 『…』for blockquote (not 100% sure though...).

FYI:
https://en.wikipedia.org/wiki/Block_quotation

Apart from quotation marks not being used to enclose block quotations, there are no hard-and-fast rules for the exact formatting of block quotations. To a large extent the specific format may be dictated by the method of publication (e.g. handwritten text, typewritten pages, or electronic publishing) as well as the typeface being used.

For writers and editors, The Chicago Manual of Style recommends using a block quotation when cited text is five lines or longer.[3] 
...
Some guidelines suggest an indentation of five, ten, or fifteen spaces. However, five spaces in a proportional font may be much narrower than in a typewriter font of the same point size.

I think the indentation quote style is more universal than the quotation marks. it's a good typographical element to bring contrast and convey meaning. Here are few examples of how it might look on wikipedia

Latin will use serif + italics. this can be done with css selector for latin scripts

iPhone 7 Copy.png (1×750 px, 235 KB)

on tablets

iPhone 7 Copy 2.png (934×1 px, 205 KB)

Non latin will use regular type with larger font size

iPhone 7 Copy 3.png (1×750 px, 299 KB)

iPhone 7 Copy 4.png (1×750 px, 117 KB)

Another stylistic variation

quote-var-2.png (1×750 px, 229 KB)

NOTE: the text in mockup is lorem ipsum for non latin scripts.

I think the indentation quote style is more universal than the quotation marks. it's a good typographical element to bring contrast and convey meaning.

Totally agree.

I like the mockups @Nirzar. One small note, design wise this is a bit similar to article message boxes. Might want to be careful with that. Readers might not be able to tell the difference if this is more widely adopted .

(And as my personal goal is to eradicate mobile specific content styling/desktop-only content styling.... I wonder how this looks in a tablet or desktop setting. :D )

@Nirzar can you update the description so it's not lost in the comments?

I will do that, it seems like we have found a solution.

Change 347765 had a related patch set uploaded (by Bmansurov):
[mediawiki/extensions/MobileFrontend@master] Make blockquotes language neutral

https://gerrit.wikimedia.org/r/347765

Change 347019 had a related patch set uploaded (by Bmansurov):
[mediawiki/extensions/MobileFrontend@printstyles] Improved block quote styles

https://gerrit.wikimedia.org/r/347019

Change 347765 abandoned by Bmansurov:
Make blockquotes language neutral

Reason:
Sorry, wrong branch. See https://gerrit.wikimedia.org/r/#/c/347019/ and I'll reply there.

https://gerrit.wikimedia.org/r/347765

Change 347019 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@printstyles] Improved block quote styles

https://gerrit.wikimedia.org/r/347019

Jdlrobson claimed this task.

The new styles for infoboxes and quotes will ride the train in production from Tuesday 25th. Note all other print style changes are restricted to beta (see T159857 for further details).

Since there are no infoboxes on mediawiki.org and test.wikipedia doesn't have enough articles to verify this on, we should verify it on Wednesday on Hebrew and Catalan. I've added a calendar invite for several stakeholders involved in this change to verify this change in production.

@Jdlrobson @bmansurov MobileFrontend misses cite styling, not sure if this is due to us not having cite in any context?

@Volker_E can you open a new task? Not sure what you mean but sure it's easily fixed.

Volker_E raised the priority of this task from High to Needs Triage.Aug 10 2017, 7:26 PM
Volker_E moved this task from Researching… to Done on the UI-Standardization-Kanban board.