diff roundup/scripts/roundup_server.py @ 7750:216662fbaaee

fix(i18n): fix incorrect lookup of some translations The code had: _("some term %s here" % term) this extracts the template, but looks up the string with %s replaced. So the translation is broken. Changed to: _("some term %s here") % term which looks up the template and substitutes in the translation of the template. Found by ruff INT ruleset.
author John Rouillard <rouilj@ieee.org>
date Fri, 01 Mar 2024 14:04:05 -0500
parents 5a35cfee727a
children 683af7c57ce5
line wrap: on
line diff
--- a/roundup/scripts/roundup_server.py	Wed Feb 28 22:40:32 2024 -0500
+++ b/roundup/scripts/roundup_server.py	Fri Mar 01 14:04:05 2024 -0500
@@ -548,8 +548,8 @@
 
 def error():
     exc_type, exc_value = sys.exc_info()[:2]
-    return _('Error: %(type)s: %(value)s' % {'type': exc_type,
-                                             'value': exc_value})
+    return _('Error: %(type)s: %(value)s') % {'type': exc_type,
+                                             'value': exc_value}
 
 
 def setgid(group):
@@ -840,11 +840,11 @@
                 raise socket.error(_(
                     "Unable to bind to port %(port)s, "
                     "access not allowed, "
-                    "errno: %(errno)s %(msg)s" % {
+                    "errno: %(errno)s %(msg)s") % {
                         "port": self["PORT"],
                         "errno": e.args[0],
                         "msg": e.args[1]}
-                ))
+                )
 
             raise
         # change user and/or group

Roundup Issue Tracker: http://roundup-tracker.org/