Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
i18n: Fix \xa0 character in a string for translation.
Mateusz Mandera4f40d9646ef2
diff --git a/zerver/lib/rate_limiter.py b/zerver/lib/rate_limiter.pyindex 432b83ac2f3..e8ae9146b3c 100644--- a/zerver/lib/rate_limiter.py+++ b/zerver/lib/rate_limiter.py@@ -12,7 +12,7 @@ from django.conf import settingsfrom django.http import HttpRequestfrom django.utils.timesince import timeuntilfrom django.utils.timezone import now as timezone_now-from django.utils.translation import gettext as _+from django.utils.translation import ngettextfrom typing_extensions import overridefrom zerver.lib import redis_utils@@ -662,7 +662,11 @@ def readable_expiry_string_for_html(seconds_till_expiry: int) -> str:# We use \xa0 as the whitespace to be consistent with# timeuntil.# If you want the regular " ", see readable_expiry_string_for_plaintext.- return _("{secs}\xa0seconds").format(secs=seconds_till_expiry)+ return ngettext(+ "{secs}{nbsp}second",+ "{secs}{nbsp}seconds",+ seconds_till_expiry,+ ).format(secs=seconds_till_expiry, nbsp="\xa0")return timeuntil(expires_in_datetime)