Mollywhite has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/80692


Change subject: Bug 53289: Use more descriptive titles for prev/next links in 
navbar.
......................................................................

Bug 53289: Use more descriptive titles for prev/next links in navbar.

The previous/next links in the navbar only gave the title of the
page to which they were linking; now they prefix the title with
"Previous section:"

Bug: 53289
Change-Id: I62ec1a3a5ebee71c5b7a14fe9e2833eacf58c749
---
M BookManagerv2.hooks.php
M BookManagerv2.i18n.php
2 files changed, 22 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BookManagerv2 
refs/changes/92/80692/1

diff --git a/BookManagerv2.hooks.php b/BookManagerv2.hooks.php
index 937ab60..77158b1 100644
--- a/BookManagerv2.hooks.php
+++ b/BookManagerv2.hooks.php
@@ -124,14 +124,24 @@
                        $html .= Linker::link(
                                Title::newFromText( $prev->link ),
                                $prev->title,
-                               array( 'class' => 'mw-bookmanagerv2-nav-prev' )
+                               array(
+                                       'class' => 'mw-bookmanagerv2-nav-prev',
+                                       'title' => wfMessage( 
'bookmanagerv2-prev-title' )
+                                               ->params( $prev->title )
+                                               ->escaped()
+                               )
                        );
                }
                if ( $next ) {
                        $html .= Linker::link(
                                Title::newFromText( $next->link ),
                                $next->title,
-                               array( 'class' => 'mw-bookmanagerv2-nav-next' )
+                               array(
+                                       'class' => 'mw-bookmanagerv2-nav-next',
+                                       'title' => wfMessage( 
'bookmanagerv2-next-title' )
+                                               ->params( $next->title )
+                                               ->escaped()
+                               )
                        );
                }
                $html .= Html::closeElement( 'div' )
diff --git a/BookManagerv2.i18n.php b/BookManagerv2.i18n.php
index 4d5d20d..b374ab6 100644
--- a/BookManagerv2.i18n.php
+++ b/BookManagerv2.i18n.php
@@ -42,6 +42,8 @@
        'bookmanagerv2-isbn' => 'ISBN: $1',
        'bookmanagerv2-lccn' => 'LCCN: $1',
        'bookmanagerv2-oclc' => 'OCLC: $1',
+       'bookmanagerv2-next-title' => 'Next section: $1',
+       'bookmanagerv2-prev-title' => 'Previous section: $2',
        'bookmanagerv2-metadata-heading' => 'Metadata',
        'bookmanagerv2-sections-heading' => 'Sections',
        'bookmanagerv2-move-alt' => 'Move this section',
@@ -187,6 +189,14 @@
 
 See screenshot for an example of this dropdown.
 [[File:BookManagerv2 navigation bar metadata dropdown.png]]',
+       'bookmanagerv2-next-title' => 'Title text for the link to the next 
section in the work.
+
+Parameters:
+*$1 - Title of the next page in the section',
+       'bookmanagerv2-prev-title' => 'Title text for the link to the previous 
section in the work.
+
+Parameters:
+*$1 - Title of the previous page in the section',
        'bookmanagerv2-metadata-heading' => 'Heading for the collapsible 
section of the JSON editor that holds the metadata (everything but the sections 
information).
 {{Identical|Metadata}}',
        'bookmanagerv2-sections-heading' => 'Heading for the collapsible 
section of the JSON editor that holds information on the sections of the book.

-- 
To view, visit https://gerrit.wikimedia.org/r/80692
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I62ec1a3a5ebee71c5b7a14fe9e2833eacf58c749
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BookManagerv2
Gerrit-Branch: master
Gerrit-Owner: Mollywhite <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to