Skip to content
Permalink
Browse files

improve Chinese locale

  • Loading branch information
icodeface committed Nov 21, 2019
1 parent a591361 commit b70278c5aa550aef33addca8a5ba80ecc39c0a40
Showing with 84 additions and 4 deletions.
  1. +1 −1 README.rst
  2. +18 −0 contrib/make_locale
  3. +2 −2 electrum/gui/qt/main_window.py
  4. +1 −1 electrum/gui/qt/token_dialog.py
  5. +62 −0 electrum/locale/zh_CN/electrum.po
@@ -67,7 +67,7 @@ Compile the protobuf description file::
Create translations (optional)::

sudo apt-get install python-requests gettext
./contrib/pull_locale
./contrib/make_locale



@@ -0,0 +1,18 @@
#!/usr/bin/env python3
import os

os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.chdir('../electrum')

# Convert .po to .mo
print('Installing')
for lang in os.listdir('locale'):
if lang.startswith('messages'):
continue
# Check LC_MESSAGES folder
mo_dir = 'locale/%s/LC_MESSAGES' % lang
if not os.path.exists(mo_dir):
os.mkdir(mo_dir)
cmd = 'msgfmt --output-file="%s/electrum.mo" "locale/%s/electrum.po"' % (mo_dir, lang)
print('Installing', lang)
os.system(cmd)
@@ -1073,8 +1073,8 @@ def on_expiry(i):
vbox_g.addStretch()

self.receive_widgets = QTabWidget()
self.receive_widgets.addTab(self.receive_qr, 'QR Code')
self.receive_widgets.addTab(self.receive_address_e, 'Text')
self.receive_widgets.addTab(self.receive_qr, _('QR Code'))
self.receive_widgets.addTab(self.receive_address_e, _('Text'))

hbox = QHBoxLayout()
hbox.addLayout(vbox_g)
@@ -36,7 +36,7 @@ def __init__(self, dialog, callback):

addr_type, __ = b58_address_to_hash160(self.addresses[0])
if not addr_type == constants.net.ADDRTYPE_P2PKH:
self.dialog.show_message('only P2PKH address supports QRC20 Token')
self.dialog.show_message(_('only P2PKH address supports QRC20 Token'))
self.dialog.reject()
return

@@ -5546,3 +5546,65 @@ msgstr "收到了{} 笔新的交易,从新交易中一共收到资金 {}"
msgid "{} words"
msgstr "{} 个单词"

msgid "Services"
msgstr "服务"

msgid "Tokens"
msgstr "代币"

msgid "On-chain"
msgstr "链上收款"

msgid "Lightning"
msgstr "闪电网络"

msgid "QR Code"
msgstr "二维码"

msgid "Text"
msgstr "文本"

msgid "only P2PKH address supports QRC20 Token"
msgstr "只有 P2PKH 类型的地址支持 QRC20 代币"

msgid "Contract Address:"
msgstr "合约地址:"

msgid "My Address:"
msgstr "我的地址:"

msgid "Bind Address"
msgstr "绑定地址"

msgid "Symbol"
msgstr "符号"

msgid "Pay to:"
msgstr "发给:"

msgid "Amount:"
msgstr "金额:"

msgid "Optional:"
msgstr "附加选项:"

msgid "In progress"
msgstr "进行中"

msgid "Failed"
msgstr "失败"

msgid "contract gas refund"
msgstr "合约 Gas 返还"

msgid "Pay out {} {}"
msgstr "支出 {} {}"

msgid "pay out {} {}"
msgstr "支出 {} {}"

msgid "Copy Transaction ID"
msgstr "复制交易ID"

msgid "raw transaction"
msgstr "交易字节码"

0 comments on commit b70278c

Please sign in to comment.
You can’t perform that action at this time.