jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/402881 )
Change subject: Rename status not-main-snak to not-in-scope
......................................................................
Rename status not-main-snak to not-in-scope
The checkers referencing this status are not updated, since this status
will be handled centrally by DelegatingConstraintChecker (implemented in
Ie9d7c1c9e7) and the code in the checkers referencing this status will
be completely removed (in I100a01e612).
Bug: T183542
Change-Id: I629afe85d2913e092e77e64cef95543e68a4cadb
---
M i18n/en.json
M i18n/qqq.json
M modules/SpecialConstraintReportPage.less
M src/ConstraintCheck/Checker/TypeChecker.php
M src/ConstraintCheck/DelegatingConstraintChecker.php
M src/ConstraintCheck/Result/CheckResult.php
6 files changed, 8 insertions(+), 9 deletions(-)
Approvals:
Jonas Kress (WMDE): Looks good to me, approved
jenkins-bot: Verified
diff --git a/i18n/en.json b/i18n/en.json
index 573918e..8c65861 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -24,7 +24,7 @@
"wbqc-constraintreport-status-bad-parameters": "Bad parameters",
"wbqc-constraintreport-status-deprecated": "Deprecated",
"wbqc-constraintreport-status-warning": "Warning",
- "wbqc-constraintreport-status-not-main-snak": "Not main snak",
+ "wbqc-constraintreport-status-not-in-scope": "Not in scope",
"wbqc-constraintreport-result-table-header-status": "Status",
"wbqc-constraintreport-result-table-header-claim": "Claim",
"wbqc-constraintreport-result-table-header-constraint": "Constraint",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index fd06648..657ebab 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -27,7 +27,7 @@
"wbqc-constraintreport-status-bad-parameters": "Status for constraints
that have missing or invalid constraint parameters.",
"wbqc-constraintreport-status-deprecated": "Status for constraint
checks that have been skipped because the statement is deprecated.",
"wbqc-constraintreport-status-warning": "Status for statements that
violate a non-mandatory constraint.\n{{Identical|Warning}}",
- "wbqc-constraintreport-status-not-main-snak": "Status for constraint
checks that have been skipped because the snak to be checked is not the main
snak of a statement (e. g. a qualifier or reference).",
+ "wbqc-constraintreport-status-not-in-scope": "Status for constraint
checks that have been skipped because the kind of the snak to be checked (main
snak, qualifier, or reference) is not within the scope of the constraint. This
should follow the label of the “constraint scope” property
([[wikidata:Property:P4680|P4680 on Wikidata]]).",
"wbqc-constraintreport-result-table-header-status": "Header of the
column that tells whether the check found a violation or something
else.\n{{Identical|Status}}",
"wbqc-constraintreport-result-table-header-claim": "Header of the
column that displays a link to the claim, the used property and its
value.\n{{Identical|Claim}}",
"wbqc-constraintreport-result-table-header-constraint": "Header of the
column that gives information about which constraint was
checked.\n{{Identical|Constraint}}",
diff --git a/modules/SpecialConstraintReportPage.less
b/modules/SpecialConstraintReportPage.less
index 8fbcbcb..b97dabc 100644
--- a/modules/SpecialConstraintReportPage.less
+++ b/modules/SpecialConstraintReportPage.less
@@ -41,7 +41,7 @@
}
&-deprecated,
- &-not-main-snak {
+ &-not-in-scope {
color: @colorNeutral;
}
diff --git a/src/ConstraintCheck/Checker/TypeChecker.php
b/src/ConstraintCheck/Checker/TypeChecker.php
index 4bdaee3..ea1e4c2 100644
--- a/src/ConstraintCheck/Checker/TypeChecker.php
+++ b/src/ConstraintCheck/Checker/TypeChecker.php
@@ -74,7 +74,7 @@
return new CheckResult( $context, $constraint, [],
CheckResult::STATUS_DEPRECATED );
}
if ( $context->getType() === Context::TYPE_REFERENCE ) {
- return new CheckResult( $context, $constraint, [],
CheckResult::STATUS_NOT_MAIN_SNAK );
+ return new CheckResult( $context, $constraint, [],
CheckResult::STATUS_NOT_IN_SCOPE );
}
$parameters = [];
diff --git a/src/ConstraintCheck/DelegatingConstraintChecker.php
b/src/ConstraintCheck/DelegatingConstraintChecker.php
index d583a04..cb71871 100644
--- a/src/ConstraintCheck/DelegatingConstraintChecker.php
+++ b/src/ConstraintCheck/DelegatingConstraintChecker.php
@@ -587,7 +587,7 @@
CheckResult::STATUS_EXCEPTION => $orderNum++,
CheckResult::STATUS_COMPLIANCE => $orderNum++,
CheckResult::STATUS_DEPRECATED => $orderNum++,
- CheckResult::STATUS_NOT_MAIN_SNAK =>
$orderNum++,
+ CheckResult::STATUS_NOT_IN_SCOPE => $orderNum++,
'other' => $orderNum++,
];
diff --git a/src/ConstraintCheck/Result/CheckResult.php
b/src/ConstraintCheck/Result/CheckResult.php
index 57109bb..62679a3 100644
--- a/src/ConstraintCheck/Result/CheckResult.php
+++ b/src/ConstraintCheck/Result/CheckResult.php
@@ -51,12 +51,11 @@
*/
const STATUS_WARNING = 'warning';
/**
- * The constraint type is only checked on the main snak of a statement,
- * but the current context is not a 'statement'-type context
- * (e. g. a 'qualifier' or 'reference' context),
+ * The constraint is not checked on this kind of snak
+ * (main snak, qualifier or reference),
* so the constraint check is skipped.
*/
- const STATUS_NOT_MAIN_SNAK = 'not-main-snak';
+ const STATUS_NOT_IN_SCOPE = 'not-in-scope';
/*
* When adding another status, don’t forget to also do the following:
* * define a message for it in i18n/
--
To view, visit https://gerrit.wikimedia.org/r/402881
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I629afe85d2913e092e77e64cef95543e68a4cadb
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: WMDE-leszek <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits