Page MenuHomePhabricator

UserInfoCard: Support GENDER for all nedeed i18n strings
Closed, ResolvedPublic0.5 Estimated Story Points

Description

Hello! I found some lines that should support GENDER.

        "checkuser-userinfocard-menu-view-contributions": "View {{GENDER:$1|user}} contributions",
	"checkuser-userinfocard-menu-add-to-watchlist": "Add {{GENDER:$1|user page}} to watchlist",
	"checkuser-userinfocard-menu-remove-from-watchlist": "Remove {{GENDER:$1|user page}} from watchlist",
	"checkuser-userinfocard-menu-check-ip": "Check {{GENDER:$1|user}} IP addresses",
	"checkuser-userinfocard-menu-block-user": "Block {{GENDER:$1|user}}",
        "checkuser-userinfocard-loading-label": "Loading {{GENDER:$1|user}} info",
	"checkuser-userinfocard-toggle-button-aria-label": "Open {{GENDER:$1|user}} info card",
	"checkuser-userinfocard-open-menu-aria-label": "Open {{GENDER:$1|user}} info card menu",

Event Timeline

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

checkuser-userinfocard-error-no-data

We may not be able to properly support GENDER in this message, because we get the gender of the user using the API and the above message is displayed if the API returns nothing. We could just provide unknown as the gender always if that works?

checkuser-userinfocard-error-no-data

We may not be able to properly support GENDER in this message, because we get the gender of the user using the API and the above message is displayed if the API returns nothing. We could just provide unknown as the gender always if that works?

It seems to me that if we absolutely cannot get information about the user, then remove this message from the list above. But if we have a chance, then we can use {{GENDER:|male text|female text|gender-neutral text for unspecified gender}}.

checkuser-userinfocard-error-no-data

We may not be able to properly support GENDER in this message, because we get the gender of the user using the API and the above message is displayed if the API returns nothing. We could just provide unknown as the gender always if that works?

It seems to me that if we absolutely cannot get information about the user, then remove this message from the list above. But if we have a chance, then we can use {{GENDER:|male text|female text|gender-neutral text for unspecified gender}}.

Yeah, if the message I mentioned is used then we can absolutely not get information about the user (because the request to get it failed).

We can still define GENDER in the message, but the gender in this case would default to unknown to use the gender-neutral text.

I’d probably add a note in the message documentation of checkuser-userinfocard-error-no-data in this case, so that this question doesn’t get asked again and again.

We can still define GENDER in the message, but the gender in this case would default to unknown to use the gender-neutral text.

In this case, it seems to me that it will only confuse the translator, so gender is not needed :)

kostajh set the point value for this task to 0.5.Aug 1 2025, 9:27 AM

Change #1178078 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Use gender for several UserInfoCard messages

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

Change #1178078 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Use gender for several UserInfoCard messages

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

This probably doesn't need QA, so moving to done and resolving

But it would have needed more thorough code review… Please address my comments on Gerrit.

Change #1178825 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Remove GENDER from messages which cannot support it

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

AFAICS the second patch should have resolved the open comments on the first patch, so marking this as resolved again.

Change #1178825 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Remove GENDER from messages which cannot support it

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