Skip to content

Commit

Permalink
feat(core): ✨ use gender symbol instead of pronoun in user tagline
Browse files Browse the repository at this point in the history
Related: #657
  • Loading branch information
alistair3149 committed Jun 9, 2023
1 parent abe3359 commit c793959
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 26 deletions.
9 changes: 0 additions & 9 deletions i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@
"citizen-tagline-ns-help": "Help page",
"citizen-tagline-ns-category": "Category page",
"citizen-tagline-user-regdate": "Joined $1",
"citizen-pronouns-subjective-male": "He",
"citizen-pronouns-objective-male": "Him",
"citizen-pronouns-possessive-male": "His",
"citizen-pronouns-subjective-female": "She",
"citizen-pronouns-objective-female": "Her",
"citizen-pronouns-possessive-female": "Hers",
"citizen-pronouns-subjective-notknown": "They",
"citizen-pronouns-objective-notknown": "Them",
"citizen-pronouns-possessive-notknown": "Theirs",
"prefs-citizen-theme-label": "Theme",
"prefs-citizen-theme-option-auto": "Auto",
"prefs-citizen-theme-option-light": "Light",
Expand Down
9 changes: 0 additions & 9 deletions i18n/qqq.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@
"citizen-tagline-ns-help": "Tagline for pages in help namespace",
"citizen-tagline-ns-category": "Tagline for pages in category namespace",
"citizen-tagline-user-regdate": "Label for registration date in taglines on userpages",
"citizen-pronouns-subjective-male": "Male subjective pronoun",
"citizen-pronouns-objective-male": "Male objective pronoun",
"citizen-pronouns-possessive-male": "Male possessive pronoun",
"citizen-pronouns-subjective-female": "Female subjective pronoun",
"citizen-pronouns-objective-female": "Female objective pronoun",
"citizen-pronouns-possessive-female": "Female possessive pronoun",
"citizen-pronouns-subjective-notknown": "Neutral subjective pronoun",
"citizen-pronouns-objective-notknown": "Neutral objective pronoun",
"citizen-pronouns-possessive-notknown": "Neutral possessive pronoun",
"prefs-citizen-theme-label": "Tooltip for the theme dropdown in Special:Preferences",
"prefs-citizen-theme-option-auto": "Label for the auto theme option",
"prefs-citizen-theme-option-light": "Label for the light theme option",
Expand Down
16 changes: 8 additions & 8 deletions includes/Partials/Tagline.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ private function buildUserTagline( $title ) {
$regDate = $user->getRegistration();
$gender = MediaWikiServices::getInstance()->getGenderCache()->getGenderOf( $user, __METHOD__ );

$msgGender = sprintf(
'%s / %s / %s',
$skin->msg( 'citizen-pronouns-subjective-' . $gender )->text(),
$skin->msg( 'citizen-pronouns-objective-' . $gender )->text(),
$skin->msg( 'citizen-pronouns-possessive-' . $gender )->text()
);

$tagline .= "<span id=\"citizen-tagline-user-gender\" data-user-gender=\"$gender\">$msgGender</span>";
if ( $gender != 'notknown' ) {
if ( $gender == 'male' ) {
$msgGender = '♂';
} elseif ( $gender == 'female' ) {
$msgGender = '♀';
}
$tagline .= "<span id=\"citizen-tagline-user-gender\" data-user-gender=\"$gender\">$msgGender</span>";
}

if ( $editCount ) {
$msgEditCount = $skin->msg( 'usereditcount' )->numParams( sprintf( '%s', number_format( $editCount, 0 ) ) );
Expand Down

0 comments on commit c793959

Please sign in to comment.