Legoktm has uploaded a new change for review.

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

Change subject: Remove some dead code
......................................................................

Remove some dead code

If we were to enable translated titles somehow, I'm fairly sure it would
not end up in the Title class.

Change-Id: If0075ac8d7971929a809cfadc46e87a1a55a4028
---
M CategoryTreeFunctions.php
1 file changed, 0 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CategoryTree 
refs/changes/01/291701/1

diff --git a/CategoryTreeFunctions.php b/CategoryTreeFunctions.php
index 45dae51..3ffcaf4 100644
--- a/CategoryTreeFunctions.php
+++ b/CategoryTreeFunctions.php
@@ -487,16 +487,9 @@
                $s = '';
 
                foreach ( $res as $row ) {
-                       # TODO: translation support; ideally added to Title 
object
                        $t = Title::newFromRow( $row );
 
-                       # $trans = $title->getLocalizedText();
-                       $trans = ''; # place holder for when translated titles 
are available
-
                        $label = htmlspecialchars( $t->getText() );
-                       if ( $trans && $trans != $label ) {
-                               $label .= ' ' . Xml::element( 'i', array( 
'class' => 'translation' ), $trans );
-                       }
 
                        $wikiLink = $special->getLocalURL( 'target=' . 
$t->getPartialURL() .
                                '&' . $this->getOptionsAsUrlParameters() );
@@ -548,9 +541,6 @@
                $ns = $title->getNamespace();
                $key = $title->getDBkey();
 
-               # $trans = $title->getLocalizedText();
-               $trans = ''; # place holder for when translated titles are 
available
-
                $hideprefix = $this->getOption( 'hideprefix' );
 
                if ( $hideprefix == CT_HIDEPREFIX_ALWAYS ) {
@@ -569,10 +559,6 @@
                        $label = htmlspecialchars( $title->getText() );
                } else {
                        $label = htmlspecialchars( $title->getPrefixedText() );
-               }
-
-               if ( $trans && $trans != $label ) {
-                       $label .= ' ' . Xml::element( 'i', array( 'class' => 
'translation' ), $trans );
                }
 
                $labelClass = 'CategoryTreeLabel ' . ' CategoryTreeLabelNs' . 
$ns;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0075ac8d7971929a809cfadc46e87a1a55a4028
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CategoryTree
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

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

Reply via email to