Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/196204
Change subject: Drop unused paramaters from wikibase-sitelinkview template ...................................................................... Drop unused paramaters from wikibase-sitelinkview template The TODO is not relevant any more because the inner element does have both lang="..." and dir="auto" attributes now. The browser calculates the direction based on the language, which is fine and exactly what should happen in that no-JS fallback. Change-Id: I28f6db1a6065d9b8b147317a55e1cb1d950f4ea4 --- M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js M repo/includes/View/SiteLinksView.php M repo/resources/templates.php 3 files changed, 2 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/04/196204/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js index b3b667e..3f9fa3f 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js @@ -51,8 +51,6 @@ var site = this._getSite(); return site ? site.getId() : 'new'; }, - '', //FIXME: Unused, drop. - '', //FIXME: Unused, drop. function() { var site = this._getSite(); return site ? site.getId() : ''; diff --git a/repo/includes/View/SiteLinksView.php b/repo/includes/View/SiteLinksView.php index 70d679e..f3ade9f 100644 --- a/repo/includes/View/SiteLinksView.php +++ b/repo/includes/View/SiteLinksView.php @@ -268,13 +268,8 @@ $siteName = htmlspecialchars( $this->languageNameLookup->getName( $languageCode ) ); } - // TODO: for non-JS, also set the dir attribute on the link cell; - // but do not build language objects for each site since it causes too much load - // and will fail when having too much site links return $this->templateFactory->render( 'wikibase-sitelinkview', htmlspecialchars( $siteId ), // ID used in classes - '', //FIXME: Unused, drop. - '', //FIXME: Unused, drop. htmlspecialchars( $siteId ), // displayed site ID $siteName, $this->getHtmlForPage( $siteLink, $site ) diff --git a/repo/resources/templates.php b/repo/resources/templates.php index 7f05509..f904ad7 100644 --- a/repo/resources/templates.php +++ b/repo/resources/templates.php @@ -241,8 +241,8 @@ <<<HTML <li class="wikibase-sitelinkview wikibase-sitelinkview-$1" data-wb-siteid="$1"> <span class="wikibase-sitelinkview-siteid-container"> - <span class="wikibase-sitelinkview-siteid wikibase-sitelinkview-siteid-$1" title="$5">$4</span> - </span><span class="wikibase-sitelinkview-link wikibase-sitelinkview-link-$1"><!-- wikibase-sitelinkview-pagename -->$6</span> + <span class="wikibase-sitelinkview-siteid wikibase-sitelinkview-siteid-$1" title="$3">$2</span> + </span><span class="wikibase-sitelinkview-link wikibase-sitelinkview-link-$1"><!-- wikibase-sitelinkview-pagename -->$4</span> </li> HTML; -- To view, visit https://gerrit.wikimedia.org/r/196204 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I28f6db1a6065d9b8b147317a55e1cb1d950f4ea4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits