Shirayuki has uploaded a new change for review.
https://gerrit.wikimedia.org/r/110950
Change subject: i18n: give grep a chance to find the usages
......................................................................
i18n: give grep a chance to find the usages
Change-Id: I81644dd310b2fb91c0def8a348e91f467654a74a
---
M lib/includes/ClaimDifferenceVisualizer.php
M lib/includes/changes/EntityChange.php
M lib/includes/formatters/QuantityDetailsFormatter.php
M repo/includes/ClaimHtmlGenerator.php
M repo/includes/MultiLangConstraintDetector.php
M repo/includes/content/EntityContent.php
M repo/includes/specials/SpecialMergeItems.php
M repo/includes/specials/SpecialModifyTerm.php
M repo/includes/specials/SpecialMyLanguageFallbackChain.php
9 files changed, 22 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/50/110950/1
diff --git a/lib/includes/ClaimDifferenceVisualizer.php
b/lib/includes/ClaimDifferenceVisualizer.php
index 367dc5a..bbe7980 100644
--- a/lib/includes/ClaimDifferenceVisualizer.php
+++ b/lib/includes/ClaimDifferenceVisualizer.php
@@ -224,6 +224,8 @@
$rank = ClaimSerializer::serializeRank( $rank );
}
+ // Messages: wikibase-diffview-rank-preferred,
wikibase-diffview-rank-normal,
+ // wikibase-diffview-rank-deprecated
$msg = wfMessage( 'wikibase-diffview-rank-' . $rank );
return $msg->inLanguage( $this->langCode )->parse();
}
diff --git a/lib/includes/changes/EntityChange.php
b/lib/includes/changes/EntityChange.php
index d68e747..d4a3df7 100644
--- a/lib/includes/changes/EntityChange.php
+++ b/lib/includes/changes/EntityChange.php
@@ -193,6 +193,8 @@
if ( $comment !== null ) {
$this->comment = $comment;
} else {
+ // Messages: wikibase-comment-add,
wikibase-comment-remove, wikibase-comment-linked,
+ // wikibase-comment-unlink, wikibase-comment-restore,
wikibase-comment-update
$this->comment = 'wikibase-comment-' .
$this->getAction();
}
}
diff --git a/lib/includes/formatters/QuantityDetailsFormatter.php
b/lib/includes/formatters/QuantityDetailsFormatter.php
index 3a5c63d..952c40a 100644
--- a/lib/includes/formatters/QuantityDetailsFormatter.php
+++ b/lib/includes/formatters/QuantityDetailsFormatter.php
@@ -86,6 +86,8 @@
protected function getFieldLabel( $fieldName ) {
$lang = $this->getOption( ValueFormatter::OPT_LANG );
+ // Messages: wikibase-quantitydetails-amount,
wikibase-quantitydetails-upperbound,
+ // wikibase-quantitydetails-lowerbound,
wikibase-quantitydetails-unit
$key = 'wikibase-quantitydetails-' . strtolower( $fieldName );
$msg = wfMessage( $key )->inLanguage( $lang );
diff --git a/repo/includes/ClaimHtmlGenerator.php
b/repo/includes/ClaimHtmlGenerator.php
index 6cd49dc..3e7e254 100644
--- a/repo/includes/ClaimHtmlGenerator.php
+++ b/repo/includes/ClaimHtmlGenerator.php
@@ -102,6 +102,8 @@
if( is_a( $claim, 'Wikibase\Statement' ) ) {
$serializedRank = ClaimSerializer::serializeRank(
$claim->getRank() );
+ // Messages: wikibase-statementview-rank-preferred,
wikibase-statementview-rank-normal,
+ // wikibase-statementview-rank-deprecated
$rankHtml = wfTemplate( 'wb-rankselector',
'wb-rankselector-' . $serializedRank,
wfMessage( 'wikibase-statementview-rank-' .
$serializedRank )->text()
diff --git a/repo/includes/MultiLangConstraintDetector.php
b/repo/includes/MultiLangConstraintDetector.php
index 0527454..ab224f1 100644
--- a/repo/includes/MultiLangConstraintDetector.php
+++ b/repo/includes/MultiLangConstraintDetector.php
@@ -145,7 +145,7 @@
}
);
$langValues = $wgLang->semicolonList(
$langValues );
- // Give grep a chance to find the usages:
wikibase-error-constraint-violation-label,
+ // Messages:
wikibase-error-constraint-violation-label,
//
wikibase-error-constraint-violation-description,
wikibase-error-constraint-violation-aliases
$status->fatal(
'wikibase-error-constraint-violation-'
. $section,
diff --git a/repo/includes/content/EntityContent.php
b/repo/includes/content/EntityContent.php
index 16b71ad..9634e2e 100644
--- a/repo/includes/content/EntityContent.php
+++ b/repo/includes/content/EntityContent.php
@@ -719,8 +719,7 @@
*/
foreach ( $foundLabels as $foundLabel ) {
if ( $foundLabel->getEntityId() !==
$entity->getId()->getNumericId() ) {
- // Give grep a chance to find the usages:
- //
wikibase-error-label-not-unique-wikibase-property,
+ // Messages:
wikibase-error-label-not-unique-wikibase-property,
//
wikibase-error-label-not-unique-wikibase-query
$status->fatal(
'wikibase-error-label-not-unique-wikibase-' . $entity->getType(),
diff --git a/repo/includes/specials/SpecialMergeItems.php
b/repo/includes/specials/SpecialMergeItems.php
index 88997b2..8e369a8 100644
--- a/repo/includes/specials/SpecialMergeItems.php
+++ b/repo/includes/specials/SpecialMergeItems.php
@@ -269,6 +269,7 @@
. Html::element(
'legend',
array( 'class' => 'wb-legend' ),
+ // Message: special-mergeitems
$this->msg( 'special-' . strtolower(
$this->getName() ) )->text()
)
);
@@ -280,6 +281,7 @@
$this->getOutput()->addHTML(
Html::input(
'wikibase-' . strtolower( $this->getName() ) .
'-submit',
+ // Message: wikibase-mergeitems-submit
$this->msg( 'wikibase-' . strtolower(
$this->getName() ) . '-submit' )->text(),
'submit',
array(
@@ -306,6 +308,7 @@
return Html::rawElement(
'p',
array(),
+ // Message: wikibase-mergeitems-intro
$this->msg( 'wikibase-' . strtolower( $this->getName()
) . '-intro' )->parse()
)
. Html::element(
diff --git a/repo/includes/specials/SpecialModifyTerm.php
b/repo/includes/specials/SpecialModifyTerm.php
index edd0b36..bbe955b 100644
--- a/repo/includes/specials/SpecialModifyTerm.php
+++ b/repo/includes/specials/SpecialModifyTerm.php
@@ -114,6 +114,8 @@
// to provide removing after posting the full form
if ( $request->getVal( 'remove' ) === null && $this->value ===
'' ) {
$this->showErrorHTML(
+ // Messages: wikibase-setlabel-warning-remove,
wikibase-setdescription-warning-remove,
+ // wikibase-setaliases-warning-remove
$this->msg(
'wikibase-' . strtolower(
$this->getName() ) . '-warning-remove',
$this->entityContent->getTitle()->getText()
@@ -191,6 +193,8 @@
return Html::rawElement(
'p',
array(),
+ // Messages: wikibase-setlabel-introfull,
wikibase-setdescription-introfull,
+ // wikibase-setaliases-introfull
$this->msg(
'wikibase-' . strtolower(
$this->getName() ) . '-introfull',
$this->entityContent->getTitle()->getPrefixedText(),
@@ -206,6 +210,8 @@
return Html::rawElement(
'p',
array(),
+ // Messages: wikibase-setlabel-intro,
wikibase-setdescription-intro,
+ // wikibase-setaliases-intro
$this->msg( 'wikibase-' . strtolower(
$this->getName() ) . '-intro' )->parse()
)
. parent::getFormElements()
@@ -233,6 +239,8 @@
'for' => 'wb-modifyterm-value',
'class' => 'wb-label'
),
+ // Messages: wikibase-setlabel-label,
wikibase-setdescription-label,
+ // wikibase-setaliases-label
$this->msg( 'wikibase-' . strtolower(
$this->getName() ) . '-label' )->text()
)
. $valueinput;
diff --git a/repo/includes/specials/SpecialMyLanguageFallbackChain.php
b/repo/includes/specials/SpecialMyLanguageFallbackChain.php
index d018422..bba1d2d 100644
--- a/repo/includes/specials/SpecialMyLanguageFallbackChain.php
+++ b/repo/includes/specials/SpecialMyLanguageFallbackChain.php
@@ -47,6 +47,7 @@
* @return String
*/
public function getDescription() {
+ // Message: special-mylanguagefallbackchain
return $this->msg( 'special-' . strtolower( $this->getName() )
)->text();
}
--
To view, visit https://gerrit.wikimedia.org/r/110950
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I81644dd310b2fb91c0def8a348e91f467654a74a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Shirayuki <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits