close

Filter

loading table of contents...

Blueprint Developer Manual / Version 2110

Table Of Contents
5.5.3.5.1 Translation Workflow Configuration

This section describes general configuration options for translation workflows.

Note

Note

The necessary Spring configurations for new custom workflows in Studio are documented within Section 7.22, “Customizing Workflow UI” in Studio Developer Manual.

Spring configuration for custom translation workflows

A new custom translation workflow requires a strategy for extracting derived contents from your customTranslation.xml workflow definition. Therefore, you need to introduce a bean definition from the class com.coremedia.translate.workflow.DefaultTranslationWorkflowDerivedContentsStrategy and adapt it to your custom workflow (see example below).

Note

Note

There is already a default bean with the "id" defaultTranslationWorkflowDerivedContentsStrategy, that is defined for the processDefinitionName "Translation".

      <bean id="customTranslationWorkflowDerivedContentsStrategy"
 class="com.coremedia.translate.workflow.DefaultTranslationWorkflowDerivedContentsStrategy">
    <description>
      A strategy for extracting derived contents from
      the custom translation.xml workflow definition.
    </description>
    <property name="processDefinitionName" value="customTranslation"/>
    <property name="derivedContentsVariable" value="derivedContents"/>
    <property name="masterContentObjectsVariable" value="masterContentObjects"/>
</bean>

    

Example 5.37. Example for a customTranslationWorkflowDerivedContentsStrategy


The bean needs to be customized in the Workflow Server web application, for example with a Blueprint extension module with Maven property coremedia.project.extension.for set to workflow-server.

Translation Workflow Properties
studio.translation.showPullTranslationStartWindow
Description

Use this property to show the workflow start dialog in Studio also for translations into the preferred site (pull translations). The pull translation always uses the first available translation workflow. If you have multiple workflow definitions, it might be necessary to select the appropriate workflow definition from the available workflows.

Possible values:

  • TRUE: Shows the workflow start dialog in Studio also for translations into the preferred site (pull translations).

  • FALSE: The workflow is started automatically. No workflow start dialog is shown.

Default Value FALSE
studio.workflow.translation.extendedWorkflow
Description

Use this property to define the amount of dependent content, that will be shown in a translation workflow window.

Default Value 100

Table 5.23. Translation Workflow Properties


XLIFF Configuration
XLIFF Configuration Properties

The handling of empty translation units during XLIFF import can be configured using the following properties:

translate.item.include-unchanged-properties
Description

Configure whether properties that have not changed since last translation are also included in items for translation.

Possible values are: true, false.

Default Value true
translate.item.transform.failure.mode
Description

Configure the strictness of the XLIFF Export pre-processing regarding missing property transformers. If mode is fail, the XLIFF export will fail if a property is marked as translatable where no corresponding TranslatePropertyTransformer has been found for.

Possible values are: fail, warn, none.

Default Value fail
translate.xliff.export.handler.failure.mode
Description

Configure the strictness of the XLIFF Export regarding missing property export handlers. If mode is fail, the XLIFF export will fail if a property is marked as translatable where no corresponding XliffPropertyExportHandler has been found for.

Possible values are: fail, warn, none.

Default Value fail
translate.xliff.import.emptyTransUnitMode
Description

Configure handling of empty trans-unit targets for XLIFF import.

Possible values:

  • IGNORE: Empty targets are allowed. On import the empty translation unit will replace a possibly non-empty target and thus delete its contents.

  • FORBIDDEN: No empty targets are allowed.

  • IGNORE_WHITESPACE: Empty targets are only allowed where the matching source is empty or contains only whitespace characters

Default Value IGNORE_WHITESPACE
translate.xliff.import.ignorableWhitespaceRegex
Description

Configure the regular expression that determines which characters are counted as ignorable whitespace. This configuration is only used when translate.xliff.import.emptyTransUnitMode is set toIGNORE_WHITESPACE.

Default Value [\\s\\p{Z}]*
translate.xliff.import.xliffValidationMode
Description

Configure XLIFF validation behavior.

Possible values:

  • FAIL_ON_WARNING: XLIFF validation will fail if any warnings or above occurred.

  • FAIL_ON_ERROR: XLIFF validation will fail if any errors or above occurred.

  • FAIL_ON_FATAL_ERROR: XLIFF validation will fail if any fatal errors occurred.

  • DISABLED: XLIFF validation is disabled.

Default Value FAIL_ON_WARNING
translate.xliff.export.excludeContentName
Description

Configure the flag that determines, whether the name of content in a translation workflow will be excluded in an XLIFF-Export.

Caution

Caution

Including content names into translation may harm your system. Thus, if you set this property to false, you should be aware that for example some settings documents referenced by name or documents like _folderProperties must not get their names translated.

Default Value true

Table 5.24. XLIFF Properties


XLIFF Configuration Beans

In addition to the properties you can customize the following XLIFF beans in your application context:

translate.xliff.translatableExpressions

This is a list bean with string entries. Each entry specifies an expression to identify content type properties which should be marked as translatable and thus will be part of the XLIFF Export. The same property types are supported as for the extensions:translatable content type model setting (see Chapter 4, Developing a Content Type Model in Content Server Manual for details).

While it is recommended to use extensions:translatable in favor of these expressions, the translatable-expressions provide support for nested Struct property value access, which is not possible within the content type model. Thus, the intended use case is to specify selected elements of Struct properties which should be part of the XLIFF file while the Struct property itself is not translatable.

This bean is available through Maven artifact com.coremedia.cms:cap-translate-item, which is by default a transitive dependency of Blueprint Studio and Workflow Server.

Example:
<customize:append
    id="blueprint.translate.xliff.translatableExpressions"
    bean="translate.xliff.translatableExpressions">
  <list>
    <value>CMLinkable.localSettings.callToActionCustomText</value>
    <value>CMLinkable.localSettings['entry.with.dots'].childEntry</value>
  </list>
</customize:append>

Example 5.38. translatableExpressions Configuration Example


Expression Syntax:

The first two elements of the expression define the content type and the property which should be known as (partially) translatable. Following elements define sub-elements within the property. This is currently only supported for Structs. The content type must be the content type which also defines the property.

The expressions support separate properties either by periods or by strings in square brackets. Thus, CMLinkable.localSettings is the same as CMLinkable['localSettings'].

Limitations:

Using this mechanism to mark properties inside Structs as being translatable works for String and Markup properties. For the latter, only the grammar coremedia-richtext-1.0 is fully supported.

Alternatively, you can add the bean RichtextInStructTranslatablePredicate to your application context to mark all richtext markup properties inside Structs as being translatable.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.