jenkins-bot has submitted this change and it was merged. Change subject: Migrate to JSON configuration based extension registration ......................................................................
Migrate to JSON configuration based extension registration Removed Autoload.php and Resources.php. Replaced ContentTranslation.php with stub. Testplan: Register extension using wfLoadExtension( 'ContentTranslation' ); and remove the old require_once "$IP/extensions/ContentTranslation/ContentTranslation.php"; Make sure "all" works fine! Bug: T92492 Change-Id: I7bb6249b1555e2159c2932eaa9a4d96e067c80ee --- D Autoload.php M ContentTranslation.php D Resources.php M extension.json 4 files changed, 278 insertions(+), 1,254 deletions(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/Autoload.php b/Autoload.php deleted file mode 100644 index 9c7c5e6..0000000 --- a/Autoload.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -/** - * Autoload definitions. - * - * @file - * @copyright See AUTHORS.txt - * @license GPL-2.0+ - */ - -global $wgAutoloadClasses; -$dir = __DIR__; - -$wgAutoloadClasses += array( - 'ApiContentTranslationConfiguration' => "$dir/api/ApiContentTranslationConfiguration.php", - 'ApiContentTranslationPublish' => "$dir/api/ApiContentTranslationPublish.php", - 'ApiContentTranslationDelete' => "$dir/api/ApiContentTranslationDelete.php", - 'ApiQueryContentTranslation' => "$dir/api/ApiQueryContentTranslation.php", - 'ApiQueryContentTranslationStats' => "$dir/api/ApiQueryContentTranslationStats.php", - 'ApiQueryContentTranslationLanguageTrend' =>"$dir/api/ApiQueryContentTranslationLanguageTrend.php", - 'ApiQueryPublishedTranslations' => "$dir/api/ApiQueryPublishedTranslations.php", - 'ContentTranslationHooks' => "$dir/ContentTranslation.hooks.php", - 'ContentTranslation\Database' => "$dir/includes/Database.php", - 'ContentTranslation\Draft' => "$dir/includes/Draft.php", - 'ContentTranslation\GlobalUser' => "$dir/includes/GlobalUser.php", - 'ContentTranslation\Notification' => "$dir/includes/Notification.php", - 'ContentTranslation\SiteMapper' => "$dir/includes/SiteMapper.php", - 'ContentTranslation\Stats' => "$dir/includes/Stats.php", - 'ContentTranslation\Translation' => "$dir/includes/Translation.php", - 'ContentTranslation\Translator' => "$dir/includes/Translator.php", - 'SpecialContentTranslation' => "$dir/specials/SpecialContentTranslation.php", - 'SpecialContentTranslationStats' => "$dir/specials/SpecialContentTranslationStats.php", -); diff --git a/ContentTranslation.php b/ContentTranslation.php index 9c757ed..c845477 100644 --- a/ContentTranslation.php +++ b/ContentTranslation.php @@ -1,173 +1,15 @@ <?php -/** - * ContentTranslation extension - * A tool that allows editors to translate pages from one language - * to another with the help of machine translation and other translation tools - * - * @file - * @ingroup Extensions - * @copyright See AUTHORS.txt - * @license GPL-2.0+ - */ - -/** - * Version number used in extension credits and in other places where needed. - */ -define( 'CONTENTTRANSLATION_VERSION', '1.0.0+20150401' ); - -/** - * Extension credits properties. - */ -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'ContentTranslation', - 'version' => CONTENTTRANSLATION_VERSION, - 'author' => array( - 'Amir Aharoni', - 'David Chan', - 'Kartik Mistry', - 'Joel Sahleen', - 'Niklas Laxström', - 'Pau Giner', - 'Runa Bhattacharjee', - 'Santhosh Thottingal', - 'Siebrand Mazeland', - 'Sucheta Ghoshal', - ), - 'descriptionmsg' => 'cx-desc', - 'url' => 'https://www.mediawiki.org/wiki/Extension:ContentTranslation', - 'license-name' => 'GPL-2.0+', -); - -$dir = __DIR__; - -require_once "$dir/Resources.php"; -require_once "$dir/Autoload.php"; - -$GLOBALS['wgMessagesDirs']['ContentTranslation'] = "$dir/i18n"; - -$GLOBALS['wgExtensionMessagesFiles']['ContentTranslationAlias'] = - "$dir/ContentTranslation.alias.php"; - -// Special pages -$GLOBALS['wgSpecialPages']['ContentTranslation'] = 'SpecialContentTranslation'; -$GLOBALS['wgSpecialPages']['ContentTranslationStats'] = 'SpecialContentTranslationStats'; - -// API modules -$GLOBALS['wgAPIModules']['cxconfiguration'] = 'ApiContentTranslationConfiguration'; -$GLOBALS['wgAPIModules']['cxpublish'] = 'ApiContentTranslationPublish'; -$GLOBALS['wgAPIModules']['cxdelete'] = 'ApiContentTranslationDelete'; -$GLOBALS['wgAPIListModules']['contenttranslation'] = 'ApiQueryContentTranslation'; -$GLOBALS['wgAPIListModules']['contenttranslationstats'] = 'ApiQueryContentTranslationStats'; -$GLOBALS['wgAPIListModules']['contenttranslationlangtrend'] = - 'ApiQueryContentTranslationLanguageTrend'; -$GLOBALS['wgAPIListModules']['cxpublishedtranslations' ]= 'ApiQueryPublishedTranslations'; -// Hooks -$GLOBALS['wgHooks']['BeforePageDisplay'][] = 'ContentTranslationHooks::addModules'; -$GLOBALS['wgHooks']['GetBetaFeaturePreferences'][] = 'ContentTranslationHooks::getPreferences'; -$GLOBALS['wgHooks']['ResourceLoaderGetConfigVars'][] = 'ContentTranslationHooks::addConfig'; -$GLOBALS['wgHooks']['EventLoggingRegisterSchemas'][] = 'ContentTranslationHooks::addEventLogging'; -$GLOBALS['wgHooks']['SpecialContributionsBeforeMainOutput'][] = - 'ContentTranslationHooks::addNewContributionButton'; -$GLOBALS['wgHooks']['ListDefinedTags'][] = 'ContentTranslationHooks::registerTags'; -$GLOBALS['wgHooks']['ChangeTagsListActive'][] = 'ContentTranslationHooks::registerTags'; -$GLOBALS['wgHooks']['UserSaveOptions'][] = 'ContentTranslationHooks::onSaveOptions'; -$GLOBALS['wgHooks']['EditPage::showEditForm:initial'][] = - 'ContentTranslationHooks::newArticleCampaign'; -$GLOBALS['wgHooks']['ResourceLoaderTestModules'][] = - 'ContentTranslationHooks::onResourceLoaderTestModules'; -$GLOBALS['wgHooks']['BeforeCreateEchoEvent'][] = 'ContentTranslationHooks::onBeforeCreateEchoEvent'; -$GLOBALS['wgHooks']['EchoGetDefaultNotifiedUsers'][] = - 'ContentTranslationHooks::onEchoGetDefaultNotifiedUsers'; -// Globals for this extension -$GLOBALS['wgDefaultUserOptions']['echo-subscriptions-web-cx'] = true; -$GLOBALS['wgContentTranslationExperimentalFeatures'] = false; -$GLOBALS['wgContentTranslationParsoid'] = array( - 'url' => 'http://parsoid-lb.eqiad.wikimedia.org/', - 'timeout' => 100 * 1000, // Parsoid timeout in milliseconds - 'prefix' => 'enwiki', -); - -/** - * Content translation database to provide dashboard and other features. - * Provide the database name as the value. - * @see sql/contenttranslation.sql for scripts to create this database. - */ -$GLOBALS['wgContentTranslationDatabase'] = null; - -/** - * If the content translation database is located in a different cluster, - * specify the name of the cluster. - */ -$GLOBALS['wgContentTranslationCluster'] = false; - -/** - * Whether to use EventLogging. - * The EventLogging extension must be installed if this option is enabled. - */ -$GLOBALS['wgContentTranslationEventLogging'] = false; - -/** - * Category to add to published translations if there is a high amount - * of unedited machine translation. E.g., "Category:HighMT" - */ -$GLOBALS['wgContentTranslationHighMTCategory'] = null; - -/** - * Patterns to access MediaWiki pages, APIs and cxserver in different languages - * for the site family. - */ -$GLOBALS['wgContentTranslationSiteTemplates'] = array( - 'view' => '//$1.wikipedia.org/wiki/$2', - 'action' => '//$1.wikipedia.org/w/index.php?title=$2', - 'api' => '//$1.wikipedia.org/w/api.php', - 'cx' => 'http://localhost:8080/v1', -); - -/** - * Whether to open Special:ContentTranslation in the target wiki - * when clicking the button in the entry point. - * The domain will be based on $wgContentTranslationSiteTemplates. - * The default is to open Special:ContentTranslation on the same wiki. - */ -$GLOBALS['wgContentTranslationTranslateInTarget'] = false; - -/** - * Whether to have CX available only as a beta feature and only shown to the - * users who have enabled the beta feature. - */ -$GLOBALS['wgContentTranslationAsBetaFeature'] = true; - -/* - * The default source language. - * English is the default. - */ -$GLOBALS['wgContentTranslationDefaultSourceLanguage'] = 'en'; - -/* - * Target namespace to publish articles. Values can be 'Main' - * or any valid Namespace without leading column. - * Example: 'User', 'MediaWiki', 'Draft' - * If the value is Main, article will be published in Main namespace. - * If the value is User, article will be published under User:UserName/PageTitle - * If it is another value like Foo, It will get published in Foo:PageTitle - */ -$GLOBALS['wgContentTranslationTargetNamespace'] = 'Main'; - -// List of campaigns enabled. Available campaigns: newarticle, cxstats -$GLOBALS['wgContentTranslationCampaigns'] = array( 'cxstats' ); - -/* - * 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 - */ -$GLOBALS['wgContentTranslationUseMagnusTool'] = true; - -// List of browsers Content Translation is incompatibe with -// See jQuery.client for specification -$GLOBALS['wgContentTranslationBrowserBlacklist'] = array( - // IE < 10 has various incompatibilities in layout and feature support - 'msie' => array ( array( '<', 10 ) ), -); +if ( function_exists( 'wfLoadExtension' ) ) { + wfLoadExtension( 'ContentTranslation' ); + // Keep i18n globals so mergeMessageFileList.php doesn't break + $wgMessagesDirs['ContentTranslation'] = __DIR__ . '/i18n'; + $wgExtensionMessagesFiles['ContentTranslation'] = __DIR__ . '/ContentTranslation.alias.php'; + wfWarn( + 'Deprecated PHP entry point used for ContentTranslation extension. ' . + 'Please use wfLoadExtension instead, ' . + 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' + ); + return; +} else { + die( 'This version of the FooBar extension requires MediaWiki 1.25+' ); +} diff --git a/Resources.php b/Resources.php deleted file mode 100644 index d749075..0000000 --- a/Resources.php +++ /dev/null @@ -1,911 +0,0 @@ -<?php -/** - * Resource loader module definitions. - * - * @file - * @license GPL-2.0+ - */ - -$dir = __DIR__; - -// TODO: use the standard form -$resourcePaths = array( - 'localBasePath' => $dir . '/modules', - 'remoteExtPath' => 'ContentTranslation/modules', -); - -$wgResourceModules['ext.cx.contributions'] = array( - 'scripts' => array( - 'entrypoint/ext.cx.contributions.js', - ), - 'styles' => array( - 'entrypoint/styles/ext.cx.contributions.less', - ), - 'dependencies' => array( - 'mediawiki.util', - 'mediawiki.ui.button', - ), - 'messages' => array( - 'cx-contributions-new-contributions', - 'cx-contributions-new-article', - 'cx-contributions-translation', - 'cx-contributions-upload', - 'cx-contributions-new-article-tooltip', - 'cx-contributions-translation-tooltip', - 'cx-contributions-upload-tooltip', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.contributions.init'] = array( - 'scripts' => array( - 'entrypoint/ext.cx.contributions.init.js', - ), - 'dependencies' => array( - 'ext.cx.contributions', - ), - 'position' => 'top', -) + $resourcePaths; - -$wgResourceModules['ext.cx.model'] = array( - 'scripts' => array( - 'base/ext.cx.model.js', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.feedback'] = array( - 'dependencies' => array( - 'ext.cx.model', - ), - 'scripts' => array( - 'widgets/feedback/ext.cx.feedback.js', - ), - 'styles' => array( - 'widgets/feedback/styles/ext.cx.feedback.less', - ), - 'messages' => array( - 'cx-feedback-link', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.translationview'] = array( - 'scripts' => array( - 'translationview/ext.cx.translationview.js', - ), - 'styles' => array( - 'translationview/styles/ext.cx.translationview.less', - ), - 'dependencies' => array( - 'ext.cx.model', - 'ext.cx.header', - 'ext.cx.source', - 'ext.cx.sitemapper', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.dashboard'] = array( - 'scripts' => array( - 'dashboard/ext.cx.dashboard.js', - ), - 'styles' => array( - 'dashboard/styles/ext.cx.dashboard.less', - ), - 'dependencies' => array( - 'ext.cx.model', - 'ext.cx.header', - 'ext.cx.sitemapper', - 'ext.cx.translationlist', - 'ext.cx.source.selector', - 'ext.cx.feedback', - 'mediawiki.ui.button', - 'mediawiki.Uri', - ), - 'messages' => array( - 'cx-create-new-translation', - 'cx-create-new-translation-desc', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.magnuslink'] = array( - 'scripts' => array( - 'dashboard/ext.cx.magnuslink.js', - ), - 'styles' => array( - 'dashboard/styles/ext.cx.magnuslink.less', - ), - 'messages' => array( - 'cx-magnus-tool-link-text', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.util'] = array( - 'scripts' => array( - 'util/ext.cx.util.js', - ), - 'dependencies' => array( - 'ext.cx.model', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.util.selection'] = array( - 'scripts' => array( - 'util/ext.cx.util.selection.js', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.sitemapper'] = array( - 'scripts' => array( - 'base/ext.cx.sitemapper.js', - ), - 'dependencies' => array( - 'ext.cx.model', - 'mediawiki.Uri', - 'mediawiki.api', - 'mediawiki.Title', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.header'] = array( - 'scripts' => array( - 'header/ext.cx.header.js', - ), - 'styles' => array( - 'header/styles/ext.cx.header.less', - ), - 'dependencies' => array( - 'mediawiki.Uri', - 'mediawiki.jqueryMsg', - 'mediawiki.util', - 'mediawiki.ui.button', - ), - 'messages' => array( - 'cx', - 'cx-error-server-connection', - 'cx-error-page-not-found', - 'cx-header-new-translation', - 'cx-header-all-translations', - 'cx-publish-button', - 'cx-special-login-error', - 'cx-translation-target-page-exists', - 'login', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.source'] = array( - 'scripts' => array( - 'source/ext.cx.source.js', - 'source/ext.cx.source.filter.js', - ), - 'styles' => array( - 'source/styles/ext.cx.source.less', - ), - 'dependencies' => array( - 'ext.cx.util', - 'jquery.uls.data', - 'mediawiki.Title', - 'mediawiki.Uri', - 'mediawiki.api', - 'mediawiki.jqueryMsg', - 'mediawiki.util', - 'ext.cx.widgets.spinner', - 'mediawiki.skinning.content.parsoid', - ), - 'messages' => array( - 'cx-source-view-page', - 'cx-source-loading', - 'cx-tools-link-hover-tooltip', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.source.selector'] = array( - 'scripts' => array( - 'source/ext.cx.source.selector.js' - ), - 'styles' => array( - 'source/styles/ext.cx.source.selector.less', - ), - 'dependencies' => array( - 'ext.cx.sitemapper', - 'jquery.suggestions', - 'jquery.throttle-debounce', - 'ext.uls.mediawiki', - 'jquery.uls.compact', - 'mediawiki.ui.button', - 'ext.cx.widgets.overlay', - 'ext.cx.pageselector', - ), - 'messages' => array( - 'cx-sourceselector-dialog-new-translation', - 'cx-sourceselector-dialog-button-start-translation', - 'cx-sourceselector-dialog-button-cancel', - 'cx-sourceselector-dialog-source-language-label', - 'cx-sourceselector-dialog-target-language-label', - 'cx-sourceselector-dialog-source-title-placeholder', - 'cx-sourceselector-dialog-target-title-placeholder', - 'cx-sourceselector-dialog-error-page-and-title-exist', - 'cx-sourceselector-dialog-error-page-exists', - 'cx-sourceselector-dialog-error-title-in-use', - 'cx-sourceselector-dialog-error-no-source-article', - 'cx-license-agreement', - 'cx-error-server-connection', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.pageselector'] = array( - 'scripts' => array( - 'widgets/pageselector/ext.cx.pageselector.js' - ), - 'styles' => array( - 'widgets/pageselector/ext.cx.pageselector.less', - ), - 'dependencies' => array( - 'mediawiki.api', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.translation'] = array( - 'scripts' => array( - 'translation/ext.cx.translation.js', - 'translation/ext.cx.translation.aligner.js', - ), - 'dependencies' => array( - 'ext.cx.editor', - 'ext.cx.translation.progress', - 'ext.cx.util', - 'ext.cx.util.selection', - 'jquery.throttle-debounce', - 'jquery.uls.data', - 'mediawiki.Uri', - 'mediawiki.Title', - ), - 'styles' => array( - 'translation/styles/ext.cx.translation.less', - ), - 'messages' => array( - 'cx-translation-add-translation', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.translation.progress'] = array( - 'scripts' => 'translation/ext.cx.translation.progress.js', - 'messages' => array( - 'cx-warning-unsaved-translation', - ), - 'dependencies' => array( - 'ext.cx.util' - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.tools.manager'] = array( - 'scripts' => array( - 'tools/ext.cx.tools.manager.js', - ), - 'styles' => array( - 'tools/styles/ext.cx.tools.manager.less', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.tools'] = array( - 'scripts' => array( - 'tools/ext.cx.tools.js', - ), - 'styles' => array( - 'tools/styles/ext.cx.tools.less', - ), - 'dependencies' => array( - 'ext.cx.feedback', - 'ext.cx.progressbar', - 'ext.cx.tools.dictionary', - 'ext.cx.tools.formatter', - 'ext.cx.tools.gallery', - 'ext.cx.tools.images', - 'ext.cx.tools.instructions', - 'ext.cx.tools.link', - 'ext.cx.tools.manager', - 'ext.cx.tools.mt', - 'ext.cx.tools.mtabuse', - 'ext.cx.tools.reference', - 'ext.cx.tools.template', - 'ext.cx.tools.categories', - 'ext.cx.util.selection', - 'jquery.uls.data', - 'mediawiki.jqueryMsg', - 'ext.cx.widgets.spinner', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.tools.card'] = array( - 'styles' => array( - 'tools/styles/ext.cx.tools.card.less', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.tools.instructions'] = array( - 'scripts' => array( - 'tools/ext.cx.tools.instructions.js', - ), - 'styles' => array( - 'tools/styles/ext.cx.tools.instructions.less', - ), - 'messages' => array( - 'cx-tools-searchbox-text', - 'cx-tools-instructions-text1', - 'cx-tools-instructions-text2', - 'cx-tools-instructions-text3', - 'cx-tools-instructions-text4', - 'cx-tools-instructions-text5', - 'cx-tools-instructions-text6', - 'cx-tools-view-guidelines', - 'cx-tools-view-guidelines-link', - ), - 'dependencies' => array( - 'ext.cx.tools.manager', - 'ext.cx.tools.card', - 'mediawiki.jqueryMsg', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.tools.mtabuse'] = array( - 'scripts' => array( - 'tools/ext.cx.tools.mtabuse.js', - ), - 'styles' => array( - 'tools/styles/ext.cx.tools.mtabuse.less', - ), - 'messages' => array( - 'cx-mt-abuse-warning-title', - 'cx-mt-abuse-warning-text', - 'cx-tools-view-guidelines', - 'cx-tools-view-guidelines-link', - ), - 'dependencies' => array( - 'ext.cx.tools.manager', - 'ext.cx.tools.card', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.tools.formatter'] = array( - 'scripts' => array( - 'tools/ext.cx.tools.formatter.js', - ), - 'styles' => array( - 'tools/styles/ext.cx.tools.formatter.less', - ), - 'dependencies' => array( - 'ext.cx.tools.manager', - 'ext.cx.tools.card', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.tools.dictionary'] = array( - 'scripts' => array( - 'tools/ext.cx.tools.dictionary.js', - ), - 'styles' => array( - 'tools/styles/ext.cx.tools.dictionary.less', - ), - 'messages' => array( - 'cx-tools-dictionary-title', - ), - 'dependencies' => array( - 'ext.cx.tools.manager', - 'ext.cx.tools.card', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.tools.link'] = array( - 'scripts' => array( - 'tools/ext.cx.tools.link.js', - ), - 'styles' => array( - 'tools/styles/ext.cx.tools.link.less', - ), - 'messages' => array( - 'cx-tools-link-title', - 'cx-tools-link-add', - 'cx-tools-link-remove', - 'cx-tools-link-instruction-shortcut', - 'cx-tools-missing-link-title', - 'cx-tools-missing-link-text', - 'cx-tools-missing-link-tooltip', - 'cx-tools-missing-link-mark-link', - ), - 'dependencies' => array( - 'ext.cx.tools.manager', - 'ext.cx.tools.card', - 'jquery.uls.data', - 'mediawiki.Title', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.tools.mt'] = array( - 'scripts' => array( - 'tools/ext.cx.tools.mt.js', - ), - 'styles' => array( - 'tools/styles/ext.cx.tools.mt.less', - ), - 'messages' => array( - 'cx-tools-mt-title', - 'cx-tools-mt-use-source', - 'cx-tools-mt-clear-translation', - 'cx-tools-mt-restore', - 'cx-tools-mt-provider-title', - 'cx-tools-mt-not-available', - 'cx-tools-mt-dont-use', - ), - 'dependencies' => array( - 'ext.cx.translationview', - 'ext.cx.model', - 'ext.cx.source', - 'ext.cx.tools.card', - 'ext.cx.tools.manager', - 'ext.cx.translation', - 'ext.cx.util', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.tools.reference'] = array( - 'scripts' => array( - 'tools/ext.cx.tools.reference.js', - ), - 'styles' => array( - 'tools/styles/ext.cx.tools.reference.less', - ), - 'messages' => array( - 'cx-tools-reference-title', - 'cx-tools-reference-add', - 'cx-tools-reference-remove', - ), - 'dependencies' => array( - 'ext.cx.tools.manager', - 'ext.cx.tools.card', - 'ext.cx.util', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.tools.template'] = array( - 'scripts' => array( - 'tools/ext.cx.tools.template.js', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.tools.images'] = array( - 'scripts' => array( - 'tools/ext.cx.tools.images.js', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.tools.gallery'] = array( - 'scripts' => array( - 'tools/ext.cx.tools.gallery.js', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.tools.categories'] = array( - 'scripts' => array( - 'tools/ext.cx.tools.categories.js', - ), - 'styles' => array( - 'tools/styles/ext.cx.tools.categories.less', - ), - 'messages' => array( - 'cx-tools-categories-count-message', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.progressbar'] = array( - 'scripts' => 'widgets/progressbar/ext.cx.progressbar.js', - 'styles' => array( - 'widgets/progressbar/ext.cx.progressbar.less', - ), - 'messages' => array( - 'cx-header-progressbar-text', - 'cx-header-progressbar-text-mt', - ), - 'dependencies' => array( - 'mediawiki.jqueryMsg', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.draft'] = array( - 'scripts' => array( - 'draft/ext.cx.draft.js', - ), - 'dependencies' => array( - 'ext.cx.model', - 'mediawiki.api.edit', - 'jquery.throttle-debounce', - ), - 'messages' => array( - 'cx-save-draft-saving', - 'cx-save-draft-save-success', - 'cx-save-draft-error', - 'cx-save-draft-tooltip', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.publish'] = array( - 'scripts' => array( - 'publish/ext.cx.publish.js', - ), - 'styles' => array( - 'publish/styles/ext.cx.publish.less', - ), - 'dependencies' => array( - 'ext.cx.model', - 'json', - 'mediawiki.api.edit', - 'ext.cx.publish.dialog', - 'ext.cx.sitemapper', - 'ext.cx.tours.publish.init', - ), - 'messages' => array( - 'cx-publish-page-success', - 'cx-publish-page-error', - 'cx-publish-button-publishing', - 'cx-publish-captcha-title', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.wikibase.link'] = array( - 'scripts' => array( - 'publish/ext.cx.wikibase.link.js', - ), - 'dependencies' => array( - 'wikibase.api.RepoApi', - 'wikibase.client.getMwApiForRepo', - 'wikibase.client.PageConnector', - 'wikibase.client.currentSite', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.publish.dialog'] = array( - 'scripts' => array( - 'publish/ext.cx.publish.dialog.js', - ), - 'styles' => array( - 'publish/styles/ext.cx.publish.dialog.less', - ), - 'dependencies' => array( - 'ext.cx.model', - 'ext.cx.sitemapper', - ), - 'messages' => array( - 'cx-publishing-dialog-message', - 'cx-publishing-dialog-keep-button', - 'cx-publishing-dialog-publish-draft-button', - 'cx-publishing-dialog-publish-anyway-button', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.tours.publish.init'] = array( - 'scripts' => array( - 'tours/ext.cx.tours.publish.init.js', - ), - 'dependencies' => array( - 'mediawiki.cookie', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.eventlogging'] = array( - 'scripts' => 'eventlogging/ext.cx.eventlogging.js', - 'dependencies' => array( - 'ext.cx.model', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.interlanguagelink'] = array( - 'scripts' => 'entrypoint/ext.cx.interlanguagelink.js', - 'styles' => 'entrypoint/styles/ext.cx.interlanguagelink.less', - 'messages' => array( - 'cx-entrypoint-title', - ), - 'dependencies' => array( - 'ext.cx.util', - 'ext.uls.init', - 'mediawiki.jqueryMsg', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.entrypoint'] = array( - 'scripts' => 'entrypoint/ext.cx.entrypoint.js', - 'styles' => 'entrypoint/styles/ext.cx.entrypoint.less', - 'messages' => array( - 'cx-entrypoint-dialog-page-doesnt-exist-yet', - 'cx-entrypoint-dialog-title-in', - 'cx-entrypoint-dialog-button-create-from-scratch', - 'cx-entrypoint-dialog-button-translate-from', - 'cx-license-agreement', - ), - 'dependencies' => array( - 'ext.cx.sitemapper', - 'jquery.uls.data', - 'mediawiki.Uri', - 'mediawiki.jqueryMsg', - 'ext.cx.widgets.callout', - ), -) + $resourcePaths; - -$wgResourceModules['ext.guidedTour.tour.cxpublish'] = array( - 'scripts' => 'tours/ext.cx.tours.publish.js', - 'dependencies' => array( - 'ext.guidedTour', - 'json', - 'mediawiki.cookie', - 'mediawiki.Title', - ), - 'messages' => array( - 'vector-action-move', - 'vector-view-edit', - 'cx-publish-gt-no-permission-to-move-title', - 'cx-publish-gt-no-permission-to-move-description', - 'cx-publish-gt-first-step-title', - 'cx-publish-gt-first-step-description', - 'cx-publish-gt-move-page-title', - 'cx-publish-gt-move-page-description', - 'cx-publish-gt-moved-title', - 'cx-publish-gt-moved-description', - 'cx-publish-gt-published-title', - 'cx-publish-gt-published-description', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.translationlist'] = array( - 'scripts' => array( - 'dashboard/ext.cx.translationlist.js', - ), - 'styles' => array( - 'dashboard/styles/ext.cx.translationlist.less', - ), - 'dependencies' => array( - 'moment', - 'ext.cx.progressbar', - 'ext.cx.util', - 'jquery.uls.data', - 'ext.cx.widgets.overlay', - ), - 'messages' => array( - 'cx-translation-filter-all-translations', - 'cx-translation-filter-published-translations', - 'cx-translation-filter-draft-translations', - 'cx-translation-filter-from-any-language', - 'cx-translation-filter-to-any-language', - 'cx-discard-translation', - 'cx-translation-status-draft', - 'cx-translation-status-deleted', - 'cx-translation-status-published', - 'cx-draft-discard-confirmation-message', - 'cx-draft-cancel-button-label', - 'cx-draft-discard-button-label', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.translation.conflict'] = array( - 'scripts' => array( - 'translation/ext.cx.translation.conflict.js', - ), - 'styles' => array( - 'translation/styles/ext.cx.translation.conflict.less', - ), - 'messages' => array( - 'cx-translation-already-in-progress', - 'cx-translation-already-in-progress-collaborate', - 'cx-create-new-translation', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.editor'] = array( - 'scripts' => array( - 'editor/ext.cx.editor.js', - ), - 'dependencies' => array( - 'jquery.throttle-debounce', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.stats'] = array( - 'scripts' => array( - 'stats/ext.cx.stats.js', - ), - 'styles' => array( - 'stats/styles/ext.cx.stats.less', - ), - 'dependencies' => array( - 'ext.cx.sitemapper', - 'ext.cx.util', - 'ext.cx.header', - 'chart.js', - 'jquery.uls.data', - 'ext.cx.widgets.spinner', - 'ext.cx.widgets.callout', - ), - 'messages' => array( - 'cx-stats-table-source-target', - 'cx-stats-table-source-total', - 'cx-stats-table-target-total', - 'cx-stats-published-translations-title', - 'cx-stats-draft-translations-title', - 'cx-stats-published-translators-title', - 'cx-trend-all-translations', - 'cx-trend-translations-to', - 'cx-stats-try-contenttranslation', - 'cx-stats-published-target-source', - 'cx-stats-published-source-target', - 'cx-stats-draft-target-source', - 'cx-stats-draft-source-target', - 'cx-stats-tabs-expand', - 'cx-stats-total-published', - 'cx-stats-monthly-published', - 'cx-stats-weekly-published', - 'cx-stats-local-published', - 'cx-stats-grouping-title', - 'percent', - ) -) + $resourcePaths; - -$wgResourceModules['chart.js'] = array( - 'localBasePath' => $dir . '/lib', - 'remoteExtPath' => 'ContentTranslation/lib', - 'scripts' => array( - 'chart.js/Chart.Core.js', - 'chart.js/Chart.Line.js', - ), -); - -$wgResourceModules['ext.cx.beta.notification'] = array( - 'scripts' => array( - 'entrypoint/ext.cx.betafeature.notification.js', - ), - 'dependencies' => array( - 'jquery.tipsy', - ), - 'messages' => array( - 'cx-beta-feature-enabled-notification', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.campaigns.newarticle'] = array( - 'scripts' => array( - 'campaigns/ext.cx.campaigns.newarticle.js', - ), - 'styles' => array( - 'campaigns/styles/ext.cx.campaigns.newarticle.less', - ), - 'dependencies' => array( - 'mediawiki.ui.button', - 'jquery.client', - 'mediawiki.util', - 'jquery.throttle-debounce', - 'ext.cx.widgets.callout', - ), - 'messages' => array( - 'cx-campaign-newarticle-notice', - 'cx-campaign-no-thanks', - 'cx-campaign-try', - ) -) + $resourcePaths; - -$wgResourceModules['ext.cx.campaigns.newarticle.veloader'] = array( - 'scripts' => array( - 'campaigns/ext.cx.campaigns.newarticle.veloader.js', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.betafeature.init'] = array( - 'scripts' => array( - 'campaigns/ext.cx.betafeature.init.js', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.campaigns.contributionsmenu'] = array( - 'scripts' => array( - 'campaigns/ext.cx.campaigns.contributionsmenu.js', - ), - 'styles' => array( - 'campaigns/styles/ext.cx.campaigns.contributionsmenu.less', - ), - 'dependencies' => array( - 'mediawiki.ui.button', - 'jquery.client', - 'mediawiki.util', - 'ext.cx.widgets.callout', - ), - 'messages' => array( - 'cx-campaign-contributionsmenu-mycontributions', - 'cx-campaign-contributionsmenu-mytranslations', - 'cx-campaign-contributionsmenu-translate-instead', - 'cx-campaign-contributionsmenu-might-be-available', - 'cx-campaign-contributionsmenu-myuploads', - 'quotation-marks', - ) -) + $resourcePaths; - -$wgResourceModules['ext.cx.widgets.overlay'] = array( - 'scripts' => array( - 'widgets/overlay/ext.cx.overlay.js', - ), - 'styles' => array( - 'widgets/overlay/ext.cx.overlay.less', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.widgets.spinner'] = array( - 'styles' => array( - 'widgets/spinner/ext.cx.spinner.less', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.widgets.callout'] = array( - 'scripts' => array( - 'widgets/callout/ext.cx.callout.js', - ), - 'styles' => array( - 'widgets/callout/ext.cx.callout.css', - ), -) + $resourcePaths; - -$wgHooks['ResourceLoaderTestModules'][] = function ( array &$modules ) { - $resourcePaths = array( - 'localBasePath' => __DIR__, - 'remoteExtPath' => 'ContentTranslation', - ); - - $modules['qunit']['ext.cx.editor.tests'] = array( - 'scripts' => array( - 'tests/qunit/editor/ext.cx.editor.test.js', - ), - 'dependencies' => array( - 'ext.cx.editor', - ), - ) + $resourcePaths; - - $modules['qunit']['ext.cx.header.test'] = array( - 'scripts' => array( - 'tests/qunit/header/ext.cx.header.test.js', - ), - 'dependencies' => array( - 'ext.cx.header', - ), - ) + $resourcePaths; - - $modules['qunit']['ext.cx.publish.test'] = array( - 'scripts' => array( - 'tests/qunit/publish/ext.cx.publish.test.js', - ), - 'dependencies' => array( - 'ext.cx.publish', - ), - ) + $resourcePaths; - - $modules['qunit']['ext.cx.tools.tests'] = array( - 'scripts' => array( - 'tests/qunit/tools/ext.cx.tools.template.test.js', - 'tests/qunit/tools/ext.cx.tools.mtabuse.test.js', - 'tests/qunit/tools/ext.cx.tools.categories.test.js', - ), - 'dependencies' => array( - 'ext.cx.model', - 'ext.cx.tools.template', - 'ext.cx.tools.mtabuse', - 'ext.cx.tools.categories', - ), - ) + $resourcePaths; - - $modules['qunit']['ext.cx.translation.tests'] = array( - 'scripts' => array( - 'tests/qunit/translation/ext.cx.translation.test.js', - ), - 'dependencies' => array( - 'ext.cx.translation', - ), - ) + $resourcePaths; - - $modules['qunit']['ext.cx.sitemapper.test'] = array( - 'scripts' => array( - 'tests/qunit/base/ext.cx.sitemapper.test.js', - ), - 'dependencies' => array( - 'ext.cx.sitemapper', - ), - ) + $resourcePaths; -}; diff --git a/extension.json b/extension.json index 81c40d4..da3643b 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "ContentTranslation", - "version": "1.0.0+20150127", + "version": "1.0.0+20150401", "author": [ "Amir Aharoni", "David Chan", @@ -15,6 +15,7 @@ ], "url": "https://www.mediawiki.org/wiki/Extension:ContentTranslation", "descriptionmsg": "cx-desc", + "license-name": "GPL-2.0+", "type": "specialpage", "ExtensionMessagesFiles": { "ContentTranslationAliases": "ContentTranslation.alias.php" @@ -23,18 +24,27 @@ "BeforePageDisplay": "ContentTranslationHooks::addModules", "GetBetaFeaturePreferences": "ContentTranslationHooks::getPreferences", "ResourceLoaderGetConfigVars": "ContentTranslationHooks::addConfig", + "EventLoggingRegisterSchemas": "ContentTranslationHooks::addEventLogging", "SpecialContributionsBeforeMainOutput": "ContentTranslationHooks::addNewContributionButton", "EventLoggingRegisterSchemas": "ContentTranslationHooks::addEventLogging", "ResourceLoaderTestModules": "ContentTranslationHooks::onResourceLoaderTestModules", "ListDefinedTags": "ContentTranslationHooks::registerTags", - "ChangeTagsListActive": "ContentTranslationHooks::registerTags" + "ChangeTagsListActive": "ContentTranslationHooks::registerTags", + "UserSaveOptions": "ContentTranslationHooks::onSaveOptions", + "EditPage::showEditForm:initial": "ContentTranslationHooks::newArticleCampaign", + "BeforeCreateEchoEvent": "ContentTranslationHooks::onBeforeCreateEchoEvent", + "EchoGetDefaultNotifiedUsers": "ContentTranslationHooks::onEchoGetDefaultNotifiedUsers" }, "APIModules": { "cxpublish": "ApiContentTranslationPublish", - "cxdelete": "ApiContentTranslationDelete" + "cxdelete": "ApiContentTranslationDelete", + "cxconfiguration": "ApiContentTranslationConfiguration" }, "APIListModules": { - "contenttranslation": "ApiQueryContentTranslation" + "contenttranslation": "ApiQueryContentTranslation", + "contenttranslationstats": "ApiQueryContentTranslationStats", + "contenttranslationlangtrend": "ApiQueryContentTranslationLanguageTrend", + "cxpublishedtranslations": "ApiQueryPublishedTranslations" }, "MessagesDirs": { "ContentTranslation": "i18n" @@ -44,13 +54,18 @@ "ContentTranslationStats": "SpecialContentTranslationStats" }, "AutoloadClasses": { + "ApiContentTranslationConfiguration": "api/ApiContentTranslationConfiguration.php", "ApiContentTranslationPublish": "api/ApiContentTranslationPublish.php", "ApiContentTranslationDelete": "api/ApiContentTranslationDelete.php", "ApiQueryContentTranslation": "api/ApiQueryContentTranslation.php", + "ApiQueryContentTranslationStats": "api/ApiQueryContentTranslationStats.php", + "ApiQueryContentTranslationLanguageTrend": "api/ApiQueryContentTranslationLanguageTrend.php", + "ApiQueryPublishedTranslations": "api/ApiQueryPublishedTranslations.php", "ContentTranslationHooks": "ContentTranslation.hooks.php", "ContentTranslation\\Database": "includes/Database.php", "ContentTranslation\\Draft": "includes/Draft.php", "ContentTranslation\\GlobalUser": "includes/GlobalUser.php", + "ContentTranslation\\Notification": "includes/Notification.php", "ContentTranslation\\SiteMapper": "includes/SiteMapper.php", "ContentTranslation\\Stats": "includes/Stats.php", "ContentTranslation\\Translation": "includes/Translation.php", @@ -58,10 +73,42 @@ "SpecialContentTranslation": "specials/SpecialContentTranslation.php", "SpecialContentTranslationStats": "specials/SpecialContentTranslationStats.php" }, + "DefaultUserOptions": { + "echo-subscriptions-web-cx": true + }, + "config": { + "ContentTranslationExperimentalFeatures": false, + "ContentTranslationParsoid": { + "url": "http://parsoid-lb.eqiad.wikimedia.org/", + "timeout": 100000, + "prefix": "enwiki" + }, + "ContentTranslationDatabase": null, + "ContentTranslationCluster": false, + "ContentTranslationEventLogging": false, + "ContentTranslationHighMTCategory": null, + "ContentTranslationSiteTemplates": { + "view": "//$1.wikipedia.org/wiki/$2", + "action": "//$1.wikipedia.org/w/index.php?title=$2", + "api": "//$1.wikipedia.org/w/api.php", + "cx": "http://localhost:8080/v1" + }, + "@ContentTranslationTranslateInTarget": "Whether to open Special:ContentTranslation in the target wiki when clicking the button in the entry point. The domain will be based on $wgContentTranslationSiteTemplates. The default is to open Special:ContentTranslation on the same wiki", + "ContentTranslationTranslateInTarget": false, + "@ContentTranslationAsBetaFeature": "Whether to have CX available only as a beta feature and only shown to the users who have enabled the beta feature.", + "ContentTranslationAsBetaFeature": true, + "ContentTranslationDefaultSourceLanguage": "en", + "@ContentTranslationTargetNamespace": "Target namespace to publish articles. Values can be 'Main' or any valid Namespace without leading column.", + "ContentTranslationTargetNamespace": "Main", + "ContentTranslationCampaigns": [ "cxstats", "newarticle" ], + "@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 ] ] + } ] + }, "ResourceModules": { "ext.cx.contributions": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "entrypoint/ext.cx.contributions.js" ], @@ -69,17 +116,20 @@ "entrypoint/styles/ext.cx.contributions.less" ], "dependencies": [ - "mediawiki.util" + "mediawiki.util", + "mediawiki.ui.button" ], "messages": [ - "cx-contributions", + "cx-contributions-new-contributions", + "cx-contributions-new-article", "cx-contributions-translation", - "cx-contributions-media" + "cx-contributions-upload", + "cx-contributions-new-article-tooltip", + "cx-contributions-translation-tooltip", + "cx-contributions-upload-tooltip" ] }, "ext.cx.contributions.init": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "entrypoint/ext.cx.contributions.init.js" ], @@ -89,31 +139,25 @@ "position": "top" }, "ext.cx.model": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "base/ext.cx.model.js" ] }, "ext.cx.feedback": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", - "scripts": [ - "base/ext.cx.feedback.js" - ], "dependencies": [ "ext.cx.model" ], + "scripts": [ + "widgets/feedback/ext.cx.feedback.js" + ], "styles": [ - "base/styles/ext.cx.feedback.less" + "widgets/feedback/styles/ext.cx.feedback.less" ], "messages": [ "cx-feedback-link" ] }, "ext.cx.translationview": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "translationview/ext.cx.translationview.js" ], @@ -128,8 +172,6 @@ ] }, "ext.cx.dashboard": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "dashboard/ext.cx.dashboard.js" ], @@ -142,46 +184,51 @@ "ext.cx.sitemapper", "ext.cx.translationlist", "ext.cx.source.selector", - "ext.cx.feedback" + "ext.cx.feedback", + "mediawiki.ui.button", + "mediawiki.Uri" ], "messages": [ "cx-create-new-translation", "cx-create-new-translation-desc" ] }, + "ext.cx.magnuslink": { + "scripts": [ + "dashboard/ext.cx.magnuslink.js" + ], + "styles": [ + "dashboard/styles/ext.cx.magnuslink.less" + ], + "messages": [ + "cx-magnus-tool-link-text" + ] + }, "ext.cx.util": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "util/ext.cx.util.js" ], "dependencies": [ - "ext.cx.model", - "mediawiki.Uri" + "ext.cx.model" ] }, "ext.cx.util.selection": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "util/ext.cx.util.selection.js" ] }, "ext.cx.sitemapper": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "base/ext.cx.sitemapper.js" ], "dependencies": [ "ext.cx.model", "mediawiki.Uri", - "mediawiki.api" + "mediawiki.api", + "mediawiki.Title" ] }, "ext.cx.header": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "header/ext.cx.header.js" ], @@ -191,7 +238,8 @@ "dependencies": [ "mediawiki.Uri", "mediawiki.jqueryMsg", - "mediawiki.util" + "mediawiki.util", + "mediawiki.ui.button" ], "messages": [ "cx", @@ -206,15 +254,12 @@ ] }, "ext.cx.source": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "source/ext.cx.source.js", "source/ext.cx.source.filter.js" ], "styles": [ - "source/styles/ext.cx.source.less", - "base/styles/ext.cx.spinner.less" + "source/styles/ext.cx.source.less" ], "dependencies": [ "ext.cx.util", @@ -223,7 +268,9 @@ "mediawiki.Uri", "mediawiki.api", "mediawiki.jqueryMsg", - "mediawiki.util" + "mediawiki.util", + "ext.cx.widgets.spinner", + "mediawiki.skinning.content.parsoid" ], "messages": [ "cx-source-view-page", @@ -232,8 +279,6 @@ ] }, "ext.cx.source.selector": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "source/ext.cx.source.selector.js" ], @@ -245,7 +290,10 @@ "jquery.suggestions", "jquery.throttle-debounce", "ext.uls.mediawiki", - "jquery.uls.compact" + "jquery.uls.compact", + "mediawiki.ui.button", + "ext.cx.widgets.overlay", + "ext.cx.pageselector" ], "messages": [ "cx-sourceselector-dialog-new-translation", @@ -259,12 +307,22 @@ "cx-sourceselector-dialog-error-page-exists", "cx-sourceselector-dialog-error-title-in-use", "cx-sourceselector-dialog-error-no-source-article", - "cx-license-agreement" + "cx-license-agreement", + "cx-error-server-connection" + ] + }, + "ext.cx.pageselector": { + "scripts": [ + "widgets/pageselector/ext.cx.pageselector.js" + ], + "styles": [ + "widgets/pageselector/ext.cx.pageselector.less" + ], + "dependencies": [ + "mediawiki.api" ] }, "ext.cx.translation": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "translation/ext.cx.translation.js", "translation/ext.cx.translation.aligner.js" @@ -287,8 +345,6 @@ ] }, "ext.cx.translation.progress": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": "translation/ext.cx.translation.progress.js", "messages": [ "cx-warning-unsaved-translation" @@ -298,8 +354,6 @@ ] }, "ext.cx.tools.manager": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "tools/ext.cx.tools.manager.js" ], @@ -308,19 +362,18 @@ ] }, "ext.cx.tools": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "tools/ext.cx.tools.js" ], "styles": [ - "tools/styles/ext.cx.tools.less", - "base/styles/ext.cx.spinner.less" + "tools/styles/ext.cx.tools.less" ], "dependencies": [ + "ext.cx.feedback", "ext.cx.progressbar", "ext.cx.tools.dictionary", "ext.cx.tools.formatter", + "ext.cx.tools.gallery", "ext.cx.tools.images", "ext.cx.tools.instructions", "ext.cx.tools.link", @@ -331,21 +384,17 @@ "ext.cx.tools.template", "ext.cx.tools.categories", "ext.cx.util.selection", - "ext.cx.feedback", "jquery.uls.data", - "mediawiki.jqueryMsg" + "mediawiki.jqueryMsg", + "ext.cx.widgets.spinner" ] }, "ext.cx.tools.card": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "styles": [ "tools/styles/ext.cx.tools.card.less" ] }, "ext.cx.tools.instructions": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "tools/ext.cx.tools.instructions.js" ], @@ -370,8 +419,6 @@ ] }, "ext.cx.tools.mtabuse": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "tools/ext.cx.tools.mtabuse.js" ], @@ -390,8 +437,6 @@ ] }, "ext.cx.tools.formatter": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "tools/ext.cx.tools.formatter.js" ], @@ -404,8 +449,6 @@ ] }, "ext.cx.tools.dictionary": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "tools/ext.cx.tools.dictionary.js" ], @@ -421,8 +464,6 @@ ] }, "ext.cx.tools.link": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "tools/ext.cx.tools.link.js" ], @@ -433,7 +474,11 @@ "cx-tools-link-title", "cx-tools-link-add", "cx-tools-link-remove", - "cx-tools-link-instruction-shortcut" + "cx-tools-link-instruction-shortcut", + "cx-tools-missing-link-title", + "cx-tools-missing-link-text", + "cx-tools-missing-link-tooltip", + "cx-tools-missing-link-mark-link" ], "dependencies": [ "ext.cx.tools.manager", @@ -443,8 +488,6 @@ ] }, "ext.cx.tools.mt": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "tools/ext.cx.tools.mt.js" ], @@ -471,8 +514,6 @@ ] }, "ext.cx.tools.reference": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "tools/ext.cx.tools.reference.js" ], @@ -481,6 +522,7 @@ ], "messages": [ "cx-tools-reference-title", + "cx-tools-reference-add", "cx-tools-reference-remove" ], "dependencies": [ @@ -490,22 +532,21 @@ ] }, "ext.cx.tools.template": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "tools/ext.cx.tools.template.js" ] }, "ext.cx.tools.images": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "tools/ext.cx.tools.images.js" ] }, + "ext.cx.tools.gallery": { + "scripts": [ + "tools/ext.cx.tools.gallery.js" + ] + }, "ext.cx.tools.categories": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "tools/ext.cx.tools.categories.js" ], @@ -517,11 +558,9 @@ ] }, "ext.cx.progressbar": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", - "scripts": "tools/ext.cx.progressbar.js", + "scripts": "widgets/progressbar/ext.cx.progressbar.js", "styles": [ - "tools/styles/ext.cx.progressbar.less" + "widgets/progressbar/ext.cx.progressbar.less" ], "messages": [ "cx-header-progressbar-text", @@ -532,24 +571,22 @@ ] }, "ext.cx.draft": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "draft/ext.cx.draft.js" ], "dependencies": [ "ext.cx.model", - "mediawiki.api.edit" + "mediawiki.api.edit", + "jquery.throttle-debounce" ], "messages": [ "cx-save-draft-saving", "cx-save-draft-save-success", + "cx-save-draft-error", "cx-save-draft-tooltip" ] }, "ext.cx.publish": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "publish/ext.cx.publish.js" ], @@ -560,9 +597,9 @@ "ext.cx.model", "json", "mediawiki.api.edit", - "mediawiki.cookie", "ext.cx.publish.dialog", - "ext.cx.sitemapper" + "ext.cx.sitemapper", + "ext.cx.tours.publish.init" ], "messages": [ "cx-publish-page-success", @@ -571,9 +608,18 @@ "cx-publish-captcha-title" ] }, + "ext.cx.wikibase.link": { + "scripts": [ + "publish/ext.cx.wikibase.link.js" + ], + "dependencies": [ + "wikibase.api.RepoApi", + "wikibase.client.getMwApiForRepo", + "wikibase.client.PageConnector", + "wikibase.client.currentSite" + ] + }, "ext.cx.publish.dialog": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "publish/ext.cx.publish.dialog.js" ], @@ -591,29 +637,33 @@ "cx-publishing-dialog-publish-anyway-button" ] }, + "ext.cx.tours.publish.init": { + "scripts": [ + "tours/ext.cx.tours.publish.init.js" + ], + "dependencies": [ + "mediawiki.cookie" + ] + }, "ext.cx.eventlogging": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": "eventlogging/ext.cx.eventlogging.js", "dependencies": [ "ext.cx.model" ] }, - "ext.cx.redlink": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", - "scripts": "entrypoint/ext.cx.redlink.js", - "styles": "entrypoint/styles/ext.cx.redlink.less", + "ext.cx.interlanguagelink": { + "scripts": "entrypoint/ext.cx.interlanguagelink.js", + "styles": "entrypoint/styles/ext.cx.interlanguagelink.less", "messages": [ "cx-entrypoint-title" ], "dependencies": [ + "ext.cx.util", + "ext.uls.init", "mediawiki.jqueryMsg" ] }, "ext.cx.entrypoint": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": "entrypoint/ext.cx.entrypoint.js", "styles": "entrypoint/styles/ext.cx.entrypoint.less", "messages": [ @@ -627,12 +677,11 @@ "ext.cx.sitemapper", "jquery.uls.data", "mediawiki.Uri", - "mediawiki.jqueryMsg" + "mediawiki.jqueryMsg", + "ext.cx.widgets.callout" ] }, "ext.guidedTour.tour.cxpublish": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": "tours/ext.cx.tours.publish.js", "dependencies": [ "ext.guidedTour", @@ -656,8 +705,6 @@ ] }, "ext.cx.translationlist": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "dashboard/ext.cx.translationlist.js" ], @@ -666,8 +713,10 @@ ], "dependencies": [ "moment", + "ext.cx.progressbar", + "ext.cx.util", "jquery.uls.data", - "ext.cx.progressbar" + "ext.cx.widgets.overlay" ], "messages": [ "cx-translation-filter-all-translations", @@ -685,8 +734,6 @@ ] }, "ext.cx.translation.conflict": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "translation/ext.cx.translation.conflict.js" ], @@ -700,8 +747,6 @@ ] }, "ext.cx.editor": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "editor/ext.cx.editor.js" ], @@ -710,8 +755,6 @@ ] }, "ext.cx.stats": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "stats/ext.cx.stats.js" ], @@ -719,7 +762,13 @@ "stats/styles/ext.cx.stats.less" ], "dependencies": [ - "ext.cx.sitemapper" + "ext.cx.sitemapper", + "ext.cx.util", + "ext.cx.header", + "chart.js", + "jquery.uls.data", + "ext.cx.widgets.spinner", + "ext.cx.widgets.callout" ], "messages": [ "cx-stats-table-source-target", @@ -727,12 +776,32 @@ "cx-stats-table-target-total", "cx-stats-published-translations-title", "cx-stats-draft-translations-title", - "cx-stats-published-translators-title" + "cx-stats-published-translators-title", + "cx-trend-all-translations", + "cx-trend-translations-to", + "cx-stats-try-contenttranslation", + "cx-stats-published-target-source", + "cx-stats-published-source-target", + "cx-stats-draft-target-source", + "cx-stats-draft-source-target", + "cx-stats-tabs-expand", + "cx-stats-total-published", + "cx-stats-monthly-published", + "cx-stats-weekly-published", + "cx-stats-local-published", + "cx-stats-grouping-title", + "percent" + ] + }, + "chart.js": { + "localBasePath": "lib", + "remoteExtPath": "ContentTranslation/lib", + "scripts": [ + "chart.js/Chart.Core.js", + "chart.js/Chart.Line.js" ] }, "ext.cx.beta.notification": { - "localBasePath": "modules", - "remoteExtPath": "ContentTranslation/modules", "scripts": [ "entrypoint/ext.cx.betafeature.notification.js" ], @@ -742,27 +811,83 @@ "messages": [ "cx-beta-feature-enabled-notification" ] + }, + "ext.cx.campaigns.newarticle": { + "scripts": [ + "campaigns/ext.cx.campaigns.newarticle.js" + ], + "styles": [ + "campaigns/styles/ext.cx.campaigns.newarticle.less" + ], + "dependencies": [ + "mediawiki.ui.button", + "jquery.client", + "mediawiki.util", + "jquery.throttle-debounce", + "ext.cx.widgets.callout" + ], + "messages": [ + "cx-campaign-newarticle-notice", + "cx-campaign-no-thanks", + "cx-campaign-try" + ] + }, + "ext.cx.campaigns.newarticle.veloader": { + "scripts": [ + "campaigns/ext.cx.campaigns.newarticle.veloader.js" + ] + }, + "ext.cx.betafeature.init": { + "scripts": [ + "campaigns/ext.cx.betafeature.init.js" + ] + }, + "ext.cx.campaigns.contributionsmenu": { + "scripts": [ + "campaigns/ext.cx.campaigns.contributionsmenu.js" + ], + "styles": [ + "campaigns/styles/ext.cx.campaigns.contributionsmenu.less" + ], + "dependencies": [ + "mediawiki.ui.button", + "jquery.client", + "mediawiki.util", + "ext.cx.widgets.callout" + ], + "messages": [ + "cx-campaign-contributionsmenu-mycontributions", + "cx-campaign-contributionsmenu-mytranslations", + "cx-campaign-contributionsmenu-translate-instead", + "cx-campaign-contributionsmenu-might-be-available", + "cx-campaign-contributionsmenu-myuploads", + "quotation-marks" + ] + }, + "ext.cx.widgets.overlay": { + "scripts": [ + "widgets/overlay/ext.cx.overlay.js" + ], + "styles": [ + "widgets/overlay/ext.cx.overlay.less" + ] + }, + "ext.cx.widgets.spinner": { + "styles": [ + "widgets/spinner/ext.cx.spinner.less" + ] + }, + "ext.cx.widgets.callout": { + "scripts": [ + "widgets/callout/ext.cx.callout.js" + ], + "styles": [ + "widgets/callout/ext.cx.callout.css" + ] } }, - "config": { - "ContentTranslationExperimentalFeatures": false, - "ContentTranslationParsoid": { - "url": "http://parsoid.wmflabs.org/", - "timeout": 100000, - "prefix": "enwiki" - }, - "ContentTranslationDatabase": null, - "ContentTranslationCluster": false, - "ContentTranslationEventLogging": false, - "ContentTranslationHighMTCategory": null, - "ContentTranslationSiteTemplates": { - "view": "//$1.wikipedia.org/wiki/$2", - "api": "//$1.wikipedia.org/w/api.php", - "cx": "http://localhost:8080" - }, - "ContentTranslationTranslateInTarget": false, - "ContentTranslationAsBetaFeature": true, - "ContentTranslationTargetNamespace": "Main" - }, - "manifest_version": 1 + "ResourceFileModulePaths": { + "localBasePath": "modules", + "remoteExtPath": "ContentTranslation/modules" + } } -- To view, visit https://gerrit.wikimedia.org/r/218600 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7bb6249b1555e2159c2932eaa9a4d96e067c80ee Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> Gerrit-Reviewer: Amire80 <amir.ahar...@mail.huji.ac.il> Gerrit-Reviewer: KartikMistry <kartik.mis...@gmail.com> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com> Gerrit-Reviewer: Santhosh <santhosh.thottin...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits