Page MenuHomePhabricator

Growthexperiments-mentor-dashboard-personalized-praise-praise-message-message needs GENDER support for the mentor
Closed, ResolvedPublic

Description

Growthexperiments-mentor-dashboard-personalized-praise-praise-message-message has $1 with the mentee's username, but in some languages, the word "mentor" can be in different grammatical genders, so $2 with the mentor's username is needed, too. Thanks.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Hello @Amire80!

Thanks for filling the task. This message is used in a somewhat special way: it is never shown as part of the interface. Instead, the message is preloaded when the mentor sends an appreciation (via the standard preload=XXX&preloadtitle=YYY query parameters).

So, if we purely add GENDER: to the message, the mentor will have GENDER: in the message they've preloaded. Furthermore, the GENDER: keyword would stay in the saved message on the talk page as well (unless mentor manually rewrites it to something else while sending). Here's how it could look like:

image.png (682×1 px, 67 KB)

I'm not sure if this approach is a wise one, as it might confuse whoever decides to view the message on the talk page (potentially including the newcomer), as GENDER: is not ordinarily used in talk page messages. That can be resolved by using something like {{su<includeonly />bst:GENDER in the i18n message, but that's also not ordinary in i18n messages.

Do you have any thoughts on this, @Amire80?

I don't think that GENDER can function in talk page messages at all.

But why does it have to be that way in general? Why can it work with the mentee's username, but not with the mentor's username? Can it be pre-generated, taking account of both usernames, and then shown in the posting form?

I don't think that GENDER can function in talk page messages at all.

I tested it, and it seems to work (at least in preview, I didn't actually save anything). So, I think it can function there, but it definitely isn't a standard feature used in talk page messages.

But why does it have to be that way in general? Why can it work with the mentee's username, but not with the mentor's username? Can it be pre-generated, taking account of both usernames, and then shown in the posting form?

The feature makes use of MediaWiki's preloading, which has a support for $1, $2, ... parameters. What happens in the background is that the user is directed to an URL like the following one:

https://cs.wikipedia.org/wiki/User_talk:Martin_Urbanec_(WMF)?action=edit&section=new&dtpreload=1&preloadtitle=Message%20subject&preload=User:Martin%20Urbanec%20(WMF)/Praiseworthy%20message&preloadparams%5B%5D=Test%20user%20100

In other words, the parameters are processed at the preloading stage, rather than at the i18n stage. In fact, this particular message is never requested through MediaWiki's i18n capabilities; it only exists to make MediaWiki:Growthexperiments-mentor-dashboard-personalized-praise-praise-message-message a valid page at all wikis, so it can be used with preloading. Unfortunately, MediaWiki's preloading currently does not support providing raw wikitext to preload (only a page as the source is supported). Even if it did, it would be much easier to run into URL length limits in that case.

We can include the mentor's username as another parameter (although {{subst:REVISIONUSER}} should also work); it will work, but the GENDER: keyword would be inevitably visible in the talk page message, and I'm wondering whether mentors would be confused about what the GENDER thing is (not all of them are active translators, and might've never seen that keyword before).

An alternative solution to using the GENDER keyword could be to have two i18n messages (MediaWiki:Growthexperiments-mentor-dashboard-personalized-praise-praise-message-message-female and Growthexperiments-mentor-dashboard-personalized-praise-praise-message-message-male). That way, the content of the preload parameter could be changed depending on the initiating user's gender, before the user is navigated to that URL. In qqq, we'd then make it clear which gender the translator is supposed to use. Because the Growth team aims to encourage mentors to customize their own default message (to avoid the praising message look like Yet Another Template (tm) in the newcomer's eyes), this might not be worth the translation effort though.

Just thinking out loud here:

Would something like {{$1:GENDER:$2|mentor|mentar|ment@r}} work? Then subst can be passed as a parameter via preloadparams.

Just thinking out loud here:

Would something like {{$1:GENDER:$2|mentor|mentar|ment@r}} work? Then subst can be passed as a parameter via preloadparams.

We could do something like {{su<includeonly/>bst:GENDER:$1|mentor|mentoress}} too. However, I'm not sure if it would be understandable for the average mentors. Unlike other messages, the default positive message will be seen in the mentor's settings as well. What do you think?

Urbanecm_WMF triaged this task as High priority.

Change 923740 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] Personalized praise: Gender support for mentor's username in message

https://gerrit.wikimedia.org/r/923740

Change 923740 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Personalized praise: Gender support for mentor's username in message

https://gerrit.wikimedia.org/r/923740