Mercurial > libervia-backend
diff frontends/src/jp/cmd_profile.py @ 2179:e42c6c131b52
jp (profile): fixed help gettext calls
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 09 Mar 2017 23:10:17 +0100 |
parents | 0c32ff2f64c4 |
children | a6c9bc4d1de0 |
line wrap: on
line diff
--- a/frontends/src/jp/cmd_profile.py Thu Mar 09 23:09:18 2017 +0100 +++ b/frontends/src/jp/cmd_profile.py Thu Mar 09 23:10:17 2017 +0100 @@ -130,17 +130,17 @@ self.need_loop = True def add_parser_options(self): - self.parser.add_argument('profile', type=str, help=(u'the name of the profile')) - self.parser.add_argument('-p', '--password', type=str, default='', help=(u'the password of the profile')) - self.parser.add_argument('-j', '--jid', type=str, help=(u'the jid of the profile')) - self.parser.add_argument('-x', '--xmpp-password', type=str, help=(u'the password of the XMPP account (use profile password if not specified)'), + self.parser.add_argument('profile', type=str, help=_(u'the name of the profile')) + self.parser.add_argument('-p', '--password', type=str, default='', help=_(u'the password of the profile')) + self.parser.add_argument('-j', '--jid', type=str, help=_(u'the jid of the profile')) + self.parser.add_argument('-x', '--xmpp-password', type=str, help=_(u'the password of the XMPP account (use profile password if not specified)'), metavar='PASSWORD') self.parser.add_argument('-C', '--component', type=base.unicode_decoder, default='', help=_(u'set to component import name (entry point) if this is a component')) def _session_started(self, dummy): if self.args.jid: - self.host.bridge.setParam("JabberID", self.args.jid, "Connection" ,profile_key=self.args.profile) + self.host.bridge.setParam("JabberID", self.args.jid, "Connection", profile_key=self.args.profile) xmpp_pwd = self.args.password or self.args.xmpp_password if xmpp_pwd: self.host.bridge.setParam("Password", xmpp_pwd, "Connection", profile_key=self.args.profile) @@ -159,14 +159,14 @@ class ProfileModify(base.CommandBase): def __init__(self, host): - super(ProfileModify, self).__init__(host, 'modify', need_connect=False, help=(u'modify an existing profile')) + super(ProfileModify, self).__init__(host, 'modify', need_connect=False, help=_(u'modify an existing profile')) def add_parser_options(self): profile_pwd_group = self.parser.add_mutually_exclusive_group() - profile_pwd_group.add_argument('-w', '--password', type=base.unicode_decoder, help=(u'change the password of the profile')) - profile_pwd_group.add_argument('--disable-password', action='store_true', help=(u'disable profile password (dangerous!)')) - self.parser.add_argument('-j', '--jid', type=base.unicode_decoder, help=(u'the jid of the profile')) - self.parser.add_argument('-x', '--xmpp-password', type=base.unicode_decoder, help=(u'change the password of the XMPP account'), + profile_pwd_group.add_argument('-w', '--password', type=base.unicode_decoder, help=_(u'change the password of the profile')) + profile_pwd_group.add_argument('--disable-password', action='store_true', help=_(u'disable profile password (dangerous!)')) + self.parser.add_argument('-j', '--jid', type=base.unicode_decoder, help=_(u'the jid of the profile')) + self.parser.add_argument('-x', '--xmpp-password', type=base.unicode_decoder, help=_(u'change the password of the XMPP account'), metavar='PASSWORD') self.parser.add_argument('-D', '--default', action='store_true', help=_(u'set as default profile')) @@ -187,4 +187,4 @@ subcommands = (ProfileConnect, ProfileCreate, ProfileDefault, ProfileDelete, ProfileInfo, ProfileList, ProfileModify) def __init__(self, host): - super(Profile, self).__init__(host, 'profile', use_profile=False, help=(u'Profile commands')) + super(Profile, self).__init__(host, 'profile', use_profile=False, help=_(u'profile commands'))