diff --git a/core/includes/pager.inc b/core/includes/pager.inc index 9892de0..e25c328 100644 --- a/core/includes/pager.inc +++ b/core/includes/pager.inc @@ -186,7 +186,7 @@ function template_preprocess_pager(&$variables) { $tags = &$variables['tags']; $tags += array( t('« first'), - t('‹ prev'), + t('‹ previous'), '', t('next ›'), t('last »'), diff --git a/core/modules/comment/src/Tests/CommentPagerTest.php b/core/modules/comment/src/Tests/CommentPagerTest.php index 4faf991..69e471d 100644 --- a/core/modules/comment/src/Tests/CommentPagerTest.php +++ b/core/modules/comment/src/Tests/CommentPagerTest.php @@ -349,11 +349,10 @@ function testTwoPagers() { } /** - * Follows a link by xpath. + * Follows a link found at a give xpath query. * - * Will click the first link found with this link text by default, or a later - * one if an index is given. Match is case sensitive with normalized space. - * The label is translated label. + * Will click the first link found with the given xpath query by default, + * or a later one if an index is given. * * If the link is discovered and clicked, the test passes. Fail otherwise. * diff --git a/core/modules/system/templates/pager.html.twig b/core/modules/system/templates/pager.html.twig index d034738..3397739 100644 --- a/core/modules/system/templates/pager.html.twig +++ b/core/modules/system/templates/pager.html.twig @@ -5,6 +5,25 @@ * * Available variables: * - items: List of pager items. + * The list is keyed by the following elements: + * - first: Item for the first page; not present on the first page of results. + * - previous: Item for the previous page; not present on the first page + * of results. + * - next: Item for the next page; not present on the last page of results. + * - last: Item for the last page; not present on the last page of results. + * - pages: List of pages, keyed by page numer. + * - current: The page number of the current page. + * - ellipsis: If there are more pages than the quantity allows, then an + * ellipsis before or after the listed pages may be present. + * + * Special case sub-sub-elements: + * + * items.first, items.previous, items.next, items.last and each item inside + * items.pages contain the following elements: + * - href: URL with appropriate query parameters for the item. + * - attributes: A keyed list of HTML attributes for the item. + * - text: The visible text used for the item link, such as "‹ previous" + * or "next ›". * * @see template_preprocess_pager() *