Re: [Wikitech-l] PLURAL in mw.msg

2019-10-01 Thread Krinkle
On Wed, 2 Oct 2019 at 03:17, Jeroen De Dauw  wrote:

>
> Including mediawiki.jqueryMsg fixed the issue. Thanks a bunch!
>
> I concur this is rather peculiar design. It'd be helpful to have some
> indication of this in the method docs of the mw.msg() code.


It is documented in the block for message.text() and message.parse(), with
mw.msg() being a shortcut for message.text(). Could be improved to mention
there directly as well!

-- Krinkle

https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.Message-method-text

https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.Message-method-parse

https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw-method-msg
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] PLURAL in mw.msg

2019-10-01 Thread Jeroen De Dauw
Hey Bawolff,

Including mediawiki.jqueryMsg fixed the issue. Thanks a bunch!

I concur this is rather peculiar design. It'd be helpful to have some
indication of this in the method docs of the mw.msg() code.

Cheers

--
Jeroen De Dauw | www.EntropyWins.wtf  |
www.Professional.Wiki 
Entrepreneur | Software Crafter | Speaker | Open Souce and Wikimedia
contributor
~=[,,_,,]:3
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] PLURAL in mw.msg

2019-09-29 Thread Brian Wolff
I think you need to load mediawiki.jqueryMsg module otherwise these
interfaces do totally different things.

Personally im not really a fan of this as i dont like the idea that methods
randomly change meaning based on what modules are loaded, but it is what it
is.

--
Bawolff


On Sunday, September 29, 2019, Jeroen De Dauw 
wrote:

> Hey,
>
> I have this message: Removed $1 {{PLURAL:$1|shape|shapes}}
>
> This message is used in JavaScript via mw.msg() to create an edit summary.
> Unfortunately this summary is showing up without the PLURAL function being
> rendered:
> https://user-images.githubusercontent.com/146040/
> 65845180-6cd43b80-e339-11e9-9fb3-12642a835aa0.png
>
> The docs state that PLURAL is supported in JS:
> https://www.mediawiki.org/wiki/Manual:Messages_API#
> Feature_support_in_JavaScript.
> I've also tried mw.message('my-key').parse() and some variants of that,
> though these all gave me the same result.
>
> Why is this not working and how can I fix it?
>
> Cheers
>
> --
> Jeroen De Dauw | www.EntropyWins.wtf  |
> www.Professional.Wiki 
> Entrepreneur | Software Crafter | Speaker | Open Souce and Wikimedia
> contributor
> ~=[,,_,,]:3
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] PLURAL in mw.msg

2019-09-29 Thread Jeroen De Dauw
Hey,

I have this message: Removed $1 {{PLURAL:$1|shape|shapes}}

This message is used in JavaScript via mw.msg() to create an edit summary.
Unfortunately this summary is showing up without the PLURAL function being
rendered:
https://user-images.githubusercontent.com/146040/65845180-6cd43b80-e339-11e9-9fb3-12642a835aa0.png

The docs state that PLURAL is supported in JS:
https://www.mediawiki.org/wiki/Manual:Messages_API#Feature_support_in_JavaScript.
I've also tried mw.message('my-key').parse() and some variants of that,
though these all gave me the same result.

Why is this not working and how can I fix it?

Cheers

--
Jeroen De Dauw | www.EntropyWins.wtf  |
www.Professional.Wiki 
Entrepreneur | Software Crafter | Speaker | Open Souce and Wikimedia
contributor
~=[,,_,,]:3
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l