Перевірки і виправлення

The quality checks help catch common translator errors, ensuring the translation is in good shape. The checks can be ignored in case of false positives.

Once submitting a translation with a failing check, this is immediately shown to the user:

../_images/checks.png

Автоматичні виправлення

In addition to Перевірки якості, Weblate can also fix some common errors in translated strings automatically. Use it with caution to not have it add errors.

Дивись також

AUTOFIX_LIST

Перевірки якості

Weblate employs a wide range of quality checks on strings. The following section describes them all in further detail. There are also language specific checks. Please file a bug if anything is reported in error.

Перевірки перекладів

Executed upon every translation change, helping translators maintain good quality translations.

Розмітка BBcode

BB-код у перекладі не збігається з BB-кодом у джерелі

BBCode represents simple markup, like for example highlighting important parts of a message in bold font, or italics.

This check ensures they are also found in translation.

Примітка

The method for detecting BBcode is currently quite simple so this check might produce false positives.

Послідовне повторення слів

Текст містить те саме слово двічі поспіль:

Нове в версії 4.1.

Checks that no consecutive duplicate words occur in a translation. This usually indicates a mistake in the translation.

Підказка

This check includes language specific rules to avoid false positives. In case it triggers falsely in your case, let us know. See Надсилання звітів щодо вад у Weblate.

Подвійна проґалина

Переклад містить подвійну прогалину

Checks that double space is present in translation to avoid false positives on other space-related checks.

Check is false when double space is found in source meaning double space is intentional.

Форматовані рядки

Checks that formatting in strings are replicated between both source and translation. Omitting format strings in translation usually causes severe problems, so the formatting in strings should usually match the source.

Weblate supports checking format strings in several languages. The check is not enabled automatically, only if a string is flagged appropriately (e.g. c-format for C format). Gettext adds this automatically, but you will probably have to add it manually for other file formats or if your PO files are not generated by xgettext.

This can be done per unit (see Додаткові відомості щодо початкових рядків) or in Налаштовування складників. Having it defined per component is simpler, but can lead to false positives in case the string is not interpreted as a formatting string, but format string syntax happens to be used.

Підказка

In case specific format check is not available in Weblate, you can use generic Заповнювачі.

Besides checking, this will also highlight the formatting strings to easily insert them into translated strings:

../_images/format-highlight.png

Рядок інтерполяції AngularJS

Рядки інтерполяції AngularJS не відповідають джерелу

Іменований рядок форматування

Your balance is {{amount}} {{ currency }}

Прапорець для вмикання

angularjs-format

Дивись також

AngularJS: API: $interpolate

Формат C

Рядок формату C# не відповідає джерелу

Простий рядок форматування

There are %d apples

Position format string

Your balance is %1$d %2$s

Прапорець для вмикання

c-format

Дивись також

C format strings, C printf format

Формат C#

Рядок формату C# не відповідає джерелу

Position format string

There are {0} apples

Прапорець для вмикання

c-sharp-format

Літерали шаблонів ECMAScript

Літерали шаблонів ECMAScript не відповідають джерелу

Інтерполяція

There are ${number} apples

Прапорець для вмикання

es-format

Дивись також

Літерали шаблонів

i18next інтерполяція

Інтерполяція i18next не відповідає джерелу

Нове в версії 4.0.

Інтерполяція

There are {{number}} apples

Вкладення

There are $t(number) apples

Прапорець для вмикання

i18next-interpolation

Дивись також

Інтерполяція i18next

Формат Java

Рядок формату Java не відповідає джерелу

Простий рядок форматування

There are %d apples

Position format string

Your balance is %1$d %2$s

Прапорець для вмикання

java-format

Формат Java Message

Рядок формату Java Message не відповідає джерелу

Position format string

There are {0} apples

Прапорець для вмикання

java-messageformat вмикає перевірку безумовно

auto-java-messageformat enables check only if there is a format string in the source

Дивись також

MessageFormat Java

Формат JavaScript

