Browse Source

small fixes, simplification/improvement of texts

3.3.3.1
tiagotrs 6 years ago
committed by SomberNight
parent
commit
ff2cdf9f16
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 8
      electrum/plugins/revealer/__init__.py
  2. 27
      electrum/plugins/revealer/qt.py

8
electrum/plugins/revealer/__init__.py

@ -1,13 +1,9 @@
from electrum.i18n import _
fullname = _('Revealer')
fullname = _('Revealer Backup Utility')
description = ''.join(["<br/>",
"<b>"+_("Do you have something to hide ?")+"</b>", '<br/>', '<br/>',
_("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."), '<br/>', '<br/>',
_("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."), '<br/>', '<br/>',
_("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."), '<br/>', '<br/>',
_("The plug-in also allows you to generate a digital Revealer file and print it yourself on a transparent overhead foil."), '<br/>', '<br/>',
_("Once activated you can access the plug-in through the icon at the seed dialog."), '<br/>', '<br/>',
_("This plug-in allows you to create a visually encrypted backup of your wallet seeds, or of custom alphanumeric secrets."), '<br/>', '<br/>',
_("For more information, visit"),
" <a href=\"https://revealer.cc\">https://revealer.cc</a>", '<br/>', '<br/>',
])

27
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("<b>"+_("Revealer Secret Backup Plugin")+"</b><br>"
+_("To encrypt your backup, first we need to load some noise.")+"</br>"))
+_("To encrypt your backup, first we need to load some noise.")+"<br/>"))
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("<b>" + _("Warning") + "</b>: " + _("Each revealer should be used only once.")
+"<br>"+_("more info at https://revealer.cc/faq")))
+"<br>"+_("more information at <a href=\"https://revealer.cc/faq\">https://revealer.cc/faq</a>")))
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),
"<br/>","<b>", self.base_dir+ self.filename+self.version+"_"+self.code_id,"</b>"]))
dialog.show_message(''.join([_("{} encrypted for Revealer {}_{} saved as PNG and PDF at: ").format(self.was, self.version, self.code_id),
"<b>", self.base_dir+ self.filename+self.version+"_"+self.code_id,"</b>", "<br/>",
"<br/>", "<b>", _("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("<b>" + _("Revealer Secret Backup Plugin") + "</b><br>"
+ _("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("<font color='red'>" + _("This version supports a maximum of 216 characters.")+"</font>")
self.max_chars = WWLabel("<font color='red'>" + _("This version supports a maximum of 189 characters.")+"</font>")
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))

Loading…
Cancel
Save