Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/translation.py
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib/translation.py')
-rw-r--r--archinstall/lib/translation.py13
1 files changed, 10 insertions, 3 deletions
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():