Page MenuHomePhabricator

$lang->formatDuration() does not convert to user language
Closed, ResolvedPublic

Description

$lang->formatDuration() does not convert to user language.

For above URL I get:

شماره ویرایش‌های اخیر (در 30 روز گذشته)

(English: Recent number of edits (within past 30 days))


Version: 1.21.x
Severity: normal
URL: https://commons.wikimedia.org/w/index.php?title=Main%20Page&action=info&uselang=fa

Details

Reference
bz41470

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:50 AM
bzimport set Reference to bz41470.
Raymond created this task.Oct 28 2012, 3:07 PM

Should we add a new parameter $2 for formatted number (which makes reuse of these messages difficult, like my gerrit 22699), or just use {{formatnum:$1}} in them?

(In reply to comment #1)

Should we add a new parameter $2 for formatted number

No. $1 should always be a formatted number.

(In reply to comment #2)

No. $1 should always be a formatted number.

Then {{PLURAL:$1| will fail.

It wont fail. It is more likely to fail if the number is not formatted properly.

(In reply to comment #4)

It wont fail. It is more likely to fail if the number is not formatted
properly.

Ah really. I read its source just now.

In the past I thought it accept ascii digits only.

It has been this way for a quite while now :)

commited gerrit 37254

IAlex added a comment.Dec 20 2012, 7:16 PM

Change merged.