[PATCH 2/3] Get rid of unnecessary constants in constants_text. (#965985)
Samantha N. Bueno
sbueno+anaconda at redhat.com
Thu Jun 18 17:44:22 UTC 2015
Without ncurses, we don't need to keep these around anymore for the
new text mode.
Related: rhbz#965985
---
pyanaconda/constants_text.py | 32 --------------------------------
1 file changed, 32 deletions(-)
diff --git a/pyanaconda/constants_text.py b/pyanaconda/constants_text.py
index 750a984..d31478a 100644
--- a/pyanaconda/constants_text.py
+++ b/pyanaconda/constants_text.py
@@ -21,38 +21,6 @@
from pyanaconda.constants import *
from pyanaconda.i18n import _, N_
-class Translator:
- """A simple class to facilitate on-the-fly translation for newt buttons"""
- def __init__(self, button, check):
- self.button = button
- self.check = check
-
- def __getitem__(self, which):
- if which == 0:
- return _(self.button)
- elif which == 1:
- return self.check
- raise IndexError
-
- def __len__(self):
- return 2
-
-TEXT_OK_STR = N_("OK")
-TEXT_OK_CHECK = "ok"
-TEXT_OK_BUTTON = Translator(TEXT_OK_STR, TEXT_OK_CHECK)
-
-TEXT_CANCEL_STR = N_("Cancel")
-TEXT_CANCEL_CHECK = "cancel"
-TEXT_CANCEL_BUTTON = Translator(TEXT_CANCEL_STR, TEXT_CANCEL_CHECK)
-
-TEXT_YES_STR = N_("Yes")
-TEXT_YES_CHECK = "yes"
-TEXT_YES_BUTTON = Translator(TEXT_YES_STR, TEXT_YES_CHECK)
-
-TEXT_NO_STR = N_("No")
-TEXT_NO_CHECK = "no"
-TEXT_NO_BUTTON = Translator(TEXT_NO_STR, TEXT_NO_CHECK)
-
# Make the return calls from the UIScreen input() function more clear
INPUT_PROCESSED = None
INPUT_DISCARDED = False
--
1.9.3
More information about the anaconda-patches
mailing list