From ff2cdf9f16440c3583e9857e16178b29dd65b66d Mon Sep 17 00:00:00 2001 From: tiagotrs Date: Mon, 10 Dec 2018 23:00:50 +0100 Subject: [PATCH] small fixes, simplification/improvement of texts --- electrum/plugins/revealer/__init__.py | 8 ++------ electrum/plugins/revealer/qt.py | 27 +++++++++++++++------------ 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/electrum/plugins/revealer/__init__.py b/electrum/plugins/revealer/__init__.py index dcc8c31fd..beb58d30e 100644 --- a/electrum/plugins/revealer/__init__.py +++ b/electrum/plugins/revealer/__init__.py @@ -1,13 +1,9 @@ from electrum.i18n import _ -fullname = _('Revealer') +fullname = _('Revealer Backup Utility') description = ''.join(["
", ""+_("Do you have something to hide ?")+"", '
', '
', - _("Revealer is a seed phrase back-up solution. It allows you to create a cold, analog, multi-factor backup of your wallet seeds, or of any arbitrary secret."), '
', '
', - _("Using a Revealer is better than writing your seed phrases on paper: a revealer is invulnerable to physical access and allows creation of trustless redundancy."), '
', '
', - _("This plug-in allows you to generate a pdf file of your secret phrase encrypted visually for your physical Revealer. You can print it trustlessly - it can only be decrypted optically with your Revealer."), '
', '
', - _("The plug-in also allows you to generate a digital Revealer file and print it yourself on a transparent overhead foil."), '
', '
', - _("Once activated you can access the plug-in through the icon at the seed dialog."), '
', '
', + _("This plug-in allows you to create a visually encrypted backup of your wallet seeds, or of custom alphanumeric secrets."), '
', '
', _("For more information, visit"), " https://revealer.cc", '
', '
', ]) diff --git a/electrum/plugins/revealer/qt.py b/electrum/plugins/revealer/qt.py index 06f817ddc..b846a1993 100644 --- a/electrum/plugins/revealer/qt.py +++ b/electrum/plugins/revealer/qt.py @@ -79,6 +79,8 @@ class Plugin(BasePlugin): self.cseed = keystore.get_seed(password) if keystore.get_passphrase(password): self.extension = True + else: + self.extension = False except Exception: traceback.print_exc(file=sys.stdout) return @@ -103,7 +105,7 @@ class Plugin(BasePlugin): logo.setAlignment(Qt.AlignLeft) self.hbox.addSpacing(16) vbox.addWidget(WWLabel(""+_("Revealer Secret Backup Plugin")+"
" - +_("To encrypt your backup, first we need to load some noise.")+"
")) + +_("To encrypt your backup, first we need to load some noise.")+"
")) vbox.addSpacing(7) bcreate = QPushButton(_("Create a new Revealer")) bcreate.setMaximumWidth(181) @@ -124,7 +126,7 @@ class Plugin(BasePlugin): self.next_button.clicked.connect(partial(self.cypherseed_dialog, window)) vbox.addWidget( QLabel("" + _("Warning") + ": " + _("Each revealer should be used only once.") - +"
"+_("more info at https://revealer.cc/faq"))) + +"
"+_("more information at https://revealer.cc/faq"))) def mk_digital(): try: @@ -183,8 +185,9 @@ class Plugin(BasePlugin): def bcrypt(self, dialog): self.rawnoise = False - dialog.show_message(''.join([_("{} encrypted for Revealer {}_{} saved as PNG and PDF at:").format(self.was, self.version, self.code_id), - "
","", self.base_dir+ self.filename+self.version+"_"+self.code_id,""])) + dialog.show_message(''.join([_("{} encrypted for Revealer {}_{} saved as PNG and PDF at: ").format(self.was, self.version, self.code_id), + "", self.base_dir+ self.filename+self.version+"_"+self.code_id,"", "
", + "
", "", _("Always check you backups.") ])) dialog.close() def ext_warning(self, dialog): @@ -199,11 +202,11 @@ class Plugin(BasePlugin): def customtxt_limits(self): txt = self.text.text() self.max_chars.setVisible(False) - self.char_count.setText("("+str(len(txt))+"/216)") + self.char_count.setText("("+str(len(txt))+"/189)") if len(txt)>0: self.ctext.setEnabled(True) - if len(txt) > 216: - self.text.setPlainText(self.text.toPlainText()[:216]) + if len(txt) > 189: + self.text.setPlainText(self.text.toPlainText()[:189]) self.max_chars.setVisible(True) def t(self): @@ -227,7 +230,7 @@ class Plugin(BasePlugin): logo.setAlignment(Qt.AlignLeft) hbox.addSpacing(16) self.vbox.addWidget(WWLabel("" + _("Revealer Secret Backup Plugin") + "
" - + _("Ready to encrypt for revealer ")+self.version+'_'+self.code_id )) + + _("Ready to encrypt for revealer {}").format(self.version+'_'+self.code_id ))) self.vbox.addSpacing(11) hbox.addLayout(self.vbox) grid = QGridLayout() @@ -247,7 +250,7 @@ class Plugin(BasePlugin): self.char_count = WWLabel("") self.char_count.setAlignment(Qt.AlignRight) self.vbox.addWidget(self.char_count) - self.max_chars = WWLabel("" + _("This version supports a maximum of 216 characters.")+"") + self.max_chars = WWLabel("" + _("This version supports a maximum of 189 characters.")+"") self.vbox.addWidget(self.max_chars) self.max_chars.setVisible(False) self.ctext = QPushButton(_("Encrypt custom secret")) @@ -286,7 +289,7 @@ class Plugin(BasePlugin): else: fontsize = 12 linespace = 10 - max_letters = 23 + max_letters = 21 max_lines = 9 max_words = int(max_letters/4) @@ -387,9 +390,9 @@ class Plugin(BasePlugin): else: self.filename = self.wallet_name+'_'+ _('seed')+'_' self.was = self.wallet_name +' ' + _('seed') + if self.extension: + self.ext_warning(self.c_dialog) - if self.extension: - self.ext_warning(self.c_dialog) if not calibration: self.toPdf(QImage(cypherseed))