Ryan10145 has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/394777 )
Change subject: Added Internationalization For Some Strings
......................................................................
Added Internationalization For Some Strings
Change-Id: I2da4efff85b71379011026d18ed2129c89f9d2ce
---
M i18n/en.json
M i18n/qqq.json
M src/MassActionSpecialPage.php
M src/Targets/WikiPage/Actions/AppendAction.php
M src/Targets/WikiPage/Actions/RegexReplaceAction.php
M src/Targets/WikiPage/Matchers/TitleRegexMatcher.php
6 files changed, 24 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassAction
refs/changes/77/394777/1
diff --git a/i18n/en.json b/i18n/en.json
index 8cc2e6a..55fa2ef 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -10,6 +10,7 @@
"massaction-errormessage": "Error: $1",
"massaction-newtask": "New task",
"massaction-viewtask": "View task",
+ "massaction-registeredtask": "Task registered and job queued!",
"massactionsavechange": "Save change",
"specialpages-group-MassAction": "MassAction",
"log-name-massaction": "MassAction",
@@ -20,5 +21,11 @@
"massaction-specialpage-matchers-section":"Matchers",
"massaction-specialpage-actions-section":"Actions",
"massaction-target-wikipage-titleregexmatcher-regex-help":"Regex
characters allowed: . * ?",
- "massaction-queued-count": "Queued [[Special:MassAction|mass action]]
jobs"
+ "massaction-queued-count": "Queued [[Special:MassAction|mass action]]
jobs",
+ "massaction-regexreplace-desc": "Performs a regex replace on the
content using the pattern",
+ "massaction-append-desc": "Appends $1 characters to Page $2",
+ "massaction-append-trimmed": "... (trimmed to 25 characters)",
+ "massaction-titleregexmatcher-desc": "Matches pages with titles matches
regex",
+ "massaction-titleregexmatcher-enabled": "Title Regex Matcher Enabled?",
+ "massaction-titleregexmatcher-label": "Title Regex"
}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index a261986..84fd58f 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -12,6 +12,7 @@
"massaction-errormessage": "Error message for special
pages\n{{Identical|Error}}",
"massaction-newtask": "New Task special page title",
"massaction-viewtask": "View Task special page title",
+ "massaction-registeredtask": "Message for when a task has been
registered and the corresponding job has been added to the queue for later
completition",
"massactionsavechange": "Save Change special page
title\n{{Identical|Save changes}}",
"specialpages-group-MassAction": "MassAction special page
group\n{{doc-special-group}}",
"log-name-massaction": "Name for the MassAction log type",
@@ -22,5 +23,11 @@
"massaction-specialpage-matchers-section": "Title for the section
containing options for Matchers when creating a new task",
"massaction-specialpage-actions-section": "Title for the section
containing options for Actions when creating a new task\n{{Identical|Action}}",
"massaction-target-wikipage-titleregexmatcher-regex-help": "Help
message for the WikiPage TitleRegexMatcher Regex form entry box",
- "massaction-queued-count": "Text for row on [[Special:Statistics]]."
+ "massaction-queued-count": "Text for row on [[Special:Statistics]].",
+ "massaction-regexreplace-desc": "Description for the action that
replaces the following regex pattern",
+ "massaction-append-desc": "Description for an action that appends
characters to a page. Parameters:\n* $1 - the amount of characters appended\n*
$2 - a snippet of the page that is being appended to",
+ "massaction-append-trimmed": "Message that shows that a snippet of text
has been truncated past 25 characters",
+ "massaction-titleregexmatcher-desc": "Description for the matcher that
matches the following regex pattern in titles",
+ "massaction-titleregexmatcher-enabled": "Label for whether or not the
matcher for title regex is enabled",
+ "massaction-titleregexmatcher-label": "Label for the title regex
matcher"
}
diff --git a/src/MassActionSpecialPage.php b/src/MassActionSpecialPage.php
index a49ff5e..cb7f46a 100644
--- a/src/MassActionSpecialPage.php
+++ b/src/MassActionSpecialPage.php
@@ -498,7 +498,7 @@
$job = new TargetListJob( Title::newMainPage(), array( 'taskid'
=> $task->getId() ) );
JobQueueGroup::singleton()->push( $job );
- $this->getOutput()->addHTML( '<p>Task registered and job
queued!</p>' );
+ $this->getOutput()->addHTML( '<p>' .
'massaction-registeredtask' . '</p>' );
$link = Linker::specialLink( 'MassAction/View/' .
$task->getId(), 'massaction-viewtask' );
$this->getOutput()->addHTML( '<p>' . $link . '</p>' );
}
diff --git a/src/Targets/WikiPage/Actions/AppendAction.php
b/src/Targets/WikiPage/Actions/AppendAction.php
index 5db2e74..c414721 100644
--- a/src/Targets/WikiPage/Actions/AppendAction.php
+++ b/src/Targets/WikiPage/Actions/AppendAction.php
@@ -34,10 +34,10 @@
$length = strlen( $this->text );
$snippet = '"' . substr( $this->text, 0, 25 ) . '"';
if ( $length > 25 ) {
- $snippet = $snippet . '... (trimmed to 25 characters)';
+ $snippet = $snippet . 'massaction-append-trimmed';
}
- return 'Appends ' . $length . ' characters to Page ' . $snippet;
+ return wfMessage( 'massaction-append-desc', $length ,
$snippet)->plain();
}
public function getText() {
diff --git a/src/Targets/WikiPage/Actions/RegexReplaceAction.php
b/src/Targets/WikiPage/Actions/RegexReplaceAction.php
index ed02c38..9bf30e9 100644
--- a/src/Targets/WikiPage/Actions/RegexReplaceAction.php
+++ b/src/Targets/WikiPage/Actions/RegexReplaceAction.php
@@ -86,7 +86,8 @@
* @return string description of the object
*/
public function getDescription() {
- return 'Performs a regex replace on the content using the
pattern \'' .
+ return 'massaction-regexreplace-desc' .
+ ' \'' .
$this->pattern .
'\'' .
' and replacement \'' .
diff --git a/src/Targets/WikiPage/Matchers/TitleRegexMatcher.php
b/src/Targets/WikiPage/Matchers/TitleRegexMatcher.php
index 494d7c1..b4cc41f 100644
--- a/src/Targets/WikiPage/Matchers/TitleRegexMatcher.php
+++ b/src/Targets/WikiPage/Matchers/TitleRegexMatcher.php
@@ -78,7 +78,7 @@
* @return string description of the object
*/
public function getDescription() {
- return "Matches pages with titles matches regex '" .
$this->titleRegex . "'";
+ return "massaction-titleregexmatcher-desc" . " '" .
$this->titleRegex . "'";
}
/**
@@ -95,11 +95,11 @@
return array(
'PageMatcherTitleRegexEnabled' => array(
'type' => 'check',
- 'label' => 'Title Regex Matcher Enabled?',
+ 'label' =>
'massaction-titleregexmatcher-enabled',
),
'PageMatcherTitleRegex' => array(
'type' => 'text',
- 'label' => 'Title Regex',
+ 'label' => 'massaction-titleregexmatcher-label',
'help-message' =>
'massaction-target-wikipage-titleregexmatcher-regex-help',
),
);
--
To view, visit https://gerrit.wikimedia.org/r/394777
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2da4efff85b71379011026d18ed2129c89f9d2ce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassAction
Gerrit-Branch: master
Gerrit-Owner: Ryan10145 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits