mirror of
https://github.com/WeblateOrg/weblate.git
synced 2026-07-27 22:46:38 +08:00
Complement the checks and describe for translators why some text should not be changed or handled specifically.
109 lines
2.8 KiB
ReStructuredText
Vendored
109 lines
2.8 KiB
ReStructuredText
Vendored
Checks and fixups
|
|
=================
|
|
|
|
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.
|
|
For practical translation guidance around placeholders, markup, punctuation,
|
|
and plural forms, see :ref:`translating-special-text`.
|
|
|
|
Once submitting a translation with a failing check, this is immediately shown to
|
|
the user:
|
|
|
|
.. image:: /screenshots/checks.webp
|
|
|
|
|
|
.. _autofix:
|
|
|
|
Automatic fixups
|
|
----------------
|
|
|
|
In addition to :ref:`checks`, Weblate can fix some common
|
|
errors in translated strings automatically. Use it with caution to not have
|
|
it add errors.
|
|
|
|
.. seealso::
|
|
|
|
:setting:`AUTOFIX_LIST`
|
|
|
|
Trailing ellipsis replacer
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
:Class name: ``weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis``
|
|
|
|
Replace trailing dots (``...``) with an ellipsis (``…``) to make it consistent with the source string.
|
|
|
|
|
|
Zero-width space removal
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
:Class name: ``weblate.trans.autofixes.chars.RemoveZeroSpace``
|
|
|
|
Zero width space is typically not desired in the translation. This fix will
|
|
remove it unless it is present in the source string as well.
|
|
|
|
Control characters removal
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
:Class name: ``weblate.trans.autofixes.chars.RemoveControlChars``
|
|
|
|
Removes control characters if the source does not contain any.
|
|
|
|
Devanagari danda
|
|
~~~~~~~~~~~~~~~~
|
|
|
|
:Class name: ``weblate.trans.autofixes.chars.DevanagariDanda``
|
|
|
|
Replaces sentence full stop in Bangla by the Devanagari danda character (``।``).
|
|
|
|
.. _autofix-punctuation-spacing:
|
|
|
|
Punctuation spacing
|
|
~~~~~~~~~~~~~~~~~~~
|
|
|
|
:Class name: ``weblate.trans.autofixes.chars.PunctuationSpacing``
|
|
|
|
.. versionadded:: 5.3
|
|
|
|
Ensures French uses correct punctuation spacing.
|
|
|
|
This fixup can be disabled via ``ignore-punctuation-spacing`` flag (which also
|
|
disables :ref:`check-punctuation-spacing`).
|
|
|
|
.. _autofix-html:
|
|
|
|
Unsafe HTML cleanup
|
|
~~~~~~~~~~~~~~~~~~~
|
|
|
|
:Class name: ``weblate.trans.autofixes.html.BleachHTML``
|
|
|
|
Removes unsafe HTML markup from strings flagged as ``safe-html``.
|
|
|
|
.. seealso::
|
|
|
|
:ref:`check-safe-html`
|
|
|
|
Trailing and leading whitespace fixer
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
:Class name: ``weblate.trans.autofixes.whitespace.SameBookendingWhitespace``
|
|
|
|
Makes leading and trailing whitespace consistent with the source string. The
|
|
behavior can be fine-tuned using ``ignore-begin-space`` and
|
|
``ignore-end-space`` flags to skip processing parts of the string.
|
|
|
|
.. _checks:
|
|
|
|
Quality checks
|
|
--------------
|
|
|
|
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.
|
|
|
|
.. seealso::
|
|
|
|
* :setting:`CHECK_LIST`
|
|
* :ref:`custom-checks`
|
|
|
|
|
|
.. include:: /snippets/checks-autogenerated.rst
|