From 52e8e93020867478015fd15be9bb38f181ed605e Mon Sep 17 00:00:00 2001 From: Piotr Miazga Date: Tue, 29 May 2018 19:20:36 +0200 Subject: [PATCH] Provide gender parameter Bug: T194868 Change-Id: I20fb6aee13c6bf7bc66bf3cae9560548a336e04d --- includes/skins/SkinMinerva.php | 3 ++- resources/skins.minerva.editor/BlockMessage.js | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index 97278e49c..11d1372c4 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -1303,7 +1303,8 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin { $blockInfo = [ 'creator' => [ 'name' => $blockCreator->getName(), - 'url' => $blockCreator->getUserPage()->getLinkURL() + 'url' => $blockCreator->getUserPage()->getLinkURL(), + 'gender' => $blockCreator->getOption( 'gender' ), ], 'expiry' => $blockExpiry, 'duration' => $blockDuration, diff --git a/resources/skins.minerva.editor/BlockMessage.js b/resources/skins.minerva.editor/BlockMessage.js index 5f462a82e..18bbdb4f1 100644 --- a/resources/skins.minerva.editor/BlockMessage.js +++ b/resources/skins.minerva.editor/BlockMessage.js @@ -35,7 +35,10 @@ } ).options, title: mw.msg( 'skin-minerva-blocked-drawer-title' ), reasonHeader: mw.msg( 'skin-minerva-blocked-drawer-reason-header' ), - creatorHeader: mw.msg( 'skin-minerva-blocked-drawer-creator-header' ), + creatorHeader: function () { + return mw.msg( 'skin-minerva-blocked-drawer-creator-header', + this.creator.gender || 'unknown' ); + }, expiryHeader: mw.msg( 'skin-minerva-blocked-drawer-expiry-header' ) } ), templatePartials: util.extend( {}, Drawer.prototype.templatePartials, {