1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Small state translation fix

This commit is contained in:
Adolfo Gómez García 2024-07-11 11:07:24 +02:00
parent 72407449be
commit c61e7e5444
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23

View File

@ -93,9 +93,11 @@ class State(enum.StrEnum):
def PUBLISH_STATES(self) -> list[str]:
return [self.LAUNCHING, self.PREPARING]
@classproperty
@property
def localized(self) -> str:
"""Returns the literal translation of the state"""
print(self)
print(_TRANSLATIONS.get(self))
return _TRANSLATIONS.get(self, _TRANSLATIONS[State.UNKNOWN])
def is_active(self) -> bool: