From 25cdd5fda83fe1173635abdd161245c4e54b3ae0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Fontaine?= Date: Sat, 10 Mar 2018 16:51:26 +0100 Subject: [PATCH] Don't try to login without credentials --- fstogedcom.py | 7 ++++++- translation.py | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fstogedcom.py b/fstogedcom.py index bdf9836..d9cc9dc 100644 --- a/fstogedcom.py +++ b/fstogedcom.py @@ -287,7 +287,7 @@ class Options(Frame): entry_ancestors = EntryWithMenu(self, textvariable=self.ancestors, width=5) label_descendants = Label(self, text=_('Number of generations to descend')) entry_descendants = EntryWithMenu(self, textvariable=self.descendants, width=5) - btn_add_indi = Button(btn, text=_('Add a Familysearch ID'), command=self.add_indi) + btn_add_indi = Button(btn, text=_('Add a FamilySearch ID'), command=self.add_indi) btn_spouses = Checkbutton(self, text='\t' + _('Add spouses and couples information'), variable=self.spouses) btn_ordinances = Checkbutton(self, text='\t' + _('Add Temple information'), variable=self.ordinances) btn_contributors = Checkbutton(self, text='\t' + _('Add list of contributors in notes'), variable=self.contributors) @@ -368,6 +368,11 @@ class Download(Frame): def login(self): global _ + username = self.sign_in.username.get() + password = self.sign_in.password.get() + if not (username and password): + messagebox.showinfo(message=_('Please enter your FamilySearch username and password.')) + return self.btn_valid.config(state='disabled') self.info(_('Login to FamilySearch...')) self.logfile = open('download.log', 'w', encoding='utf-8') diff --git a/translation.py b/translation.py index bda8595..f5164df 100644 --- a/translation.py +++ b/translation.py @@ -263,4 +263,7 @@ translations = { 'Elapsed time: %s:%s': { 'fr': 'Temps écoulé : %s:%s', }, + 'Please enter your FamilySearch username and password.': { + 'fr': "Veuillez entrer votre nom d'utilisateur et votre mot de passe FamilySearch." + } } -- 2.52.0