Commit 8ef3f54f by Őry Máté

common: don't try to translate empty string

_("") is the metadata of the translation
parent 095b49ad
...@@ -373,9 +373,13 @@ class HumanReadableObject(object): ...@@ -373,9 +373,13 @@ class HumanReadableObject(object):
return None if d is None else cls(**d) return None if d is None else cls(**d)
def get_admin_text(self): def get_admin_text(self):
if self.admin_text_template == "":
return ""
return _(self.admin_text_template) % self.params return _(self.admin_text_template) % self.params
def get_user_text(self): def get_user_text(self):
if self.user_text_template == "":
return ""
return _(self.user_text_template) % self.params return _(self.user_text_template) % self.params
def to_dict(self): def to_dict(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment