From 8469728bb5b2abfa33ca65b10021ab3f58c48cd2 Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Fri, 15 Jun 2018 11:07:59 +0100 Subject: [PATCH] Update tests and localization --- .../wikidata/module/langs/translation-en.json | 24 +++++-------------- .../RestrictedPositionScrutinizerTest.java | 4 ++-- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/extensions/wikidata/module/langs/translation-en.json b/extensions/wikidata/module/langs/translation-en.json index e3a9cf53c..da2203a6f 100644 --- a/extensions/wikidata/module/langs/translation-en.json +++ b/extensions/wikidata/module/langs/translation-en.json @@ -121,29 +121,17 @@ "title": "Statements without references.", "body": "Most statements should have references. You can add them easily in the schema." }, - "property-restricted-to-reference-found-in-mainsnak": { + "property-found-in-mainsnak": { "title": "{property_entity} used as statement.", - "body": "You are using {property_entity} in a statement but it is designed to be used in references only." + "body": "You are using {property_entity} as a main statement but it is not designed for that." }, - "property-restricted-to-reference-found-in-qualifier": { + "property-found-in-qualifier": { "title": "{property_entity} used as qualifier.", - "body": "You are using in {property_entity} in a qualifier but it is designed to be used in references only." + "body": "You are using in {property_entity} as a qualifier but it is not designed for that ." }, - "property-restricted-to-qualifier-found-in-mainsnak": { - "title": "{property_entity} used as statement.", - "body": "You are using {property_entity} in a statement but it is designed to be used in qualifiers only." - }, - "property-restricted-to-qualifier-found-in-reference": { + "property-found-in-reference": { "title": "{property_entity} used as reference.", - "body": "You are using {property_entity} in a reference but it is designed to be used in qualifiers only." - }, - "property-restricted-to-mainsnak-found-in-qualifier": { - "title": "{property_entity} used as qualifier.", - "body": "You are using {property_entity} in a qualifier but it is designed to be used as a statement only." - }, - "property-restricted-to-mainsnak-found-in-reference": { - "title": "{property_entity} used as reference.", - "body": "You are using {property_entity} in a reference but it is designed to be used as a statement only." + "body": "You are using {property_entity} in a reference but it is not designed for that." }, "missing-mandatory-qualifiers": { "title": "{statement_property_entity} is missing a {missing_property_entity} qualifier.", diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/scrutinizers/RestrictedPositionScrutinizerTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/scrutinizers/RestrictedPositionScrutinizerTest.java index 7ed820d28..7b7a0bb55 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/scrutinizers/RestrictedPositionScrutinizerTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/scrutinizers/RestrictedPositionScrutinizerTest.java @@ -48,7 +48,7 @@ public class RestrictedPositionScrutinizerTest extends SnakScrutinizerTest { @Test public void testTriggerMainSnak() { scrutinize(TestingData.generateStatement(qid, MockConstraintFetcher.qualifierPid, qid)); - assertWarningsRaised("property-restricted-to-qualifier-found-in-mainsnak"); + assertWarningsRaised("property-found-in-mainsnak"); } @Test @@ -72,7 +72,7 @@ public class RestrictedPositionScrutinizerTest extends SnakScrutinizerTest { TestingData.generateStatement(qid, MockConstraintFetcher.mainSnakPid, qid).getClaim(), Collections.singletonList(Datamodel.makeReference(snakGroups)), StatementRank.NORMAL, ""); scrutinize(statement); - assertWarningsRaised("property-restricted-to-mainsnak-found-in-reference"); + assertWarningsRaised("property-found-in-reference"); } }