I'm sometimes getting the message code instead of the message text in JS using mw.message(...).text(). The messages in question are declared in the RL module declaration. This happens when doing a normal reload (F5), not when doing a full reload (Ctrl+F5), so I guess reloading the module from the net instead of from cache gives mw the time to actually set up the messages.
Is there a module I need to/should/could wait for? I thought RL was making sure that basic modules like mw and jquery were available before loading/running other stuff?
Cheers Stephan
On 11/04/2017 07:00 AM, Stephan Gambke wrote:
Is there a module I need to/should/could wait for? I thought RL was making sure that basic modules like mw and jquery were available before loading/running other stuff?
You just need to wait for the module that depends upon those messages to load before you can use those messages. If you're doing that, it should work. Could you provide a link to your code?
-- Legoktm
Note: I made no comments to this organization. Nor did i authorize the use of my name in an publications if any sort. Please confirm receipt of my complaint, that this is an accidental error on behalf of your organization, that you have deleted related comments and unsubscribed my email address from your people.
Thank you,
Chad Amsel c. 310.307.9648 e. amselchad@gmail.com
On Nov 6, 2017, at 11:16 AM, Kunal Mehta legoktm@member.fsf.org wrote:
On 11/04/2017 07:00 AM, Stephan Gambke wrote: Is there a module I need to/should/could wait for? I thought RL was making sure that basic modules like mw and jquery were available before loading/running other stuff?
You just need to wait for the module that depends upon those messages to load before you can use those messages. If you're doing that, it should work. Could you provide a link to your code?
-- Legoktm
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Bleagh. I was sure I had the messages defined together with the module that was using them. Turns out I had them defined with the module holding the styles instead.
Thanks for the heads-up, Legoktm
Cheers Stephan
-------- Original Message -------- Subject: Re: [MediaWiki-l] Messages not available client-side Local Time: November 6, 2017 8:16 PM UTC Time: November 6, 2017 7:16 PM From: legoktm@member.fsf.org To: mediawiki-l@lists.wikimedia.org
On 11/04/2017 07:00 AM, Stephan Gambke wrote:
Is there a module I need to/should/could wait for? I thought RL was making sure that basic modules like mw and jquery were available before loading/running other stuff?
You just need to wait for the module that depends upon those messages to load before you can use those messages. If you're doing that, it should work. Could you provide a link to your code?
-- Legoktm
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org