File level instructions
When you place a file to translate into the project's input directory, Beebox will use default parameters for translation workflows. Using "instruction files" you are able to adjust workflows per each file. Instructions are JSON formatted and let you:
- Specify the target languages of translation. For example: Translate file into French only ("fr"). Without instructions, files are translated into all project languages.
- Specify a deadline of translation.
- Specify text alignment options in case you also sent the translated file version.
- Specify any meta information to include with files.
This page describes:
When to use file level instructions?
You would not create those manually each time.
Instructions are commonly employed when pushing content to Beebox using software or code. This is, for example, the case when developing CMS connectors using the API.
Instruction file name and location
Let us suppose our source file path is folder\document-200.xml. In that case the instructions file is named folder\document-200.xml.beebox . Append “.beebox” to the original file name like in the example below:
To request translation into one specific target language, save a JSON code and name if document-200.xml.beebox:
{ "locales": ["es-ES"] }
Instruction format
Instructions are JSON files saved in UTF-8 format. It may contain one or more of the following options:
Example
{ "translate": true, "deadline": "2015-11-08T23:00:00.0000000Z", "locales": ["fr-BE", "es"], "align": { "locales": ["fr-BE"] }, "metadata": [ { "id": "url", "value": "http://mine.com/page199.htm", "type": "segment" }, { "id": "title", "value": "Introduction page", "type": "segment", "title": "Top title" }, { "id": "reference", "value": "A-1024", "type": "segment", "title": "Page reference" } ], "unapproveAll": false, "disableMT": false, "diableJobs": false, "attachments": ["filePath", "filePath"] }
JSON properties
Instruction | Sample JSON |
---|---|
translate | Optional boolean. Specifies whether the file shall be translated or not. If omitted, the value is assumed "true". Generally, you would not include this property. |
deadline | Specify an ISO formatted deadline. The value may include a time zone indicator. In the example below we use "Z" to indicate the UTC time zone. "deadline": "2015-11-08T23:00:00.0000000Z" Optional field. If not specified, the source file will not be given a specific deadline for translation. |
deadlineLocal | Optional. Specify a deadline in the Beebox server's local time zone. The format must be exactly as in the example below. Do not use both "deadline" and "dealineLocal" at the same time. "deadlineLocal": "2015-06-15T13:00:00" Optional field. If not specified, the source file will not be given a specific deadline for translation. |
locales | Specifies one or more target languages for translation. Most content management system connectors send files with one specific target language, like in: "locales": [ "de-DE" ] Optional field. If not specified, the system assumes that the file requires translation into ALL the project target languages. |
align | Instructs the Beebox to look for translated files in the Beebox "out" directory. If translated files are found, these will be aligned with the source file for the purpose of pretranslation. The JSON indicates the target languages for which to look for translated files. "locales": [ "de-DE", "de-AT", "fr" ] Optional field. If not specified, the system will not align the source and translated files. This option has a common use case with content management system connectors. Imagine that a user edits translations in the CMS directly. To capture such edits and send to the translation team, you would simply send this to the Beebox: (a) the source page, (b) the edited page, (c) instructions telling the Beebox to align source/edited page. All edits of the user will be extracted by the Beebox and send to the translation team for approval or revision. |
unapproveAll | Instructs the Beebox to force unapproval of any pretranslations. There is one specific use case for setting this property: Imagine that you retrieve a translated file from the Beebox. The user looks at it and does not like it at all. In that case you can propose an option to send the original file once again to the Beebox (maybe you include the translated file too for alignment) with the property "unapprove" set to true. If you do not set the flag then the Beebox will immediately return to you the very same translated file since the source text did not change and the Beebox already has the translations in its memory. With the flag set, the Beebox will do all pretranslation as well but flag them as unapproved. This means the content goes into the regular human translation workflow once again for editing. "unapproveAll": false Optional. If not included, no unapproved is enforced. |
metadata | Permits to include any kind of meta-data with each source file: "metadata": [ { "id": "url", "value": "http://mine.com/page199.htm", "type": "file", "title": "Page URL" }, { "id": "title", "value": "Introduction page", "type": "segment" } ] The properties are:
Meta information in translation jobs: Wordbee Translator jobs Meta data are inserted as either file or segment level comments in Wordbee Translator. These are instantly visible in the Wordbee translation editor.
Note that pass through projects supports file-level metadata only. As seen above, regular Beebox projects allow you to populate Wordbee Translator custom fields in segments or jobs. For this to work, you need to include a segment or file-level metadata and follow a special convention for the "id" property: "CustomStr1", "CustomStr2", etc. These are the IDs used in Wordbee Translator for segment level data. Make sure to first configure corresponding segment level custom fields in Wordbee. XLIFF jobs Meta information is included with XLIFF jobs as described here. Additional reading: Please read this page more information and alternative approaches of adding metadata. |
disableMT | If true then machine translation is explicitly disabled for this file. Optional. If not included then MT is enabled if used in the workflow. |
disableJobs | If true then human workflows (translation, revision...) are explicitly disabled for this file. Optional. If not included then human work is enabled if used in the workflow. |
attachments | The attachment files, if existing, are attached to the Wordbee job references. This feature is available with Pass-Through projects only. It is not supported by regular Beebox projects. |
More information for developers
Please refer to the developer guide:
Copyright Wordbee - Buzzin' Outside the Box since 2008