Page MenuHomePhabricator

[[MediaWiki:Revisionslider-label-username]] needs GENDER support
Closed, ResolvedPublic2 Story Points


Can we have GENDER for 'user'/'username'/'edited by'? Probably with $1 as parameter.

The translation of the noun "username" is not gender-neutral in many languages, such as Portuguese ( ).

The message was previously known as revisionslider-label-user or revisionslider-label-edited-by.


Event Timeline

Macofe created this task.May 26 2016, 10:12 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 26 2016, 10:12 PM
Restricted Application added a project: TCB-Team. · View Herald TranscriptMay 27 2016, 10:45 PM
Lea_WMDE moved this task from Incoming to Revision Slider on the TCB-Team board.May 30 2016, 11:21 AM
Tobi_WMDE_SW set the point value for this task to 2.Jun 2 2016, 2:36 PM
Tobi_WMDE_SW moved this task from Proposed to Backlog on the TCB-Team-Sprint-2016-06-02 board.
Tobi_WMDE_SW triaged this task as Normal priority.Jun 2 2016, 3:29 PM

It turns out this is rather tricky in JavaScript. While in PHP you can just pass a username string to the GENDER function, in JS you need a user object ( I don't see a way of doing this without expensive requests per user or trying to work around it by loading this data upfront.

@Lea_WMDE After talking to @WMDE-leszek and @Addshore we came to the conclusion that there probably isn't a good solution for the problem I mentioned above. Would it be fine for the label to say "Username" instead of "User" to be gender neutral?

@Jakob_WMDE @WMDE-leszek @Addshore sounds good, but could you test in at least two appropriate languages if this would really solve the problem (i.e. not be Name des Nutzers)?

I believe "Benutzername" would be fine for German.
I've just checked what is used as a label for "Username" on the "Create a new account" page of Mediawiki and it uses userlogin-yourname message which does not use GENDER.
Also there several other places where (I believe as same as in our case, for performance reasons) the "username" label is not translated, etc. Special:Newpages page.
So we wouldn't be coming with something new by doing this.

For the qqq.json something similar for Mediawiki's userlogin-yourname could be used to it is clear that the label is not "genderizable":

"userlogin-yourname": "In user login & create account forms, label for username field.\n{{doc-important|<nowiki>{{</nowiki>[[Gender|GENDER]]<nowiki>}}</nowiki> is '''NOT''' supported.}}..."

Change 292549 had a related patch set uploaded (by Jakob):
Use username instead of user for tooltip label.

Hmm I looked a bit into translations, and the problem with username seems to be, that it translates e.g. in Spanish to nombre de usuario or nombre de usuaria depending on the gender, same for French and Portuguese .

Apart from that, the label is quite long, so I wonder what is common there. Would they only use nombre ? Or usuario / usuaria with gender ? Sorry to be the party pooper here but maybe the best solution is to avoid having a label there.

P.S.: Using name could also be an option.

Edited by won the Googlefight over edit by. So we will use that as gender-neutral label.

Change 292549 merged by Jakob:
Use a gender-neutral label for user.

Nemo_bis added a subscriber: Nemo_bis.EditedJun 7 2016, 10:13 AM

Change 292549 merged by Jakob:
Use a gender-neutral label for user.

What makes you think that "Edited by" is gender neutral? It isn't necessarily.

WMDE-Fisch added a comment.EditedJun 7 2016, 10:42 AM

What makes you think that "Edited by" is gender neutral? It isn't necessarily.

Hi @Nemo_bis,

thanks for looking into that. "Edited by" is gender neutral in English. We are at the point, where we don't claim to have an English label, that word by word translated is gender neutral in every language. That is up to the translators. The point is, that the description of the text in the qqq.json states, that the text should be gender-neutral giving a label for the user. It does not have to be a word by word translation.

I hope that helps addressing your concern.
Best, Fisch

Lea_WMDE moved this task from Maintenance to Doing on the Revision-Slider board.Jun 7 2016, 12:58 PM
Tobi_WMDE_SW closed this task as Resolved.Jun 16 2016, 2:36 PM

Change 294066 had a related patch set uploaded (by Addshore):
Use username for username label

Change 294066 merged by WMDE-leszek:
Use username for username label

Tobi_WMDE_SW moved this task from Doing to Done on the Revision-Slider board.Jul 5 2016, 2:31 PM

Apparently the message was renamed yet another time, now it's "revisionslider-label-username" (<strong>Username:</strong> [[$2|$1]]); but the problem is the same, no way to make translations grammatically correct based on the user's gender.

Nemo_bis renamed this task from [[MediaWiki:Revisionslider-label-user/en]] i18n issue to [[MediaWiki:Revisionslider-label-username]] needs GENDER support.Jul 24 2016, 8:50 PM
Nemo_bis reopened this task as Open.
Nemo_bis updated the task description. (Show Details)
Nemo_bis updated the task description. (Show Details)Jul 24 2016, 8:53 PM

Hi @Nemo_bis,

sadly, it is not possible to use GENDER in the username label in the tool-tips, without having a huge load of extra requests that would slow the extension down and possibly make it useless. :-/

Change 300881 had a related patch set uploaded (by WMDE-leszek):
Add support for GENDER to the username label in the tooltip

@Nemo_bis I am sorry to say there has been quite some confusion on our (WMDE) side related to this topic, and I was one of people who started it. My apologies for that.

We have completely misinterpreted the differences how client-side and server-side deal with GENDER magic word when we were first looking at this issue. Or at least I have.

It is not that bad as I/we thought that we need to query DB (through API) for each unique user that has edited a revision (which means in worst case up to 500 API calls) in order to create a mw.User object for each user that would be then passed to message function. This is not how mw.User is supposed to work.
It is embarrassing to admit but I only learned about today, and this is exactly a thing we need to have those "username"/"user" (be it a whatever label) messages GENDERized. As seen above, I've prepared a patch that should be sufficient (I have tested it with a strongly gender-marking language I speak and it worked as I'd have expected it).

Thank you for bringing this issue up again. Otherwise we would not have realized the mistake for a long time.

WMDE-leszek claimed this task.
WMDE-leszek moved this task from Proposed to Review on the TCB-Team-Sprint-2016-07-14 board.
WMDE-leszek added a subscriber: Jakob_WMDE.

It's ok; one can only learn such i18n by using it. Next time, feel free to add Nikerabbit to reviewers to have someone double-check your i18n logic.

It's also useful if you point out where you looked for documentation/help on the matter, or where you would have expected to find something that you didn't find. The main docs are at but they may be incomplete or poorly linked.

Change 300881 merged by jenkins-bot:
Add support for GENDER to the username label in the tooltip

Addshore closed this task as Resolved.Aug 2 2016, 9:52 AM

It looks as if this should have been deployed last week.