Project - 项目

整体流程

image

创建项目

POST /project/create.json
{
    "accessKey":"xxxxx",
    "projectBase":{
        "appName": "xxx",
        "appId": "xxx",
        "projectName":"项目名称",
        "sourceLanguage":"zh-CN",
        "targetLanguage":"en-US",
        "dueDate":"1639756800000",
        "description":"xx",
        "category":"xxx",
        "tags":["xx", "xx"]
    },
    "dataList":[{
        //返稿时透传
        "dataId":1,
        "dataType": "file",
        "fileName": "文件名称",
        "fileUrl": "文件地址",
    }]
    "produceTemplateName": "abc1" //在平台中设置
  
}
  • 说明:业务方appName 和 appId 是唯一的,客户通过该唯一值获取项目的生产状态和生产文件。

  • status 状态:

init

创建中

assigning

待分配

progress

生产中

submit

已提交,所有译员已提交,可以下载译文

finish

已完成

  • produceTemplateName 对应的生产配置,如下:

image

获取项目结果

Request

GET /project/detail.json
{
    "appName": "创建项目传值",
    "appId": "创建项目传值",
    "accessKey":"fmxtestalynxsecret"
}

Response

{
    "success": true,
    "data": {
        "sourceLanguage": "zh-CN",
        "targetLanguage": "en-US",
        "totalWordCount": 76, //总字数
        "totalTaskCount": 7,  //总句子数
        "createTime": 1639536689000, //项目创建时间
        "dueTime": 1639756800000, //项目截止日期
        "status": "busy", //busy:翻译进行中,finish:已完成
        "progressList": [
            {
                "actionType": "translation",
                "deliverCount": 0,
                "actionStepNum": 1,
                "totalUnitCount": 76,
                "deliverUnitCount": 0,
                "totalCount": 7
            }
        ],
        "extInfo": {},
    },
}

获取项目文件

  • 返回译员最近一次交付的内容。

Request

GET /project/result.json

{
    "appName": "创建项目传值",
    "appId": "创建项目传值",
    "accessKey":"fmxtestalynxsecret"
}

Response

{
    "data": [
        {
            "dataId": 1,
            "fileUrl": "//alifanyi-pixar-dev.oss-cn-zhangjiakou.aliyuncs.com/oss-20211215014539562Ow4ojwd3G25g6lP.docx?Expires=1671097738&OSSAccessKeyId=*************"
        }
    ],
    "success": true
}