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.
This commit is contained in:
Benjamin Zeiss 2022-01-29 18:42:16 +01:00 committed by GitHub
parent 31309a8ee3
commit 4536666544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
"""Module for mapping between rascsi return codes and translated strings""" """Module for mapping between rascsi return codes and translated strings"""
from rascsi.return_codes import ReturnCodes from rascsi.return_codes import ReturnCodes
from flask_babel import _ from flask_babel import _, lazy_gettext
# pylint: disable=too-few-public-methods # pylint: disable=too-few-public-methods
@ -41,5 +41,5 @@ class ReturnCodeMapper:
parameters = payload["parameters"] parameters = payload["parameters"]
payload["msg"] = _(ReturnCodeMapper.MESSAGES[payload["return_code"]], **parameters) payload["msg"] = lazy_gettext(ReturnCodeMapper.MESSAGES[payload["return_code"]], **parameters)
return payload return payload