Page tree

Versions Compared

Key

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

...

{

"data":{

          "collectionId": "the id of the term collection where those terms from the tbx file are going to"1, 

          "customerId":1000,

          "customerIdmergeTerms":"customer to that this term collection is associated"true,

          "tbxUpload": ,

          "mergeTermsdeleteTermsLastTouchedOlderThan": "see details for the mergeTerms behaviour below2018-05-01",

          "tbxUploaddeleteTermsOlderThanCurrentImport": "tbx file/files uploaded as multipart/form-data"true,

          "deleteProposalsLastTouchedOlderThan": 2018-05-01",

          "deleteProposalsOlderThanCurrentImport" : true

          }
}

Details for the mergeTerms parameterresource parameters:

collectionId

The id of the term collection where those terms from the tbx file are going to

customerId

Customer to that this term collection is associated

mergeTerms

  • A merging based on the TermEntry-ID is always done, independent if the mergeTerms paramenter is true or false.
    • If the the termEntry-ID in the TBX matches a termEntry-ID in the database, all terms in this termEntry in the TBX are saved to the same termEntry in the database.
    • If the termEntry-ID matches, but the term-ID does not match, yet the term is the same, the term is still merged, even if mergeTerms is false
  • If the  parameter mergeTerms is true, translate5 will search all existing terms to see if the same term already exists in the TermCollection in the same language.
    • If so, the first term that is found is updated by the values in the TBX file. The term-ID and termEntry-ID remain the same as they already existed in translate5.
      • All other terms of this termEntry in the TBX file will be imported/merged to the same termEntry of the TermCollection, that just has been found through the matching 
      • This means, if 2 (or more) terms that belong to the same termEntry-ID in the TBX file can be merged with a term in the database, but in the database those terms do NOT belong to the same termEntry-ID, only the first one will be merged with the one it matches and the second one (or more) will be put into the same termEntry as the first one.
    • If no term of a termEntry can be matched with an existing term in the termCollection, a new termEntry is added with the termEntry ID of the TBX in the TermCollection and all terms of the termEntry of the TBX are added to this termEntry in the TermCollection
    • Summarized this means, that the checks should be done in the following order, in case the termEntry-ID does not exist in the termCollection and mergeTerms is true
      • For each term of a termEntry of the TBX file check, if the term exists in the termCollection within the same language.
        • If yes, merge it 
          • Also put all other terms of the same termEntry of the TBX (independent of their language) file into this termEntry in the termCollection
          • For all other terms in the same termEntry you therefore can stop checking, if they match with something (abort the loop)
        • If the term does not match, check the next
        • if no term of the termEntry of the TBX file can be matched, create a new termEntry with the termEntry-ID of the TBX and add all terms from the TBX to that termEntry in the termCollection with the term-IDs of the TBX.
  • If the parameter mergeTerms is false, a new termEntry is added to the termCollection with the term ID of the TBX file and all terms of this termEntry of the TBX file are added to this new termEntry in the termCollection with the term IDs of the TBX file (same thing as if  no term from this termEntry in the TBX can be matched in the termCollection).


tbxUpload

tbx file/files uploaded as multipart/form-data

deleteTermsLastTouchedOlderThan (date format Y-m-d)

Deletes all terms in all listed termCollections, that have a updated date older than the date configured for "deleteTermsLastTouchedOlderThan". Every term in a termCollection has a creation date, a modification date and an updated dated. The creation date and the modification date are taken from the dates as they appear in the TBX file.
The updated date is not shown in the GUI and is changed every time a user changes the term through touching it in the GUI or through an import. 

deleteTermsOlderThanCurrentImport (boolean)

Deletes all terms in all listed termCollections, that have an "updated date" older than the start of the current import. To learn, what the "updated date" is, please read above possible values: true or false.

deleteProposalsLastTouchedOlderThan (date format Y-m-d)

Delete all proposals in a listed termCollections, that have a creation date older than this configs value.

deleteProposalsOlderThanCurrentImport (boolean)

Delete all proposals in a listed termCollections, that have a creation date older than the start of the current import. 


Important: with the import call, one or multiple tbx files must be provided.


...