Update english messages

master3.3
Mike Hiretsky 12 years ago
parent b5940e67c8
commit 2c8055ca72

@ -600,7 +600,7 @@ class fileHeader(_terms):
self.typeAppend = typeAppend
else:
self.headerTerm = False
self.setError(_("incorrect header parameters - '%s'")\
self.setError(_("incorrect header parameter: '%s'")\
%"append=%s"%self.params["append"])
if 'exec' in self.params:
self.execStr = "#!%s"%self.params['exec']
@ -609,7 +609,7 @@ class fileHeader(_terms):
incorrectParams = set(self.params.keys()) - set(self.allowParam)
if incorrectParams:
self.headerTerm = False
self.setError(_("incorrect header parameters - '%s'")\
self.setError(_("incorrect header parameter: '%s'")\
%" ".join(list(incorrectParams)))
def _getType(self):
@ -704,7 +704,7 @@ class dirHeader(_terms):
self.body = ""
if self.body.strip():
self.headerTerm = False
self.setError(_("incorrect text in template: '%s'")\
self.setError(_("incorrect text in the template: '%s'")\
%self.body)
flagErrorBody = True
if not flagErrorBody:
@ -741,14 +741,14 @@ class dirHeader(_terms):
self.typeAppend = typeAppend
else:
self.headerTerm = False
self.setError(_("incorrect header parameters - '%s'")\
self.setError(_("incorrect header parameter: '%s'")\
%"append=%s"%self.params["append"])
if not flagErrorBody:
if not incorrectParams:
incorrectParams = set(self.params.keys()) - set(self.allowParam)
if incorrectParams:
self.headerTerm = False
self.setError(_("incorrect header parameters - '%s'")\
self.setError(_("incorrect header parameter: '%s'")\
%" ".join(list(incorrectParams)))
def _getAppend(self):
@ -2553,21 +2553,24 @@ class templateFunction(_error, _shareTemplate, _shareTermsFunction):
num = int(localVars[strNum])
except:
self.raiseErrTemplate(
_("error var %s not int")%str(strNum))
_("error: variable %s is not integer")%
str(strNum))
elif self.objVar.exists(strNum):
try:
num = int(self.objVar.Get(strNum))
except:
self.raiseErrTemplate(
_("error var %s not int")%str(strNum))
_("error: variable %s is not integer")%
str(strNum))
else:
self.raiseErrTemplate(
_("error local var %s not defined")%str(strNum))
_("error: local variable %s not defined")%
str(strNum))
if minus:
num = -num
strNumers.append(num)
return sum(strNumers)
self.raiseErrTemplate(_("error template term %s, incorrect data")\
self.raiseErrTemplate(_("error: template term %s, incorrect data")\
%str(term))
def multAndDiv(self, term, localVars):
@ -2797,7 +2800,8 @@ class templateFunction(_error, _shareTemplate, _shareTermsFunction):
'uuid':string.ascii_lowercase[:6] + string.digits}
if not terms[0] in fArgvNames:
self.raiseErrTemplate(
_("first argument function must be 'num','pas' or 'uuid'"))
_("the first argument of the function must "
"be 'num','pas' or 'uuid'"))
try:
lenStr = int(terms[1])
except:
@ -2832,7 +2836,7 @@ or 'lower' or 'capitalize'"))
except:
raise TemplatesError(
_("error in template %s")%self.nameTemplate + "\n" +
_("error var %s not found")%str(terms[1]))
_("error: variable %s not found")%str(terms[1]))
replace = ""
strValue = _toUNICODE(strValue)
if terms[0] == 'upper':
@ -2870,12 +2874,12 @@ or 'lower' or 'capitalize'"))
if len(terms) == 1:
self.stackGlobalVars.append(str(value))
else:
self.raiseErrTemplate(_("error var %s exists")\
self.raiseErrTemplate(_("error: variable %s is exists")\
%str(nameLocVar))
else:
# Если переменная не существует
if len(terms) == 1:
self.raiseErrTemplate(_("error var %s not exists")\
self.raiseErrTemplate(_("error: variable %s is not exists")\
%str(nameLocVar))
elif len(terms) == 2:
value = terms[1].strip()
@ -2902,7 +2906,7 @@ or 'lower' or 'capitalize'"))
localVars[nameLocVar] = self.stackGlobalVars.pop()
else:
self.raiseErrTemplate(
_("error, gloval variables stack is empty"))
_("error: global variables stack is empty"))
else:
self.raiseErrTemplate()
replace = ""
@ -3222,7 +3226,7 @@ or 'lower' or 'capitalize'"))
pass
if not flagFoundVar:
# Если переменная не существует
self.raiseErrTemplate(_("error var %s not exists")\
self.raiseErrTemplate(_("error: variable %s is not exists")\
%str(nameLocVar))
if not type(value) in (list,tuple):
# Значение переменной не список или кортеж
@ -3242,7 +3246,8 @@ or 'lower' or 'capitalize'"))
def funcDisk(self, funArgv, resS, localVars, textTemplateTmp):
"""Функция шаблона disk().
Первый аргумент ищется в значении переменной os_disk_install
(значение os_install_disk_mount - список точек монтирования при установке)
(значение os_install_disk_mount -
список точек монтирования при установке)
второй аргумент используется для поиска в переменной
os_disk_второй_аргумент (значение os_disk_второй_аргумент - список)
В os_install_disk_mount ищется первый аргумент, находим его индекс
@ -3262,7 +3267,8 @@ or 'lower' or 'capitalize'"))
valueVar = self.objVar.Get(nameVar)
except:
# Если переменная не существует
self.raiseErrTemplate(_("error var %s not exists")%nameVar)
self.raiseErrTemplate(
_("error: variable %s is not exists")%nameVar)
nameElementVar = "os_install_disk_%s"%lastElementVar
try:
valueElementVar = self.objVar.Get(nameElementVar)
@ -3273,7 +3279,7 @@ or 'lower' or 'capitalize'"))
valueElementVar = self.objVar.Get(nameElementVar)
except:
self.raiseErrTemplate(_("%s wrong")%lastElementVar+"\n"+
_("error var %s not exists")\
_("error: variable %s is not exists")\
%nameElementVar)
if not type(valueVar) in (list,tuple):
# Значение переменной не список или кортеж
@ -4912,7 +4918,7 @@ variable 'cl_name'"))
objTempl = self.getFormatObj(formatTemplate, self.textTemplate)
if not objTempl:
self.setError(\
_("Incorrect header parmeter format=%s in template")\
_("Incorrect header parameter format=%s in template")\
%formatTemplate + " " + nameFileTemplate)
return False
if objHeadOld and objHeadOld.body:
@ -4953,7 +4959,7 @@ variable 'cl_name'"))
self.textTemplate)
if not objTemplNew:
self.setError(\
_("Incorrect header parmeter format=%s in template")\
_("Incorrect header parameter format=%s in template")\
%formatTemplate + " " + nameFileTemplate)
return False
if "xml_" in formatTemplate:
@ -5074,7 +5080,7 @@ variable 'cl_name'"))
self.textTemplate = objTxtCoder.encode(self.textTemplate)
if formatTemplate =="raw":
self.setError(\
_("Incorrect header parmeter append=%s in template")\
_("Incorrect header parameter append=%s in template")\
%typeAppendTemplate + " " + nameFileTemplate)
return False
# создаем объект формата шаблона
@ -5082,7 +5088,7 @@ variable 'cl_name'"))
self.textTemplate)
if not objTemplNew:
self.setError(\
_("Incorrect header parmeter format=%s in template")\
_("Incorrect header parameter format=%s in template")\
%formatTemplate + " " + nameFileTemplate)
return False
if "xml_" in formatTemplate:
@ -5382,7 +5388,7 @@ class iniParser(_error, templateFormat):
fcntl.flock(self.FD.fileno(), fcntl.LOCK_EX)
os.chmod(self.iniFile, self.mode)
except:
self.setError(_("Unable to create file") + ": " + self.iniFile)
self.setError(_("Failed to create the file") + ": " + self.iniFile)
return False
if not self.FD:
self.setError(_("Unable to write into file") + ": " + self.iniFile)

@ -695,7 +695,7 @@ class DataVars:
varModule = importlib.import_module(data)
except (ImportError,AttributeError),e:
raise DataVarsError("\n".join([
_("Error in import module %s")%data,
_("Failed to import module %s")%data,
_("error") + ": " +str(e)]))
# get all Variable classes from module
# variable of class VariableClAction will be named cl_action
@ -1028,7 +1028,7 @@ class DataVars:
return True
else:
raise DataVarsError(_("Unable to find alias '%s' of the path"
"for storage of template variables")%location)
" for storage of template variables")%location)
return False
def Delete(self, varname, location='default', header=False):

@ -119,7 +119,7 @@ class xml_gconf(xml_xfce):
(found '<gconf><%(tag)s>..</%(tag)s></gconf>'")%{'tag':tagName})
return False
if not n.hasAttribute("name"):
self.setError(_('Not found arrtibute "name" in tag entry'))
self.setError(_('Not found attribute "name" in tag entry'))
return False
flagType = n.hasAttribute("type")
flagValue = False
@ -127,7 +127,7 @@ class xml_gconf(xml_xfce):
if flagSchema:
nSchema = n.getAttribute("schema")
if not flagType and not flagSchema:
self.setError(_('Not found arrtibute "type" in tag entry'))
self.setError(_('Not found attribute "type" in tag entry'))
return False
nName = n.getAttribute("name")
attrName = u"attribute::name='%s'"%nName
@ -137,7 +137,7 @@ class xml_gconf(xml_xfce):
# Проверка правильности аттрибута type
if not nType in self.supportEntryTypes:
self.setError(\
_('Incorrect arrtibute "type" - <entry type="%s"/>')\
_('Incorrect attribute "type" - <entry type="%s"/>')\
%nType)
return False
if flagValue:
@ -179,7 +179,8 @@ Valid values attribute 'action': \
flagJoin = False
flagDrop = True
if flagRootNode:
textError = _('Incorrect action="drop" in root node')
textError = \
_('Incorrect action="drop" in the root node')
self.setError(textError)
return False
if oldNodes:
@ -265,7 +266,7 @@ the same nodes at one level")
try:
self.joinDoc(xml_gconfObj.doc)
except:
self.setError(_("Can not join template"))
self.setError(_("Failed to join the template"))
return False
return True

@ -54,7 +54,7 @@ class xml_gconf_tree(xml_gconf):
return False
if not n.hasAttribute("name"):
self.setError(\
_('Not found arrtibute "name" in %(tag)s')\
_('Not found attribute "name" in %(tag)s')\
%{'tag':tagNameStr})
return False
nName = n.getAttribute("name")
@ -91,7 +91,8 @@ Valid values attribute 'action': \
flagDrop = True
flagJoin = False
if flagRootNode:
textError = _('Incorrect action="drop" in root node')
textError = \
_('Incorrect action="drop" in the root node')
self.setError(textError)
return False
if oldNodes:
@ -183,6 +184,6 @@ the same nodes at one level")
try:
self.joinDoc(xml_gconfObj.doc)
except:
self.setError(_("Can not join template"))
self.setError(_("Failed to join the template"))
return False
return True

@ -81,7 +81,7 @@ class xml_xfce(_error):
try:
self.joinDoc(xml_xfceObj.doc)
except:
self.setError(_("Can not join template"))
self.setError(_("Failed to join the template"))
return False
return True
@ -182,7 +182,8 @@ Valid values attribute 'action': \
flagJoin = False
flagDrop = True
if flagRootNode:
textError = _('Incorrect action="drop" in root node')
textError = \
_('Incorrect action="drop" in the root node')
self.setError(textError)
return False
if oldNodes:

@ -105,7 +105,8 @@ Valid values attribute 'action': \
flagJoin = False
flagDrop = True
if flagRootNode:
textError = _('Incorrect action="drop" in root node')
textError = \
_('Incorrect action="drop" in the root node')
self.setError(textError)
return False
if path == "panel":
@ -190,7 +191,7 @@ the same nodes at one level")
try:
self.joinDoc(xml_xfceObj.doc)
except:
self.setError(_("Can not join template"))
self.setError(_("Failed to join the template"))
return False
return True

@ -227,7 +227,7 @@ in a sambaDomainName',
"%s-%s"%(userName,strUid),
service)
if os.path.exists(delBackDir) and os.listdir(delBackDir):
self.printERROR(_("Found deleted user data dir %s")\
self.printERROR(_("Found deleted users data in directory %s")\
%delBackDir)
self.printERROR(_("Not created deleted user data dir %s")\
%delBackDir)
@ -310,7 +310,7 @@ in a sambaDomainName',
def printW():
cl_overriding.printSUCCESS(_("Incorrect string allow networks"))
cl_overriding.printSUCCESS(\
_("Example - allow networks: 10.0.0.0/24 10.0.10.0/24"))
_("Example: available networks: 10.0.0.0/24 10.0.10.0/24"))
cl_overriding.printSUCCESS(_("Try again\n"))
strNet = rawInput(strPrompt, strNetAllow)
i = 0

@ -244,7 +244,7 @@ class updateUserConfigs(shareUpdateConfigs):
set(self.getConfiguredPasswdUsers()))))
if not xUsers:
self.logger.info(_("Package %s") %nameProgram)
self.logger.warn(_("Not found X sessions users"))
self.logger.warn(_("X session users not found"))
return True
self.logger.info(_("Package %s") %nameProgram)
self.logger.info(_("Update desktop configuration files"))
@ -287,7 +287,8 @@ class updateUserConfigs(shareUpdateConfigs):
sorted(list(set(dirsFiles[1])))))
if dictPakkages:
for calcPkg in listIndex:
self.printWARNING(_("Package %s has changed files")\
self.printWARNING(
_("Package %s has modified the following files")\
%calcPkg+":")
for userName, configFiles in dictPakkages[calcPkg]:
self.printWARNING(" "*2 + _("User %s")%userName + ":")
@ -452,7 +453,9 @@ class updateSystemConfigs(shareUpdateConfigs):
sorted(list(set(dirsFiles[1])))
if dictPakkages:
for calcPkg in listIndex:
self.printWARNING(_("Package %s has changed files")%calcPkg+":")
self.printWARNING(
_("Package %s has modified the following files")%
calcPkg+":")
for nameF in dictPakkages[calcPkg]:
nameFile = nameF.partition(configPath)[2]
if nameFile:

@ -86,7 +86,7 @@ def getUserPassword(flag="dialog", pwDialog=False):
if flag == "dialog":
if not pwDialog:
pwDialog = [_("New password"),
_("Retype new password")]
_("Retype the new password")]
pwdA = getpass.getpass(pwDialog[0]+":")
pwdB = getpass.getpass(pwDialog[1]+":")
elif flag == "stdin":
@ -98,7 +98,7 @@ incorrect option 'flag=%s'")%flag)
return False
if not pwdA or not (pwdA == pwdB):
cl_overriding.printERROR(_("ERROR") + ": " +\
_("password incorrect")+ ": " + _("try again"))
_("wrong password")+ ": " + _("try again"))
return False
userPwd = pwdA
return userPwd

Loading…
Cancel
Save