Page tree

Versions Compared

Key

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

...

  1. Your application must be able to talk with translate5 via API to prepare users, tasks and task associations
    1. Create the users that should be able to work in translate5 via API
    2. Import the tasks into translate5 via API
    3. Associate users to tasks via API
    4. Provide a Link to the user, authenticated via API
  2. The translate5 instance must be configured to be in editor only mode
    1. Change ViewPort by config:
      Set the Zf_configuration value with the name value runtimeOptions.editor.editorViewPort to Editor.view.ViewPortSingle
    2. remove not needed ACLs
  3. Create your own skin

Implement interaction buttons in the custom header

In the header of translate5 there are should be buttons to interact with translate5. These are typically:

  • close a the task and go back to the project management tool
  • finish a task and go back
  • logout
  • and optionally finish the task
  • close the task and close the window (works only if translate5 was opened via Javascript window.open from your tool!)
  • to show a dialog where the user can decide if the task should be closed or leaved open use this config: runtimeOptions.editor.toolbar.askFinishOnClose to 1
    • this config is important in editor only mode because this is the way how a user can finish his job

As alternative translate5 provides there fore a translate5 provides there fore some simple JavaScript class to interact with translate5.Therefore exists the class:

Code Block
languagejs
Editor.util.TaskActions

...

task: evaluates to the currently mentioned task record
app: evaluates to Editor.app
strings: evaluates to a list of commonly used, already translated strings for messages related to the performed tasks

Note

Depending on what should happen in the callback, a destruction of the loaded app may be necessary.
So if the callback contains a

window.location.href = "NEW LOCATION" 

this may not work. Therefore a Editor.app.destroy(); must be prepended:


Editor.app.destroy();
window.location.href = "NEW LOCATION" 


Check if current task is exportable

Just call

Editor.util.TaskActions.isTaskExportable()

from your JS code to check if the currently opened task can be exported. Currently it is only checked if there is still a segment save running.

Logout from translate5

Since translate5 is used embedded, logout should be done the application where translate5 is embedded via API.

...