Skip to content

Commit

Permalink
feat: localize comma in consistency checks
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Feb 20, 2025
1 parent 702af2c commit 0d0dadc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion weblate/checks/consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from django.utils.translation import gettext, gettext_lazy, ngettext

from weblate.checks.base import BatchCheckMixin, TargetCheck
from weblate.utils.html import format_html_join_comma
from weblate.utils.state import STATE_TRANSLATED

if TYPE_CHECKING:
Expand Down Expand Up @@ -206,7 +207,9 @@ def get_description(self, check_obj):

return ngettext(
"Other source string: %s", "Other source strings: %s", len(other_sources)
) % ", ".join(gettext("“%s”") % source for source in other_sources)
) % format_html_join_comma(
"{}", ((gettext("“%s”") % source,) for source in other_sources)
)

def check_single(self, source: str, target: str, unit: Unit) -> bool:
"""Target strings are checked in check_target_unit."""
Expand Down

0 comments on commit 0d0dadc

Please sign in to comment.