Skip to content

Commit

Permalink
feat: localize comma in consistency checks
Browse files Browse the repository at this point in the history
Issue #13896
  • Loading branch information
nijel committed Feb 20, 2025
1 parent 08dad02 commit 2ac1c0c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion weblate/checks/duplicate.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from weblate.checks.base import TargetCheck
from weblate.checks.data import NON_WORD_CHARS
from weblate.checks.same import replace_format_placeholder, strip_format
from weblate.utils.html import format_html_join_comma

if TYPE_CHECKING:
from weblate.trans.models import Unit
Expand Down Expand Up @@ -89,4 +90,8 @@ def get_description(self, check_obj):
source = unit.source_string
for target in unit.get_target_plurals():
duplicate.update(self.check_single(source, target, unit))
return format_html("{} {}", self.description, ", ".join(sorted(duplicate)))
return format_html(
"{} {}",
self.description,
format_html_join_comma("{}", ((word,) for word in sorted(duplicate))),
)

0 comments on commit 2ac1c0c

Please sign in to comment.