[Mediawiki-i18n] moment.js and i18n messages

Petr Kadlec petr.kadlec at gmail.com
Wed Nov 5 09:38:49 UTC 2014


Hi,

On Tue, Nov 4, 2014 at 9:35 PM, Erik Bernhardson <ebernhardson at wikimedia.org
> wrote:

> 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
>

If I understand you correctly, you take the result of
MWTimestamp::getHumanTimestamp() and put it into “Edited $1”? That should
work, I believe (in Czech, at least, I can’t speak for all languages). You
definitely cannot use “Edited $1 ago”, with $1 being just a plain time
indicator like “5 minutes”, which is what bug 67959 is about.

-- [[cs:User:Mormegil | Petr Kadlec]]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wikimedia.org/pipermail/mediawiki-i18n/attachments/20141105/e9e82713/attachment.html>


More information about the Mediawiki-i18n mailing list