Browse Source

trezor: tweak some messages

283
Neil Booth 9 years ago
parent
commit
b3a3628b49
  1. 5
      plugins/trezor/clientbase.py
  2. 35
      plugins/trezor/qt_generic.py

5
plugins/trezor/clientbase.py

@ -9,9 +9,12 @@ class GuiMixin(object):
messages = {
3: _("Confirm the transaction output on your %s device"),
4: _("Confirm internal entropy on your %s device to begin"),
5: _("Write down the seed word shown on your %s"),
6: _("Confirm on your %s that you want to wipe it clean"),
7: _("Confirm on your %s device the message to sign"),
8: _("Confirm the total amount spent and the transaction fee on your "
"%s device"),
7: _("Confirm on your %s device the message to sign"),
10: _("Confirm wallet address on your %s device"),
'default': _("Check your %s device to continue"),
}

35
plugins/trezor/qt_generic.py

@ -22,6 +22,9 @@ PASSPHRASE_HELP = PASSPHRASE_HELP_SHORT + " " + _(
"you use as they each generate different addresses. Changing "
"your passphrase does not lose other wallets, each is still "
"accessible behind its own passphrase.")
RECOMMEND_PIN = _(
"You should enable PIN protection. Your PIN is the only protection "
"for your bitcoins if your device is lost or stolen.")
PASSPHRASE_NOT_PIN = _(
"If you forget a passphrase you will be unable to access any "
"bitcoins in the wallet behind it. A passphrase is not a PIN. "
@ -179,30 +182,33 @@ class QtHandler(QtHandlerBase):
vbox = QVBoxLayout()
next_enabled=True
label = QLabel(_("Enter a label to name your device:"))
name = QLineEdit()
hl = QHBoxLayout()
hl.addWidget(label)
hl.addWidget(name)
hl.addStretch(1)
vbox.addLayout(hl)
def clean_text(widget):
text = unicode(widget.toPlainText()).strip()
return ' '.join(text.split())
if method in [TIM_NEW, TIM_RECOVER]:
gb = QGroupBox()
vbox1 = QVBoxLayout()
gb.setLayout(vbox1)
hbox1 = QHBoxLayout()
gb.setLayout(hbox1)
# KeepKey recovery doesn't need a word count
if method == TIM_NEW or self.device == 'TREZOR':
vbox.addWidget(gb)
gb.setTitle(_("Select your seed length:"))
choices = [
_("12 words"),
_("18 words"),
_("24 words"),
]
bg = QButtonGroup()
for i, choice in enumerate(choices):
for i, count in enumerate([12, 18, 24]):
rb = QRadioButton(gb)
rb.setText(choice)
rb.setText(_("%d words") % count)
bg.addButton(rb)
bg.setId(rb, i)
vbox1.addWidget(rb)
hbox1.addWidget(rb)
rb.setChecked(True)
cb_pin = QCheckBox(_('Enable PIN protection'))
cb_pin.setChecked(True)
@ -228,15 +234,8 @@ class QtHandler(QtHandlerBase):
hbox_pin.addWidget(pin)
hbox_pin.addStretch(1)
label = QLabel(_("Enter a label to name your device:"))
name = QLineEdit()
hl = QHBoxLayout()
hl.addWidget(label)
hl.addWidget(name)
hl.addStretch(1)
vbox.addLayout(hl)
if method in [TIM_NEW, TIM_RECOVER]:
vbox.addWidget(WWLabel(RECOMMEND_PIN))
vbox.addWidget(cb_pin)
else:
vbox.addLayout(hbox_pin)

Loading…
Cancel
Save