Page MenuHomePhabricator

Pdf export doesn't support {{formatnum:}}
Closed, ResolvedPublic

Description

Pdf export doesn't support {{formatnum:}} and {{formatnum: |R}}

in english wiki it doesn't show decimal separators
http://en.wikipedia.org/w/index.php?title=User%3AReza1615%2Fpdf&action=historysubmit&diff=447504296&oldid=447501002

in fa.wiki it has error
http://fa.wikipedia.org/wiki/%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1:Reza1615/pdf2

in it.wiki doesn't show decimal separators
http://it.wikipedia.org/wiki/Utente:Reza1615/pdf


Version: unspecified
Severity: normal

Details

Reference
bz30634

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:48 PM
bzimport added a project: Collection.
bzimport set Reference to bz30634.
bzimport added a subscriber: Unknown Object (MLST).

in it.wiki also it has wrong calculation (third item)

shealen.clare wrote:

This bug has not been touched in at least six months. With this in mind, I've been asked by the bugmeister to bump this bug's priority down from "High". Concerns can be addressed to mah@everybody.org.

ralf_wikimedia wrote:

I've implemented a much better formatnum today. the administrators still need to install the needed locales however...english should work pretty good.

ralf_wikimedia wrote:

locales have been installed.

our code may still choose the wrong locale, i.e. it uses it_CH-UTF-8 for it.wikipedia.org, since it_IT isn't available. strictly speaking I don't know which locale to use based on the language. the code is guessing and using what's available.

for fa.wiki it doesn't change still it is not working

ralf_wikimedia wrote:

Can you tell me exactly what's the input, what's the output mediawiki produces, and what's produced in the pdf? ASCII characters only please.

in http://fa.wikipedia.org/wiki/%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1:Reza1615/pdf2
the 3th & 4th lines
{{formatnum:{{formatnum:۱۲۳۴|R}}}} =۱٬۲۳۴
{{formatnum:1234}}=۱٬۲۳۴

pdf export should render ۱٬۲۳۴ or 1٬234 (if it doesn't support Persian number at least it should show ٬)

but now it renders 1234

Someone reported this problem on English Wikipedia village pump (https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_%28technical%29&oldid=537991822#Insidious_problem_with_pdf_rendering), along with a work-around (moving a period outside formatnum).

(In reply to reza1615 from comment #9)

Thanks for new version

To clarify, did you test the output of the new renderer and verify this bug was fixed?

(In reply to Nemo from comment #10)

(In reply to reza1615 from comment #9)

Thanks for new version

To clarify, did you test the output of the new renderer and verify this bug
was fixed?

Yes.
I reported this bug.
I tested http://fa.wikipedia.org/wiki/%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1:Reza1615/pdf2
and
http://it.wikipedia.org/wiki/Utente:Reza1615/pdf
and they are OK