diff --git a/i18n/en.json b/i18n/en.json index b0bf5dbd9..227907368 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -38,6 +38,7 @@ "vector-searchsuggest-containing": "Search for pages containing $1", "vector-intro-page": "Help:Introduction", "vector-toc-heading": "Contents", + "vector-toc-beginning": "Beginning", "vector-anon-user-menu-pages": "Pages for logged out editors", "vector-anon-user-menu-pages-learn": "learn more", "vector-anon-user-menu-pages-label": "Learn more about editing", diff --git a/i18n/qqq.json b/i18n/qqq.json index 0c33edc99..02966f557 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -53,6 +53,7 @@ "vector-searchsuggest-containing": "Label used in the special item of the search suggestions list which gives the user an option to perform a full text search for the term. Used in the WVUI typeahead search component.", "vector-intro-page": "Introduction or tutorial page for the wiki. Typically either Project/Help:Introduction ([[d:Q3945]]) or Project/Help:Tutorial ([[d:Q915263]]).", "vector-toc-heading": "Heading of table of contents\n\n{{Identical|Content}}", + "vector-toc-beginning": "Shown in the table of contents: Text of link to the beginning of the article.", "vector-anon-user-menu-pages": "Label describing the anon editor links in the anon user menu", "vector-anon-user-menu-pages-learn": "Lowercase text of link that goes to Help:Introduction and helps the user learn more about editing", "vector-anon-user-menu-pages-label": "Accessible version of 'vector-anon-user-menu-pages' link text, prompts user to learn more about editing", diff --git a/includes/SkinVector.php b/includes/SkinVector.php index 629ff9660..5d4da1a20 100644 --- a/includes/SkinVector.php +++ b/includes/SkinVector.php @@ -622,6 +622,9 @@ abstract class SkinVector extends SkinMustache { } return array_merge( $tocData, [ + 'is-vector-toc-beginning-enabled' => $this->getConfig()->get( + 'VectorTableOfContentsBeginning' + ), 'vector-is-collapse-sections-enabled' => $tocData[ 'number-section-count'] >= $this->getConfig()->get( 'VectorTableOfContentsCollapseAtCount' diff --git a/includes/templates/TableOfContents.mustache b/includes/templates/TableOfContents.mustache index 91f549074..dd6e1b248 100644 --- a/includes/templates/TableOfContents.mustache +++ b/includes/templates/TableOfContents.mustache @@ -3,6 +3,14 @@