...
Code Block |
---|
language | js |
---|
title | Translation memory exists and loaded into memory |
---|
|
{
"status": "open",
"tmxImportStatus": "available",
"importProgress": 100,
"importTime": "Overall import time is : 0:00:01\n",
"segmentsImported": 1,
"invalidSegments": 0,
"invalidSymbolErrors": 0,
"importErrorMsg": "",
"lastAccessTime": ""
} |
Code Block |
---|
language | js |
---|
title | Translation memory exists and loaded into memory |
---|
|
{
"status": "open",
"tmxImportStatus": "import",
"importProgress": 0,
"importTime": "not finished",
"segmentsImported": -1,
"invalidSegments": -1,
"invalidSymbolErrors": -1,
"importErrorMsg": "",
"lastAccessTime": ""
} |
Code Block |
---|
language | js |
---|
title | Translation memory exists and loaded into memory |
---|
|
{
"status": "open",
"tmxImportStatus": "failed",
"importProgress": 100,
"importTime": "Overall import time is : 0:00:00\n",
"segmentsImported": 0,
"invalidSegments": 1,
"invalidSymbolErrors": 0,
"importErrorMsg": "",
"lastAccessTime": "",
"ErrorMsg": "some error in import process"
} |
Response parsing
While parsing the response from the API endpoint we pay attention to 3 fieldsÂ
...
The following table shows how we map those three fields values to our internal TM status
What's happening with the TM in t5memory | status | tmxImportStatus | importTime | How translate5 considers this TM |
---|
Not found | not found | N/A | N/A | Error |
Available | available | N/A | N/A | Available |
Additional file import not finished | open | available | not finished | Import |
Primary file import not finished | open | import | N/A | Import |
Import finished successfully | open | available | finished | Available |
Import finished with error | open | error | N/A | Error |
Import failed | open | failed | N/A | Error |
In case status or tmxImportStatus contains something that is not mentioned in table above we consider TM status to be Unknown
...