-
Notifications
You must be signed in to change notification settings - Fork 2
ts.Translator
The Translator manages all the ts.Translator.TargetTranslations in the application.
##Interface
String compileTranslation(String text)
Compiles all the special formatting code (used for display to the user) back into the proper translation format e.g. USX, USFM.
TargetTranslation createTargetTranslation(TargetLanguage targetLanguage, String projectId)
Creates a new target translation on the disk
void deleteTargetTranslation(String targetTranslationId)
Deletes a target translation from the disk
void export(TargetTranslation targetTranslation, File outputFile)
Exports a target translation as a tStudio Archive to the output file specified.
Note: The export archive will only include the target translation. No source translations will be included in the export.
TargetTranslation getTargetTranslation(String targetTranslationId)
Returns a target translation if it exists
TargetTranslation getTargetTranslation(String targetLanguageId, String projectId)
Returns a target translation if it exists
TargetTranslation[] getTargetTranslations()
Returns an array of all target translations on the disk
##Translator Root Directory Structure The translator will store all target translations (see ts.Translator.TargetTranslation) in a single directory. For example:
uw-obs-de/
uw-gen-fr/
...
##Exporting (Human Readable) When exporting target translations there are a few guidelines to follow:
- Bible projects are exported as a single
USFM
file. Example at https://github.com/unfoldingWord/ulb-en/blob/master/65-3JN.usfm. - Open Bible Stories is exported as a zipball of
DokuWiki
formated files (one file per chapter). Although, this needs to move to MarkDown at some point.
USFM reference can be downloaded as a PDF. General information and additional file formats can be found at http://paratext.org/about/usfm.
##Exporting (Backups) For exporting a target translation into a machine readable format see https://github.com/unfoldingWord-dev/ts-requirements/wiki/tStudio-Archive
##Importing See Importing a Target Translation.