Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Mar 5, 2015
2 parents 8fcc75f + 4b80102 commit 589bcd1
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 7 deletions.
64 changes: 57 additions & 7 deletions docs/admin/checks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,70 @@ Customizing checks
Fine tuning existing checks
+++++++++++++++++++++++++++

You can fine tune checks for each source strings or in the :ref:`component`
(:guilabel:`Quality checks flags`), here is current list of flags accepted:
You can fine tune checks for each source string (in source strings review) or
in the :ref:`component` (:guilabel:`Quality checks flags`), here is current
list of flags accepted:

``rst-text``
Treat text as RST document, affects :ref:`check-same`.
``python-format``, ``c-format``, ``php-format``, ``python-brace-format``
Treats all string like format strings, affects :ref:`check-python-format`,
:ref:`check-c-format`, :ref:`check-php-format`,
:ref:`check-python-brace-format`, :ref:`check-same`.
``ignore-*``
Ignores given check for a component.

These flags are understood both in :ref:`component` settings and in
translation file itself (eg. in GNU Gettext).
``ignore-end-space``
Skip the "Trailing space" quality check.
``ignore-inconsistent``
Skip the "Inconsistent" quality check.
``ignore-begin-newline``
Skip the "Starting newline" quality check.
``ignore-zero-width-space``
Skip the "Zero-width space" quality check.
``ignore-escaped-newline``
Skip the "Mismatched \n" quality check.
``ignore-same``
Skip the "Unchanged translation" quality check.
``ignore-end-question``
Skip the "Trailing question" quality check.
``ignore-end-ellipsis``
Skip the "Trailing ellipsis" quality check.
``ignore-ellipsis``
Skip the "Ellipsis" quality check.
``ignore-python-brace-format``
Skip the "Python brace format" quality check.
``ignore-end-newline``
Skip the "Trailing newline" quality check.
``ignore-c-format``
Skip the "C format" quality check.
``ignore-optional-plural``
Skip the "Optional plural" quality check.
``ignore-end-exclamation``
Skip the "Trailing exclamation" quality check.
``ignore-end-colon``
Skip the "Trailing colon" quality check.
``ignore-xml-tags``
Skip the "XML tags mismatch" quality check.
``ignore-python-format``
Skip the "Python format" quality check.
``ignore-plurals``
Skip the "Missing plurals" quality check.
``ignore-begin-space``
Skip the "Starting spaces" quality check.
``ignore-bbcode``
Skip the "Mismatched BBcode" quality check.
``ignore-multiple-failures``
Skip the "Multiple failing checks" quality check.
``ignore-php-format``
Skip the "PHP format" quality check.
``ignore-end-stop``
Skip the "Trailing stop" quality check.

.. note::

Generally the rule is named ``ignore-*`` for any check, using it's
identifier, so you can use this even for your custom checks.

These flags are understood both in :ref:`component` settings, per source string
settings and in translation file itself (eg. in GNU Gettext).

Writing own checks
++++++++++++++++++
Expand Down
20 changes: 20 additions & 0 deletions docs/admin/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,28 @@ For example you can enable only few of them:
CHECK_LIST = (
'weblate.trans.checks.same.SameCheck',
'weblate.trans.checks.chars.BeginNewlineCheck',
'weblate.trans.checks.chars.EndNewlineCheck',
'weblate.trans.checks.chars.BeginSpaceCheck',
'weblate.trans.checks.chars.EndSpaceCheck',
'weblate.trans.checks.chars.EndStopCheck',
'weblate.trans.checks.chars.EndColonCheck',
'weblate.trans.checks.chars.EndQuestionCheck',
'weblate.trans.checks.chars.EndExclamationCheck',
'weblate.trans.checks.chars.EndEllipsisCheck',
'weblate.trans.checks.format.PythonFormatCheck',
'weblate.trans.checks.format.PythonBraceFormatCheck',
'weblate.trans.checks.format.PHPFormatCheck',
'weblate.trans.checks.format.CFormatCheck',
'weblate.trans.checks.consistency.PluralsCheck',
'weblate.trans.checks.consistency.ConsistencyCheck',
'weblate.trans.checks.chars.NewlineCountingCheck',
'weblate.trans.checks.markup.BBCodeCheck',
'weblate.trans.checks.chars.ZeroWidthSpaceCheck',
'weblate.trans.checks.markup.XMLTagsCheck',
'weblate.trans.checks.source.OptionalPluralCheck',
'weblate.trans.checks.source.EllipsisCheck',
'weblate.trans.checks.source.MultipleFailingCheck',
)
.. seealso:: :ref:`checks`, :ref:`custom-checks`
Expand Down

0 comments on commit 589bcd1

Please sign in to comment.