Исправлены фразы

master3.3 3.2.0_beta1
Mike Khiretskiy 10 years ago
parent 2bec0bd353
commit 550ed25dc4

@ -176,7 +176,7 @@ class ProfileRepository(object):
shutil.move(self.directory, newpath) shutil.move(self.directory, newpath)
self._storage = storage self._storage = storage
except OSError as e: except OSError as e:
raise UpdateError(_("Failed to move profile: %s") % raise UpdateError(_("Failed to move the profile: %s") %
str(e)) str(e))
@classmethod @classmethod

@ -732,5 +732,5 @@ class Update:
os.unlink(rm_fn) os.unlink(rm_fn)
os.symlink(profile_path, '/etc/portage/make.profile') os.symlink(profile_path, '/etc/portage/make.profile')
except (OSError,IOError) as e: 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 return True

@ -32,9 +32,9 @@ class ClUpdateProfileAction(Action):
# ошибки, которые отображаются без подробностей # ошибки, которые отображаются без подробностей
native_error = (FilesError, UpdateError, GitError) native_error = (FilesError, UpdateError, GitError)
successMessage = __("Update profile successed") successMessage = __("The profile was successfully updated")
failedMessage = __("Update profile failed") failedMessage = __("Failed to update the profile")
interruptMessage = __("Update profile manually interrupted") interruptMessage = __("Profile update manually interrupted")
# список задач для дейсвия # список задач для дейсвия
@ -99,10 +99,10 @@ class ClUpdateProfileAction(Action):
] ]
}, },
{'name': 'reps_synchronization', {'name': 'reps_synchronization',
'group': __("Setting up profile"), 'group': __("Setting up the profile"),
'tasks': [ 'tasks': [
{'name': 'set_profile', {'name': 'set_profile',
'message': __("Switching to {cl_update_profile_system} profile"), 'message': __("Switching to profile {cl_update_profile_system}"),
'method': 'Update.setProfile()' 'method': 'Update.setProfile()'
}, },
] ]

@ -549,7 +549,7 @@ class VariableClUpdateProfileLinuxVer(ReadonlyVariable):
Имя системы в профиле Имя системы в профиле
""" """
def init(self): def init(self):
self.label = _("Profile system version") self.label = _("System profile version")
def get(self): def get(self):
dv = self.Get('cl_update_profile_datavars') dv = self.Get('cl_update_profile_datavars')
@ -578,7 +578,7 @@ class VariableClUpdateProfileRep(Variable):
def init(self): def init(self):
self.label = _("Profile repository") self.label = _("Profile repository")
self.help = _("set profile repository") self.help = _("set the profile repository")
re_url = re.compile( re_url = re.compile(
r"^(?:(%s)://)?(\w[\w\./:-]+?\w)(\.git)?$" % "|".join( r"^(?:(%s)://)?(\w[\w\./:-]+?\w)(\.git)?$" % "|".join(
@ -590,7 +590,7 @@ class VariableClUpdateProfileRep(Variable):
def normalize_url(cls, url): def normalize_url(cls, url):
match = cls.re_url.match(url) match = cls.re_url.match(url)
if not match: if not match:
raise VariableError(_("Failed repository url")) raise VariableError(_("Wrong repository URL"))
url = match.group(2) url = match.group(2)
url = "%s://%s" % (match.group(1) or "git", url) url = "%s://%s" % (match.group(1) or "git", url)
url = "%s.git" % url url = "%s.git" % url
@ -607,12 +607,12 @@ class VariableClUpdateProfileRep(Variable):
where='cl_update_rep_host', where='cl_update_rep_host',
eq=match.group(1), limit=1) eq=match.group(1), limit=1)
if not template: if not template:
raise VariableError(_("Failed to determine repository host")) raise VariableError(_("Failed to determine the repository host"))
try: try:
return template % match.group(2) return template % match.group(2)
except TypeError: except TypeError:
raise VariableError(_("Failed to determine repository host")) raise VariableError(_("Failed to determine the repository host"))
def set(self, value): def set(self, value):
if self.re_shortname.match(value): if self.re_shortname.match(value):
@ -628,7 +628,7 @@ class VariableClUpdateProfileRep(Variable):
except GitError as e: except GitError as e:
raise VariableError(str(e)) raise VariableError(str(e))
if not self.Get('cl_profile_shortname'): 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): def get(self):
try: try:
@ -666,7 +666,7 @@ class VariableClUpdateProfileBranch(Variable):
def init(self): def init(self):
self.label = _("Repository branch") self.label = _("Repository branch")
self.help = _("set repository branch") self.help = _("set the repository branch")
def check(self, value): def check(self, value):
pass pass
@ -782,11 +782,11 @@ class VariableClUpdateProfileSystem(Variable):
def init(self): def init(self):
self.label = _("System profile") self.label = _("System profile")
self.help = _("set system profile") self.help = _("set the system profile")
def check(self, profile): def check(self, profile):
if not profile: if not profile:
raise VariableError(_("Profile must be specified")) raise VariableError(_("You must specify the profile"))
path_profile = self.Select('cl_profile_path', path_profile = self.Select('cl_profile_path',
where='cl_profile_shortname', where='cl_profile_shortname',
eq=profile, limit=1) eq=profile, limit=1)
@ -795,8 +795,8 @@ class VariableClUpdateProfileSystem(Variable):
try: try:
if (not dv.Get('cl_update_rep_name') or if (not dv.Get('cl_update_rep_name') or
not dv.Get('cl_update_rep_url')): not dv.Get('cl_update_rep_url')):
raise VariableError(_("Repository variables is not " raise VariableError(_("Repository variables "
"configured in profile")) "were not configured for the profile"))
if not dv.Get('os_linux_name'): if not dv.Get('os_linux_name'):
raise VariableError() raise VariableError()
except (DataVarsError, VariableError) as e: except (DataVarsError, VariableError) as e:

@ -119,5 +119,5 @@ class Wsdl(WsdlBase):
'cl_update_profile_depend_data') 'cl_update_profile_depend_data')
)], )],
'brief': {'next': __("Perform"), 'brief': {'next': __("Perform"),
'name': __("Set profile")}}, 'name': __("Set the profile")}},
] ]

Loading…
Cancel
Save