Рядок, формату JavaScript, не відповідає джерелу

Простий рядок форматування

There are %d apples

Прапорець для вмикання

javascript-format

Відсоток заповнювачів

Відсоток заповнювачів не відповідає джерелам

Нове в версії 4.0.

Простий рядок форматування

There are %number% apples

Прапорець для вмикання

percent-placeholders

Формат Perl

Рядок формату Perl не відповідає джерелу

Простий рядок форматування

There are %d apples

Position format string

Your balance is %1$d %2$s

Прапорець для вмикання

perl-format

Формат PHP

Рядок, формату PHP, не відповідає джерелу

Простий рядок форматування

There are %d apples

Position format string

Your balance is %1$d %2$s

Прапорець для вмикання

php-format

Формат дужок Python

Рядок, формату Python brace, не відповідає джерелу

Простий рядок форматування

There are {} apples

Іменований рядок форматування

Your balance is {amount} {currency}

Прапорець для вмикання

python-brace-format

Формат Python

Рядок форматування Python не відповідає джерелу

Простий рядок форматування

There are %d apples

Іменований рядок форматування

Your balance is %(amount) %(currency)

Прапорець для вмикання

python-format

Формат Qt

Рядок формату Qt не відповідає джерелу

Position format string

There are %1 apples

Прапорець для вмикання

qt-format

Дивись також

Qt QString::arg()

Формат Qt у множині

Рядок формату Qt у множині не відповідає джерелу

Рядок форматування форм множини

There are %Ln apple(s)

Прапорець для вмикання

qt-plural-format

Дивись також

Підручник з i18n Qt

Формат Ruby

Рядок формату Ruby не збігається з джерелом

Простий рядок форматування

There are %d apples

Position format string

Your balance is %1$f %2$s

Іменований рядок форматування

Your balance is %+.2<amount>f %<currency>s

Рядок із іменованим шаблоном

Your balance is %{amount} %{currency}

Прапорець для вмикання

ruby-format

Дивись також

Ruby Kernel#sprintf

Вже перекладено

Цей рядок перекладено раніше

Means a string has been translated already. This can happen when the translations have been reverted in VCS or lost otherwise.

Неузгодженість

Цей рядок має більше одного перекладу в цьому проєкті або не перекладається в деяких складниках.

Weblate checks translations of the same string across all translation within a project to help you keep consistent translations.

The check fails on differing translations of one string within a project. This can also lead to inconsistencies in displayed checks. You can find other translations of this string on the Other occurrences tab.

Примітка

This check also fires in case the string is translated in one component and not in another. It can be used as a quick way to manually handle strings which are not translated in some components just by clicking on the Use this translation button displayed on each line in the Other occurences tab.

You can use Автоматичний переклад addon to automate translating of newly added strings which are already translated in another component.

Використано літеру кашида

Декоративні букви кашиди не повинні використовуватися

Нове в версії 3.5.

Декоративні букви кашиди не повинні використовуватися. Такі букви також називають татвілами.

Дивись також

Кашида у Вікіпедії

Markdown посилання

Посилання Markdown не збігаються з джерелом

Нове в версії 3.5.

Посилання Markdown не збігаються з джерелом.

Дивись також

Посилання Markdown

Синтаксис Markdown

Синтаксис Markdown не відповідає джерелу

Нове в версії 3.5.

Синтаксис Markdown не відповідає джерелу

Дивись також

Markdown span elements

Максимальна довжина перекладу

Переклад не перевищує заданої довжини

Checks that translations are of acceptable length to fit available space. This only checks for the length of translation characters.

Unlike the other checks, the flag should be set as a key:value pair like max-length:100.

Підказка

This checks looks at number of chars, what might not be the best metric when using proportional fonts to render the text. The Найбільший розмір перекладу check does check actual rendering of the text.

The replacements: flag might be also useful to expand placeables before checking the string.

Найбільший розмір перекладу

Перекладений текст не повинен перевищувати заданий розмір

