File tree Expand file tree Collapse file tree 6 files changed +25
-3
lines changed
Expand file tree Collapse file tree 6 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ Weblate 5.16
55
66.. rubric :: New features
77
8+ * :ref: `check-multiple-capital ` quality check.
9+
810.. rubric :: Improvements
911
1012* Delete announcements permission can be assigned to teams, see :ref: `privileges `.
Original file line number Diff line number Diff line change @@ -1476,6 +1476,22 @@ Specifics on how each plural form is used can be found in the string definition.
14761476Failing to fill in plural forms will in some cases lead to displaying nothing when
14771477the plural form is in use.
14781478
1479+ .. _check-multiple-capital :
1480+
1481+ Multiple capitals
1482+ ~~~~~~~~~~~~~~~~~
1483+
1484+ .. versionadded :: 5.16
1485+
1486+ :Summary: Translation contains words with multiple misplaced capital letters.
1487+ :Scope: translated strings
1488+ :Check class: ``weblate.checks.chars.MultipleCapitalCheck ``
1489+ :Check identifier: ``multiple_capital ``
1490+ :Trigger: This check is always enabled but can be ignored using a flag.
1491+ :Flag to ignore: ``ignore-multiple-capital ``
1492+
1493+ Checks for misplaced capitalization, which often is a mistake when typing words with a first uppercased letter.
1494+
14791495.. _check-kabyle-characters :
14801496
14811497Non‑standard characters in Kabyle
Original file line number Diff line number Diff line change 88import unicodedata
99from typing import TYPE_CHECKING , ClassVar
1010
11- import regex # pip install regex
11+ import regex
1212from django .utils .translation import gettext_lazy
1313
1414from weblate .checks .base import CountingCheck , TargetCheck , TargetCheckParametrized
@@ -587,7 +587,9 @@ class MultipleCapitalCheck(TargetCheck):
587587
588588 check_id = "multiple_capital"
589589 name = gettext_lazy ("Multiple capitals" )
590- description = gettext_lazy ("Detects words with multiple misplaced capital letters" )
590+ description = gettext_lazy (
591+ "Translation contains words with multiple misplaced capital letters."
592+ )
591593
592594 # matches sequences of 2+ uppercase letters in *any language*
593595 UPPERCASE_SEQ = regex .compile (r"\p{Lu}{2,}" )
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ class WeblateChecksConf(AppConf):
6565 "weblate.checks.chars.EndEllipsisCheck" ,
6666 "weblate.checks.chars.EndSemicolonCheck" ,
6767 "weblate.checks.chars.MaxLengthCheck" ,
68+ "weblate.checks.chars.MultipleCapitalCheck" ,
6869 "weblate.checks.chars.KashidaCheck" ,
6970 "weblate.checks.chars.PunctuationSpacingCheck" ,
7071 "weblate.checks.chars.KabyleCharactersCheck" ,
Original file line number Diff line number Diff line change 2323 KabyleCharactersCheck ,
2424 KashidaCheck ,
2525 MaxLengthCheck ,
26- MultipleCapitalCheck , # added class
26+ MultipleCapitalCheck ,
2727 NewLineCountCheck ,
2828 PunctuationSpacingCheck ,
2929 ZeroWidthSpaceCheck ,
Original file line number Diff line number Diff line change 11081108 "weblate.checks.chars.EndEllipsisCheck" ,
11091109 "weblate.checks.chars.EndSemicolonCheck" ,
11101110 "weblate.checks.chars.MaxLengthCheck" ,
1111+ "weblate.checks.chars.MultipleCapitalCheck" ,
11111112 "weblate.checks.chars.KashidaCheck" ,
11121113 "weblate.checks.chars.PunctuationSpacingCheck" ,
11131114 "weblate.checks.chars.KabyleCharactersCheck" ,
You can’t perform that action at this time.
0 commit comments