Skip to content

Commit

Permalink
Override of the qa model json from the inside of the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Ostico committed May 4, 2018
1 parent de3fc77 commit ebad171
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/Features/Microsoft.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

}
53 changes: 53 additions & 0 deletions qa_model.json
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}

0 comments on commit ebad171

Please sign in to comment.