Phoenix303 has uploaded a new change for review.

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

Change subject: "Other languages" box changed to use HTML List
......................................................................

"Other languages" box changed to use HTML List

As per Bug T57389, I have made changes to use <ul><li></li></ul> instead
of <div> to list all the languages that the page has been translated into
in the "Other languages" box.

Bug: T57389
Change-Id: I52ddd71bf96cb6220d716eb20741e3aa07267857
---
M resources/css/ext.translate.css
M tag/PageTranslationHooks.php
2 files changed, 14 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/30/181630/1

diff --git a/resources/css/ext.translate.css b/resources/css/ext.translate.css
index de49a98..688b84a 100644
--- a/resources/css/ext.translate.css
+++ b/resources/css/ext.translate.css
@@ -25,13 +25,18 @@
 }
 
 .mw-pt-languages-list {
-       padding-left: 0.5em;
-       padding-bottom: 0.7em;
+       padding-left: 0.5em !important;
+       padding-bottom: 0.7em !important;
        display: table-cell;
        width: 80%;
+       list-style-type: none;
 }
 
-.mw-pt-languages-list a {
+.mw-pt-languages-list li {
+       display: inline;
+}
+
+.mw-pt-languages-list li a {
        white-space: nowrap;
 }
 
diff --git a/tag/PageTranslationHooks.php b/tag/PageTranslationHooks.php
index 7c01e7e..8c2b908 100644
--- a/tag/PageTranslationHooks.php
+++ b/tag/PageTranslationHooks.php
@@ -290,7 +290,11 @@
                                $name = Linker::link( $specialTranslateTitle, 
$name, $attribs, $params );
                        }
 
-                       $languages[] = $name;
+                       $languages[] = Html::rawElement(
+                               'li',
+                               array(),
+                               $name
+                       );
                }
 
                // dirmark (rlm/lrm) is added, because languages with RTL names 
can
@@ -309,7 +313,7 @@
                        wfMessage( 'tpt-languages-legend' )->escaped()
                );
                $out .= Html::rawElement(
-                       'div',
+                       'ul',
                        array( 'class' => 'mw-pt-languages-list autonym' ),
                        $languages
                );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I52ddd71bf96cb6220d716eb20741e3aa07267857
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Phoenix303 <divyalife...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to