translationCore (tC) can be extended by tools using the tC Tool library.
For a description of how these and additional props are made available within tools see tC Tool Props.
Below is a description of some properties inject into tools.
writeProjectData(filePath: string, data: string): Promise
Writes data to a project's .apps
folder given a relative file path.
readProjectData(filePath: string): Promise<string>
Reads data from a project's .apps
folder given a relative file path.
readProjectDataSync(filePath: string): string
A synchronous form of readProjectData
.
projectDataPathExists(filePath: string): Promise<boolean>
Check if a path exists in a project's .apps
folder given a relative file path.
projectDataPathExistsSync(filePath: string): boolean
A synchronous form of projectDataPathExists
.
deleteProjectFile(filePath: string): Promise
Deletes a file from a project's .apps
folder given a relative file path.
showDialog(message: string, confirmText: string, cancelText: string): Promise
Displays a modal dialog with a message. The promise will resolve when the dialog is closed.
showLoading(message: string)
Displays an asynchronous loading dialog.
closeLoading()
Closes the asynchronous loading dialog.
Provides information regarding the currently selected context.
The target language text of the currently selected verse.
The source language verse objects of the currently selected verse.
The target language chapter objects of the currently selected chapter.
The source language chapter objects of the currently selected chapter.
The target language book
The source language book
The language selected for application localization.