Update english messages

master3.3
Mike Hiretsky 12 years ago
parent f3a355baeb
commit cae8ef31fa

@ -73,8 +73,8 @@ class updateConfFiles(color_print):
flagFoundPath = True flagFoundPath = True
if not flagFoundPath: if not flagFoundPath:
self.printERROR(_("Incorrect path %s")%cltTemplatePath) self.printERROR(_("Incorrect path %s")%cltTemplatePath)
self.printWARNING(_("Use the following directories and their \ self.printWARNING(_("Use the following directories: %s and their "
subdirectories %s")%', '.join(dirsTemplates)) "subdirectories")%', '.join(dirsTemplates))
return False return False
if not os.path.exists(cltTemplatePath): if not os.path.exists(cltTemplatePath):
self.printERROR(_("File '%s' does not exist")%cltTemplatePath) self.printERROR(_("File '%s' does not exist")%cltTemplatePath)
@ -87,7 +87,7 @@ subdirectories %s")%', '.join(dirsTemplates))
return False return False
clTempl = templateClt(self.clVars) clTempl = templateClt(self.clVars)
if not cltTemplatePath.endswith(clTempl.extFileTemplate): if not cltTemplatePath.endswith(clTempl.extFileTemplate):
self.printERROR(_("extension of the file '%s' not '.clt'") self.printERROR(_("extension of the file '%s' not 'clt'")
%cltTemplatePath) %cltTemplatePath)
return False return False
calcPkg = self.clVars.Get("cl_name")+"-" + self.clVars.Get("cl_ver") calcPkg = self.clVars.Get("cl_name")+"-" + self.clVars.Get("cl_ver")
@ -95,7 +95,7 @@ subdirectories %s")%', '.join(dirsTemplates))
self.clVars.Set("cl_action", "merge", True) self.clVars.Set("cl_action", "merge", True)
nameFile = clTempl.applyTemplate(cltTemplatePath) nameFile = clTempl.applyTemplate(cltTemplatePath)
if nameFile is False: if nameFile is False:
self.printERROR(_("Error template in a package %s")\ self.printERROR(_("Template error in package %s")\
%calcPkg) %calcPkg)
for errMess in clTempl.getError().splitlines(): for errMess in clTempl.getError().splitlines():
self.printERROR(errMess) self.printERROR(errMess)
@ -193,7 +193,7 @@ subdirectories %s")%', '.join(dirsTemplates))
nameAndVerPkg = clVars.Get("cl_name")+"-"+\ nameAndVerPkg = clVars.Get("cl_name")+"-"+\
clVars.Get("cl_ver") clVars.Get("cl_ver")
if dirsFiles is False: if dirsFiles is False:
self.printERROR(_("Error template in a package %s")\ self.printERROR(_("Template error in package %s")\
%nameAndVerPkg) %nameAndVerPkg)
for errMess in clTempl.getError().splitlines(): for errMess in clTempl.getError().splitlines():
self.printERROR(errMess) self.printERROR(errMess)

@ -31,18 +31,18 @@ COMMENT_EXAMPLES = _("Apply all templates to all packages")
EXAMPLES = _("%prog --locate all") EXAMPLES = _("%prog --locate all")
DESCRIPTION = _("Calculate Linux templates utility") DESCRIPTION = _("Calculate Linux Templates Utility")
CMD_OPTIONS = [{'shortOption':"l", CMD_OPTIONS = [{'shortOption':"l",
'longOption':"locate", 'longOption':"locate",
'optVal':"LOCATE", 'optVal':"LOCATE",
'type':'choice', 'type':'choice',
'choices':['all','clt','local','remote'], 'choices':['all','clt','local','remote'],
'help':_("select location templates \ 'help':_("select location for \
'all','clt','local','remote'")}, 'all','clt','local','remote' templates")},
{'longOption':'merge', {'longOption':'merge',
'optVal':"PACKAGE", 'optVal':"PACKAGE",
'help':_("apply templates to specified package only") 'help':_("apply templates to the specified package only")
}, },
{'longOption':"clt", {'longOption':"clt",
'optVal':"CLT_TEMPLATE", 'optVal':"CLT_TEMPLATE",
@ -95,7 +95,7 @@ class apply_template_cmd(share_cmd):
if len(args) == 0: if len(args) == 0:
if not optObj.clt and not optObj.l: if not optObj.clt and not optObj.l:
errMsg = _("option required")+": --clt "+_("or")+" --locate" errMsg = _("required option")+": --clt "+_("or")+" --locate"
self.optobj.error(errMsg) self.optobj.error(errMsg)
return False return False
elif len(args) == 1: elif len(args) == 1:

@ -280,7 +280,7 @@ class Distributive(object):
"""Copy files from 'fromdir' directory to 'todir' directory""" """Copy files from 'fromdir' directory to 'todir' directory"""
cpCmd = varsShare().getProgPath('/bin/cp') cpCmd = varsShare().getProgPath('/bin/cp')
if not cpCmd: if not cpCmd:
raise DistributiveError(_("Failed to find '%s' command")%"cp") raise DistributiveError(_("'%s' not found")%"cp")
try: try:
joinFrom = partial(path.join,fromdir) joinFrom = partial(path.join,fromdir)
params = [cpCmd,"-a"]+\ params = [cpCmd,"-a"]+\
@ -552,7 +552,7 @@ class MultiPartitions:
unnecessaryAttr = (set(dictDataPart.keys()) ^ set(argv.keys())) -\ unnecessaryAttr = (set(dictDataPart.keys()) ^ set(argv.keys())) -\
set(dictDataPart.keys()) set(dictDataPart.keys())
if unnecessaryAttr: if unnecessaryAttr:
raise DistributiveError(_("Failed to use attributes (%s)")\ raise DistributiveError(_("Failed to use (%s) attributes")\
%", ".join(map(lambda x:"DataPartition.%s"%x, unnecessaryAttr))) %", ".join(map(lambda x:"DataPartition.%s"%x, unnecessaryAttr)))
else: else:
partObj = DataPartition() partObj = DataPartition()
@ -575,7 +575,7 @@ class MultiPartitions:
return map(lambda x: x.isFormat, self.listPartitions) return map(lambda x: x.isFormat, self.listPartitions)
def getFileSystems(self): def getFileSystems(self):
"""Get list file systems ["reiserfs",...]""" """Get list filesystems ["reiserfs",...]"""
return map(lambda x: x.fileSystem, self.listPartitions) return map(lambda x: x.fileSystem, self.listPartitions)
def getPartitions(self): def getPartitions(self):
@ -794,19 +794,19 @@ class PartitionDistributive(Distributive):
"""Checking mount point""" """Checking mount point"""
if isMount(dev): if isMount(dev):
raise DistributiveError( raise DistributiveError(
_("Failed to format partition %s, because it is mounted")%dev) _("Failed to format %s, because this partition is mounted")%dev)
def formatPartition(self, dev,format="reiserfs",label=""): def formatPartition(self, dev,format="reiserfs",label=""):
"""Format partition""" """Format partition"""
if not format in self.formatUtilities: if not format in self.formatUtilities:
raise DistributiveError( raise DistributiveError(
_("Specified format of '%s' not supported")%format) _("Specified format of '%s' is not supported")%format)
if dev in map(lambda y: y.split(" ")[0], if dev in map(lambda y: y.split(" ")[0],
filter(lambda x: x.startswith("/"), filter(lambda x: x.startswith("/"),
open("/proc/swaps"))): open("/proc/swaps"))):
raise DistributiveError(\ raise DistributiveError(\
_("Failed to format partition %s, because it is used as swap")% _("Failed to format %s, because this partition "
dev) "is used as swap")%dev)
self._checkMount(dev) self._checkMount(dev)
if not os.access(dev,os.W_OK): if not os.access(dev,os.W_OK):
raise DistributiveError(_("Failed to format the partition") + raise DistributiveError(_("Failed to format the partition") +
@ -879,7 +879,7 @@ class PartitionDistributive(Distributive):
else: else:
sleep(waittime) sleep(waittime)
raise DistributiveError( raise DistributiveError(
_("Failed to found partition %s after changing the system id")%dev) _("Failed to found partition %s after changing the system ID")%dev)
def formatSwapPartition(self, dev): def formatSwapPartition(self, dev):
"""Format swap partition""" """Format swap partition"""
@ -887,11 +887,11 @@ class PartitionDistributive(Distributive):
filter(lambda x: x.startswith("/"), filter(lambda x: x.startswith("/"),
open("/proc/swaps"))): open("/proc/swaps"))):
raise DistributiveError(\ raise DistributiveError(\
_("Failed to execute 'mkswap %s', the swap partition is used " _("Failed to execute 'mkswap %s', as the swap partition is used"
"by the current system") %dev) " by the current system") %dev)
if isMount(dev): if isMount(dev):
raise DistributiveError( raise DistributiveError(
_("Failed to format partition %s, because it is mounted") %dev) _("Failed to format %s, because this partition is mounted")%dev)
execStr = self.formatUtilities["swap"]%dev execStr = self.formatUtilities["swap"]%dev
res,errmes = self.runOsCommand(execStr) res,errmes = self.runOsCommand(execStr)
if res == 0: if res == 0:
@ -1088,7 +1088,7 @@ class IsoDistributive(Distributive):
if path.isdir(self.file): if path.isdir(self.file):
return _("image directory %s")%self.file return _("image directory %s")%self.file
else: else:
return _("iso image %s")%self.file return _("ISO image %s")%self.file
def probe(self): def probe(self):
"""Check directory for iso content""" """Check directory for iso content"""
@ -1127,7 +1127,7 @@ class IsoDistributive(Distributive):
fileLive = self._getLastLive(mdirectory) fileLive = self._getLastLive(mdirectory)
if not fileLive: if not fileLive:
self._umountIso(mdirectory) self._umountIso(mdirectory)
raise DistributiveError(_("Iso %s contains no live image") % raise DistributiveError(_("ISO %s contains no live image") %
self.file) self.file)
return SquashDistributive(path.join(mdirectory,fileLive), return SquashDistributive(path.join(mdirectory,fileLive),
parent=self,exclude=self.exclude, parent=self,exclude=self.exclude,
@ -1161,7 +1161,7 @@ class IsoDistributive(Distributive):
mkisoUtil = '/usr/bin/mkisofs' mkisoUtil = '/usr/bin/mkisofs'
if not path.exists(mkisoUtil): if not path.exists(mkisoUtil):
raise DistributiveError(_("Failed to create the iso image") + raise DistributiveError(_("Failed to create the ISO image") +
" : %s"%_("command '%s' not found")%mkisoUtil) " : %s"%_("command '%s' not found")%mkisoUtil)
res,errmes = self.runOsCommand( res,errmes = self.runOsCommand(
"%(progname)s %(params)s -o %(target)s %(source)s/"% "%(progname)s %(params)s -o %(target)s %(source)s/"%
@ -1174,12 +1174,12 @@ class IsoDistributive(Distributive):
if res == 0: if res == 0:
return True return True
else: else:
raise DistributiveError(_("Failed to create the iso image") + raise DistributiveError(_("Failed to create the ISO image") +
" %s:\n%s"%(file,errmes)) " %s:\n%s"%(file,errmes))
def prepareIso(self): def prepareIso(self):
raise DistributiveError( raise DistributiveError(
_("Iso image cannot be created without overriding prepareIso")) _("The ISO image cannot be created without overriding prepareIso"))
def installFrom(self, source, **kwargs): def installFrom(self, source, **kwargs):
"""Install distributive to partition from source distributive""" """Install distributive to partition from source distributive"""
@ -1231,7 +1231,8 @@ class FlashDistributive(PartitionDistributive):
self._umountDirectory(mp) self._umountDirectory(mp)
else: else:
raise DistributiveError( raise DistributiveError(
_("Failed to format partition %s, because it is mounted")%dev) _("Failed to format %s, because this partition is mounted")
%dev)
def getType(self): def getType(self):
return _("USB flash %s")%self.file return _("USB flash %s")%self.file
@ -1256,7 +1257,7 @@ class FlashDistributive(PartitionDistributive):
**kwargs) **kwargs)
else: else:
raise DistributiveError( raise DistributiveError(
_("Installation to flash does not support %s")% _("Installation on a Flash does not support %s")%
source.__class__.__name__) source.__class__.__name__)
class ScratchDistributive(Distributive): class ScratchDistributive(Distributive):

@ -460,7 +460,7 @@ class Install(color_print):
_in=('/','/boot'), _in=('/','/boot'),
sort='DESC',limit=1) sort='DESC',limit=1)
if not bootDisk: if not bootDisk:
raise DistributiveError(_("Failed to determine boot disk")) raise DistributiveError(_("Failed to determine the boot disk"))
self.setActivePartition(bootDisk) self.setActivePartition(bootDisk)
for mbrDisk in self.clVars.Get('os_install_mbr'): for mbrDisk in self.clVars.Get('os_install_mbr'):
mbrDiskNum = self.Select("os_device_map", mbrDiskNum = self.Select("os_device_map",
@ -536,7 +536,7 @@ class Install(color_print):
def configureSystem(self,autologin): def configureSystem(self,autologin):
"""configuring the current system""" """configuring the current system"""
configureMessage = _("Configure the system") configureMessage = _("Configuring the system")
error = None error = None
keyInter = None keyInter = None
try: try:
@ -560,7 +560,7 @@ class Install(color_print):
sys.path.insert(0, path.abspath(desktopLib)) sys.path.insert(0, path.abspath(desktopLib))
from cl_desktop import desktop from cl_desktop import desktop
self.printMessageForTest( self.printMessageForTest(
_("Enable calculate-desktop " _("calculate-desktop enabled "
"for package configuration")) "for package configuration"))
self.hideStdout() self.hideStdout()
objDesktop = desktop() objDesktop = desktop()
@ -575,7 +575,8 @@ class Install(color_print):
sys.path.insert(0, path.abspath(clientLib)) sys.path.insert(0, path.abspath(clientLib))
from cl_client import client from cl_client import client
self.printMessageForTest( self.printMessageForTest(
_("Enable calculate-client for package configuration")) _("calculate-client enabled "
"for package configuration"))
objClient = client() objClient = client()
objClient.createClVars() objClient.createClVars()
self.hideStdout() self.hideStdout()
@ -588,10 +589,10 @@ class Install(color_print):
pathGlModules = path.join(self.clVars.Get('cl_chroot_path'), pathGlModules = path.join(self.clVars.Get('cl_chroot_path'),
'usr/lib/opengl') 'usr/lib/opengl')
self.printMessageForTest(_("Check the video driver")) self.printMessageForTest(_("Checking the video driver"))
self.printByResult(self.checkVideoDriver()) self.printByResult(self.checkVideoDriver())
if path.exists(pathGlModules): if path.exists(pathGlModules):
self.printMessageForTest(_("Configure OpenGL")) self.printMessageForTest(_("Configuring OpenGL"))
self.printByResult(self.setupOpenGL()) self.printByResult(self.setupOpenGL())
# if change video driver, then restore initramfs # if change video driver, then restore initramfs
installDrv = self.clVars.Get('os_install_x11_video_drv') installDrv = self.clVars.Get('os_install_x11_video_drv')
@ -661,13 +662,13 @@ class Install(color_print):
def afterCopyHDDinstall(self,targetDistr): def afterCopyHDDinstall(self,targetDistr):
"""Action performed after distributive copy for hdd install""" """Action performed after distributive copy for hdd install"""
# copy clt files from current system # copy clt files from current system
self.startTask(_("Coping clt templates to the new system")) self.startTask(_("Copying clt templates to the new system"))
cltCpy = cltCopy(target=targetDistr.getDirectory()) cltCpy = cltCopy(target=targetDistr.getDirectory())
for directory in self.clVars.Get('cl_template_clt_path'): for directory in self.clVars.Get('cl_template_clt_path'):
cltCpy.performCopy(directory) cltCpy.performCopy(directory)
self.endTask() self.endTask()
self.startTask(_("Coping configuration files to the new system")) self.startTask(_("Copying configuration files to the new system"))
fileMask = r"/etc/udev/rules\.d/70-persistent-net\.rules" fileMask = r"/etc/udev/rules\.d/70-persistent-net\.rules"
if self.clVars.Get('os_root_type') != "livecd": if self.clVars.Get('os_root_type') != "livecd":
fileMask = \ fileMask = \
@ -687,7 +688,7 @@ class Install(color_print):
self.endTask("") self.endTask("")
# join templates # join templates
self.startTask(_("Updating configuration"),progress=True) self.startTask(_("Updating the configuration"),progress=True)
self.applyTemplates(targetDistr.getDirectory(), self.applyTemplates(targetDistr.getDirectory(),
targetDistr.getBootDirectory()[:-4]) targetDistr.getBootDirectory()[:-4])
# mount bind mount points # mount bind mount points
@ -702,18 +703,18 @@ class Install(color_print):
self.startTask(_("Migrate users")) self.startTask(_("Migrate users"))
objMigrate = migrate(targetDistr.getDirectory()) objMigrate = migrate(targetDistr.getDirectory())
if not objMigrate.migrate(self.clVars.Get('cl_migrate_data'),[],[]): if not objMigrate.migrate(self.clVars.Get('cl_migrate_data'),[],[]):
raise InstallError(_("Failed to migrate users to the new system")) raise InstallError(_("Failed to migrate users onto the new system"))
self.endTask() self.endTask()
def setupVideo(self): def setupVideo(self):
"""Setup video""" """Setup video"""
pathGlModules = path.join(self.clVars.Get('cl_chroot_path'), pathGlModules = path.join(self.clVars.Get('cl_chroot_path'),
'usr/lib/opengl') 'usr/lib/opengl')
self.startTask(_("Check the video driver")) self.startTask(_("Checking the video driver"))
self.checkVideoDriver() self.checkVideoDriver()
self.endTask() self.endTask()
if path.exists(pathGlModules): if path.exists(pathGlModules):
self.startTask(_("Configure OpenGL")) self.startTask(_("Configuring OpenGL"))
self.setupOpenGL() self.setupOpenGL()
self.endTask() self.endTask()
oldXdrv = self.clVars.Get('os_x11_video_drv') oldXdrv = self.clVars.Get('os_x11_video_drv')
@ -759,7 +760,7 @@ class Install(color_print):
sys.path.insert(0, path.abspath(generalLib)) sys.path.insert(0, path.abspath(generalLib))
sys.path.insert(0, path.abspath(desktopLib)) sys.path.insert(0, path.abspath(desktopLib))
from cl_desktop import desktop from cl_desktop import desktop
self.startTask(_("Enable calculate-desktop " self.startTask(_("calculate-desktop enabled "
"for package configuration")) "for package configuration"))
self.hideStdout() self.hideStdout()
objDesktop = desktop() objDesktop = desktop()
@ -781,7 +782,8 @@ class Install(color_print):
sys.path.insert(0, path.abspath(clientLib)) sys.path.insert(0, path.abspath(clientLib))
from cl_client import client from cl_client import client
self.startTask( self.startTask(
_("Enable calculate-client for package configuration")) _("calculate-client enabled "
"for package configuration"))
objClient = client() objClient = client()
objClient.createClVars() objClient.createClVars()
self.hideStdout() self.hideStdout()
@ -806,7 +808,7 @@ class Install(color_print):
target = None target = None
setupType = self.clVars.Get('cl_setup',humanreadable=True) setupType = self.clVars.Get('cl_setup',humanreadable=True)
if setupType: if setupType:
self.startTask((_("%s are configured")% self.startTask((_("%s are being configured")%
setupType).capitalize(),progress=True) setupType).capitalize(),progress=True)
else: else:
self.startTask(_("System configuration"),progress=True) self.startTask(_("System configuration"),progress=True)
@ -882,7 +884,7 @@ class Install(color_print):
try: try:
#self.clVars.printVars() #self.clVars.printVars()
if self.clVars.Get('cl_autopartition_set') == 'on': if self.clVars.Get('cl_autopartition_set') == 'on':
self.startTask(_("Creating new partition table"), self.startTask(_("Creating a new partition table"),
progress=True) progress=True)
ap = AutoPartition() ap = AutoPartition()
devices = self.clVars.Get('cl_autopartition_device') devices = self.clVars.Get('cl_autopartition_device')
@ -900,7 +902,7 @@ class Install(color_print):
self.setTaskNumber(25) self.setTaskNumber(25)
# cmd options # cmd options
if targetDistr.needFormat: if targetDistr.needFormat:
self.startTask(_("Formating partitions"),progress=True) self.startTask(_("Formatting partitions"),progress=True)
targetDistr.performFormat() targetDistr.performFormat()
self.endTask() self.endTask()
# install distributive # install distributive
@ -933,7 +935,7 @@ class Install(color_print):
self.applyTemplatesFlash('/') self.applyTemplatesFlash('/')
else: else:
self.startTask( self.startTask(
_("Configure flash installation")) _("Configuring flash installation"))
self.applyTemplatesFlash(targetDistr.getDirectory(), self.applyTemplatesFlash(targetDistr.getDirectory(),
progress=True) progress=True)
self.endTask() self.endTask()
@ -964,7 +966,7 @@ class Install(color_print):
try: try:
self.closeClTemplate() self.closeClTemplate()
if sourceDistr and sourceDistr.childs: if sourceDistr and sourceDistr.childs:
self.startTask(_("Releasing the source distribution")) self.startTask(_("Letting go the source distribution"))
sourceDistr.close() sourceDistr.close()
self.endTask() self.endTask()
if targetDistr and targetDistr.childs: if targetDistr and targetDistr.childs:

@ -153,7 +153,7 @@ class Wsdl:
return [] return []
@rpc(Integer, InstallInfo, _returns = Array(ReturnedMessage)) @rpc(Integer, InstallInfo, _returns = Array(ReturnedMessage))
@core_method(category=__('Installation'),title=__('System installing'), @core_method(category=__('Installation'),title=__('System installation'),
image='system-installer,applications-other,drive-harddisk', image='system-installer,applications-other,drive-harddisk',
gui=True,command='cl-install', gui=True,command='cl-install',
rights=['install']) rights=['install'])
@ -172,11 +172,11 @@ class Wsdl:
dv.addGroup(_("Choice of distro"), dv.addGroup(_("Choice of distro"),
normal=('cl_image_filename',), normal=('cl_image_filename',),
expert=('cl_image_linux_shortname', 'cl_image_arch_machine')) expert=('cl_image_linux_shortname', 'cl_image_arch_machine'))
dv.addGroup(_("Allocating drive space"), dv.addGroup(_("Allocate drive space"),
normal=('cl_autopartition_set',), normal=('cl_autopartition_set',),
expert=('cl_autopartition_scheme','cl_autopartition_device', expert=('cl_autopartition_scheme','cl_autopartition_device',
'cl_autopartition_table','cl_autopartition_root_size'), 'cl_autopartition_table','cl_autopartition_root_size'),
expert_label=_("Click for autopartition settings")) expert_label=_("Click to set up autopartition options"))
dv.addGroup(_("Mount points"), dv.addGroup(_("Mount points"),
normal=('os_location_data',), normal=('os_location_data',),
brief=('os_location_data','os_install_mbr'), brief=('os_location_data','os_install_mbr'),
@ -230,7 +230,7 @@ class Wsdl:
brief=params.brief, brief=params.brief,
has_brief=True, has_brief=True,
allsteps=langChanged, allsteps=langChanged,
brief_label=_("Starting the installation")) brief_label=_("Start installing"))
self.set_cache(sid, 'install', "vars",dv,smart=False) self.set_cache(sid, 'install', "vars",dv,smart=False)
return view return view

@ -42,10 +42,10 @@ class VideoVariable(Variable):
""" """
if self.Get('os_install_root_type') == 'flash': if self.Get('os_install_root_type') == 'flash':
return \ return \
_("Video configuration unavailable for flash installation") _("Video configuration unavailable for Flash installation")
if self.Get('os_install_x11_server_set') == 'no' and self.xorg_need: if self.Get('os_install_x11_server_set') == 'no' and self.xorg_need:
return \ return \
_("Installed distro has not Xorg server") _("This distribution does not provide a Xorg server")
return "" return ""
class ResolutionVariable(VideoVariable): class ResolutionVariable(VideoVariable):
@ -77,7 +77,6 @@ class ResolutionVariable(VideoVariable):
resolution=value, resolution=value,
example="(%s:%s)"%(_("Example"),"1024x768"))) example="(%s:%s)"%(_("Example"),"1024x768")))
class VariableOsInstallX11Resolution(ResolutionVariable): class VariableOsInstallX11Resolution(ResolutionVariable):
""" """
X.org resolution X.org resolution
@ -87,7 +86,7 @@ class VariableOsInstallX11Resolution(ResolutionVariable):
metavalue = "<width>x<height>" metavalue = "<width>x<height>"
def init(self): def init(self):
self.help = _("set Xorg resolution") self.help = _("set the Xorg resolution")
self.label = _("Screen resolution") self.label = _("Screen resolution")
def get(self): def get(self):
@ -168,9 +167,9 @@ class VariableOsInstallX11VideoDrv(VideoVariable):
else: else:
if not value in getInstalledVideo(prefix="/") and \ if not value in getInstalledVideo(prefix="/") and \
not value in ("auto","other"): not value in ("auto","other"):
error =_("%s videodriver is unavailable")%value error =_("videodriver %s is unavailable")%value
if value in self.pkgDrvMap: if value in self.pkgDrvMap:
error += ". " + (_("Install %s driver with:") error += ". " + (_("Install driver %s with:")
%self.pkgDrvMap[value][0]) %self.pkgDrvMap[value][0])
error += "\n" + ("emerge %s"%self.pkgDrvMap[value][1]) error += "\n" + ("emerge %s"%self.pkgDrvMap[value][1])
raise VariableError(error) raise VariableError(error)
@ -190,7 +189,7 @@ class VariableOsInstallX11Composite(VideoVariable):
opt = ['--composite'] opt = ['--composite']
def init(self): def init(self):
self.help = _("set composite") self.help = _("set the composite")
self.label = _("Composite") self.label = _("Composite")
def get(self): def get(self):
@ -227,7 +226,7 @@ class VariableOsInstallFbResolution(ResolutionVariable):
fbres = True fbres = True
def init(self): def init(self):
self.help = _("set framebuffer resolution") self.help = _("set the framebuffer resolution")
self.label = _("Framebuffer resolution") self.label = _("Framebuffer resolution")
def get(self): def get(self):

@ -159,7 +159,7 @@ class AutoPartition:
else: else:
sleep(waittime) sleep(waittime)
raise AutopartitionError( raise AutopartitionError(
_("Failed to found partition %s after creating partition table") _("Failed to found partition %s after creating the partition table")
%device) %device)
def _createPhisicalVolumes(self,devices): def _createPhisicalVolumes(self,devices):
@ -247,7 +247,7 @@ class AutoPartition:
disks = map(lambda x:"%s1"%x,devices) disks = map(lambda x:"%s1"%x,devices)
if not self._createPhisicalVolumes(disks): if not self._createPhisicalVolumes(disks):
raise AutopartitionError( raise AutopartitionError(
_("Failed to create phisical volumes from %s") _("Failed to create physical volumes from %s")
%",".join(devices)) %",".join(devices))
if not self._createVolumesGroup(vgname,disks): if not self._createVolumesGroup(vgname,disks):
@ -362,7 +362,7 @@ class VariableClAutopartitionDevice(AutopartitionHelper,Variable):
untrusted = True untrusted = True
def init(self): def init(self):
self.help = _("set autopartition device") self.help = _("set the autopartition device")
self.label = _("Devices for install") self.label = _("Devices for install")
def get(self): def get(self):
@ -380,8 +380,9 @@ class VariableClAutopartitionDevice(AutopartitionHelper,Variable):
def checkNeeded(self,valuelist,usedDevices,agregationType): def checkNeeded(self,valuelist,usedDevices,agregationType):
needDevices = list(set(usedDevices) - set(valuelist)) needDevices = list(set(usedDevices) - set(valuelist))
if needDevices: if needDevices:
raise VariableError(_("Disks {selecteddisk} is {agrtype} part.\n" raise VariableError(_("Disks {selecteddisk} are part of "
"You need use also {needdisk} or clear {agrtype} manualy") "{agrtype}\nYou need to use {needdisk} as well or "
"clear {agrtype} manually")
.format(selecteddisk=",".join( .format(selecteddisk=",".join(
list(set(usedDevices)&set(valuelist))), list(set(usedDevices)&set(valuelist))),
needdisk=",".join(needDevices), needdisk=",".join(needDevices),
@ -413,14 +414,14 @@ class VariableClAutopartitionDevice(AutopartitionHelper,Variable):
def check(self,valuelist): def check(self,valuelist):
if self.Get('cl_autopartition_set') == "on": if self.Get('cl_autopartition_set') == "on":
if not valuelist: if not valuelist:
raise VariableError(_("For autopartition need select install" raise VariableError(_("For autopartition, please select "
" device")) "the install device"))
useDisks = self.Select('os_disk_parent', useDisks = self.Select('os_disk_parent',
where='os_disk_mount',ne='') where='os_disk_mount',ne='')
for value in valuelist: for value in valuelist:
if value in useDisks: if value in useDisks:
raise VariableError( raise VariableError(
_("Device %s already is used by current system")%value) _("Device %s is now used by the current system")%value)
self.checkOnLvm(valuelist) self.checkOnLvm(valuelist)
self.checkOnRaid(valuelist) self.checkOnRaid(valuelist)
if len(valuelist) > 1 and \ if len(valuelist) > 1 and \
@ -432,8 +433,8 @@ class VariableClAutopartitionDevice(AutopartitionHelper,Variable):
if freeSize < 0 and (abs(freeSize))/(Sizes.M*100) > 0: if freeSize < 0 and (abs(freeSize))/(Sizes.M*100) > 0:
availSize = int(self.Get('cl_autopartition_device_size')) availSize = int(self.Get('cl_autopartition_device_size'))
raise VariableError( raise VariableError(
_("The device is not sufficient space available")+"\n"+ _("There is not enough space on this device")+"\n"+
_("Available is {avail}, need is {need}").format( _("{avail} available, {need} needed").format(
avail=humanreadableSize(availSize), avail=humanreadableSize(availSize),
need=humanreadableSize(availSize-freeSize))) need=humanreadableSize(availSize-freeSize)))
@ -448,7 +449,7 @@ class VariableClAutopartitionSet(Variable):
def init(self): def init(self):
self.label = _("Partitions") self.label = _("Partitions")
self.help = _("use autoparitition") self.help = _("autopartition")
def choice(self): def choice(self):
return [("off",_("Use current partitions")), return [("off",_("Use current partitions")),
@ -488,7 +489,7 @@ class VariableClAutopartitionRootSize(AutopartitionHelper,Variable):
def init(self): def init(self):
self.label = _("Root partition size")+ " (MB)" self.label = _("Root partition size")+ " (MB)"
self.help = _("set root partition size for autopartition") self.help = _("set the root partition size for autopartition")
def get(self): def get(self):
if self.Get('os_install_linux_system') == 'server': if self.Get('os_install_linux_system') == 'server':
@ -525,7 +526,7 @@ class VariableClAutopartitionRootSize(AutopartitionHelper,Variable):
self.Get('cl_autopartition_set') == "on": self.Get('cl_autopartition_set') == "on":
if int(value) < Sizes().to_M(MINROOTSIZE): if int(value) < Sizes().to_M(MINROOTSIZE):
raise VariableError( raise VariableError(
_("Root partition size should not be less {size}").format( _("The root partition should be at least {size}").format(
size="7 Gb")) size="7 Gb"))
class VariableClAutopartitionTable(AutopartitionHelper,Variable): class VariableClAutopartitionTable(AutopartitionHelper,Variable):
@ -539,7 +540,7 @@ class VariableClAutopartitionTable(AutopartitionHelper,Variable):
def init(self): def init(self):
self.label = _("Partition table") self.label = _("Partition table")
self.help = _("set partition table for autopartition") self.help = _("set the partition table for autopartition")
def choice(self): def choice(self):
return [("dos","DOS-type Partition Table"), return [("dos","DOS-type Partition Table"),
@ -648,7 +649,7 @@ class VariableClAutopartitionDiskMount(ReadonlyVariable,AutopartitionHelper):
class VariableClAutopartitionDiskFormat(ReadonlyVariable,AutopartitionHelper): class VariableClAutopartitionDiskFormat(ReadonlyVariable,AutopartitionHelper):
""" """
Autopartition disk file system Autopartition disk filesystem
""" """
type = "list" type = "list"

@ -360,7 +360,7 @@ class VariableOsDiskFormat(ReadonlyVariable):
type = "list" type = "list"
def get(self): def get(self):
"""Get current disk file system""" """Get current disk filesystem"""
fstab = FStab('/etc/fstab') fstab = FStab('/etc/fstab')
def getFormat(device): def getFormat(device):
prop = getUdevDeviceInfo(name=device) prop = getUdevDeviceInfo(name=device)
@ -591,7 +591,7 @@ class LocationHelper:
""" """
if self.Get('cl_autopartition_set') == "on": if self.Get('cl_autopartition_set') == "on":
return \ return \
_("Location not available with autopartitioning") _("Location is not available with autopartitioning")
return "" return ""
class VariableOsLocationData(LocationHelper,TableVariable): class VariableOsLocationData(LocationHelper,TableVariable):
@ -608,10 +608,9 @@ class VariableOsLocationData(LocationHelper,TableVariable):
"os_location_size"] "os_location_size"]
def init(self): def init(self):
self.help = _("DISK for installation, will be mounted to DIR. " self.help = _("DISK bound for installation will be mounted to DIR DIR "
"DIR set to 'none' will cancel the mount point " "set to 'none' will cancel the mount point transfer For creating bind "
"transfer. For creating bind mount point you have " "mount point you have to specify the source directory as DISK")
"to specify the source directory as DISK")
self.label = _("Locations") self.label = _("Locations")
class VariableOsLocationSource(LocationHelper,DeviceHelper,Variable): class VariableOsLocationSource(LocationHelper,DeviceHelper,Variable):
@ -688,7 +687,8 @@ class VariableOsLocationSource(LocationHelper,DeviceHelper,Variable):
# check of device specifing # check of device specifing
################################ ################################
if not value: if not value:
raise VariableError(_("For installation need specify root device")) raise VariableError(
_("To install the system, you need to specify the root device"))
########################### ###########################
# check wrong dev # check wrong dev
########################### ###########################
@ -771,7 +771,7 @@ class VariableOsLocationDest(LocationHelper,Variable):
izip(value, izip(value,
self.Get("os_location_size"))): self.Get("os_location_size"))):
raise VariableError( raise VariableError(
_("Root partition should be not less %s")%"7 Gb") _("The root partition should be at least %s")%"7 Gb")
source = self.Get("os_location_source") source = self.Get("os_location_source")
################################ ################################
# check of root device specifing # check of root device specifing
@ -779,7 +779,8 @@ class VariableOsLocationDest(LocationHelper,Variable):
if not source: if not source:
return return
if not filter(lambda x:x == "/",value): if not filter(lambda x:x == "/",value):
raise VariableError(_("For installation need specify root device")) raise VariableError(_("To install the system, you need to "
"specify the root device"))
################################ ################################
disks = filter(lambda x:x[0].startswith('/dev/') and x[1], disks = filter(lambda x:x[0].startswith('/dev/') and x[1],
zip(source,value)) zip(source,value))
@ -819,8 +820,8 @@ class VariableOsLocationDest(LocationHelper,Variable):
rootDev = self.Get('os_root_dev') rootDev = self.Get('os_root_dev')
if rootDev in self.Get('os_install_disk_dev'): if rootDev in self.Get('os_install_disk_dev'):
raise VariableError( raise VariableError(
_("The current root partition %s can not be " _("You may not use the current root partition %s for "
"used for installation")%rootDev) "installation")%rootDev)
################################# #################################
# detect using extended partition # detect using extended partition
################################# #################################
@ -829,7 +830,7 @@ class VariableOsLocationDest(LocationHelper,Variable):
eq='extended',limit=1) eq='extended',limit=1)
if extendedPartitions: if extendedPartitions:
raise VariableError( raise VariableError(
_("Unable to use the extended partition %s for installation")% _("Unable to use extended partition %s for installation")%
extendedPartitions) extendedPartitions)
########################## ##########################
# detect using CDROM disks # detect using CDROM disks
@ -863,10 +864,10 @@ class VariableOsLocationDest(LocationHelper,Variable):
if osInstallRootType == "flash": if osInstallRootType == "flash":
if filter(lambda x: x and x != '/', value): if filter(lambda x: x and x != '/', value):
raise VariableError( raise VariableError(
_("Installation to flash disk is not supported for " _("Installation on a Flash disk is not supported for "
"multipartition install")) "multipartition install"))
if filter(lambda x: x == "swap",value): if filter(lambda x: x == "swap",value):
raise VariableError(_("Installation to flash disk is not " raise VariableError(_("Installation on a Flash disk is not "
"supported for swap disks")) "supported for swap disks"))
######################################## ########################################
# check install on member of RAID or LVM # check install on member of RAID or LVM
@ -887,7 +888,7 @@ class VariableOsLocationFormat(LocationHelper,Variable):
type = "choice-list" type = "choice-list"
def init(self): def init(self):
self.label = _("File system") self.label = _("Filesystem")
def get(self): def get(self):
if self.Get('cl_autopartition_set') == "on": if self.Get('cl_autopartition_set') == "on":
@ -948,13 +949,13 @@ class VariableOsLocationFormat(LocationHelper,Variable):
if not FileSystemManager.checkFSForType(fs, if not FileSystemManager.checkFSForType(fs,
osInstallRootType): osInstallRootType):
raise VariableError( raise VariableError(
_("File system for '%(mp)s' should not be '%(opt)s'") _("Filesystem for '%(mp)s' should not be '%(opt)s'")
%{'mp':mp, 'opt':fs}+" "+ %{'mp':mp, 'opt':fs}+" "+
_("for {typedisk} installation").format( _("for {typedisk} installation").format(
typedisk=osInstallRootType)) typedisk=osInstallRootType))
if mp == "swap" and fs != "swap": if mp == "swap" and fs != "swap":
raise VariableError( raise VariableError(
_("Swap partition {dev} must be formatted as swap").format( _("The swap partition {dev} must be formatted as swap").format(
dev=dev)) dev=dev))
class VariableOsLocationPerformFormat(LocationHelper,Variable): class VariableOsLocationPerformFormat(LocationHelper,Variable):
@ -981,7 +982,7 @@ class VariableOsLocationPerformFormat(LocationHelper,Variable):
"""Check perform format """Check perform format
Check what format will perform for need partition. Check what format will perform for need partition.
At example on change file system on partition. At example on change filesystem on partition.
""" """
DEV,MP,FS,FORMAT = 0,1,2,3 DEV,MP,FS,FORMAT = 0,1,2,3
info = zip(self.Get('os_location_source'), info = zip(self.Get('os_location_source'),
@ -1006,27 +1007,27 @@ class VariableOsLocationPerformFormat(LocationHelper,Variable):
# partition use in current system # partition use in current system
if diskMount.get(dev,''): if diskMount.get(dev,''):
raise VariableError( raise VariableError(
_("Disk {device} should be formatted, but can " _("{device}should, but cannot be formatted, because "
"not be formatted because mounted to " "mounted to {mountpoint} in "
"{mountpoint} in the current system").format( "the current system").format(
device=dev,mountpoint=diskMount.get(dev,''))) device=dev,mountpoint=diskMount.get(dev,'')))
if isMount(dev): if isMount(dev):
raise VariableError( raise VariableError(
_("Please unmount disk {device} for using in" _("Please unmount {device}, as it will be used for "
" installation").format(device=dev)) "installation").format(device=dev))
# but user select non-format # but user select non-format
if not self.isTrue(isformat): if not self.isTrue(isformat):
raise VariableError( raise VariableError(
_("Disk {device} should be formatted").format( _("{device} should be formatted").format(
device=dev)) device=dev))
if self.isTrue(isformat): if self.isTrue(isformat):
if not mp: if not mp:
raise VariableError( raise VariableError(
_("No need to format the unused {dev} disk").format( _("No need to format the unused device {dev}").format(
dev=dev)) dev=dev))
if fs in unavailFS: if fs in unavailFS:
raise VariableError( raise VariableError(
_("File system '%s' is not available")%fs) _("Filesystem '%s' is not available")%fs)
if not dev.startswith('/dev/'): if not dev.startswith('/dev/'):
raise VariableError( raise VariableError(
_("Bind mount points should not be formatted")) _("Bind mount points should not be formatted"))
@ -1357,7 +1358,7 @@ class VariableOsInstallMbr(LocationHelper,Variable):
def init(self): def init(self):
self.label = _("Boot disk") self.label = _("Boot disk")
self.help = _("boot disks for the system bound for install") self.help = _("boot disk for the system bound for install")
def get(self): def get(self):
"""Get default Master boot record install""" """Get default Master boot record install"""
@ -1432,7 +1433,7 @@ class VariableOsInstallMbr(LocationHelper,Variable):
if rootType == "flash": if rootType == "flash":
if len(value) > 1: if len(value) > 1:
raise VariableError( raise VariableError(
_("For flash installation need only one disk")) _("For Flash installation, you need only one disk"))
for mbrDisk in value: for mbrDisk in value:
if self.Get('cl_autopartition_set') == 'on': if self.Get('cl_autopartition_set') == 'on':
tableOnBootDisk = self.Get('cl_autopartition_table') tableOnBootDisk = self.Get('cl_autopartition_table')
@ -1445,8 +1446,8 @@ class VariableOsInstallMbr(LocationHelper,Variable):
"contains no boot record")%mbrDisk) "contains no boot record")%mbrDisk)
if rootType == "flash": if rootType == "flash":
if tableOnBootDisk == "gpt": if tableOnBootDisk == "gpt":
raise VariableError( raise VariableError(_("For Flash installation, you need "
_("For flash installation need disk with dos table")) "a disk with dos table"))
if value: if value:
if self.Get('os_grub2_path'): if self.Get('os_grub2_path'):
self.checkForGrub2() self.checkForGrub2()
@ -1462,14 +1463,14 @@ class VariableOsInstallMbr(LocationHelper,Variable):
sort="DESC",limit=1) sort="DESC",limit=1)
if "lvm-raid" in grubDiskType: if "lvm-raid" in grubDiskType:
raise VariableError( raise VariableError(
_("Grub does not support booting from a RAID assembled from LVM.") _("Grub does not support booting from a RAID assembled from LVM")
+ " " + + ". " +
_("Try to use a separate /boot partition")) _("Try to use a separate /boot partition"))
if grubDiskType.count("raid")>1: if grubDiskType.count("raid")>1:
raise VariableError( raise VariableError(
_("Grub does not support booting from a RAID assembled " _("Grub does not support booting from a RAID assembled "
"from another RAID.") "from another RAID")
+ " " + + ". " +
_("Try to use a separate /boot partition")) _("Try to use a separate /boot partition"))
def checkForLegacyGrub(self): def checkForLegacyGrub(self):
@ -1483,11 +1484,11 @@ class VariableOsInstallMbr(LocationHelper,Variable):
sort="DESC",limit=1) sort="DESC",limit=1)
if "lvm" in bootDiskType or "raid" in bootDiskType: if "lvm" in bootDiskType or "raid" in bootDiskType:
raise ValueError( raise ValueError(
_("Legacy grub does not support boot from raid or lvm " _("Legacy grub requires a separate /boot partition to "
"without separate /boot partition")) "support boot from RAID or LVM"))
if bootDiskFormat in ("btrfs","nilfs2"): if bootDiskFormat in ("btrfs","nilfs2"):
raise ValueError( raise ValueError(
_("Legacy grub does not support booting from %s without " _("To support booting from %s, legacy grub needs a "
"separate /boot partition")%bootDiskFormat) "separate /boot partition")%bootDiskFormat)
class VariableOsInstallRootType(LocationHelper,Variable): class VariableOsInstallRootType(LocationHelper,Variable):

@ -357,7 +357,7 @@ class VariableClImageLinuxShortname(Variable,Linux,DistroRepository):
opt = ['--os','-s'] opt = ['--os','-s']
def init(self): def init(self):
self.label = "%s %s"%(_("Filter"),_("by distributive")) self.label = "%s %s"%(_("Filter"),_("by distribution"))
self.help = _("select the operation system") self.help = _("select the operation system")
def choice(self): def choice(self):

@ -40,7 +40,7 @@ class VariableOsInstallKernelScheduler(Variable):
metavalue = "SCHEDULER" metavalue = "SCHEDULER"
def init(self): def init(self):
self.help = _("set I/O scheduler") self.help = _("set the I/O scheduler")
self.label = _("I/O scheduler") self.label = _("I/O scheduler")
def get(self): def get(self):

@ -38,7 +38,7 @@ class LocaleVariable(ReadonlyVariable,Locale):
""" """
if self.Get('os_install_root_type') == 'flash': if self.Get('os_install_root_type') == 'flash':
return \ return \
_("Locale configuration unavailable for flash installation") _("Locale configuration unavailable for Flash installation")
return "" return ""
class VariableOsInstallLinguas(LocaleVariable): class VariableOsInstallLinguas(LocaleVariable):

@ -44,12 +44,12 @@ class NetHelper:
""" """
if self.Get('os_install_root_type') == 'flash': if self.Get('os_install_root_type') == 'flash':
return \ return \
_("Network configuration unavailable for flash installation") _("Network configuration unavailable for Flash installation")
if self.routing and not self.Select('os_install_net_interfaces', if self.routing and not self.Select('os_install_net_interfaces',
where='os_install_net_dhcp_set', where='os_install_net_dhcp_set',
eq='off',limit=1): eq='off',limit=1):
return _("Network routing is not available " return _("Network routing is not available "
"if all interfaces are set to dhcp") "if all interfaces are set to DHCP")
return "" return ""
class VariableOsInstallNtp(NetHelper,Variable): class VariableOsInstallNtp(NetHelper,Variable):
@ -62,7 +62,7 @@ class VariableOsInstallNtp(NetHelper,Variable):
def init(self): def init(self):
self.label = _("NTP server") self.label = _("NTP server")
self.help = _("set the ntp server for the system") self.help = _("set the NTP server for the system")
class VariableOsInstallProxy(NetHelper,Variable): class VariableOsInstallProxy(NetHelper,Variable):
""" """
@ -118,7 +118,7 @@ class VariableOsInstallNetData(NetHelper,TableVariable):
def init(self): def init(self):
self.label = _("Addresses") self.label = _("Addresses")
self.help = _("ip address with net (example:%s)")%"192.168.1.1/24" self.help = _("IP address with network (example:%s)")%"192.168.1.1/24"
class VariableOsInstallNetHostname(NetHelper,Variable): class VariableOsInstallNetHostname(NetHelper,Variable):
""" """
@ -136,7 +136,7 @@ class VariableOsInstallNetFqdn(NetHelper,Variable):
def init(self): def init(self):
self.label = _("Hostname") self.label = _("Hostname")
self.help = _("set the short hostname or full hostname") self.help = _("set the short or full hostname")
def set(self,value): def set(self,value):
if "." in value: if "." in value:
@ -148,7 +148,7 @@ class VariableOsInstallNetFqdn(NetHelper,Variable):
maxfqdn = 254 maxfqdn = 254
if len(value) > maxfqdn: if len(value) > maxfqdn:
raise VariableError( raise VariableError(
_("Hostname length should be less that %d")%maxfqdn) _("The hostname length should be less than %d")%maxfqdn)
def get(self): def get(self):
# TODO: temporary code for quick run on PXE loading # TODO: temporary code for quick run on PXE loading
@ -347,7 +347,8 @@ class VariableOsInstallNetRouteData(NetHelper,TableVariable):
def init(self): def init(self):
self.label = _("Routing") self.label = _("Routing")
self.help = \ self.help = \
_("add a routing rule (format NETWORK:[GATEWAY][:DEV[:SOURCE]])") _("add a routing rule (specified as "
"NETWORK:[GATEWAY][:DEV[:SOURCE]])")
def get(self,hr=False): def get(self,hr=False):
"""Routing hash""" """Routing hash"""
@ -431,7 +432,7 @@ class VariableOsInstallNetRouteGw(FieldValue,NetHelper,Variable):
self.Get('os_install_net_network'))) self.Get('os_install_net_network')))
for wrongip in ifilterfalse(ip.checkIp,value): for wrongip in ifilterfalse(ip.checkIp,value):
raise VariableError(_("Wrong gateway ip %s")%wrongip) raise VariableError(_("Wrong gateway IP %s")%wrongip)
wrongGws = map(lambda x:x[GW], wrongGws = map(lambda x:x[GW],
filter(lambda x:not ip.isIpInNet(x[GW], filter(lambda x:not ip.isIpInNet(x[GW],
@ -439,7 +440,7 @@ class VariableOsInstallNetRouteGw(FieldValue,NetHelper,Variable):
filter(lambda x:x[GW], filter(lambda x:x[GW],
netsGw))) netsGw)))
if wrongGws: if wrongGws:
raise VariableError(_("Gateways %s is unreachable")% raise VariableError(_("Gateways %s are unreachable")%
(",".join(wrongGws))) (",".join(wrongGws)))
class VariableOsInstallNetRouteDev(FieldValue,NetHelper,Variable): class VariableOsInstallNetRouteDev(FieldValue,NetHelper,Variable):
@ -473,12 +474,13 @@ class VariableOsInstallNetRouteSrc(FieldValue,NetHelper,Variable):
def check(self,value): def check(self,value):
for wrongip in ifilterfalse(ip.checkIp, for wrongip in ifilterfalse(ip.checkIp,
ifilter(None,value)): ifilter(None,value)):
raise VariableError(_("Wrong source ip %s")%wrongip) raise VariableError(_("Wrong source IP %s")%wrongip)
ipAddrs = self.Get('os_install_net_ip') ipAddrs = self.Get('os_install_net_ip')
wrongIps = filter(lambda x: x and not x in ipAddrs, wrongIps = filter(lambda x: x and not x in ipAddrs,
value) value)
if wrongIps: if wrongIps:
raise VariableError(_("Wrong ip addresse %s in source IP")% raise VariableError(
_("Wrong IP address %s in the specified source IP")%
(",".join(wrongIps))) (",".join(wrongIps)))
class VariableOsInstallNetRoute(NetHelper,ReadonlyVariable): class VariableOsInstallNetRoute(NetHelper,ReadonlyVariable):

@ -42,9 +42,9 @@ class UserHelper:
User setting up unavailable for flash installation User setting up unavailable for flash installation
""" """
if self.Get('os_install_root_type') == 'flash': if self.Get('os_install_root_type') == 'flash':
return _("User configuration unavailable for flash installation") return _("User configuration unavailable for Flash installation")
if self.Get('os_install_x11_server_set') == 'no' and self.xorg_need: if self.Get('os_install_x11_server_set') == 'no' and self.xorg_need:
return _("Autologin possible for xorg session only") return _("Autologin is available for Xorg sessions only")
return "" return ""
class VariableOsInstallScratch(Variable): class VariableOsInstallScratch(Variable):
@ -56,7 +56,7 @@ class VariableOsInstallScratch(Variable):
def init(self): def init(self):
self.label = _("Builder mode") self.label = _("Builder mode")
self.help = _("installation for assemble") self.help = _("installation for build")
def get(self): def get(self):
# for installation default - normal system # for installation default - normal system
@ -70,12 +70,13 @@ class VariableOsInstallScratch(Variable):
# scratch not use for falsh and multipartition # scratch not use for falsh and multipartition
if self.Get('os_install_root_type') == "flash": if self.Get('os_install_root_type') == "flash":
raise VariableError( raise VariableError(
_("Installation to flash disk is not supported" _("Installation on a Flash disk is not supported"
" in builder mode")) " in the builder mode"))
if filter(lambda x: not x in ('/','swap'), if filter(lambda x: not x in ('/','swap'),
self.Get('os_install_disk_mount')): self.Get('os_install_disk_mount')):
raise VariableError( raise VariableError(
_("Builder mode does not support multipartition install")) _("The builder mode does not support "
"multipartition install"))
class VariableOsFormatType(ReadonlyVariable): class VariableOsFormatType(ReadonlyVariable):
""" """
@ -114,7 +115,7 @@ class VariableClMigrateData(UserHelper,TableVariable):
def init(self): def init(self):
self.help = _("add a user to the installed system") self.help = _("add a user to the installed system")
self.label = _("Migration users") self.label = _("Migrating users")
class VariableClMigrateUser(UserHelper,Variable): class VariableClMigrateUser(UserHelper,Variable):
""" """
@ -127,7 +128,7 @@ class VariableClMigrateUser(UserHelper,Variable):
def get(self): def get(self):
""" """
Migration users (root and users above 1000 uid) Migrating users (root and users above 1000 uid)
""" """
return getPasswdUsers() return getPasswdUsers()
@ -142,7 +143,7 @@ class VariableClMigrateUserPwd(UserHelper,Variable):
def get(self): def get(self):
""" """
Migration users passwords Migrating users passwords
""" """
retList = [] retList = []
fileName = "/etc/shadow" fileName = "/etc/shadow"
@ -186,7 +187,7 @@ class VariableClMigrateUserPwd(UserHelper,Variable):
for user,pwd in zip(self.Get('cl_migrate_user'),value): for user,pwd in zip(self.Get('cl_migrate_user'),value):
if not pwd: if not pwd:
raise VariableError( raise VariableError(
_("Missed a password for the user %s")%user) _("Missed a password for user %s")%user)
def set(self,value): def set(self,value):
""" """
@ -236,7 +237,7 @@ class VariableClAutologin(UserHelper,Variable):
if value and not value in self.Get('cl_migrate_user'): if value and not value in self.Get('cl_migrate_user'):
raise VariableError(_("User %s is not exists")%value) raise VariableError(_("User %s is not exists")%value)
if value == "root": if value == "root":
raise VariableError(_("Autologin is imposible for %s user")%value) raise VariableError(_("Autologin is unavailable for user %s")%value)
def humanReadable(self): def humanReadable(self):
return self.Get() or _("Not used") return self.Get() or _("Not used")
@ -433,11 +434,11 @@ class VariableClSetup(Variable):
return ["network","locale","video","boot","users",""] return ["network","locale","video","boot","users",""]
def humanReadable(self): def humanReadable(self):
mapType = {'network':_("network parameters"), mapType = {'network':_("network settings"),
'locale':_("localization and time parameters"), 'locale':_("localization and time options"),
'video':_("video parameters"), 'video':_("video settings"),
'boot':_("boot parameters"), 'boot':_("boot parameters"),
'users':_("user parameters") } 'users':_("user settings") }
return mapType.get(self.Get(),"") return mapType.get(self.Get(),"")
def check(self,value): def check(self,value):
@ -454,7 +455,7 @@ class VariableClLive(Variable):
opt = ['--live'] opt = ['--live']
def init(self): def init(self):
self.label = _("Configure only mutable parameter") self.label = _("Configure only mutable parameters")
self.help = _("configure only mutable parameters") self.help = _("configure only mutable parameters")
class VariableOsInstallPxe(ReadonlyVariable): class VariableOsInstallPxe(ReadonlyVariable):

Loading…
Cancel
Save