Page MenuHomePhabricator RL executes the module before the i18n messages are available
Closed, ResolvedPublic


If a gadget try to use a message as soon as it starts its execution, the translated text is not available. Take a look at the example above. Its definition is at
and includes "messages":["about"]. Nonetheless, when it prints the value of mw.msg('about'), I get "<about>". A few seconds later, if I use mw.msg('about') again, it return the correct value: "About".

I tested on Ubuntu 12.04 using Google Chrome 21.0.1180.57. Same problem on Firefox 14.0.1.

Screenshot of the console after the two attempts to get the translated message



Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:56 AM
bzimport set Reference to bz39027.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 10930
Same problem on Firefox 14


Unclear whether this is a regression, mediawiki core related, Gadgets 2.0 related or ResourceLoader related.

Setting unconfirmed and blocking RL2.

DannyH set Security to None.
DannyH added a subscriber: DannyH.

For CommTech: We should test this after these tickets are done:

T106177: Implement Gadget and Gadget definition namespaces plus their content models
T31398: Implement Gadget Manager

Legoktm expects that this is already fixed; we just need to make sure, and close the ticket.

kaldari claimed this task.
kaldari added a subscriber: kaldari. seems to no longer exist, but the bug seems to be fixed as of the current patchset in gerrit. You can test with the "Console" gadget at I even set the Gadget to position:top and it still loaded the message correctly.