jenkins-bot has submitted this change and it was merged.
Change subject: Add "notify translators" link when marking page for translation
......................................................................
Add "notify translators" link when marking page for translation
Only do this when NotifyTranslators is installed, and the actor has the
correct access.
This also needs a patch in TranslatorNotifications, as the special page has
to pick up on the passed group ID.
Bug: 49326
Change-Id: Ie3abb0411922bada6f7040699dbd8e4552eaff78
---
M PageTranslation.i18n.php
M tag/SpecialPageTranslation.php
2 files changed, 13 insertions(+), 0 deletions(-)
Approvals:
Nikerabbit: Looks good to me, approved
jenkins-bot: Verified
diff --git a/PageTranslation.i18n.php b/PageTranslation.i18n.php
index 694dde9..bc2fc6e 100644
--- a/PageTranslation.i18n.php
+++ b/PageTranslation.i18n.php
@@ -43,6 +43,7 @@
Make sure it has <nowiki><translate></nowiki> tags and has a valid syntax.',
'tpt-saveok' => 'The page [[$1]] has been marked up for translation
with $2 {{PLURAL:$2|translation unit|translation units}}.
The page can now be <span class="plainlinks">[$3 translated]</span>.',
+ 'tpt-offer-notify' => 'You can <span class="plainlinks">[$1 notify
translators]</span> about this page.',
'tpt-badsect' => '"$1" is not a valid name for translation unit $2.',
'tpt-showpage-intro' => 'Below new, existing and deleted translation
units are listed.
Before marking this version for translation, check that the changes to
translation units are minimized to avoid unnecessary work for translators.',
@@ -280,6 +281,9 @@
'tpt-saveok' => '* $1 - page title
* $2 - count of sections which can be used with PLURAL
* $3 - URL',
+ 'tpt-offer-notify' => 'Message displayed on Special:PageTranslation
after marking a page for translation when
+the marking user also has right to notify translators. Parameters:
+* $1 is a URL to Special:NotifyTranslators with the marked page preselected.',
'tpt-badsect' => 'See definition on
[[mw:Help:Extension:Translate/Glossary]].
Parameters:
* $1 - the identifier of the unit
diff --git a/tag/SpecialPageTranslation.php b/tag/SpecialPageTranslation.php
index 3c72dbd..5e7cc34 100644
--- a/tag/SpecialPageTranslation.php
+++ b/tag/SpecialPageTranslation.php
@@ -172,6 +172,15 @@
array( 'group' => $page->getMessageGroupId() ) );
$this->getOutput()->addWikiMsg( 'tpt-saveok', $titleText, $num,
$link );
+ // If TranslationNotifications is installed, and the user can
notify
+ // translators, add a convenience link.
+ if ( method_exists( 'SpecialNotifyTranslators', 'execute' ) &&
+ $this->getUser()->isAllowed(
SpecialNotifyTranslators::$right )
+ ) {
+ $link = SpecialPage::getTitleFor( 'NotifyTranslators'
)->getFullUrl(
+ array( 'tpage' =>
$page->getTitle()->getArticleID() ) );
+ $this->getOutput()->addWikiMsg( 'tpt-offer-notify',
$link );
+ }
}
public function loadPagesFromDB() {
--
To view, visit https://gerrit.wikimedia.org/r/76115
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3abb0411922bada6f7040699dbd8e4552eaff78
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits