Articles that use the Convert template generate errors

19 views
Skip to first unread message

Jeff

unread,
Sep 21, 2012, 12:50:04 PM9/21/12
to mw...@googlegroups.com
I posted this on the github issue tracker a few days ago, but I figured someone around here might be able to offer some guidance on this issue.

Basically, any article that uses the convert template to display converted units will generate the text unknown operator: u',' instead of the calculated result.  The Atlantic Ocean page is a good example.  In the first paragraph, the code {{convert|106,400,000|km2|sqmi}} should be rendered as 106,400,000 square kilometres (41,100,000 sq mi) but instead is rendered as unknown operator: u','
square kilometres (unknown operator: u'strong'unknown operator: u','sq mi),


There are additional reports of this problem discussed on the Convert template's talk page.

Ralf Schmitt

unread,
Sep 21, 2012, 1:40:55 PM9/21/12
to mw...@googlegroups.com
Jeff <jdo...@gmail.com> writes:

> I posted this on the github issue
> tracker<https://github.com/pediapress/mwlib/issues/22>a few days ago,
> but I figured someone around here might be able to offer
> some guidance on this issue.

I'll take it look at it.

>
> Basically, any article that uses the convert template to display converted
> units will generate the text unknown operator: u',' instead of the
> calculated result. The Atlantic Ocean<https://en.wikipedia.org/wiki/Atlantic_Ocean>page is
> a good example. In the first paragraph, the code *
> {{convert|106,400,000|km2|sqmi}}* should be rendered as *106,400,000 square
> kilometres (41,100,000 sq mi)* but instead is rendered as *unknown
> operator: u','
> square kilometres (unknown operator: u'strong'unknown operator: u','sq mi),*
>
> There are additional reports of this problem discussed on the Convert
> template's talk page<https://en.wikipedia.org/wiki/Template_talk:Convert#Problems_with_this_template_in_Book_namespace>
> .

thanks for the pointer.

Ralf Schmitt

unread,
Sep 21, 2012, 4:05:16 PM9/21/12
to mw...@googlegroups.com
Ralf Schmitt <ra...@brainbot.com> writes:

> Jeff <jdo...@gmail.com> writes:
>
>> I posted this on the github issue
>> tracker<https://github.com/pediapress/mwlib/issues/22>a few days ago,
>> but I figured someone around here might be able to offer
>> some guidance on this issue.
>
> I'll take it look at it.

{{#expr: e e e}} evaluates to 1420.9418661882 (i.e. e * 10 ^ e, with e
being the euler number).

{{#expr: 1e2e3}} evaluates to 100000

words can't express how I feel about that.

I've implemented that in
https://github.com/pediapress/mwlib/commit/dcf219261e8d9d9f79722969eeb42b51275e2dcc

I hope I'm not going to get burned in hell for that one.

I'll deploy that in the next days.

--
Cheers
Ralf

Ralf Schmitt

unread,
Sep 21, 2012, 6:11:37 PM9/21/12
to mw...@googlegroups.com
Jeff <jdo...@gmail.com> writes:

> That's some pretty crazy synax. I tried out the patch, however, and it
> still seems to display that error when I convert the Atlantic Ocean article.

That's why I wrote the following:

Ralf Schmitt

unread,
Sep 24, 2012, 10:07:04 AM9/24/12
to mw...@googlegroups.com
Jeff <jdo...@gmail.com> writes:

> That's some pretty crazy synax. I tried out the patch, however, and it
> still seems to display that error when I convert the Atlantic Ocean article.

that should work now.

Reply all
Reply to author
Forward
0 new messages