From 453666654458f4a1faaabc48da2a0e0344539425 Mon Sep 17 00:00:00 2001 From: Benjamin Zeiss Date: Sat, 29 Jan 2022 18:42:16 +0100 Subject: [PATCH] return code mapper gettext extract fix (#622) * fix for the wrong extraction of the return_code line. * second try for the wrong extraction of the return_code line. --- python/web/src/return_code_mapper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/web/src/return_code_mapper.py b/python/web/src/return_code_mapper.py index faf31487..a25a3f11 100644 --- a/python/web/src/return_code_mapper.py +++ b/python/web/src/return_code_mapper.py @@ -1,7 +1,7 @@ """Module for mapping between rascsi return codes and translated strings""" from rascsi.return_codes import ReturnCodes -from flask_babel import _ +from flask_babel import _, lazy_gettext # pylint: disable=too-few-public-methods @@ -41,5 +41,5 @@ class ReturnCodeMapper: parameters = payload["parameters"] - payload["msg"] = _(ReturnCodeMapper.MESSAGES[payload["return_code"]], **parameters) + payload["msg"] = lazy_gettext(ReturnCodeMapper.MESSAGES[payload["return_code"]], **parameters) return payload