Page tree

Versions Compared

Key

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

...

URL:

/editor/languageresourceinstance/[ID]

Available Methods:

GET / POST / PUT / DELETE

Specialities:

Non filebased langauge resource can only be added by the "admin" role. Users with the role "pm" can add filebased entries.

Special URLs

download/editor/languageresourceinstance/[ID]/
URLMethodsParametersDescription

/editor/languageresourceinstance/[ID]/query

GET

segmentId (integer)

the id of the segment to be queried

returns a list with query results, format see below
/editor/languageresourceinstance/[ID]/searchGET / POST

query (string)

the string to be searched in the underlying service


field (string - source or target)

determines which field should be searched in a TM


limit (integer)

how many results should be returned

returns a list with search results, format see below
/editor/languageresourceinstance/[ID]/GET-Returns the uploaded TM file - if any.importPOST

IMPORTANT: The request must be encoded using the multipart/form-data format for file-uploads to work

tmUpload

TM file uploaded to be uploaded

Panel
titleAdditional parameters only available for termcollection import

mergeTerms

The merging of terms into an existing term collection is controlled by this boolean parameter.

The merge process is complex and completely described here.

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.


Imports the given TM file into the chosen Language Resource instance
/editor/languageresourceinstance/[ID]/tasksGET / POST

GET


        id (integer)

        ID of the task language resource association

        taskGuid (guid)

       TaskGuid of the associated task
       

        taskName (string)

        name of the associated task
       

        state (string)

        status of the associated task
       

        lockingUser (guid)

        user who is locking of the associated task - if any
       

        taskNr (string)

        task number of the associated task
       

       languageResourceId (integer)

        associated TM ID


POST
        toReImport (array)

        an array of taskGuids. The chosen tasks segment data is reimported into the selected TM.

Gives some status information about the tasks associated to a specific Language Resource.

Triggers a reimport of the chosen tasks into the TM.

Search / Query result format

...

Config name

Values

Default

Description

Anchor
fileExtension
fileExtension
runtimeOptions.LanguageResources.fileExtension

map
Available file types by extension per engine type. The engine type is defined by source rcf5646,target rcf5646. ex: "en-ge,en-us"

runtimeOptions.LanguageResources.preloadedTranslationSegments

integer3Number of segments for which matches are preloaded (cached) in the front-end.
runtimeOptions.LanguageResources.moses.serverjson array[ ]Moses MT related: List of available Moses Server, example: ["http://www.translate5.net:8124/RPC2"]
runtimeOptions.LanguageResources.moses.matchrateinteger, 0 - 10070

Moses MT related: Moses MT penalty value, used as default matchrate since in MT no matchrate is available.


Download TMX of T5Memory language resource

Download is done in a couple of steps as process is async.

Code Block
languagebash
titlecurl
curl -Ls -o /dev/null -w %{url_effective} --location --request POST 'http://your-domain.com/editor/languageresourceinstance/{{LR_ID}}/download' --header 'Translate5AuthToken: YOUR_AUTH_TOKEN_HERE' --header 'Accept: application/json' --form 'type="tmx"'

 You will be redirected here so you need url from url_effective and get UUID from it

Code Block
languagebash
titlecurl
curl --location --request GET 'http://translate5.local/editor/queuedexport/{{UUID_FROM_STEP_ABOVE}}/download' --header 'Translate5AuthToken: YOUR_AUTH_TOKEN_HERE


You will either get payload with errorMessage "Export is not ready yet",  or you'll get TMX to download