Page MenuHomePhabricator

rl2.wmflabs.org: RL executes the module before the i18n messages are available
Closed, ResolvedPublic

Description

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
http://rl2.wmflabs.org/rl2-repo1/w/index.php?title=Gadget_definition:test.js&oldid=466
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.


URL: http://rl2.wmflabs.org/rl2-repo1/w/index.php?title=Gadget:Test.js&oldid=469
Screenshot of the console after the two attempts to get the translated message

Details

Reference
bz39027

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).
He7d3r created this task.Aug 4 2012, 1:14 AM
He7d3r added a comment.Aug 4 2012, 1:16 AM

Created attachment 10930
Same problem on Firefox 14

Attached:

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

Setting unconfirmed and blocking RL2.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 23 2015, 5:48 PM
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.

Catrope removed a subscriber: Catrope.Nov 13 2015, 8:07 PM
He7d3r updated the task description. (Show Details)Jan 6 2016, 9:25 PM
He7d3r removed a subscriber: wikibugs-l-list.
kaldari closed this task as Resolved.Feb 9 2016, 12:55 AM
kaldari claimed this task.
kaldari added a subscriber: kaldari.

rl2.wmflabs.org 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 http://commtech.wmflabs.org/wiki/Gadget_definition:Console. I even set the Gadget to position:top and it still loaded the message correctly.

DannyH moved this task from Bug backlog to Archive on the Community-Tech board.Feb 17 2016, 1:39 AM