jenkins-bot has submitted this change and it was merged.

Change subject: Register the 'contenttranslation' change tag and add description
......................................................................


Register the 'contenttranslation' change tag and add description

This is necessary for the tag to appear correctly on Special:Tags.

The ChangeTagsListActive hook was introduced to core in
I77f476c8d0f32c80f720aa2c5e66869c81faa282

Change-Id: If721358dade947999f22e26eab9edd84943f11b5
---
M ContentTranslation.hooks.php
M ContentTranslation.php
M i18n/en.json
M i18n/qqq.json
4 files changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Anomie: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index d4f9d28..da01623 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -131,4 +131,15 @@
                $vars['wgContentTranslationDatabase'] = 
$wgContentTranslationDatabase;
                $vars['wgContentTranslationTargetNamespace'] = 
$wgContentTranslationTargetNamespace;
        }
+
+       /**
+        * Hooks: ListDefinedTags and ChangeTagsListActive
+        * Define the content translation change tag, and mark it as active.
+        * @param array $tags
+        * @return bool
+        */
+       public static function registerTags( array &$tags ) {
+               $tags[] = 'contenttranslation';
+               return true;
+       }
 }
diff --git a/ContentTranslation.php b/ContentTranslation.php
index baf1623..8310ea9 100644
--- a/ContentTranslation.php
+++ b/ContentTranslation.php
@@ -66,6 +66,9 @@
 $GLOBALS['wgHooks']['EventLoggingRegisterSchemas'][] = 
'ContentTranslationHooks::addEventLogging';
 $GLOBALS['wgHooks']['SpecialContributionsBeforeMainOutput'][] =
        'ContentTranslationHooks::addNewContributionButton';
+$GLOBALS['wgHooks']['ListDefinedTags'][] = 
'ContentTranslationHooks::registerTags';
+$GLOBALS['wgHooks']['ChangeTagsListActive'][] = 
'ContentTranslationHooks::registerTags';
+
 // Globals for this extension
 
 $GLOBALS['wgContentTranslationExperimentalFeatures'] = false;
diff --git a/i18n/en.json b/i18n/en.json
index 0d2adbf..8b2d231 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -37,6 +37,7 @@
        "cx-translation-add-translation": "+ Add translation",
        "cx-translation-target-page-exists": "A page with the title [$1 $2] 
exists in the target wiki. Consider giving the page a different title.",
        "tag-contenttranslation": "ContentTranslation",
+       "tag-contenttranslation-description": "The content was translated from 
another language using the ContentTranslation tool.",
        "cx-source-loading": "Loading $1",
        "cx-beta": "Content translation",
        "cx-beta-desc": "A tool to quickly translate pages into your language. 
Start translations from [[Special:MyContributions|your contributions page]], 
and edit them with our side-by-side editor especially designed for translation. 
Some of the tools may be only available for specific languages.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 097c973..ee71f54 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -42,6 +42,7 @@
        "cx-translation-add-translation": "This appears in the empty paragraph 
in the translation column. Clicking the paragraph adds an automatic translation 
of the corresponding source paragraph. The plus sign is used as an icon that 
hints that something is being added.",
        "cx-translation-target-page-exists": "A warning that is shown if a user 
tries to translate a page with a title that already exists in the target wiki. 
$1 is a URL to the target page and $2 is the target page title.",
        "tag-contenttranslation": "A short description of the 
contenttranslation revision tag. It appears in the edit summary when a 
translated page is created. It doesn't have to be CamelCase.",
+       "tag-contenttranslation-description": "A brief sentence to explain the 
use of the contenttranslation revision tag. This appears on [[Special:Tags]].",
        "cx-source-loading": "Status text shown in the source pane while the 
page is being loaded.\n\nParameters:\n* $1 - the title of the page being 
loaded\n{{Identical|Loading}}",
        "cx-beta": "Beta feature title. Appears in the beta tab in user 
preferences.",
        "cx-beta-desc": "Beta feature description. Appears in the beta tab in 
user preferences.\n\n\"Your contributions page\" refers to 
[[Special:MyContributions]], which can be accessed using the link 
{{msg-mw|mycontris}} in the personal bar.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If721358dade947999f22e26eab9edd84943f11b5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: TTO <at.li...@live.com.au>
Gerrit-Reviewer: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Santhosh <santhosh.thottin...@gmail.com>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to