Ayushimrigen has uploaded a new change for review. https://gerrit.wikimedia.org/r/198730
Change subject: Add styling for previous/next in SearchTranslations ...................................................................... Add styling for previous/next in SearchTranslations Bug: T49920 Change-Id: I7c81396e53a41001b722abcd45caabfd3759006c --- M i18n/search/en.json M specials/SpecialSearchTranslations.php 2 files changed, 8 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/30/198730/1 diff --git a/i18n/search/en.json b/i18n/search/en.json index 4e83be6..ae19730 100644 --- a/i18n/search/en.json +++ b/i18n/search/en.json @@ -16,6 +16,6 @@ "tux-sst-nosolr-body": "This wiki does not have a translation search service.", "tux-sst-solr-offline-title": "Search unavailable", "tux-sst-solr-offline-body": "The search service is temporarily unavailable.", - "tux-sst-next": "Next results", - "tux-sst-prev": "Previous results" -} \ No newline at end of file + "tux-sst-next": "Next", + "tux-sst-prev": "Previous" +} diff --git a/specials/SpecialSearchTranslations.php b/specials/SpecialSearchTranslations.php index c5fc1c1..261b220 100644 --- a/specials/SpecialSearchTranslations.php +++ b/specials/SpecialSearchTranslations.php @@ -152,21 +152,11 @@ } $titleText = $title->getPrefixedText(); - $titleAttribs = array( - 'class' => 'row tux-title', - 'dir' => 'ltr', - ); - - $textAttribs = array( - 'class' => 'row tux-text', - 'lang' => wfBCP47( $document['language'] ), - 'dir' => Language::factory( $document['language'] )->getDir(), - ); $resultsHtml = $resultsHtml . Html::openElement( 'div', $resultAttribs ) - . Html::rawElement( 'div', $textAttribs, $text ) - . Html::element( 'div', $titleAttribs, $titleText ) + . Html::rawElement( 'div', array( 'class' => 'row tux-text' ), $text ) + . Html::element( 'div', array( 'class' => 'row tux-title' ), $titleText ) . $edit . Html::closeElement( 'div' ); } @@ -182,7 +172,7 @@ 'class' => 'pager-next', 'href' => $this->getTitle()->getLocalUrl( $newParams ), ); - $next = Html::element( 'a', $attribs, $this->msg( 'tux-sst-next' )->text() ); + $next = Html::element( 'a', $attribs, $this->msg( 'tux-sst-next'.$this->limit )->text() ); } if ( $offset ) { $newParams = array( 'offset' => max( 0, $offset - $this->limit ) ) + $params; @@ -190,10 +180,10 @@ 'class' => 'pager-prev', 'href' => $this->getTitle()->getLocalUrl( $newParams ), ); - $prev = Html::element( 'a', $attribs, $this->msg( 'tux-sst-prev' )->text() ); + $prev = Html::element( 'a', $attribs, $this->msg( 'tux-sst-prev'.$this->limit )->text() ); } - $resultsHtml .= Html::rawElement( 'div', array(), "$prev $next" ); + $resultsHtml .= Html::rawElement( 'div', array('class' => 'prev-next' ), "$prev $next" ); $search = $this->getSearchInput( $queryString ); $count = $this->msg( 'tux-sst-count' )->numParams( $total ); -- To view, visit https://gerrit.wikimedia.org/r/198730 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c81396e53a41001b722abcd45caabfd3759006c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Ayushimrigen <ayushimrige...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits