Date: Fri, 29 Mar 2024 00:01:00 +0000 (UTC) Message-ID: <974413146.92.1711670460268@node2041-mqi-confluence.web.inetsolutions.cloud> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_91_963244455.1711670460267" ------=_Part_91_963244455.1711670460267 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
translate5 can be used in "editor only mode". That means that al= l project management stuff is done in a separate application. The tasks in = translate5 are getting prepared via API= a>.
Your users are using then only the editor component of translate5.
The following steps are needed to embed translate5 in your application:<= /p>
In the header of translate5 there are buttons to interact with translate= 5. These are:
As alternative translate5 provides there fore a simple JavaScript class = to interact with translate5:
Editor.ut= il.TaskActions
Closing a task means, that the user wants to stop working on this task a= nd 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.
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 ac= cess 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.
The above provided callback method looks like:
callback =3D function(task, app, strings){ CODE }
task: evaluates to the currently mentioned task record<=
br>app: evaluates to Editor.app
strings: evaluates to a list of commonly used, already translated strings fo=
r messages related to the performed tasks
Depending on what should happen in the callback, a destruction of the lo=
aded app may be necessary.
So if the callback contains a
window.location.href =3D "NEW LOCATION"
this may not work. Therefore a Editor.app.destroy(); must be prepended:<= /p>
Editor.app.destroy();
window.location.href =3D "NEW LOCATION" =
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.
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 impleme= nted there to the Project Managament tool.