Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

translate5 can be used in "editor only mode". That means that all project management stuff is done in a separate application. The tasks in translate5 are getting prepared via API.

Your users are using then only the editor component of translate5.

The following steps are needed to embed translate5 in your application:

  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 task and go back to the project management tool
  • finish a task and go back
  • logout

translate5 provides there fore some simple JavaScript class to interact with translate5.

Therefore exists the class:

Editor.util.TaskActions

Close Task - Editor.util.TaskActions.close()

Closing a task means, that the user wants to stop working on this task and wants to go back to the PM tool.

To close a task just call the JavaScript method

Editor.util.TaskActions.close(callback)

A callback function can be provided as parameter. The callback is called if the task was closed in translate5. For the callback see below.

Finish Task - Editor.util.TaskActions.finish()

Finishing a task means, that the user has finished his work on this task, and he wants to leave this task so that next users in the workflow can access the task.

To finish a task just call the JavaScript method

Editor.util.TaskActions.finish(callback)

A callback function can be provided as parameter. The callback is called if the task was finished in translate5. For the callback see below.

Callback Method

The above provided callback method looks like:

callback = function(task, app, strings){ CODE }

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

Logout from translate5

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

Nevermind the JavaScript method

Editor.app.logout()

can be called. It just logs out the user from translate5 and redirect to the URL /

Since this page can be skinned and overwritten a redirect can be implemented there to the Project Managament tool.

  • No labels