Нове в версії 3.7.

Translation rendered text should not exceed given size. It renders the text with line wrapping and checks if it fits into given boundaries.

This check needs one or two parameters - maximal width and maximal number of lines. In case the number of lines is not provided, one line text is considered.

You can also configure used font by font-* directives (see Налаштовування поведінки), for example following translation flags say that the text rendered with ubuntu font size 22 should fit into two lines and 500 pixels:

max-size:500:2, font-family:ubuntu, font-size:22

Підказка

You might want to set font-* directives in Налаштовування складників to have the same font configured for all strings within a component. You can override those values per string in case you need to customize it per string.

The replacements: flag might be also useful to expand placeables before checking the string.

Не збіглися n

Число n у перекладі не відповідає джерелу

Usually escaped newlines are important for formatting program output. Check fails if the number of \\n literals in translation do not match the source.

Невідповідність двокрапки

Джерело та переклад не закінчуються двокрапкою

Checks that colons are replicated between both source and translation. The presence of colons is also checked for various languages where they do not belong (Chinese or Japanese).

Невідповідність багатокрапок

Джерело і переклад не завершуються трикрапкою

Checks that trailing ellipses are replicated between both source and translation. This only checks for real ellipsis () not for three dots (...).

An ellipsis is usually rendered nicer than three dots in print, and sounds better with text-to-speech.

Невідповідність знаків оклику

Джерело та переклад не закінчуються знаком оклику

Checks that exclamations are replicated between both source and translation. The presence of exclamation marks is also checked for various languages where they do not belong (Chinese, Japanese, Korean, Armenian, Limbu, Myanmar or Nko).

Невідповідність кінцевої крапки

Джерело і переклад не завершуються кінцевою крапкою

Checks that full stops are replicated between both source and translation. The presence of full stops is checked for various languages where they do not belong (Chinese, Japanese, Devanagari or Urdu).

Дивись також

Крапка у Вікіпедії

Невідповідність знаків питання

Джерело та переклад не закінчуються знаком питання

Checks that question marks are replicated between both source and translation. The presence of question marks is also checked for various languages where they do not belong (Armenian, Arabic, Chinese, Korean, Japanese, Ethiopic, Vai or Coptic).

Невідповідність крапки з комою

Джерело і переклад не завершуються крапкою з комою

Checks that semicolons at the end of sentences are replicated between both source and translation. This can be useful to keep formatting of entries such as desktop files.

Розбіжність розривів рядків

Кількість знаків нових рядків у перекладі не відповідає джерелу

Usually newlines are important for formatting program output. Check fails if the number of \n literals in translation do not match the source.

Бракує множини

Деякі форми множини не перекладені

Checks that all plural forms of a source string have been translated. Specifics on how each plural form is used can be found in the string definition.

Failing to fill in plural forms will in some cases lead to displaying nothing when the plural form is in use.

Заповнювачі

У перекладі відсутні деякі замінники:

Нове в версії 3.9.

Translation is missing some placeholders. These are either extracted from the translation file or defined manually using placeholders flag, more can be separated with colon, strings with space can be quoted:

placeholders:$URL$:$TARGET$:"some long text"

Щільність знаків

Пропущений нерозривний пробіл перед подвійним знаком пунктуації

Нове в версії 3.9.

Checks that there is non breakable space before double punctuation sign (exclamation mark, question mark, semicolon and colon). This rule is used only in a few selected languages like French or Breton, where space before double punctuation sign is a typographic rule.

Регулярний вираз

Переклад не відповідає регулярному виразу:

Нове в версії 3.9.

Переклад не відповідає формальному виразу. Вираз або видобувається з файла перекладу, або визначається вручну за допомогою прапорця regex:

regex:^foo|bar$

Однакова множина

Деякі форми множини перекладені однаково

Перевірка вважається не пройденою, якщо у перекладі усі форми множини є однаковими. У більшості мов форми множини мають бути різними.

Перехід у новий рядок

