Documentation

Translation

Validations

WebTranslateIt includes a validation system to make sure the translations are correct, with highlighted errors and AutoCorrect. 8 min read

WebTranslateIt includes a validation system that checks translations for common errors and formatting issues. When you save a translation that has issues, a modal window appears showing the problems and helping you fix them.

Validation Checks

We currently have 18 validations in place:

Variable placeholders

There are validation checks to see if the translation uses the variable placeholders properly.

  • The original text does not contain variables but the target text does include a variable
  • The original text does contain a variable but no variables were found in the target text
  • The original text does not contain the variables found in the target text
  • A variable is incorrect in a plural segment.

The variable placeholders currently supported by WebTranslateIt are:

  • {{variable}}
  • {variable}
  • %{variable}
  • {!1}, {!2}, …
  • %1$s, %2$s, …
  • %1$d, %2$d, …
  • %d, %,d
  • %@
  • %02d
  • %s
  • %%s
  • <%%= @variable %>, <%%= variable %>
  • <%%# @variable %>, <%%# variable %>
  • <%% variable %>, <%% @variable %>
  • <%% variable -%>, <%% @variable -%>
  • $t(__variable__)
  • @variable@, @variable.variable@, @variable:variable@, @variable"variable"@, @variable'variable'@

HTML tags

There are validation checks to see if the translation uses HTML tags properly.

  • The original text does not contain HTML tags but the target text does include HTML tags
  • The translation should contain specific HTML tags that are present in the source text
  • The original text does not contain specific HTML tags that were found in the target text
  • An HTML tag may be incorrect in a plural segment

Linebreaks

There are validation checks to see if the translation uses the new line character properly.

  • The original text starts with a new line character but no new line character was included in the target text
  • The original text ends with a new line character but no new line character was included in the target text
  • The original text doesn’t start with a new line character but a new line character was included in the target text
  • The original text doesn’t end with a new line character but a new line was included in the target text
  • The original text and translation have a different number of linebreaks

Spaces

There are validation checks to see if the translation uses the space character properly.

  • The original text starts with a space character but no space character was included in the target text
  • The original text ends with a space character but no space character was included in the target text
  • The original text doesn’t start with a space character but a space character was included in the target text
  • The original text doesn’t end with a space character but a space was included in the target text

CDATA tags

CDATA tags are sometimes used in XML files. Usually, when a CDATA tag is included in the source text, it should also be included in the target text and these validations make sure they are present.

  • The original text has a CDATA tag but no CDATA tag was included in the target text.
  • The original text doesn’t have a CDATA tag but a CDATA tag was included in the target text.

Maximum characters

There is a validation check to see if the translation doesn’t exceed the character limit set on a segment.

Keyboard shortcuts symbols “&”

There are validation checks to see if the translation contains the keyboard shortcut symbol & in some language files.

  • The original text contains a keyboard shortcut symbol & but it isn’t present in the translation.
  • The original text doesn’t contain a keyboard shortcut symbol & but it is present in the translation.

Ellipsis

There is a validation check to see if a translation is using a proper ellipsis sign () if the source text uses a proper ellipsis sign too.

Brackets and Parentheses

There are validation checks to see if a translation makes proper use of brackets and parentheses.

  • Unbalanced brackets detected in the translation
  • The translation doesn’t have the same amount of opening parentheses ( as the source text
  • The translation doesn’t have the same amount of closing parentheses ) as the source text
  • The translation doesn’t have the same amount of opening and closing parentheses.

Punctuation

There are validation checks to see if the translation preserves the punctuation from the source text.

  • An ending punctuation mark is missing in the translation
  • An ending punctuation mark was added but shouldn’t be included
  • The count of a specific punctuation mark differs between the source and the translation

Numbers

There is a validation check to see if the translation contains the same numbers as the source text. If numbers present in the source text are missing from the translation, the check will flag them.

Arrays

There are validation checks to see if array translations contain the same number of elements and arrays as the source text.

  • Array element count mismatch between the source and translation
  • Different number of arrays between the source and translation

Double Spaces

There is a validation check to see if the translation contains double spaces, which are usually unintentional.

Capitalization

There are validation checks to see if the translation preserves the capitalization style of the source text.

  • The first letter of the translation should be uppercase (to match the source text)
  • The first letter of the translation should be lowercase (to match the source text)

Terminology

There is a validation check to see if the translation uses the terms defined in the project’s Term Base. If a source term is found in the original text, the corresponding target term should be present in the translation.

ICU MessageFormat

ICU MessageFormat is an industry standard for handling plurals, gender, and number/date formatting in translated strings. When the source text contains typed ICU arguments (e.g. {count, plural, one {# item} other {# items}}), the following checks are performed on the translation:

  • Syntax errors — Unclosed braces, missing commas, or malformed sub-messages in the translation.
  • Missing or added arguments — If the source uses {count} and {name}, the translation must include the same arguments.
  • Type mismatches — A {count, number} in the source shouldn’t become {count, date} in the translation.
  • Missing # number references — Plural and selectordinal sub-messages that use # in the source should keep it in the translation.
  • Translated ICU keywords — Translators sometimes inadvertently translate ICU keywords like plural, one, other, etc. into their own language. For example, a French translator might write {count, pluriel, un {# article} autre {# articles}} instead of {count, plural, one {# article} other {# articles}}. This is detected across 12 languages and automatically corrected via AutoCorrect.

Simple placeholders like {name} or {0} don’t activate this check — it only triggers when the source string contains typed ICU arguments.

Plural Categories

Different languages require different plural forms. English needs just one and other, Polish needs one, few, many, and other, and Arabic requires all six: zero, one, two, few, many, and other.

The Plural Categories check validates that translations provide the correct set of plural categories for their target locale, based on the project’s locale plural rules.

  • Missing categories — A plural category required by the target locale is missing from the translation.
  • Extra categories — A plural category not used by the target locale is present in the translation.

Missing plural forms require human translation and cannot be fixed by AutoCorrect alone. When used with AutoCorrect, missing categories are sent to the AI handler with full context to generate the missing forms.

Highlighted Errors

When validation issues are found, a modal window shows:

  • A text preview of your translation with the problematic parts highlighted in color. Each issue is highlighted with a distinct color so you can easily tell them apart.
  • A list of issues found in the translation, each with a colored indicator matching its highlight in the text.

Hovering over an issue in the list highlights the corresponding text in the preview, and hovering over a highlighted section in the preview highlights the matching issue — making it easy to understand exactly what needs fixing.

AutoCorrect

Many validation issues can be fixed automatically. When issues are detected, the validation modal offers three options:

  • Ignore (⌘I) — Bypass the validation and save the translation as-is. Use this when you are certain the translation is correct despite the warnings.
  • Correct Manually (Esc) — Close the modal and return to the text editor to fix the issues yourself.
  • AutoCorrect (Enter) — Automatically fix all detected issues. This applies deterministic corrections first (such as adding a missing ellipsis or fixing variable placeholders), then uses AI to fix any remaining issues that require contextual understanding.

AutoCorrect requires Machine Translation to be enabled for AI-powered corrections.

Next Up: Word Count and Character Count. Word count… »