From ebad171d0eb9a0d5543a787ba68c6a787a7383d5 Mon Sep 17 00:00:00 2001 From: domenico Date: Fri, 4 May 2018 20:42:03 +0200 Subject: [PATCH] Override of the qa model json from the inside of the plugin --- lib/Features/Microsoft.php | 11 ++++++++ qa_model.json | 53 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 qa_model.json diff --git a/lib/Features/Microsoft.php b/lib/Features/Microsoft.php index db19663..0c5b98b 100644 --- a/lib/Features/Microsoft.php +++ b/lib/Features/Microsoft.php @@ -56,4 +56,15 @@ public function doNotManageAlternativeTranslations( $boolean ){ return false; } + /** + * Entry point for project data validation for this feature. + * + * @param $projectStructure + */ + public function validateProjectCreation( $projectStructure ) { + //override Revise Improved qa Model + $qa_mode_file = realpath( self::getPluginBasePath() . "/../qa_model.json" ); + ReviewImproved::loadAndValidateModelFromJsonFile( $projectStructure, $qa_mode_file ); + } + } \ No newline at end of file diff --git a/qa_model.json b/qa_model.json new file mode 100644 index 0000000..37fd5ad --- /dev/null +++ b/qa_model.json @@ -0,0 +1,53 @@ +{ + "model": { + "version" : 1, + "label": "MateCat default", + + "categories": [ + { + "label": "Tag issues (mismatches, whitespaces)", + "dqf_id" : 5 + }, + { + "label": "Translation errors (mistranslation, additions/omissions)", + "dqf_id" : 1 + }, + { + "label": "Terminology and translation consistency", + "dqf_id" : 3 + }, + { + "label": "Language quality (grammar, punctuation, spelling)", + "dqf_id" : 2 + }, + { + "label": "Style (readability, consistent style and tone)", + "dqf_id" : 4 + } + ], + "severities": [ + { + "label": "Enhancement", + "dqf_id" : 1, + "penalty": 0 + }, + { + "label": "Error", + "dqf_id" : 2, + "penalty": 1 + }, + { + "label": "Critical", + "dqf_id" : 2, + "penalty": 10 + } + ], + + "passfail" : { + "type" : "points_per_thousand", + "options" : { + "limit" : 20 + } + } + } +}