Джерело і переклад не починаються з переходу у новий рядок

Newlines usually appear in source strings for good reason, omissions or additions can lead to formatting problems when the translated text is put to use.

Початкові пропуски

Джерело і переклад не починаються з однакового числа пропусків

A space in the beginning of a string is usually used for indentation in the interface and thus important to keep.

Кінцевий знак нового рядка

Джерело і переклад не завершуються переходом у новий рядок

Newlines usually appear in source strings for good reason, omissions or additions can lead to formatting problems when the translated text is put to use.

Дивись також

Перехід у новий рядок

Кінцеві пропуски

Джерело і переклад не завершуються пропуском

Checks that trailing spaces are replicated between both source and translation.

Trailing space is usually utilized to space out neighbouring elements, so removing it might break layout.

Переклад не змінено

Джерело і переклад збігаються

Happens if the source and corresponding translation strings is identical, down to at least one of the plural forms. Some strings commonly found across all languages are ignored, and various markup is stripped. This reduces the number of false positives.

Ця перевірка може допомогти рядки, які помилково не було перекладено.

The default behavior of this check is to exclude words from the built-in blacklist from the checking. These are words which are frequently not being translated. This is useful to avoid false positives on short strings, which consist only of single word which is same in several languages. This blacklist can be disabled by adding strict-same flag to string or component.

Небезпечний HTML-код

Переклад використовує небезпечну HTML-розмітку

Нове в версії 3.9.

The translation uses unsafe HTML markup. This check has to be enabled using safe-html flag (see Налаштовування поведінки). There is also accompanied autofixer which can automatically sanitize the markup.

Дивись також

The HTML check is performed by the Bleach library developed by Mozilla.

URL

Цей переклад не містить URL

Нове в версії 3.5.

The translation does not contain an URL. This is triggered only in case the unit is marked as containing URL. In that case the translation has to be a valid URL.

Розмітка XML

Теґи XML у перекладі не збігаються з тегами XML у джерелі

This usually means the resulting output will look different. In most cases this is not a desired result from changing the translation, but occasionally it is.

Checks that XML tags are replicated between both source and translation.

Синтаксис XML

Цей переклад не є правильним XML

Нове в версії 2.8.

Розмітка XML є некоректною.

Простір нульової ширини

Переклад містить зайві символи пропуску нульової ширини

Zero-width space (<U+200B>) characters are used to break messages within words (word wrapping).

As they are usually inserted by mistake, this check is triggered once they are present in translation. Some programs might have problems when this character is used.

Перевірки джерела

Source checks can help developers improve the quality of source strings.

Трикрапка

Рядок використовує три крапки (…) замість символу трикрапки (…)

This fails when the string uses three dots (...) when it should use an ellipsis character ().

Using the Unicode character is in most cases the better approach and looks better rendered, and may sound better with text-to-speech.

Тривалий час не перекладено

Цей рядок вже тривалий час не перекладено

Нове в версії 4.1.

When the string has not been translated for a long time, it is can indicate problem in a source string making it hard to translate.

Кратні невдалі перевірки

Переклади на декількох мовах мають непройдені перевірки

Numerous translations of this string have failing quality checks. This is usually an indication that something could be done to improve the source string.

This check failing can quite often be caused by a missing full stop at the end of a sentence, or similar minor issues which translators tend to fix in translation, while it would be better to fix it in the source string.

Декілька змінних без назв

У рядку є декілька змінних без назв — перекладачі не зможуть змінити порядок цих змінних

Нове в версії 4.1.

У рядку є декілька змінних без назв — перекладачі не зможуть змінити порядок цих змінних.

Consider using named variables instead to allow translators to reorder them.

Немножинний

Рядок використовується як множина, але не використовує форми множини

The string is used as a plural, but does not use plural forms. In case your translation system supports this, you should use the plural aware variant of it.

Наприклад, із Gettext у Python це може бути:

from gettext import ngettext

print ngettext('Selected %d file', 'Selected %d files', files) % files