From b9c2fe0152d60014bd0e9d8aa258ad4edca7e772 Mon Sep 17 00:00:00 2001 From: David Bryan Date: Fri, 1 Nov 2019 01:46:46 +0000 Subject: [PATCH] Adding JA translations --- proxmark3-web.py | 5 ++ proxmark3-web.service | 2 +- rpi-setup.sh | 10 +++- translations/ja/LC_MESSAGES/messages.po | 62 ++++++++++++------------- 4 files changed, 45 insertions(+), 34 deletions(-) diff --git a/proxmark3-web.py b/proxmark3-web.py index d2e8f69..6dfc387 100755 --- a/proxmark3-web.py +++ b/proxmark3-web.py @@ -14,6 +14,7 @@ from datetime import datetime debug=1 +run_directory="/home/pi/proxmark3-web/" proxmark3_rdv4_dir='../proxmark3' proxmark3_rdv4_client=proxmark3_rdv4_dir + '/client/proxmark3' logfile = "../card-reads.log" @@ -67,6 +68,10 @@ while not serial_port: print("Serial device not found.... sleeping "+ str(delay) +" seconds - connect your Proxmark3-rdv4...") time.sleep(delay) +if not exists(run_directory + "messages.pot"): + subprocess.run(['pybabel', 'extract', '-F', run_directory + 'babel.cfg', '-o', 'messages.pot', '.']) + subprocess.run(['pybabel', 'compile', '-d', run_directory + 'translations']) + if(True): # create and configure the app diff --git a/proxmark3-web.service b/proxmark3-web.service index 8882b1d..a58b344 100644 --- a/proxmark3-web.service +++ b/proxmark3-web.service @@ -7,7 +7,7 @@ WorkingDirectory=/home/pi/proxmark3-web/ #Type=simple Environment=FLASK_CONFIG=production Environment=FLASK_APP=/home/pi/proxmark3-web/proxmark3-web.py -ExecStart=/usr/bin/gunicorn3 --threads 4 --reload proxmark3-web:app -b:8080 +ExecStart=/usr/bin/gunicorn3 --reload proxmark3-web:app -b:8080 Restart=always [Install] diff --git a/rpi-setup.sh b/rpi-setup.sh index 73b476a..2256b22 100755 --- a/rpi-setup.sh +++ b/rpi-setup.sh @@ -1,18 +1,24 @@ #!/bin/bash sudo systemctl stop dnsmasq && \ sudo systemctl stop hostapd && \ -cat </tmp/dhcpcd.conf +sudo cp /etc/dhcpcd.conf /tmp/dhcpcd.conf +cat <>/tmp/dhcpcd.conf interface wlan0 static ip_address=192.168.4.1/24 nohook wpa_supplicant EOF -sudo mv /tmp/dhcpcd.conf /etc/dhcpcd.conf +sudo cp /tmp/dhcpcd.conf /etc/dhcpcd.conf sudo service dhcpcd restart sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig cat </tmp/dnsmasq.conf interface=wlan0 # Use the require wireless interface - usually wlan0 dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h + +interface=br0 +expand-hosts +domain=proxmark3-web.com +dhcp-range=192.168.20.100,192.168.20.150,12h EOF sudo mv /tmp/dnsmasq.conf /etc/dnsmasq.conf sudo systemctl reload dnsmasq diff --git a/translations/ja/LC_MESSAGES/messages.po b/translations/ja/LC_MESSAGES/messages.po index b1697dc..998726e 100644 --- a/translations/ja/LC_MESSAGES/messages.po +++ b/translations/ja/LC_MESSAGES/messages.po @@ -20,127 +20,127 @@ msgstr "" #: app.py:166 proxmark3-web.py:166 msgid "ERROR: Could not read a card... please try again...." -msgstr "" +msgstr "エラー:カードを読み取れませんでした... 再試行してください...." #: app.py:179 proxmark3-web.py:179 msgid "" "Simulate Mode has been entered, please press the button on the PM3 to " "exit..." -msgstr "" +msgstr "似せるモードが開始されました" #: app.py:207 app.py:261 proxmark3-web.py:207 proxmark3-web.py:261 msgid "ERROR: CARD DID NOT PROGRAM... TRY AGIAN." -msgstr "" +msgstr "エラー:データがカードに書き込まれませんでした... 再試行してください" #: app.py:221 proxmark3-web.py:221 msgid "System shutdown in progress...." -msgstr "" +msgstr "システムのシャットダウンが進行中...." #: app.py:233 proxmark3-web.py:233 msgid "Card " -msgstr "" +msgstr "カード " #: app.py:233 proxmark3-web.py:233 msgid " was deleted from the database..." -msgstr "" +msgstr " がデータベースから削除されました...." #: app.py:244 proxmark3-web.py:244 msgid "t5577 card wipe complete" -msgstr "" +msgstr "t557カードの消去が完了しました" #: app.py:258 proxmark3-web.py:258 msgid "Wrote default ID to card." -msgstr "" +msgstr "デフォルトIDをカードに書き込みました" #: templates/buttons.html:11 msgid "CREATE X-Force Red Card" -msgstr "" +msgstr "X-Force Redカードを作る" #: templates/buttons.html:17 msgid "Wipe Card" -msgstr "" +msgstr "カードのデータを消す" #: templates/buttons.html:23 msgid "RESET" -msgstr "" +msgstr "リセット" #: templates/buttons.html:29 msgid "Shutdown Pi" -msgstr "" +msgstr "Piを停止する" #: templates/cards.html:13 templates/main.html:49 msgid "Status" -msgstr "" +msgstr "状態" #: templates/cards.html:27 msgid "Action:" -msgstr "" +msgstr "活動" #: templates/cards.html:30 msgid "Facility Code:" -msgstr "" +msgstr "施設コード" #: templates/cards.html:33 msgid "Card Number:" -msgstr "" +msgstr "カード番号" #: templates/cards.html:36 msgid "Card Raw" -msgstr "" +msgstr "カードの生データ" #: templates/cards.html:39 msgid "OEM Code:" -msgstr "" +msgstr "OEMコード" #: templates/cards.html:47 msgid "Clone" -msgstr "" +msgstr "クローン" #: templates/cards.html:51 msgid "Simulate" -msgstr "" +msgstr "似せる" #: templates/cards.html:55 msgid "Delete" -msgstr "" +msgstr "削除" #: templates/main.html:9 msgid "Read HID Card" -msgstr "" +msgstr "HIDカードを読み取る" #: templates/main.html:17 msgid "OEM Code" -msgstr "" +msgstr "OEMコード" #: templates/main.html:18 msgid "Facility Code" -msgstr "" +msgstr "施設コード" #: templates/main.html:19 msgid "Card Number" -msgstr "" +msgstr "OEMコード" #: templates/main.html:20 msgid "Raw HID Formated Card" -msgstr "" +msgstr "生HIDデータでフォーマット済みのカード" #: templates/main.html:32 msgid "Card ID" -msgstr "" +msgstr "カードID" #: templates/main.html:36 msgid "Clone Card" -msgstr "" +msgstr "カードをクローンする" #: templates/nav.html:2 msgid "Proxmark3-web" -msgstr "" +msgstr "Proxmark3-web" #: templates/nav.html:10 msgid "Read Card" -msgstr "" +msgstr "カードを読み取る" #: templates/nav.html:13 msgid "Captured Cards" -msgstr "" +msgstr "取り込みカード"