Last modified: 2013-04-22 16:15:16 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 T43470, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41470 - $lang->formatDuration() does not convert to user language
$lang->formatDuration() does not convert to user language
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
1.21.x
All All
: Normal normal (vote)
: ---
Assigned To: Umherirrender
https://commons.wikimedia.org/w/index...
: easy, i18n
Depends on:
Blocks: 38450
  Show dependency treegraph
 
Reported: 2012-10-28 15:07 UTC by Raimond Spekking
Modified: 2013-04-22 16:15 UTC (History)
9 users (show)

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


Attachments

Description Raimond Spekking 2012-10-28 15:07:35 UTC
$lang->formatDuration() does not convert to user language.

For above URL I get:

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

(English: Recent number of edits (within past 30 days))
Comment 1 Liangent 2012-11-20 09:36:14 UTC
Should we add a new parameter $2 for formatted number (which makes reuse of these messages difficult, like my Gerrit change #22699), or just use {{formatnum:$1}} in them?
Comment 2 Niklas Laxström 2012-11-20 12:11:26 UTC
(In reply to comment #1)
> Should we add a new parameter $2 for formatted number

No. $1 should always be a formatted number.
Comment 3 Liangent 2012-11-20 12:18:53 UTC
(In reply to comment #2)
> No. $1 should always be a formatted number.

Then {{PLURAL:$1| will fail.
Comment 4 Niklas Laxström 2012-11-20 12:21:23 UTC
It wont fail. It is more likely to fail if the number is not formatted properly.
Comment 5 Liangent 2012-11-20 12:25:24 UTC
(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.
Comment 6 Niklas Laxström 2012-11-20 13:45:58 UTC
It has been this way for a quite while now :)
Comment 7 Umherirrender 2012-12-06 19:36:09 UTC
commited Gerrit change #37254
Comment 8 Alexandre Emsenhuber [IAlex] 2012-12-20 19:16:22 UTC
Change merged.

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


Navigation
Links