#
# constants_text.py: text mode constants
#
# Copyright (C) 2000, 2001, 2002 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
from constants import *
import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)
INSTALL_OK = 0
INSTALL_BACK = -1
INSTALL_NOOP = -2
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_BACK_STR = N_("Back")
TEXT_BACK_CHECK = "back"
TEXT_BACK_BUTTON = Translator(TEXT_BACK_STR, TEXT_BACK_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)
TEXT_EDIT_STR = N_("Edit")
TEXT_EDIT_CHECK = "edit"
TEXT_EDIT_BUTTON = Translator(TEXT_EDIT_STR, TEXT_EDIT_CHECK)
TEXT_F12_CHECK = "F12"
>yQri5\f| DijjRy kw8
]!TPԸ(&[E@NLt9oko6MX1QoM)
!DAE>t$Bo xl{:~!ZCW
6i*#y$?|pJg5:`jbF@):q
|ˠpt8k8Xts"S%CF*(IIaԩ=.扦:)->-gk@Vj%D9|=hSWu_*;0͜2LC!f\}ʵ4{ٛOFVm5 )chP5L΅'-W ǺMgO?+;8a.!d!t^D&o7QRc!ʘ̦ه*4DܺdrpgkM#]S3
0T˭0e
=l@R?hC ~,֣J'X) Iܾ珻koyf?Ό̪>Q@f fmn^zrM$.+JZB:#s-,+M/Ă*EOQ=C6i%'_5 O蜸_9 3[kg9
6S#&[Y0Q][>?
'CåNٲɀB}5\SQH{)jvDžքJi>" +IK CGI8/ 0T|.1INv:ڼԋ%4\ڎl VW"tzzhwR0 7+6
]!
n ?{욿t8
_썦!+@a5-#~|ئ`f|M"Z%xpJ5$%K2b~Ctk4c(Te,UW4>Vఔ8aw E< +{ aA POq iC^Ou
"rOyF`ֵjʿӭLRCwEǽ bU+(
贎#7\ !3CD'@ك407䐬hP2G*t={1_} ظ^
.\x-