Skip to content

Commit

Permalink
checks: Allow duplicate words at sentence boundary
Browse files Browse the repository at this point in the history
This is less likely an error and more likely an intention.

Fixes WeblateOrg#9351
  • Loading branch information
nijel committed Jun 6, 2023
1 parent e3b8cfd commit 46af586
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions scripts/generate-non-word-chars
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ EXCLUDES = {
"]",
# We intentionally skip following
"-",
# Allow same words at sentence boundary
";",
":",
",",
".",
# Used in Catalan ŀ
"·",
"•",
Expand Down
4 changes: 0 additions & 4 deletions weblate/checks/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,11 +1029,7 @@
"'",
"(",
"*",
",",
".",
"/",
":",
";",
"?",
"@",
"[",
Expand Down
9 changes: 9 additions & 0 deletions weblate/checks/tests/test_duplicate_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,12 @@ def test_duplicated_punctuation(self):
MockUnit(source="comments (``#`` characters)"),
)
)

def test_duplicated_sentence(self):
self.assertFalse(
self.check.check_single(
"",
"Sobald diese Anfrage angenommen wird, wird der Chat als zu löschen markiert",
MockUnit(),
)
)

0 comments on commit 46af586

Please sign in to comment.