Page tree

Versions Compared

Key

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

...

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.

...