[Mediawiki-i18n] moment.js and i18n messages

Erik Bernhardson ebernhardson at wikimedia.org
Tue Nov 4 20:35:18 UTC 2014

secWithin flow we display a number of humanized timestamps, such as '5
minutes ago'  These are provided by MWTimestamp::getHumanTimestamp() in php
and moment.js in javascript.  We are adjusting this feature to have a few
more messages, in english these would be:

* 5 minutes ago
* Edited 5 minutes ago
* Edited by ErikB 5 minutes ago

We would like to represent the last two with i18n messages like:

* Edited $1
* Edited by $1 $2

This is the exact same use case and solution that is already used in


The alternative is to define a message for every possible timeframe from a
moment ago
up to N years ago(which is also much less robust than the builtin ago

* Edited a moment ago
* Edited $1 {{PLURAL:$1|second|seconds}} ago
* Edited $1 {{PLURAL:$1|minute|minutes}} ago

I'm writing to double check that this is reasonable and allowed by the i18n

Erik B.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wikimedia.org/pipermail/mediawiki-i18n/attachments/20141104/8ea58e81/attachment.html>

More information about the Mediawiki-i18n mailing list