Browse Source

[fix] gettext can't work with f-strings (i10n)

``str.format`` is the pythonic way of handling strings returned by
gettext.gettext that retain interpolation tokens.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Markus Heiser 3 months ago
parent
commit
3f4e0b0859
1 changed files with 1 additions and 1 deletions
  1. 1 1
      searx/answerers/statistics.py

+ 1 - 1
searx/answerers/statistics.py

@@ -33,7 +33,7 @@ class SXNGAnswerer(Answerer):
 
         return AnswererInfo(
             name=gettext(self.__doc__),
-            description=gettext(f"Compute {'/'.join(self.keywords)} of the arguments"),
+            description=gettext("Compute {func} of the arguments".format(func='/'.join(self.keywords))),
             keywords=self.keywords,
             examples=["avg 123 548 2.04 24.2"],
         )