外部 QA 检查模块
该模块支持集成高级、AI 驱动及其他专项 QA 检查,能够对译文进行验证,检测默认 QA 检查或基于 JavaScript 的自定义 QA 检查无法发现的细微问题。
您可以将此模块的访问权限授予以下用户类别之一:
- 仅限组织管理员
- 组织项目中的所有用户
- 选定用户
{ "modules": { "external-qa-check": [ { "key": "custom-check-qa", "name": "QA Check", "description": "Description", "runQaCheckUrl": "/validate", "getBatchSizeUrl": "/batch-size", "url": "/settings/index.html" } ] }}key | 类型: 必填: 是 描述: Crowdin 应用内的模块标识符。 |
name | 类型: 必填: 是 描述: 模块的可读名称。 |
description | 类型: 描述: 模块功能的可读描述。 |
runQaCheckUrl | 类型: 必填: 是 描述: 发送文本进行 QA 验证时触发的相对 URL。 |
getBatchSizeUrl | 类型: 必填: 否 描述: 检索模块支持的批次大小时触发的相对 URL。 |
url | 类型: 必填: 否 描述: 模块设置页面的相对 URL。 |
environments | 类型: 允许值: 描述: 可安装模块的环境集合。 |
系统使用 runQaCheckUrl 发送文本进行 QA 验证,触发时机为编辑器中保存译文后或执行 QA 检查时。 应用随后处理文本,并向系统返回以下两种可能类型的响应之一:无 QA 问题或存在 QA 问题。 当应用需要确定 QA 检查的最大批次大小时,可在 manifest.json 中设置 getBatchSizeUrl 键,指向提供最优批次大小的端点 URL。
请求载荷示例:
{ "data": { "translations": [ { "id": 12345, "stringId": 1234567, "languageId": "fr", "userId": 1, "text": "La mise à jour est installé avec succès.", "provider": null, "pluralCategoryName": null, "isPreTranslated": false, "rating": 0 } ], "strings": [ { "id": 1234567, "key": "update_success", "context": "Confirmation of successful software update", "maxLength": null, "text": "The update was successfully installed.", "fields": [] } ],57 collapsed lines
"sourceLanguage": { "id": "en", "name": "English", "twoLettersCode": "en", "threeLettersCode": "eng", "locale": "en-US", "pluralCategoryNames": ["one", "other"], "pluralRules": "(n != 1)", "pluralExamples": [1, 2], "textDirection": "ltr", "dialectOf": null }, "targetLanguage": { "id": "fr", "name": "French", "twoLettersCode": "fr", "threeLettersCode": "fra", "locale": "fr-FR", "pluralCategoryNames": ["one", "other"], "pluralRules": "(n > 1)", "pluralExamples": [1, 2], "textDirection": "ltr", "dialectOf": null }, "project": { "id": 123, "type": 0, "sourceLanguage": { "id": "en", "name": "English", "twoLettersCode": "en", "threeLettersCode": "eng", "locale": "en-US", "pluralCategoryNames": ["one", "other"], "pluralRules": "(n != 1)", "pluralExamples": [1, 2], "textDirection": "ltr", "dialectOf": null }, "targetLanguages": [ { "id": "fr", "name": "French", "twoLettersCode": "fr", "threeLettersCode": "fra", "locale": "fr-FR", "pluralCategoryNames": ["one", "other"], "pluralRules": "(n > 1)", "pluralExamples": [1, 2], "textDirection": "ltr", "dialectOf": null } ], "name": "Project Name", "description": "Project Description", "fields": [] }, "file": { "id": 123, "name": "filename.csv", "title": null, "context": null, "type": "csv", "path": "/filename.csv", "fields": [] } }}响应载荷示例:
{ "data": { "validations": [ { "translationId": 123, "passed": true } ] }}响应载荷示例:
{ "data": { "validations": [ { "translationId": 456, "passed": false, "error": { "message": "Example error message" } } ] }}响应载荷示例:
{ "data": { "size": 10 }}应用响应的结构应与所提供的示例一致,否则 Crowdin 将视其为无效。
感谢您的反馈!