Mercurial > p > roundup > code
diff roundup/backends/back_anydbm.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 | c8c4514f4c3e |
| children | 88a2a6079a89 |
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py Wed Feb 28 22:40:32 2024 -0500 +++ b/roundup/backends/back_anydbm.py Fri Mar 01 14:04:05 2024 -0500 @@ -212,7 +212,7 @@ def addclass(self, cl): cn = cl.classname if cn in self.classes: - raise ValueError(_('Class "%s" already defined.' % cn)) + raise ValueError(_('Class "%s" already defined.') % cn) self.classes[cn] = cl # add default Edit and View permissions
