- Overview
- Common Parameters
- Options - Input Tab
- Options - Options Tab
- Options - Patterns Tab
- Options - Output Tab

Overview

- The utility set identifier for this utility is: oku_set02
- The utility identifier is: qualitycheck

The Quality Check utility allows you to compare the source and target entries of files and detect possible issues such as missing or extra inline codes, un-translated text, missing patterns, etc. The input can be a single bilingual file, or two distinct files. The utility produces a report where for each issue is explained in details and the source and target text are shown with the problem highlighted.

Common Parameters

The common parameters are the options specified from the application calling the utility rather than in the options dialog box of the utility itself. For this utility the common parameters you need to specify are the following:

Files of the first input list - Needed
Root for the first input list - Not Needed
Files of the second input list - Needed in some cases
Root for the second input list - Not Needed
Files of the third input list - Not Needed
Root for the third input list - Not Needed
Input language - Needed
Output language - Needed
Input default encoding - Needed
Output default encoding - Needed
Location and names for output files - Not Needed

Options - Input Tab

This utility can be used with one or two input files:

One input list -- Select this option when both the source and target text are in the same input file. This is for input files that are associated with filters that supports bilingual process, such as the PO Filter, the Wordfast Filter, the Trados Text Filter, etc.

Two input lists -- Select this option when the source and target text are in two different input files. The source text must be in the files listed in the Input List 1, and the target text must be in the files listed in the Input List 2.

Use the translated entries in the second file -- Set this option when you want to use the translated entries of the second file as the target text. This option is valid only if the input file is associated with a filter that supports bilingual process, and where you do have translated text. If this option is not set the source entries of the second file are used as the target text.

When the text is taken from two input files:

The table below summarizes the different input modes, using PO files as example: The source text is marked in bolded blue, the target text in bolded green:

One input list: Set File in Input List 1:
msgid "Cannot find %s."
msgstr "Impossible de trouver %s."

msgid "Open existing project."
msgstr "Ouvre un project existant."

File in Input List 2: No needed.

Two input list: Set
Use the translated entries in the second file: Not set
File in Input List 1:
msgid "Cannot find %s."
msgstr "Impossible de trouver %s."

msgid "Open existing project."
msgstr "Ouvre un project existant."

File in Input List 2:

msgid "Cannot find %s."
msgstr "Impossible de trouver %s."

msgid "Open existing project."
msgstr "Ouvre un project existant."
Two input list: Set
Use the translated entries in the second file: Set
File in Input List 1:
msgid "Cannot find %s."
msgstr "Impossible de trouver %s."

msgid "Open existing project."
msgstr "Ouvre un project existant."

File in Input List 2:

msgid "Cannot find %s."
msgstr "Impossible de trouver %s."

msgid "Open existing project."
msgstr "Ouvre un project existant."

Options - Options Tab

You can select different verifications to perform:

Check inline codes -- Set this option to verify that the target text contains the same inline codes as the source text.

Check leading white spaces -- Set this option to verify that the target text contains the same leading white space as the source text.

Check trailing white spaces -- Set this option to verify that the target text contains the same trailing white space as the source text.

Warn if the target text is the same as the source text -- Set this option to generate a warning if the target text is exactly the same as the source text. This can be used to detect un-translated entries.

Check targets with the same resname -- Set this option to check the groups of targets that have the same resname property.

Warn if at least one entry is different from the others -- Select this option to warn when, in a set of entries with the same resname, at least one is different from the others.

Warn if all the entries are the same -- Select this option to warn when, in a set of entries with the same resname, all entries are identical.

Options - Pattern Tab

One of the main features of this utility is the capability to define a list of patterns to check against the source text. When one of the patterns is found, the program looks in the target to see if the corresponding target pattern exists. This allows:

See the Regular Expression section for more information about the syntax of the patterns.

Verify that the following patterns are translated as expected -- Set this option to verify that when a given source pattern is found in the source text, its corresponding target pattern exists in the target text.

The list enumerates the patterns to use. The full path of the pattern file is displayed below the list.

Select File -- Click this button to select a pattern file.

Edit -- Click this button to edit the current pattern file.

Refresh -- Click this button to re-load the current pattern file into the list. Use this command after modifying the file.

Pattern File Format

The pattern file must be in UTF-16 or UTF-8.

The first line must be:

#PatternFile N

Where N is the pattern file version, currently: 1.

The other lines can be either comments or pattern declarations. Comments line are empty line or lines without tab. Pattern declarations are the lines with a source pattern and a target pattern separated with a tab character. The example below illustrate this (the tab character is represented by <tab> for clarity:

#PatternFile 1

\{\d\}<tab><same>
&&|&<tab><same>

Now we define the language-specific terms to verify:

\bcancel\b<tab>\bannuler\b
\bfile<tab>\bfichier

Note the use of a marker "<same>" (case-sensitive) for the target pattern in some cases. This special pattern allows you to specify that the target pattern should be the text that was matched by the source pattern at runtime. For example if the source pattern is "\{\d\}" it could match "{0}", "{1}", etc. and it is that specific match you want to find in the target.

The patterns themselves must be valid regular expressions. When using patterns that should match words, you should bracket it with the \b assertion to indicate this. If only the pattern should match the start of a word, use the \b assertion at the beginning of the pattern, etc. For example:

"\bcancel\b" will match: "use the cancel button"
                but not: "the process is cancelled"
"\bcancel"   will match: "use the cancel button"
               and also: "the process is cancelled"

Options - Output Tab

XML report file to generate -- Enter the full path of the XML report document that will be generated.

Generate a stand-alone HTML output from the XML file -- Set this option to generate an HTML output from the XML report. This HTML file will be formatted using the specified XSL template. Enter the full path of the HTML output in the text field below the option.

Keep the XML file -- Set this option if, when you generate an HTML output, you want also to keep the XML report file and copy the XSL template in the same folder. If this option is not set, the XML file is deleted automatically after the HTML file has been generated.

XSL template to use for the presentation of the report -- Enter the full path of the XSL template to associate with the report document. This template allows you to customize the appearance of the report. A default template named DefaultQCView.xsl is provided in the Okapi Shared folder.

Open automatically the report when the task is done -- Set this option to open automatically the report file as soon as the verification is done.