Last modified: 2014-10-10 16:15:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73803, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71803 - Cite extension doesn't use native digits
Cite extension doesn't use native digits
Status: NEW
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal major
: ---
Assigned To: Marc Ordinas i Llopis
: i18n
Depends on: 43235
Blocks: 71890
  Show dependency treegraph
 
Reported: 2014-10-08 15:12 UTC by Nemo
Modified: 2014-10-10 16:15 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nemo 2014-10-08 15:12:28 UTC
See the references numbers, they are in "Arab" digits [1] [2] instead of [۱] [۲] etc.

http://parsoid-lb.eqiad.wikimedia.org/fawiki/%DA%AF%D9%88%DA%AF%D9%84?oldid=13402018
http://parsoid-lb.eqiad.wikimedia.org/fawiki/%DA%86%D9%BE%D9%82%D9%84%D9%88_(%D8%B1%D8%B2%D9%86)?oldid=10111059

Needs to respect formatNum() like behaviour.
Comment 1 C. Scott Ananian 2014-10-08 15:13:35 UTC
Note that the digits at the bottom are in localized digits.  It's just the inline references where are in arabic numerals.
Comment 2 C. Scott Ananian 2014-10-08 18:20:09 UTC
It was suggested that Parsoid might want to eventually move to a native CSS solution here.

This isn't viable in the short term because:

1) The set of digits supported in browsers is very small. https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type lists a decent number of different digit scripts, but most of these are firefox only and not included in the official spec yet.  The official spec is http://dev.w3.org/csswg/css-counter-styles-3/ and includes a means for us to manually specify additional native number styles -- but this isn't implemented anywhere yet AFAICT.

2) Styling the actual inline reference numbers would seem to want to use:

display: inline-list-item;

so that it doesn't start a new paragraph box. (See http://dev.w3.org/csswg/css-lists-3/#list-item ). But not that this is (again) not yet implemented in browsers.

3) We might also need to explicitly set the citation counter?  That might require using <li value="..."></li> to represent the reference number, but then that would need to be enclosed in some sort of <ol> tag.  I'm not certain whether there is a pure-CSS way to set the value of a counter.

So: probably possible in a few years.  Not possible yet today.
Comment 3 Gabriel Wicke 2014-10-08 18:30:05 UTC
@Scott: Are we sure that most of the list types in https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type are not supported in Chrome for example?

Re 2): Could you explain why that would be necessary? We don't use lists afaik, only counters.

Re 3): Last I looked we were working on setting the counter with counter-reset, inside a style attribute. This does not require lists.
Comment 4 Gabriel Wicke 2014-10-08 18:32:12 UTC
FWIW, in Chrome most of the list styles in https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type seem to render fine in Chrome.
Comment 5 C. Scott Ananian 2014-10-08 18:52:03 UTC
Re 2) -- I agree that

content: counter(references, <list-style-type>) 

should work, according to http://www.w3.org/TR/CSS2/generate.html#counter-styles.  So you're right, inline-list-item support shouldn't be required.

Re 3) good point.

Latest Chrome is not so bad: http://jsfiddle.net/ky3htxde/ shows that cjk, ethiopic, and tamil are missing.  But of course support across the VE browser base will be not nearly as good.
Comment 6 C. Scott Ananian 2014-10-08 18:54:15 UTC
(And @counter-style is not supported anywhere yet AFAICT.)
Comment 7 C. Scott Ananian 2014-10-09 17:25:42 UTC
See https://gerrit.wikimedia.org/r/158852 which implements CSS styling of references in parsoid.

Once this lands, I probably need to open a separate OCG bug to fake this same styling in the PDF renderer.
Comment 8 Nemo 2014-10-10 12:13:40 UTC
Thanks for setting a priority. Whatever the priority for development, however, "major" is correct severity when a wiki is "contaminated" by interface elements in wrong locale.
Comment 9 ssastry 2014-10-10 14:30:17 UTC
Fair enough.
Comment 10 Marc Ordinas i Llopis 2014-10-10 16:15:22 UTC
I've pushed a new version of https://gerrit.wikimedia.org/r/158852 with support for fawiki. The numbers appear correclty, as well as the backlinks, but I couldn't test pixel accuracy as phantomjs doesn't support all list-style-types yet (I think).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links