How to create a filter template in the XTM UI and apply it to a project

Introduction

Before reading this article, we recommend that you read basic principles of configuration levels. To do so, read this article: How a source file can be processed and what are configuration levels.

Before reading this article, we recommend that you read basic principles of configuration levels. To do so, read this article: How a source file can be processed and what are configuration levels.

Filter templates can be used to specify a configuration for identifying translatable text in a document. Filter templates can be used for:

  • MS Office Excel files, including multilingual Excel files (XLSX, XLS, XML),

  • MS Office Word files (DOCX, DOC, RTF),

  • MS Office PowerPoint files (PPTX),

  • Custom variables, which can be configured using regular expressions.

Depending on the selected criteria, users can choose to localize:

Depending on the selected criteria, users can choose to localize:

sheet names

hyperlinks

formulas

comments

text in hidden sheets

text in hidden cells and rows

conditional formatting

numbers

text in specified columns

text in a specified color (multiple colors can be selected)

text with applied style (e.g. bold)

 


Guidelines

Creating a filter template in XTM Cloud UI

  1. As a user with the Administrator role, go to Configuration → Settings → Filter templates → (you can specify if a filter is to be applied at Project, Customer or Global level) → Add template.

You can also immediately create a new configuration (Add configuration) and add it to the existing filter template, in the subsequent step.

2024-05-07 12_08_02-Window.png
  1. The New template popup will open. There are four configuration types for filter templates:

  • Name your template → enter a filter template name:

  • Define the configuration type → it can be Filter, Custom Variables, Font mapping, or Segmentation:

  • Create your configuration → choose the file type for which you want to create a filter template. Select one of the following options from the dropdown:

  • MS Office Word;

  • MS Office Excel;

  • Multilingual MS Office Excel;

  • MS Office PowerPoint;

  • MS Office PowerPoint 97-2003;

  • XML.

  1. Select the configuration applicable to your file extension in the Translate and Other tabs. Then, click Save and add configuration.

  1. A newly-created filter will be displayed in its own, separate section in which you can further edit it if needed.

Applying a filter template to a project

To apply a new configuration for a specific project, proceed as follows.

Creating a new project

  1. During project creation, choose the required Filter template from the dropdown in the Translation section:

Updating an existing project

  1. If the project has already been created, you can choose a filter template in the project General info section from the same dropdown. Remember to Save the change at the bottom of the page.

  1. Reanalyze the project.

Analysis is performed automatically if you are creating a new project but you need to perform manual reanalysis for an existing project. You can do it from Projects Project list, by clicking on the context menu for a specific project and selecting Actions and then Reanalyze project.

If you do not want to reanalyze the entire project, you can always upload a new file to it via the Files tab. This file can be added to existing ones or replace one of them. In this case, only newly uploaded files are analyzed with the new configuration rules. if you upload a file with the same name and extension as one of the source files, the content of the existing file will be overwritten during analysis.


Additional options: segmentation & font mapping

Aside from standard options for specifying a configuration to identify translatable text in a document, the embedded XTM UI Filter Builder also offers some additional text-related possibilities to use.

Segmentation

You can configure segmentation rules in a new template at:

  • Project level.

  • Customer level.

IMPORTANT!

It is not possible to add a custom template at Global level. You can only add segmentation configurations in the existing global filter template.

In the Create your configuration section, you first need to specify type of the file (File type), as well as source language (+Add language), for which you would like to configure the segmentation rules. Once you have selected a particular language, a list with corresponding segmentation rules (regular expressions) will be displayed.

In the below screenshot, four segmentation rules, that handle four English honorifics with full stop, are marked:

  • (^|\p{Zs}|\p{Ps}|\p{Po}|(<[^>]*>))Mr\. → Mr.

  • (^|\p{Zs}|\p{Ps}|\p{Po}|(<[^>]*>))Mrs\. → Mrs.

  • (^|\p{Zs}|\p{Ps}|\p{Po}|(<[^>]*>))Ms\. → Ms.

  • (^|\p{Zs}|\p{Ps}|\p{Po}|(<[^>]*>))Dr\. → Dr.

The expressions in question are set up to break a sentence into multiple segments in XTM Workbench (Break sentenceYes) after the occurrence of a particular abbreviation in the text.

The segmentation in XTM Workbench, after applying such newly created configuration to a project, looks as shown below. As you can see, sentences are broken into multiple segments after each and every occurrence of a particular abbreviation.

Font mapping

You can configure font mapping rules in a new template at:

  • Project level.

  • Customer level.

IMPORTANT!

It is not possible to add a custom template at Global level. You can only add font mapping configurations in the existing global filter template.

Font mapping generally allows you to define which font needs to be used in the target file. You can condition the application of a particular font in the target file basing on the presence of another certain font in the corresponding source file, specific target language, or specific source font category. Font mapping in the XTM UI is based on configuration files for MS Word format.

The below screenshot demonstrates three exemplary font mapping configuration rules that are created within the framework of one filter template:

  • If the source file’s text is in Calibri → the target file will be in Times New Roman Bold.

  • If the target language of the source file’s text is Polish → the target file will be in Arial Black.

  • If the source language’s writing system belongs to the so called complex scripts (in which the shape or positioning of a grapheme depends on its relation to other graphemes, for instance, Arabic alphabet), and the target language is Japanese → the target file will be in Comic Sans MS.


Good to know!

The new or updated configuration is applied during analysis. If you change any configuration, full reanalysis of any project that was using this configuration is required to apply the changes to all the target languages/files.