[Mediawiki-i18n] why is jquery.localize undocumented and little used?

Amir E. Aharoni amir.aharoni at mail.huji.ac.il
Sat Aug 17 14:28:10 UTC 2013

I imagine that mw.msg provides more features, such as plural and
gender, and that makes it closer to the server-side i18n, but Niklas
may know better.

In any case, if it's deprecated, it should be documented.

Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
‪“We're living in pieces,
I want to live in peace.” – T. Moore‬

2013/8/8 S Page <spage at wikimedia.org>:
> Shamelessly looking at dialog code to lift, I came across WikiLove's dialog
> box:
>             $dialog = $( '\
> <div id="mw-wikilove-dialog">\
>     <h2><html:msg key="wikilove-get-started-header"/></h2> ...
> Wait, html:msg ?  It calls $dialog.localize() and the whole chunk of DOM
> gets localized at once.
> This has been in core since I believe 1.17, and the AFT,  MoodBar, and
> WikiLove extensions use it. I'm not sure why it's not mentioned in
> Localisation or Manual:Messages API . I just added it to Resource Loader
> modules page.
> Why isn't newer code using it, did it fall out of favor? E.g. Echo uses
> jQuery chaining:
>    $( '<a>' ).attr(...).text( mw.msg( 'echo-overlay-link' ) ). ...
> jquery.localize() doesn't give you the control of
> mw.msg().escape/parse/plain/text() , but for big basic chunks of HTML it
> seems ideal.
> Thanks for any insight,
> --
> =S Page  software engineer on E3
> _______________________________________________
> Mediawiki-i18n mailing list
> Mediawiki-i18n at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-i18n

More information about the Mediawiki-i18n mailing list