From 550ed25dc4cea6d84c4dfcc2ddc051788274bff4 Mon Sep 17 00:00:00 2001 From: Mike Khiretskiy Date: Mon, 11 Aug 2014 13:54:52 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D1=84=D1=80=D0=B0=D0=B7=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update/profile.py | 2 +- update/update.py | 2 +- update/utils/cl_update_profile.py | 10 +++++----- update/variables/update.py | 22 +++++++++++----------- update/wsdl_update.py | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/update/profile.py b/update/profile.py index fb5188f..aa28782 100644 --- a/update/profile.py +++ b/update/profile.py @@ -176,7 +176,7 @@ class ProfileRepository(object): shutil.move(self.directory, newpath) self._storage = storage except OSError as e: - raise UpdateError(_("Failed to move profile: %s") % + raise UpdateError(_("Failed to move the profile: %s") % str(e)) @classmethod diff --git a/update/update.py b/update/update.py index 053d307..9ffec82 100644 --- a/update/update.py +++ b/update/update.py @@ -732,5 +732,5 @@ class Update: os.unlink(rm_fn) os.symlink(profile_path, '/etc/portage/make.profile') except (OSError,IOError) as e: - raise UpdateError(_("Failed to set profile: %s")%str(e)) + raise UpdateError(_("Failed to set the profile: %s")%str(e)) return True diff --git a/update/utils/cl_update_profile.py b/update/utils/cl_update_profile.py index 045b92c..20121a1 100644 --- a/update/utils/cl_update_profile.py +++ b/update/utils/cl_update_profile.py @@ -32,9 +32,9 @@ class ClUpdateProfileAction(Action): # ошибки, которые отображаются без подробностей native_error = (FilesError, UpdateError, GitError) - successMessage = __("Update profile successed") - failedMessage = __("Update profile failed") - interruptMessage = __("Update profile manually interrupted") + successMessage = __("The profile was successfully updated") + failedMessage = __("Failed to update the profile") + interruptMessage = __("Profile update manually interrupted") # список задач для дейсвия @@ -99,10 +99,10 @@ class ClUpdateProfileAction(Action): ] }, {'name': 'reps_synchronization', - 'group': __("Setting up profile"), + 'group': __("Setting up the profile"), 'tasks': [ {'name': 'set_profile', - 'message': __("Switching to {cl_update_profile_system} profile"), + 'message': __("Switching to profile {cl_update_profile_system}"), 'method': 'Update.setProfile()' }, ] diff --git a/update/variables/update.py b/update/variables/update.py index 29a6c1a..c6b891c 100644 --- a/update/variables/update.py +++ b/update/variables/update.py @@ -549,7 +549,7 @@ class VariableClUpdateProfileLinuxVer(ReadonlyVariable): Имя системы в профиле """ def init(self): - self.label = _("Profile system version") + self.label = _("System profile version") def get(self): dv = self.Get('cl_update_profile_datavars') @@ -578,7 +578,7 @@ class VariableClUpdateProfileRep(Variable): def init(self): self.label = _("Profile repository") - self.help = _("set profile repository") + self.help = _("set the profile repository") re_url = re.compile( r"^(?:(%s)://)?(\w[\w\./:-]+?\w)(\.git)?$" % "|".join( @@ -590,7 +590,7 @@ class VariableClUpdateProfileRep(Variable): def normalize_url(cls, url): match = cls.re_url.match(url) if not match: - raise VariableError(_("Failed repository url")) + raise VariableError(_("Wrong repository URL")) url = match.group(2) url = "%s://%s" % (match.group(1) or "git", url) url = "%s.git" % url @@ -607,12 +607,12 @@ class VariableClUpdateProfileRep(Variable): where='cl_update_rep_host', eq=match.group(1), limit=1) if not template: - raise VariableError(_("Failed to determine repository host")) + raise VariableError(_("Failed to determine the repository host")) try: return template % match.group(2) except TypeError: - raise VariableError(_("Failed to determine repository host")) + raise VariableError(_("Failed to determine the repository host")) def set(self, value): if self.re_shortname.match(value): @@ -628,7 +628,7 @@ class VariableClUpdateProfileRep(Variable): except GitError as e: raise VariableError(str(e)) if not self.Get('cl_profile_shortname'): - raise VariableError(_("Repository %s has not profiles")%value) + raise VariableError(_("Repository %s has no profiles")%value) def get(self): try: @@ -666,7 +666,7 @@ class VariableClUpdateProfileBranch(Variable): def init(self): self.label = _("Repository branch") - self.help = _("set repository branch") + self.help = _("set the repository branch") def check(self, value): pass @@ -782,11 +782,11 @@ class VariableClUpdateProfileSystem(Variable): def init(self): self.label = _("System profile") - self.help = _("set system profile") + self.help = _("set the system profile") def check(self, profile): if not profile: - raise VariableError(_("Profile must be specified")) + raise VariableError(_("You must specify the profile")) path_profile = self.Select('cl_profile_path', where='cl_profile_shortname', eq=profile, limit=1) @@ -795,8 +795,8 @@ class VariableClUpdateProfileSystem(Variable): try: if (not dv.Get('cl_update_rep_name') or not dv.Get('cl_update_rep_url')): - raise VariableError(_("Repository variables is not " - "configured in profile")) + raise VariableError(_("Repository variables " + "were not configured for the profile")) if not dv.Get('os_linux_name'): raise VariableError() except (DataVarsError, VariableError) as e: diff --git a/update/wsdl_update.py b/update/wsdl_update.py index 67f2e32..5e8d36e 100644 --- a/update/wsdl_update.py +++ b/update/wsdl_update.py @@ -119,5 +119,5 @@ class Wsdl(WsdlBase): 'cl_update_profile_depend_data') )], 'brief': {'next': __("Perform"), - 'name': __("Set profile")}}, + 'name': __("Set the profile")}}, ]