Page tree

Versions Compared

Key

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

...

All terminology is imported with respect to a customer specific config are associated to that customer, which should be copied from TermImport/config/instruction.ini and uploaded to the remote SFTP directory's Import-folder, which is then accessed by translate5.

If there is no instruction.ini in the remote directory's Import-folder - the import won't be started.

Folder structure

Each remote SFTP folder may 4 folders:directory may have from 1 to 2 of 4 possible folders (sub-directories):

  • Import - This is single folder, initially expected to exist inside SFTP directory. It, in it's turn, is expected to have:
    • *.tbx files to be imported
    • instruction.ini that contains the settings
    Import
    • In this folder there should be one instruction.ini file, that contains the setting to control the import behaviour Others files are expected to be of *.tbx-files
  • Error
    • If an error happens on import, the Import-dir is renamed to Error-dirat least one tbx-file was failed to import - this folder will be automatically created and failed tbx-file will be moved here
  • Import-running
    • we move the project folder here during importIf we initially had Import folder having valid instruction.ini file then this folder is renamed from Import to Import-running, so this is  indicating that import process is started
  •  Import-success
    • In case the transfer of the data is successful, the imported tbx-files beneath the import folder is moved to the Import-success folderOnce at least one tbx-file has been successfully imported - this folder is auto-created and this tbx-file is moved here. Still the import itself may running in translate5.

...

Code Block
; If this is true, terms will be merged as described at https://confluence.translate5.net/display/TAD/Term+Collection.
; Otherwise all terms will be added to the termCollection, if the ID in the TBX does NOT exist already in the DB
; when the ID of the termEntry of the TBX does already exist in the DB, the terms of this termEntry will always be merged
; Possible values: true or false.
mergeTerms=true
 
; Deletes all terms in all listed termCollections, that have a modification date older than the listed one.
; Since every term that exists in a TBX gets a new updated date on TBX-import, even if it is not changed: Simply set this date to yesterday to delete all terms, that are not part of the current import
; The updated date is a date internal to translate5 and different from the modified date of the term, that is shown in the interface
deleteTermsLastTouchedOlderThan=2018-05-01
 
; Deletes all terms in all listed termCollections, that have a modification date older than the start of the current import.
; Possible values: true or false
deleteTermsOlderThanCurrentImport=true
 
; Delete all proposals in a listed termCollections, that have a creation date older than this configs value.
deleteProposalsLastTouchedOlderThan=2018-05-01
 
; Delete all proposals in a listed termCollections, that have a creation date older than the start of the current import.
; Possible values: true or false
deleteProposalsOlderThanCurrentImport=false
 
; Mappings between tbx-file names, expected to exist in remote sftp directory and local TermCollection names
; where those files shoud be imported into. If some TermCollection does not exist so far - it will be created
; if there the customer exists having the specified number (see comments for further [CollectionMapping] section)

[FileMapping]
Term1.tbx=exampletermCollection
Term2.tbx=exampletermCollection2
;Term3.tbx=exampletermCollection2

; Mappings between TermCollection names and customer numbers.
; If there is no customer having such number in the database
; then tbx file won't be imported into such a TermCollection
[CollectionMapping]
exampletermCollection3=10001
exampletermCollection2=123456789
exampletermCollection=123456789

API point for manual start

Users with role api have right to manually start processing.

Endpoint: editor/termimport/force-check

Possible GET params:

Param nameValuesDescription

none 

-

If no params provided - all clients and default configs will be processed

defaultOnly

true|false

Only default config will be processed

clientIds

integer[]

Comma separated client ids. Only provided client ids will be processed (if some present of course)

Configuration

Config nameValuesDefaultDescription

runtimeOptions.plugins.TermImport.filesystemConfig

map[]

Filesystem config for terminology import from remote SFTP directory

...