Skip to content

Commit

Permalink
Merge pull request #2270 from candlepin/jhnidek/1725525
Browse files Browse the repository at this point in the history
1725525: Better translation of syspurpose; ENT-1680
  • Loading branch information
cnsnyder committed Jun 2, 2020
2 parents f1fe06e + f0f7611 commit ffaff52
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/subscription_manager/managercli.py
Expand Up @@ -577,30 +577,30 @@ def __init__(self, name, shortdesc=None, primary=False, attr=None, commands=('se
self.parser.add_option(
"--set",
dest="set",
help=(_("Set {attr} of system purpose".format(attr=attr)))
help=(_("Set {attr} of system purpose").format(attr=attr))
)
if 'unset' in commands:
self.parser.add_option(
"--unset",
dest="unset",
action="store_true",
help=(_("Unset {attr} of system purpose".format(attr=attr)))
help=(_("Unset {attr} of system purpose").format(attr=attr))
)
if 'add' in commands:
self.parser.add_option(
"--add",
dest="to_add",
action="append",
default=[],
help=_("Add an item to the list ({attr}).".format(attr=attr))
help=_("Add an item to the list ({attr}).").format(attr=attr)
)
if 'remove' in commands:
self.parser.add_option(
"--remove",
dest="to_remove",
action="append",
default=[],
help=_("Remove an item from the list ({attr}).".format(attr=attr))
help=_("Remove an item from the list ({attr}).").format(attr=attr)
)

def _get_synced_store(self):
Expand Down Expand Up @@ -632,7 +632,7 @@ def _validate_options(self):

def set(self):
self._set(self.options.set)
success_msg = '{attr} set to "{val}".'.format(attr=self.attr, val=self.options.set)
success_msg = _('{attr} set to "{val}".').format(attr=self.attr, val=self.options.set)
self._check_result(
expectation=lambda res: res.get(self.attr) == self.options.set,
success_msg=success_msg,
Expand Down Expand Up @@ -716,7 +716,7 @@ def show(self):
print(_("Current {name}: {val}".format(name=self.name.capitalize(),
val=values)))
else:
print(_("{name} not set.".format(name=self.name.capitalize())))
print(_("{name} not set.").format(name=self.name.capitalize()))

def sync(self):
return syspurposelib.SyspurposeSyncActionCommand().perform(include_result=True)[1]
Expand Down Expand Up @@ -751,7 +751,7 @@ def _check_result(self, expectation, success_msg, command, attr):
msg = _(SP_CONFLICT_MESSAGE.format(attr=attr, download_value=value, advice=advice))
system_exit(os.EX_SOFTWARE, msgs=msg)
else:
print(_(success_msg))
print(success_msg)


class UserPassCommand(CliCommand):
Expand Down Expand Up @@ -1187,7 +1187,7 @@ def set(self):
super(ServiceLevelCommand, self).set()
else:
self.update_service_level(self.options.set)
print(_("Service level set to: \"{val}\".".format(val=self.options.set)))
print(_("Service level set to: \"{val}\".").format(val=self.options.set))

def unset(self):
if self.cp.has_capability("syspurpose"):
Expand Down

0 comments on commit ffaff52

Please sign in to comment.