Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titleTranslation 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
languagejs
titleTranslation 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
languagejs
titleTranslation 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/AN/AError
Available
available
N/AN/AAvailable
Additional file import not finished
openavailablenot finishedImport
Primary file import not finished
openimportN/AImport
Import finished successfully
openavailablefinishedAvailable
Import finished with error
openerrorN/AError
Import failed
openfailedN/AError


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

...