$customHeader
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 29 Next »

When you send a file to translate, the Beebox will translate according to the configured workflow and automation. By default, translation will be into all project target languages.

Next to the source file you can optionally send JSON formatted "instructions" to the Beebox:

  • Specify the target languages of translation. For example: Translate file into French only ("fr").
  • 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.

Read: When to use instructions?.

URL

(PUT) /api/files/file?token=&locale=&filename={source file name}.beebox

Add JSON formatted instructions to the request body. Note that the instructions file is named like the source file name + .beebox at the end.

The API method, parameters and result is identical to that for sending source files.

 

Instruction file name and location

The instructions are stored are JSON formatted. Let us suppose the source file is folder\document-200.xml. In that case the instructions file must be 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, send a JSON like below with name "document-200.xml.beebox":

{ "locales": ["es-ES"] }

Use the standard API call to send/api/files/file?token=...&filename=document-200.xml.beebox&locale=en

 

Instructions format

The JSON may contain one or more of the following options:

{
	"deadline": "2015-11-08T23:00:00.0000000Z",
	"locales": "fr-BE",
	"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
}

 

The options are:

InstructionSample JSON
"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.

"deadline": "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" ]

Optional field. If not specified, the system will not align 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 unapproval 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:

  • "id": An alphanumeric id for the meta data element
  • "value": The meta data content
  • "title": An option user friendly title. In Beebox meta information is labelled with the reference or the title, if the latter is specified. It is recommended to always set a title.
  • "type": A mandatory value:
    • "segment": Segment meta data is stored with each source segment of the file. This data can be viewed inside Beebox and is exported to XLIFF or to Wordbee Translator custom fields.
    • "file": Information referring to the entire file. It is exported to XLIFF (attribute in <file> node) or Wordbee Translator (as comment attached to the file).

Meta information in translation jobs:

Wordbee Translator: Meta data can be forwarded to Wordbee Translator if you use this system for translation. In that case, you need to opt for segment level data and assign specific IDs: "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: Meta information is included with XLIFF jobs as described here.

Additional reading:

Please read this page more information and alternative approaches of adding meta data.

"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.

 

Common use cases

Read more about when to use instructions

Please read the use cases. Instructions files are an important tool!

API call sequence

Always send files in this order to the Beebox:

  1. The instructions file, if any
  2. The translated file, if any 
  3. The source file

It is important to send the source file at the end or otherwise an automatic Beebox operation might detect and process the source file before you start sending instructions and translations.

CONTENT ENCODING AND CODE PAGES

Serialize JSON to UTF-8 when adding to the HTTP request body.

 

ADDITIONAL INFORMATION

More information is found at:

 

Beebox also supports folder level instruction files:

 

 

 

 

  • No labels