jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  Mollywhite: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/BookManagerv2.hooks.php b/BookManagerv2.hooks.php
index be78f3f..38883b2 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 bfba964..9c61e53 100644
--- a/BookManagerv2.i18n.php
+++ b/BookManagerv2.i18n.php
@@ -44,6 +44,8 @@
        'bookmanagerv2-oclc' => 'OCLC: $1',
        'bookmanagerv2-read-json-block' => 'View the metadata and chapter list 
for this work',
        'bookmanagerv2-edit-json-block' => 'Edit the metadata and chapter list 
for this work',
+       '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',
@@ -193,6 +195,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-read-json-block' => 'Title for a link to explain that 
clicking the \'read\' button will allow them to view the metadata and chapter 
list for this work',
        'bookmanagerv2-edit-json-block' => 'Title for a link to explain that 
clicking the \'edit\' button will allow them to edit the metadata and chapter 
list for this work',
        'bookmanagerv2-metadata-heading' => 'Heading for the collapsible 
section of the JSON editor that holds the metadata (everything but the sections 
information).

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62ec1a3a5ebee71c5b7a14fe9e2833eacf58c749
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BookManagerv2
Gerrit-Branch: master
Gerrit-Owner: Mollywhite <[email protected]>
Gerrit-Reviewer: Helder.wiki <[email protected]>
Gerrit-Reviewer: Mollywhite <[email protected]>
Gerrit-Reviewer: Mwalker <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to