diff --git a/i18n/en.json b/i18n/en.json index bbba011e..c868c608 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -11,8 +11,8 @@ "citizen.css": "/* All CSS here will be loaded for users of the Citizen skin */", "citizen.js": "/* All JavaScript here will be loaded for users of the Citizen skin */", - "citizen-header-menu-toggle": "Toggle menu", - "citizen-header-search-toggle": "Toggle search", + "citizen-drawer-toggle": "Toggle menu", + "citizen-search-toggle": "Toggle search", "citizen-footer-desc": "Edit this text on MediaWiki:Citizen-footer-desc", "citizen-footer-tagline": "Edit this text on MediaWiki:Citizen-footer-tagline", diff --git a/i18n/qqq.json b/i18n/qqq.json index d3f46bf2..80a938ce 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -11,8 +11,8 @@ "citizen.css": "{{optional}}", "citizen.js": "{{optional}}", - "citizen-header-menu-toggle": "Tooltip of menu toggle in header", - "citizen-header-search-toggle": "Tooltip of search toggle in header", + "citizen-drawer-toggle": "Tooltip of drawer menu toggle", + "citizen-search-toggle": "Tooltip of search box toggle", "citizen-footer-desc": "Edit this text on MediaWiki:Citizen-footer-desc", "citizen-footer-tagline": "Edit this text on MediaWiki:Citizen-footer-tagline", diff --git a/includes/CitizenTemplate.php b/includes/CitizenTemplate.php index 3c004196..056fce7b 100644 --- a/includes/CitizenTemplate.php +++ b/includes/CitizenTemplate.php @@ -42,9 +42,7 @@ class CitizenTemplate extends BaseTemplate { ), 'data-header' => [ - 'msg-citizen-header-menu-toggle' => $this->getMsg( 'citizen-header-menu-toggle' )->text(), - 'data-menu' => $this->buildMenu(), - 'msg-citizen-header-search-toggle' => $this->getMsg( 'citizen-header-search-toggle' )->text(), + 'data-drawer' => $this->buildDrawer(), 'data-extratools' => $this->getExtraTools(), 'data-searchbox' => $this->buildSearchbox(), ], @@ -107,11 +105,11 @@ class CitizenTemplate extends BaseTemplate { } /** - * Render the navigation menu + * Render the navigation drawer * Based on Vector (be3843e) * @return array */ - private function buildMenu() : array { + private function buildDrawer() : array { $skin = $this->getSkin(); $portals = $skin->buildSidebar(); $props = []; @@ -196,6 +194,7 @@ class CitizenTemplate extends BaseTemplate { $personalToolsPortal[ 'label-class' ] .= 'screen-reader-text'; return [ + 'msg-citizen-drawer-toggle' => $this->getMsg( 'citizen-drawer-toggle' )->text(), 'data-logo' => $this->buildLogo(), 'data-portals-first' => $firstPortal, 'array-portals-rest' => array_slice( $props, 1 ), @@ -256,6 +255,7 @@ class CitizenTemplate extends BaseTemplate { private function buildSearchbox() : array { $config = $this->config; $props = [ + 'msg-citizen-search-toggle' => $this->getMsg( 'citizen-search-toggle' )->text(), 'form-action' => $config->get( 'Script' ), 'html-input' => $this->makeSearchInput( [ 'id' => 'searchInput' ] ), 'html-button-search' => $this->makeSearchButton( diff --git a/includes/templates/Drawer.mustache b/includes/templates/Drawer.mustache new file mode 100644 index 00000000..c5338b7d --- /dev/null +++ b/includes/templates/Drawer.mustache @@ -0,0 +1,34 @@ +{{! + string msg-citizen-drawer-toggle The label used by the drawer button. +}} + + +
+ \ No newline at end of file diff --git a/includes/templates/Header.mustache b/includes/templates/Header.mustache index bf00f65f..76e2240b 100644 --- a/includes/templates/Header.mustache +++ b/includes/templates/Header.mustache @@ -3,25 +3,10 @@ string msg-citizen-header-search-toggle tooltip for search toggle }}