Shirayuki has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/78503


Change subject: Add full-stops to error messages
......................................................................

Add full-stops to error messages

Add comments for grep

Change-Id: I5c7f5ae9d08f1dd14605058ff7f2eb16d46bb0e1
---
M lib/includes/Validators/ValidatorErrorLocalizer.php
M repo/Wikibase.i18n.php
M repo/includes/MultiLangConstraintDetector.php
M repo/includes/content/EntityContent.php
M repo/includes/specials/SpecialEntitiesWithoutLabel.php
5 files changed, 17 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/03/78503/1

diff --git a/lib/includes/Validators/ValidatorErrorLocalizer.php 
b/lib/includes/Validators/ValidatorErrorLocalizer.php
index 9d6a0f4..7989940 100644
--- a/lib/includes/Validators/ValidatorErrorLocalizer.php
+++ b/lib/includes/Validators/ValidatorErrorLocalizer.php
@@ -37,6 +37,12 @@
 class ValidatorErrorLocalizer {
 
        public function getErrorMessage( Error $error ) {
+               // Give grep a chance to find the usages:
+               // wikibase-validator-bad-type, wikibase-validator-too-long, 
wikibase-validator-too-short,
+               // wikibase-validator-malformed-value, 
wikibase-validator-bad-entity-id,
+               // wikibase-validator-bad-entity-type, 
wikibase-validator-no-such-entity,
+               // wikibase-validator-no-such-property, 
wikibase-validator-bad-value,
+               // wikibase-validator-bad-value-type
                $key = 'wikibase-validator-' . $error->getCode();
                $params = $error->getParameters();
 
diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index fc8a3ea..9dd9f1f 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -104,9 +104,9 @@
        'wikibase-error-constraint-violation-aliases' => 'There is 
{{PLURAL:$1|a constraint|constraints}} violation for 
{{PLURAL:$1|alias|aliases}} "$3" for {{PLURAL:$1|language code|language codes}} 
"$2".',
 
        'wikibase-error-sitelink-already-used' => 'Site link [$1 $2] already 
used by item [[$3]].',
-       'wikibase-error-label-not-unique-wikibase-property' => 'Another 
property ($3) already has label "$1" associated with language code $2',
-       'wikibase-error-label-not-unique-wikibase-query' => 'Another query ($3) 
already has label "$1" associated with language code $2',
-       'wikibase-error-label-not-unique-item' => 'Another item ($3) already 
has label "$1" and description "$4" associated with language code $2',
+       'wikibase-error-label-not-unique-wikibase-property' => 'Another 
property ($3) already has label "$1" associated with language code $2.',
+       'wikibase-error-label-not-unique-wikibase-query' => 'Another query ($3) 
already has label "$1" associated with language code $2.',
+       'wikibase-error-label-not-unique-item' => 'Another item ($3) already 
has label "$1" and description "$4" associated with language code $2.',
 
        'wikibase-itemlink' => '$1 $2',
        'wikibase-itemlink-id-wrapper' => '($1)',
@@ -136,7 +136,7 @@
        'wikibase-newproperty-summary' => 'Make sure to check if the property 
already exists!<br />You should create a [[Help:Label|label]] and a 
[[Help:Description|description]] for all new properties, and in addition a 
valid property type.',
        'wikibase-newproperty-fieldset' => 'Create a new property',
        'wikibase-newproperty-datatype' => 'Data type:',
-       'wikibase-newproperty-invalid-datatype' => 'Invalid datatype specified',
+       'wikibase-newproperty-invalid-datatype' => 'Invalid datatype 
specified.',
        'special-newitem' => 'Create a new item',
        'wikibase-newitem-summary' => 'Make sure to [[Special:ItemByTitle|check 
if the item already exists]]!<br />You should create a [[Help:Label|label]] and 
a [[Help:Description|description]] for all new items.',
        'wikibase-newitem-fieldset' => 'Create a new item',
diff --git a/repo/includes/MultiLangConstraintDetector.php 
b/repo/includes/MultiLangConstraintDetector.php
index d338615..792a648 100644
--- a/repo/includes/MultiLangConstraintDetector.php
+++ b/repo/includes/MultiLangConstraintDetector.php
@@ -159,6 +159,8 @@
                                        }
                                );
                                $langValues = $wgLang->semicolonList( 
$langValues );
+                               // Give grep a chance to find the usages: 
wikibase-error-constraint-violation-label,
+                               // 
wikibase-error-constraint-violation-description, 
wikibase-error-constraint-violation-aliases
                                $status->fatal(
                                        'wikibase-error-constraint-violation-' 
. $section,
                                        count($langCodes),
diff --git a/repo/includes/content/EntityContent.php 
b/repo/includes/content/EntityContent.php
index da2772e..75f87e8 100644
--- a/repo/includes/content/EntityContent.php
+++ b/repo/includes/content/EntityContent.php
@@ -602,6 +602,9 @@
                 */
                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,
+                               // 
wikibase-error-label-not-unique-wikibase-query
                                $status->fatal(
                                        
'wikibase-error-label-not-unique-wikibase-' . $entity->getType(),
                                        $foundLabel->getText(),
diff --git a/repo/includes/specials/SpecialEntitiesWithoutLabel.php 
b/repo/includes/specials/SpecialEntitiesWithoutLabel.php
index 19f1205..0750970 100644
--- a/repo/includes/specials/SpecialEntitiesWithoutLabel.php
+++ b/repo/includes/specials/SpecialEntitiesWithoutLabel.php
@@ -90,7 +90,8 @@
                }
                $typeSelect = new XmlSelect( 'type', 
'wb-entitieswithoutlabel-type', $this->type );
                $typeSelect->addOption( $this->msg( 
'wikibase-entitieswithoutlabel-label-alltypes' )->text(), '' );
-               //item, property and query
+               // Give grep a chance to find the usages:
+               // wikibase-entity-item, wikibase-entity-property, 
wikibase-entity-query
                foreach( $possibleTypes as $possibleType ) {
                        $typeSelect->addOption( $this->msg( 'wikibase-entity-' 
. $possibleType )->text(), $possibleType );
                }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c7f5ae9d08f1dd14605058ff7f2eb16d46bb0e1
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

Reply via email to