Santhosh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/265475
Change subject: Dashboard: Remove magnus tool
......................................................................
Dashboard: Remove magnus tool
Suggestions system replaces the tool now.
Change-Id: Ib212f0953db578112014c68f01170d0008149a07
---
M extension.json
M i18n/en.json
D modules/dashboard/ext.cx.magnuslink.js
D modules/dashboard/images/cx-find-missing.png
D modules/dashboard/images/cx-find-missing.svg
M modules/dashboard/styles/ext.cx.dashboard.less
M specials/SpecialContentTranslation.php
7 files changed, 1 insertion(+), 95 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation
refs/changes/75/265475/1
diff --git a/extension.json b/extension.json
index 0d4bebd..cb60462 100644
--- a/extension.json
+++ b/extension.json
@@ -134,8 +134,6 @@
"cxstats": true,
"newarticle": true
},
- "@ContentTranslationUseMagnusTool":"Whether the Magnus tool to
find missing articles to be enabled or not. This is initially made to
experiment with an article comparison tool at
http://tools.wmflabs.org/not-in-the-other-language/ See
https://phabricator.wikimedia.org/T76843",
- "ContentTranslationUseMagnusTool": true,
"ContentTranslationBrowserBlacklist": {
"msie": [ [ "<", 10 ] ]
},
@@ -282,17 +280,6 @@
"cx-translation-filter-draft-translations",
"cx-translation-filter-from-any-language",
"cx-translation-filter-to-any-language"
- ]
- },
- "ext.cx.magnuslink": {
- "scripts": [
- "dashboard/ext.cx.magnuslink.js"
- ],
- "dependencies": [
- "ext.cx.sitemapper"
- ],
- "messages": [
- "cx-magnus-tool-link-text"
]
},
"ext.cx.util": {
diff --git a/i18n/en.json b/i18n/en.json
index 5ba3d9b..f816546 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -136,7 +136,6 @@
"cx-translation-status-draft": "In progress",
"cx-translation-status-published": "Published",
"cx-translation-status-deleted": "Deleted",
- "cx-magnus-tool-link-text": "Find pages missing in your language",
"cx-translation-already-in-progress": "This is an ongoing translation
by $1.",
"cx-translation-already-in-progress-collaborate": "Please make sure you
coordinate with the user who translated the current translation.",
"cx-publishing-dialog-publish-draft-button": "Publish as draft",
diff --git a/modules/dashboard/ext.cx.magnuslink.js
b/modules/dashboard/ext.cx.magnuslink.js
deleted file mode 100644
index fb40555..0000000
--- a/modules/dashboard/ext.cx.magnuslink.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/*!
- * A link from ContentTranslation dashboard to Magnus Manske's
- * tool for finding missing articles.
- *
- * @ingroup Extensions
- * @copyright See AUTHORS.txt
- * @license GPL-2.0+
- */
-( function ( $, mw ) {
- 'use strict';
-
- var toolLink = 'https://tools.wmflabs.org/not-in-the-other-language/';
-
- function getMagnusToolLink() {
- var uri, contentLanguage, previousLanguages,
- sourceLanguage, targetLanguage, $link;
-
- uri = new mw.Uri( toolLink );
-
- contentLanguage = mw.config.get( 'wgContentLanguage' );
- previousLanguages = mw.uls.getPreviousLanguages();
- sourceLanguage = mw.cx.sourceLanguage ||
- ( window.localStorage && localStorage.getItem(
'cxSourceLanguage' ) ) ||
- previousLanguages[ previousLanguages.length - 1 ] ||
- ( contentLanguage === 'en' ? 'de' : 'en' );
-
- targetLanguage = mw.cx.targetLanguage ||
- ( window.localStorage && localStorage.getItem(
'cxTargetLanguage' ) ) ||
- contentLanguage;
-
- uri.extend( {
- lang1: mw.cx.siteMapper.getWikiDomainCode(
sourceLanguage ),
- lang2: mw.cx.siteMapper.getWikiDomainCode(
targetLanguage ),
- proj1: 'wiki',
- proj2: 'wiki',
- targets: 'source'
- } );
-
- // The algorithm for guessing the source and target languages
is very basic
- // and can return invalid results.
- // Run the actual query ("doit"), only if the languages
- // are defined and not identical, otherwise the query will
appear to be stuck.
- if ( sourceLanguage !== targetLanguage ) {
- uri.extend( {
- doit: 'Do it'
- } );
- }
-
- $link = $( '<a>' )
- .addClass( 'cx-sidebar__link cx-sidebar__link--magnus' )
- .text( mw.msg( 'cx-magnus-tool-link-text' ) )
- .prop( {
- target: '_blank',
- href: uri.toString()
- } );
-
- return $link;
- }
-
- mw.hook( 'mw.cx.dashboard.ready' ).add( function () {
- $( '.cx-sidebar ul' ).append( $( '<li>' ).append(
getMagnusToolLink() ) );
- } );
-}( jQuery, mediaWiki ) );
diff --git a/modules/dashboard/images/cx-find-missing.png
b/modules/dashboard/images/cx-find-missing.png
deleted file mode 100644
index 4b38542..0000000
--- a/modules/dashboard/images/cx-find-missing.png
+++ /dev/null
Binary files differ
diff --git a/modules/dashboard/images/cx-find-missing.svg
b/modules/dashboard/images/cx-find-missing.svg
deleted file mode 100644
index bd575ad..0000000
--- a/modules/dashboard/images/cx-find-missing.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"
width="74" height="74" viewBox="0 0 37 37">
- <defs>
- <style>
- .cls-2 { fill: #2460cf; }
- </style>
- </defs>
- <path d="M18.5 0C8.288 0 0 8.288 0 18.5S8.288 37 18.5 37 37 28.712 37 18.5
28.712 0 18.5 0zm1.85 31.45h-3.7v-3.7h3.7v3.7zm3.83-14.338l-1.665 1.703c-1.333
1.35-2.165 2.46-2.165 5.235h-3.7v-.925c0-2.035.833-3.885
2.164-5.235l2.294-2.332c.685-.665 1.092-1.59 1.092-2.608
0-2.035-1.665-3.7-3.7-3.7s-3.7 1.665-3.7 3.7h-3.7c0-4.09 3.312-7.4 7.4-7.4 4.09
0 7.4 3.31 7.4 7.4 0 1.628-.666 3.108-1.72 4.162z" id="path-1" class="cls-2"
fill-rule="evenodd"/>
-</svg>
diff --git a/modules/dashboard/styles/ext.cx.dashboard.less
b/modules/dashboard/styles/ext.cx.dashboard.less
index ab53784..86ea3ff 100644
--- a/modules/dashboard/styles/ext.cx.dashboard.less
+++ b/modules/dashboard/styles/ext.cx.dashboard.less
@@ -95,10 +95,6 @@
.cx-sidebar__link--feedback {
.background-image-svg('../images/cx-discuss.svg',
'../images/cx-discuss.png');
}
-
- .cx-sidebar__link--magnus {
- .background-image-svg('../images/cx-find-missing.svg',
'../images/cx-find-missing.png');
- }
}
.cx-header--dashboard {
diff --git a/specials/SpecialContentTranslation.php
b/specials/SpecialContentTranslation.php
index 0a630ee..9b7793e 100644
--- a/specials/SpecialContentTranslation.php
+++ b/specials/SpecialContentTranslation.php
@@ -75,8 +75,7 @@
}
public function execute( $parameters ) {
- global $wgContentTranslationUseMagnusTool,
- $wgContentTranslationTranslateInTarget;
+ global $wgContentTranslationTranslateInTarget;
$out = $this->getOutput();
$skin = $this->getSkin();
@@ -118,9 +117,6 @@
}
} else {
$out->addModules( 'ext.cx.dashboard' );
- if ( $wgContentTranslationUseMagnusTool ) {
- $out->addModules( 'ext.cx.magnuslink' );
- }
}
$this->setHeaders();
--
To view, visit https://gerrit.wikimedia.org/r/265475
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib212f0953db578112014c68f01170d0008149a07
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits