Gender support broken

Gender support broken

This won’t work. See mw:Manual:Messages API#GENDER in JavaScript for how to use GENDER in JS code.

Tacsipacsi (talk)00:33, 1 December 2021

Thanks for the headsup! I think I've fixed it now. Can you check to make sure?

Jon Harald Søby (talk)22:20, 1 December 2021
Edited by another user.
Last edit: 16:34, 27 December 2021

Sorry for the slow response. Yes, it works—I tested it on Portal:Hu/terminology.json by manually setting the message with mw.messages.set('gadget-term-json-intro', '{{GENDER:$1|he|she|they}}') on the browser console before the gadget loaded the missing messages (so it wasn’t missing by that time and thus didn’t get overwritten), and in logged in state I got he, while logged out it displayed they, as expected.

Tacsipacsi (talk)18:24, 21 December 2021

Great! Would you mind telling me how you set the message in the console before the messages are loaded? I am not aware of how to make sure something I put in console is done before anything on the page happens…

Jon Harald Søby (talk)16:35, 27 December 2021

No magic here – I prepared the command in the console, hit F5 and hoped that I hit Enter at the right time, not too early (before mw.messages.set is available) and not too late. In logged out state it was even easier: since this is not a default gadget yet, I had to manually load the appropriate ResourceLoader module, so I simply set the message before I started loading the module.

Tacsipacsi (talk)00:17, 28 December 2021