weblate/docs/user/checks.rst
Gersona bf2d62dbe5
feat: Automatic documentation generation (#18152)
* Automate docs generation for addons
* Automate docs generation for machinery
* refactor DocVersionsMixin
* Automate docs generation for checks
* setup DB/cache services in docs GA workflow
* update command name in comments
* improve test coverage
2026-03-17 17:48:07 +01:00

107 lines
2.7 KiB
ReStructuredText

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.
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