Page tree

There is an API call for checking the status of the particular translation memory t5memory - translate5 TM service - REST API#GetthestatusofTM

Response from the endpoint looks next:

Requested translation memory does not exist
{
    "status": "not found"
}


Requested translation memory exists but is not loaded into memory
{
    "status": "available"
}


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": ""
}


Translation memory exists and loaded into memory
{
    "status": "open",
    "tmxImportStatus": "import",
    "importProgress": 0,
    "importTime": "not finished",
    "segmentsImported": -1,
    "invalidSegments": -1,
    "invalidSymbolErrors": -1,
    "importErrorMsg": "",
    "lastAccessTime": ""
}


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 

  - status
- tmxImportStatus
- importTime

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

reorganizeStatus

How translate5 considers this TM

Not found
not found
N/AN/AN/AError
Available
available
N/AN/AN/AAvailable
Just openedopenN/AN/AN/AAvailable
Additional file import not finished
openavailablenot finishedN/AImport
Primary file import not finished
openimportN/AN/A

Import

Waiting to be loaded

waiting for loadingN/AN/AN/A

Waiting for load

Loading

loadingN/AN/AN/A

Loading

Failed to load

failed to openN/AN/AN/A

Failed to load

Import finished successfully
openavailablefinishedN/AAvailable
Import finished with error
openerrorN/AN/AError
Import failed
openfailedN/AN/AError

Reorganize in progress

openN/AN/A

reorganize

Reorganize in progress

Reorganize failed

openN/AN/A

reorganize failed

Reorganize failed

Reorganize finished

openN/AN/A

available

Available


In case status or tmxImportStatus contains something that is not mentioned in table above we consider TM status to be Unknown



  • No labels