EBernhardson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/112038
Change subject: Use provided language for link messages
......................................................................
Use provided language for link messages
Change-Id: I97147b63ab11a3fe992fe35784f55f9993e2d89c
---
M includes/CheckUser/Formatter.php
M includes/Contributions/Formatter.php
M includes/Formatter.php
M includes/RecentChanges/Formatter.php
4 files changed, 12 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/38/112038/1
diff --git a/includes/CheckUser/Formatter.php b/includes/CheckUser/Formatter.php
index 693e5db..599bf93 100644
--- a/includes/CheckUser/Formatter.php
+++ b/includes/CheckUser/Formatter.php
@@ -43,6 +43,7 @@
}
$result = array();
+ $lang = $checkUser->getLanguage();
foreach ( $links as $key => $link ) {
// @todo these $text strings are using $wgLang instead
of $checkUser->getLanguage()
list( $url, $text ) = $link;
@@ -53,7 +54,7 @@
'href' => $url,
'title' => $text,
),
- $text
+ $text->inLanguage( $lang )->text()
) );
}
$result['title'] = '. . ' . Linker::link( $title );
diff --git a/includes/Contributions/Formatter.php
b/includes/Contributions/Formatter.php
index a466945..f1b3e95 100644
--- a/includes/Contributions/Formatter.php
+++ b/includes/Contributions/Formatter.php
@@ -44,12 +44,12 @@
// Format timestamp: add link
$formattedTime = $dateFormats['timeAndDate'];
if ( $links ) {
- list( $url, $text ) = $links[count( $links ) - 1];
+ list( $url, $message ) = $links[count( $links ) - 1];
$formattedTime = Html::element(
'a',
array(
'href' => $url,
- 'title' => $text
+ 'title' => $message->inLanguage( $lang
)->text(),
),
$formattedTime
);
@@ -64,7 +64,8 @@
// Format links
foreach ( $links as &$link ) {
- list( $url, $text ) = $link;
+ list( $url, $message ) = $link;
+ $text = $message->inLanguage( $lang )->text();
$link = Html::element(
'a',
array(
diff --git a/includes/Formatter.php b/includes/Formatter.php
index 9911905..321c425 100644
--- a/includes/Formatter.php
+++ b/includes/Formatter.php
@@ -171,7 +171,7 @@
'topic-history',
array( 'workflow' => $workflowId->getHex() )
),
- wfMessage( 'flow-link-history' )->text()
+ wfMessage( 'flow-link-history' )
);
}
@@ -185,7 +185,7 @@
'topic' => array( 'postId' =>
$postId->getHex() ),
)
),
- wfMessage( 'flow-link-history' )->text()
+ wfMessage( 'flow-link-history' )
);
}
@@ -196,7 +196,7 @@
'view',
array( 'workflow' => $workflowId->getHex() )
),
- wfMessage( 'flow-link-topic' )->text()
+ wfMessage( 'flow-link-topic' )
);
}
@@ -210,7 +210,7 @@
'topic' => array( 'postId' =>
$postId->getHex() ),
)
),
- wfMessage( 'flow-link-post' )->text()
+ wfMessage( 'flow-link-post' )
);
}
diff --git a/includes/RecentChanges/Formatter.php
b/includes/RecentChanges/Formatter.php
index 8cd2ab1..c284c3c 100644
--- a/includes/RecentChanges/Formatter.php
+++ b/includes/RecentChanges/Formatter.php
@@ -60,7 +60,8 @@
// Format links
foreach ( $links as &$link ) {
- list( $url, $text ) = $link;
+ list( $url, $message ) = $link;
+ $text = $message->inLanguage( $lang )->text();
$link = Html::element(
'a',
array(
--
To view, visit https://gerrit.wikimedia.org/r/112038
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I97147b63ab11a3fe992fe35784f55f9993e2d89c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits