Each language has its own grammatical forms for singular and plural phrases.
Example:
-
English has two forms: one and other, as in 1 file and 2 files.
-
Other languages may have one or even several forms: one, few, and other.
This presents a challenge for localization.
The translation of plural-sensitive strings is supported. These strings must be translated using the plural forms based on the plural rules of the target language. These plural forms must be defined in the source file.
Example:
-
The English string There are %d% items left, where %d% represents any number except 1.
-
In Czech, this needs to to be translated in two ways.
The first for numbers 2, 3 or 4 (i.e. few) and the second for numbers 0, 5 and more (i.e. other).
.PO (gettext) files commonly use plural forms as well as ICU messages.
For more information about plural rules, see CLDR plural rules.
Importing files
When importing files with plural-sensitive strings, the Segment Key should be used as the context type in TM match context and optimization. The language locale and the plural category become part of the context of such strings. This is needed for leveraging translation memory matches, avoiding false positives while running QA, and identifying repetitions.
To set the Context type as Segment key, follow these steps:
-
From the Settings
page, scroll down to the section and click on TM match context and optimization.
The
page opens. -
For the Segment key from the dropdown list.
, select -
Click Save. The settings are applied to imported files imported.
These settings can also be applied at the project level by editing the project.
Leveraging TM matches
If there are multiple TM matches where the match percentage is the same and the source is the same, but where the segment key context is different, the match with the corresponding plural form will be suggested first in the CAT pane and pre-translated based on the preferences.
Quality assurance warnings
Plural-sensitive strings can have a different context and this is taken into account when running QA on a job with plural-sensitive strings.
-
The warning Identical source but different translation is not given if segments with plural-sensitive strings (and a different context) are translated in a different way.
-
The warning Identical translation but different source is issued when the same translation is used for the same source with a different context.
Identifying repetitions
Plural-sensitive strings which have the same source text are not considered repetitions in analyses or in a CAT editor unless they have the same context.
-
Once a file with plural-sensitive strings is imported, the plural-sensitive strings are shown in all their forms based on the target language plural rules in separate segments in the editor.
-
The required plural form for the active segment is shown in the Plural Category and the Plural Examples are specified.
at the bottom of the editor, where the -
The
is always open when these segments are active to show the required plural details so that the translation is correct. -
Segments containing plural-sensitive strings are indicated by a blue P in the info column and the corresponding tooltip.
-
Plural-sensitive segments are filtered using the
filter in the filter options. They can also be filtered out using the filter. -
Plural-sensitive segments cannot be split or joined.