- Created by Aaron Sakievich (Unlicensed) , last modified on Mar 14, 2018
You are viewing an old version of this content. View the current version.
Compare with Current View Version History
« Previous Version 6 Next »
Downloading Tasks
Our API calls make it easy for LSPs to export the tasks assigned to them in our TMS and translate them in their own CAT tools. Use the following API calls to view and export your tasks.
- The GET /task API call will allow you to view the list of tasks assigned to you in the TMS
- Use GET /task/{id}/content to download the XLIFF for a given task
Keep in mind the following as you are exporting tasks:
- Via the UI, a user is not able to download XLIFF for a task that isn't in their Task List. Therefore, the API calls will likewise need to authenticate using the credentials of the user to whom the task is assigned in Lingotek.
- You can only download XLIFF for 'Active' tasks (i.e. tasks that have not been 'marked complete' within Lingotek).
Editing XLIFF files
While you are editing the XLIFF files you should be aware of the following so that you can upload the files back into the TMS:
- We follow XLIFF 1.2 specifications.
- On export, we add a lgtk:phaseUUID attribute in the header of the XLIFF. This is what we match on when you re-import the XLIFF. If this attribute is missing, we are not able to successfully re-import the XLIFF file.
- Be sure not to modify the number of trans-units, their order or identifier.
- The XLIFF files you download from Lingotek's TMS will only ever correspond to one target language. As such it is important that if you have an xml:lang for a segment it should match the target language in the header.
- Adding style to the corrections is not advisable. The corrections should just be made, without adding style to them. For example, if a translation were to change from "dog" to "puppy", "puppy" should simply replace "dog" and not be something like "
dogpuppy." - Do not merge or split segments withing your tool. If on re-import we detect that one or more segments were merged or split, the re-import will fail.
Attributes and metadata
- Lingotek doesn't import any meta from the uploaded XLIFF. All we do is extract the translations form the trans-units. We ignore everything else.
- Modified dates for each segment translation will be set in our system based on the upload time.
- All target attributes are optional, however, below is more information about target attributes if you include them.
- state: Different behavior can happen on XLIFF re-import depending on the state attribute.
- xml:lang: If present, this should contain the locale code for the target locale, which is defined in the <file> tag's "target-language" attribute.
- state-qualifier: This helps to clarify the origin of the translation.
- phase-name: This provides clarification as to which phase this target is in. The export provides a number, which has a description in the <phase group> section in the <header>. For example, phase-name="1" might correspond to the following in the header: <phase phase-name="1" process-name="Translate"/>
- mrk: <mrk> is optional, but if present, there must only be one per target, and it must surround the entire segment (e.g. <target...><mrk mtype="seg">This is my translation</mrk></target>). If there is more than one <mrk> segment in a <target>, the import fails. If there is one that does not completely encapsulate the segment, only the text within the <mrk> is imported. (e.g. <target...>This <mrk mtype="seg">text</mrk> is translated</target> will only import "text")
- mid: Optional. Used as an identifier for a specific <mrk> within the target.
- mtype: REQUIRED. This is required by the XLIFF 1.2 specification. It describes the type of mrk. The export uses "seg" as the mtype. If mtype is not present, the import will fail.
Uploading A Completed Task
Upon completing a Task outside of Lingotek's TMS, it is a simple process to push them back into the TMS. The following API calls will upload content into the TMS.
- To send the XLIFF back use PATCH /task/{id}/content.
Keep the following in mind as you reimport your completed task.
- Uploading completed XLIFF files to the TMS has the same effect as if you had worked within Lingotek's Workbench to perform the translations/edits.
- We only re-import the translations and not any metadata from the XLIFF that may have been added to the file.
- Authorship is attributed to the user re-importing the tasks through the API.
Existing translations in the phase are overwritten by the ones in the XLIFF file.
A revision history for each segment is available on our Workbench.
- If there is no translation in the imported XLIFF the import process will skip over that segment. Leave it untranslated.
- If there isn't text for a XLIFF file, then translations are not overwritten.
- When you re-import a zip folder of XLIFF files, we ignore the folder structure entirely. We simply use the lgtk:phaseUUID attribute in each of the XLIFF files to programmatically match each XLIFF file with the applicable tasks in our Task List.
- Via the UI, a user is not able to re-import XLIFF for a task that isn't in their Task List (i.e. the task has to be assigned to you). Therefore, the API calls will likewise need to authenticate using the credentials of the user to whom the task is assigned in Lingotek.
- You can only re-import XLIFF for 'Active' tasks (i.e. tasks that have not been 'marked complete' within Lingotek).
- We accept both zip folders containing XLIFF files or single XLIFF files.
- To send the XLIFF back use PATCH /task/{id}/content. Be sure that the structure of the XLIFF has not changed.
- If the document is completely correct and does not need any changes, you should still upload it back to the TMS and the system will note that the document was completed and did not need any edits.
- No labels