index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Daniel <blackrabbit256@gmail.com> | 2022-02-06 21:30:26 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-06 11:30:26 +0100 |
commit | 9fb8d3164ce07e6cd08fe60f2e6f1203ccb8991a (patch) | |
tree | 8e525e9d65ab48da74602bec20e68e5cae51d754 /archinstall/lib/translation.py | |
parent | ec73bdab4cf124aba16e10293e5e75a3bc89afb8 (diff) |
-rw-r--r-- | archinstall/lib/translation.py | 13 |
diff --git a/archinstall/lib/translation.py b/archinstall/lib/translation.py index 1ae6989d..16556fbe 100644 --- a/archinstall/lib/translation.py +++ b/archinstall/lib/translation.py @@ -28,7 +28,7 @@ class Languages: class DeferredTranslation: - def __init__(self, message): + def __init__(self, message: str): self.message = message def __len__(self) -> int: @@ -40,6 +40,15 @@ class DeferredTranslation: return self.message return translate(self.message) + def __lt__(self, other) -> bool: + return self.message < other + + def __gt__(self, other) -> bool: + return self.message > other + + def format(self, *args) -> str: + return self.message.format(*args) + @classmethod def install(cls): import builtins @@ -48,8 +57,6 @@ class DeferredTranslation: class Translation: def __init__(self, locales_dir): - DeferredTranslation.install() - self._languages = {} for name in self.get_all_names(): |