Sync english message with i18n.

master
Mike Hiretsky 13 years ago
parent b3f7a7a2ec
commit 6d22416234

@ -46,7 +46,7 @@ class DataVarsDesktop(DataVars):
class ProgressTemplate(template):
def __init__(self, vars):
template.__init__(self, vars)
self.progress = ProgressBar(_("Setting up user profile") + " ...")
self.progress = ProgressBar(_("Setting up the user profile") + " ...")
def numberAllTemplates(self, number):
self.progress.setMaximum(number)
@ -116,14 +116,14 @@ class desktop(share):
# Действие инсталяция
self.clVars.Set("cl_action", "install", True)
if not self.applyTemplatesFromSystem():
self.printERROR(_("Can not apply install templates"))
self.printERROR(_("Failed to apply install templates"))
return False
# Добавление программы в инсталяционную переменную
if not appendProgramToEnvFile(__app__, self.clVars):
self.printERROR(_("Can not save '%s'") %__app__ + " " +\
self.printERROR(_("Failed to save '%s'") %__app__ + " " +\
_("to %s") %self.clVars.Get("cl_env_path")[0])
return False
self.printOK(_("Apply install templates"))
self.printOK(_("Install templates applied"))
return True
def uninstallProg(self):
@ -134,15 +134,15 @@ class desktop(share):
# Действие деинсталяция
self.clVars.Set("cl_action", "uninstall", True)
if not self.applyTemplatesFromSystem():
self.printERROR(_("Can not apply uninstall templates"))
self.printERROR(_("Failed to apply uninstall templates"))
return False
# Удаление программы из инсталяционной переменной
if not removeProgramToEnvFile(__app__, self.clVars):
self.printERROR(_("Can not remove '%(app)s' to %(path)s")%
self.printERROR(_("Failed to remove '%(app)s' from %(path)s")%
{'app':__app__,
'path': self.clVars.Get("cl_env_path")[0]})
return False
self.printOK(_("Apply uninstall templates"))
self.printOK(_("Uninstall templates applied"))
return True
def existsUser(self, userName):
@ -150,7 +150,7 @@ class desktop(share):
try:
pwd.getpwnam(userName).pw_gid
except:
self.printERROR(_("User %s not exists")%userName)
self.printERROR(_("User %s does not exist")%userName)
return False
return True
@ -170,7 +170,7 @@ class desktop(share):
"""
Display templates are applied (--verbose)
"""
self.printWARNING(_("Following files were changed")+":")
self.printWARNING(_("The following files were changed")+":")
for nameF in dirsFiles[1]:
nameFile = nameF
if nameFile[:1] != "/":
@ -224,7 +224,7 @@ class desktop(share):
try:
pwdInfo = pwd.getpwnam(userName)
except:
self.printERROR(_("Can not found user %s") %userName)
self.printERROR(_("User %s not found") %userName)
self.umountUserRes()
return False
uid = pwdInfo.pw_uid
@ -246,11 +246,12 @@ class desktop(share):
dirsAndFiles = self.applyTemplatesFromUser(progress)
if not dirsAndFiles:
# Отмонтируем пользовательские ресурсы в случае ошибки
self.printERROR(_("Can not apply user profile"))
self.printERROR(_("Failed to apply user profile templates"))
self.umountUserRes(homeDir)
return False
if not flagHomeExists:
self.printSUCCESS(_("Created home dir %s")%homeDir + " ...")
self.printSUCCESS(_("The home directory for %s created")%homeDir +
" ...")
self.printSUCCESS(_("User account %s is configured")%userName + " ...")
return True
@ -312,7 +313,7 @@ class desktop(share):
break
i += 1
if textLine is False:
self.printERROR(_("Can not unmount path %s")%path + " ...")
self.printERROR(_("Failed to unmount path %s")%path + " ...")
return False
return True

@ -26,24 +26,24 @@ lang().setLanguage(sys.modules[__name__])
USAGE = _("%prog [options] user")
# Коментарии к использованию программы
COMMENT_EXAMPLES = _("Create home directory for the user_name")
COMMENT_EXAMPLES = _("Create the home directory for user_name")
# Пример использования программы
EXAMPLES = _("%prog user_name")
# Описание программы (что делает программа)
DESCRIPTION = _("Create home directory for the new user account")
DESCRIPTION = _("Creates the home directory for the new user account")
# Опции командной строки
CMD_OPTIONS = [{'longOption':"verbose",
'help':_("display the template is applied")},
'help':_("display the applied template")},
{'longOption':"set"},
{'longOption':"install",
'help':_("install package")},
'help':_("install the package")},
{'longOption':"uninstall",
'help':_("uninstall package")},
'help':_("uninstall the package")},
{'longOption':"progress",
'help':_("show progress bar for xdm startup")}]
'help':_("show progress bar at xdm startup")}]
class desktop_cmd(share_cmd):
def __init__(self):

@ -68,7 +68,7 @@ class share_cmd(color_print, _error):
errMsg = self.getError()
if errMsg:
self.printERROR(errMsg.strip())
self.printERROR(_('Can not write template variables'))
self.printERROR(_("Failed to write template variables"))
return False
return True

Loading…
Cancel
Save