changeset 2260:45b89d7c5c81

jp (invitation): fixed inconsistency in language handling
author Goffi <goffi@goffi.org>
date Wed, 21 Jun 2017 08:00:14 +0200
parents f51315500eb1
children 8be4f5769bf7
files frontends/src/jp/cmd_invitation.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/jp/cmd_invitation.py	Mon Jun 19 09:36:55 2017 +0200
+++ b/frontends/src/jp/cmd_invitation.py	Wed Jun 21 08:00:14 2017 +0200
@@ -142,7 +142,8 @@
         self.parser.add_argument("-n", "--name", type=base.unicode_decoder, default='', help='name of the invitee')
         self.parser.add_argument("-N", "--host-name", type=base.unicode_decoder, default='', help='name of the host')
         self.parser.add_argument("-e", "--email", type=base.unicode_decoder, default='', help='email to send the invitation to (if --no-email is set, email will just be saved)')
-        self.parser.add_argument("-l", "--lang", type=base.unicode_decoder, default='', help='main language spoken by the invitee')
+        self.parser.add_argument("-l", "--lang", dest="language", type=base.unicode_decoder, default='',
+            help='main language spoken by the invitee')
         self.parser.add_argument("-x", "--extra", metavar=('KEY', 'VALUE'), type=base.unicode_decoder, action='append', nargs=2, default=[], help='extra data to associate with invitation/invitee')
         self.parser.add_argument("-p", "--profile", type=base.unicode_decoder, default='', help="profile doing the invitation (default: don't associate profile")
         self.parser.add_argument("id", type=base.unicode_decoder,
@@ -159,7 +160,7 @@
 
     def start(self):
         extra = dict(self.args.extra)
-        for arg_name in ('name', 'host_name', 'email', 'lang', 'profile'):
+        for arg_name in ('name', 'host_name', 'email', 'language', 'profile'):
             value = getattr(self.args, arg_name)
             if not value:
                 continue