diff options
author | Brian Evans <grknight@gentoo.org> | 2019-04-11 12:58:18 -0400 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2019-04-11 12:58:18 -0400 |
commit | 8befe8b8f4fecc31aa7f04fbb4b31a98dce28325 (patch) | |
tree | c45b2e6a265c342333073bfef0dca899bd676721 /MLEB/Translate/Translate.php | |
parent | Update Widgets for 1.32 (diff) | |
download | extensions-8befe8b8f4fecc31aa7f04fbb4b31a98dce28325.tar.gz extensions-8befe8b8f4fecc31aa7f04fbb4b31a98dce28325.tar.bz2 extensions-8befe8b8f4fecc31aa7f04fbb4b31a98dce28325.zip |
Update Language Bundle to 2019.01
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'MLEB/Translate/Translate.php')
-rw-r--r-- | MLEB/Translate/Translate.php | 68 |
1 files changed, 9 insertions, 59 deletions
diff --git a/MLEB/Translate/Translate.php b/MLEB/Translate/Translate.php index 8eb45a4c..330bca48 100644 --- a/MLEB/Translate/Translate.php +++ b/MLEB/Translate/Translate.php @@ -10,39 +10,23 @@ if ( !defined( 'MEDIAWIKI' ) ) { * * @author Niklas Laxström * @author Siebrand Mazeland - * @copyright Copyright © 2006-2018, Niklas Laxström, Siebrand Mazeland + * @copyright Copyright © 2006-2019, Niklas Laxström, Siebrand Mazeland * @license GPL-2.0-or-later */ /** * Version number used in extension credits and in other places where needed. */ -define( 'TRANSLATE_VERSION', '2018-10-26' ); +define( 'TRANSLATE_VERSION', '2019-01-17' ); -/** - * Extension credits properties. - */ -$wgExtensionCredits['specialpage'][] = [ - 'path' => __FILE__, - 'name' => 'Translate', - 'namemsg' => 'translate-extensionname', - 'version' => TRANSLATE_VERSION, - 'author' => [ - 'Niklas Laxström', - 'Santhosh Thottingal', - 'Siebrand Mazeland' - ], - 'descriptionmsg' => 'translate-desc', - 'url' => 'https://www.mediawiki.org/wiki/Extension:Translate', - 'license-name' => 'GPL-2.0-or-later', -]; +// Load stuff already converted to extension registration. +wfLoadExtension( 'Translate', __DIR__ . '/extension-wip.json' ); /** * @cond file_level_code * Setup class autoloading. */ -$dir = __DIR__; -require_once "$dir/Autoload.php"; +require_once __DIR__ . '/Autoload.php'; /** @endcond */ /** @@ -55,11 +39,10 @@ $wgMessagesDirs['Translate'] = __DIR__ . '/i18n/core'; $wgMessagesDirs['TranslateSearch'] = __DIR__ . '/i18n/search'; $wgMessagesDirs['TranslateSandbox'] = __DIR__ . '/i18n/sandbox'; $wgMessagesDirs['TranslateApi'] = __DIR__ . '/i18n/api'; -$wgExtensionMessagesFiles['TranslateAlias'] = "$dir/Translate.alias.php"; -$wgExtensionMessagesFiles['TranslateMagic'] = "$dir/Translate.i18n.magic.php"; +$wgExtensionMessagesFiles['TranslateAlias'] = __DIR__ . '/Translate.alias.php'; +$wgExtensionMessagesFiles['TranslateMagic'] = __DIR__ . '/Translate.i18n.magic.php'; // Register initialization code -$wgExtensionFunctions[] = 'TranslateHooks::setupTranslate'; $wgHooks['CanonicalNamespaces'][] = 'TranslateHooks::setupNamespaces'; $wgHooks['ResourceLoaderTestModules'][] = 'TranslateHooks::onResourceLoaderTestModules'; $wgHooks['UnitTestsList'][] = 'TranslateHooks::setupUnitTests'; @@ -176,36 +159,7 @@ $wgHooks['AbuseFilter-filterAction'][] = 'TranslateHooks::onAbuseFilterFilterAct $wgHooks['AbuseFilter-computeVariable'][] = 'TranslateHooks::onAbuseFilterComputeVariable'; $wgHooks['AbuseFilter-builder'][] = 'TranslateHooks::onAbuseFilterBuilder'; -// New rights -// right-translate -$wgAvailableRights[] = 'translate'; -// right-translate-import action-translate-import -$wgAvailableRights[] = 'translate-import'; -// right-translate-manage action-translate-manage -$wgAvailableRights[] = 'translate-manage'; -// right-translate-messagereview -$wgAvailableRights[] = 'translate-messagereview'; -// right-translate-groupreview -$wgAvailableRights[] = 'translate-groupreview'; - -$wgGrantPermissions['editpage']['translate'] = true; - -// Logs. More logs are defined in TranslateHooks::setupTranslate -// log-name-translationreview log-descriptionmsg-translationreview -$wgLogTypes[] = 'translationreview'; -// logentry-translationreview-message logentry-translationreview-group -$wgLogActionsHandlers['translationreview/message'] = 'TranslateLogFormatter'; -$wgLogActionsHandlers['translationreview/group'] = 'TranslateLogFormatter'; - -// New jobs -$wgJobClasses['MessageIndexRebuildJob'] = 'MessageIndexRebuildJob'; -$wgJobClasses['MessageUpdateJob'] = 'MessageUpdateJob'; -$wgJobClasses['MessageGroupStatesUpdaterJob'] = 'MessageGroupStatesUpdaterJob'; -$wgJobClasses['TTMServerMessageUpdateJob'] = 'TTMServerMessageUpdateJob'; - -$wgParserTestFiles[] = "$dir/tests/parser/translateParserTests.txt"; - -require "$dir/Resources.php"; +require __DIR__ . '/Resources.php'; /** @endcond */ @@ -279,7 +233,7 @@ $wgTranslateTranslationServices['TTMServer'] = [ 'public' => false, ]; $wgTranslateTranslationServices['Microsoft'] = [ - 'url' => 'http://api.microsofttranslator.com/V2/Http.svc/Translate', + 'url' => 'https://api.cognitive.microsofttranslator.com', 'key' => null, 'timeout' => 3, 'type' => 'microsoft', @@ -678,7 +632,3 @@ function wfAddNamespace( $id, $name, $constant = null ) { } /** @defgroup TranslateSpecialPage Special pages of Translate extension */ - -if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) { - require_once __DIR__ . '/vendor/autoload.php'; -} |