Page MenuHomePhabricator

[[MediaWiki:Discussiontools-emptystate-desc-user/en]] needs GENDER
Closed, ResolvedPublic


{{GENDER}} is needed here. Is {{GENDER:{{PAGENAME}}|maleadj|femaleadj}} safe?


Event Timeline

Aklapper renamed this task from [[MediaWiki:Discussiontools-emptystate-desc-user/el]] translation issue to [[MediaWiki:Discussiontools-emptystate-desc-user/en]] needs GENDER.Oct 10 2021, 8:43 PM
Aklapper edited projects, added Gender-Support, DiscussionTools; removed I18n.
matmarex added a subscriber: matmarex.

Is {{GENDER:{{PAGENAME}}|maleadj|femaleadj}} safe?

Yes, I actually used it in the Polish translation myself ( We'll add it to the English message to make that clear.

Change 732833 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Add {{GENDER:}} hint to empty state messages for user talk pages

Change 732833 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Add {{GENDER:}} hint to empty state messages for user talk pages

Wouldn’t it be better to introduce a translation variable? The current version works fine as long as the message is always processed by PHP, but it will break if you ever parse it in JavaScript—and this breakage won’t even be visible in English, since the JS message parser seems to silently return the gender-neutral version if the parameter is not male or female, which is same in English as the gendered versions.

It seemed simpler to not do that (simpler for me to implement, and simpler for the translators to understand).

The message can't be used from the JavaScript parser already because it uses unsupported magic words ({{SUBJECTPAGENAME}}) and refers to a message in content language ({{MediaWiki:discussiontools-emptystate-link-userpage}}). I don't think that's a concern, since we're not using it from the JavaScript parser :D