...
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
| URL | Methods | Parameters | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
/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]/search | GET / POST | query (string)the string to be searched in the underlying service
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]/ | downloadGET | - | Returns the uploaded TM file - if any. | /editor/languageresourceinstance/[ID]/import | POST | IMPORTANT: The request must be encoded using the multipart/form-data format for file-uploads to work tmUploadTM file uploaded to be uploaded
| Imports the given TM file into the chosen Language Resource instance | |||||
| /editor/languageresourceinstance/[ID]/tasks | GET / POST | GET
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 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 | ||||||
|---|---|---|---|---|---|---|---|---|---|
| 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 | integer | 3 | Number of segments for which matches are preloaded (cached) in the front-end. | ||||||
| runtimeOptions.LanguageResources.moses.server | json array | [ ] | Moses MT related: List of available Moses Server, example: ["http://www.translate5.net:8124/RPC2"] | ||||||
| runtimeOptions.LanguageResources.moses.matchrate | integer, 0 - 100 | 70 | 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 | ||||
|---|---|---|---|---|
| ||||
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 | ||||
|---|---|---|---|---|
| ||||
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