Commit 54085d57 韩晓涛

增加日文翻译

1 个父辈 276f0cb2
......@@ -37,7 +37,7 @@ app = Flask(__name__)
babel = Babel(app)
app.config.from_object(Config)
app.after_request(add_header)
LANGUAGES = {
app.config["LANGUAGES"] = {
"zh": "Chinese",
"en": "English",
"ja": "Japanese"
......
<script>
function switchLanguage(language){
function switchLanguage(language) {
$.ajax({
url: "/language/"+language,
url: "/language/" + language,
type: "get",
//data: JSON.stringify(ionum),
//contentType: "application/json",
......@@ -31,17 +31,24 @@
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li{{ " class=active" if index==1 }}><a href="{{ url_for('induction_control') }}">{{ _('通用') }}</a></li>
<li{{ " class=active" if index==2 }}><a href="{{ url_for('induction_test') }}">{{ _('测试') }}</a> </li>
<li{{ " class=active" if index==3 }}><a href="{{ url_for('induction_config') }}">{{ _('配置') }}</a> </li>
<li
{{ " class=active" if index==1 }}><a href="{{ url_for('induction_control') }}">{{ _('通用') }}</a></li>
<li
{{ " class=active" if index==2 }}><a href="{{ url_for('induction_test') }}">{{ _('测试') }}</a> </li>
<li
{{ " class=active" if index==3 }}><a href="{{ url_for('induction_config') }}">{{ _('配置') }}</a> </li>
</ul>
<ul class="nav navbar-nav navbar-right" style="font-size: 14px;"">
<ul class="nav navbar-nav navbar-right" style="font-size: 14px;"
">
<li>
<a href="#" onclick="return switchLanguage('zh');">简体中文</a>
</li>
<li>
<a href="#" onclick="return switchLanguage('en');">English</a>
</li>
<li>
<a href="#" onclick="return switchLanguage('ja');">日本語</a>
</li>
</ul>
</div>
<!--/.nav-collapse -->
......
# Japanese translations for PROJECT.
# Copyright (C) 2025 ORGANIZATION
# This file is distributed under the same license as the PROJECT project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
#
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2025-01-08 14:02+0800\n"
"PO-Revision-Date: 2025-01-08 14:03+0800\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: ja\n"
"Language-Team: ja <LL@li.org>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.16.0\n"
#: induction_config.py:42 induction_config.py:204
#: templates/induction_config.html:119
msgid "串口号"
msgstr "シリアルポート番号"
#: induction_config.py:42 induction_config.py:204
#: templates/induction_config.html:124 templates/induction_test.html:50
msgid "地址"
msgstr "アドレス"
#: induction_post.py:74
msgid "启动成功"
msgstr "起動成功"
#: induction_post.py:116
msgid "关闭成功"
msgstr "シャットダウン成功"
#: induction_post.py:119
msgid "无需关闭"
msgstr "シャットダウン不要"
#: templates/head.html:29
msgid "感应式料架"
msgstr "感応式ラック"
#: templates/head.html:34
msgid "通用"
msgstr "汎用"
#: templates/head.html:35
msgid "测试"
msgstr "テスト"
#: templates/head.html:36
msgid "配置"
msgstr "設定"
#: templates/induction_admin.html:7 templates/induction_config.html:6
#: templates/induction_control.html:6 templates/induction_debug.html:7
#: templates/induction_test.html:6
msgid "感应式料架系统"
msgstr "感応式ラックシステム"
#: templates/induction_admin.html:30 templates/induction_control.html:25
#: templates/induction_debug.html:67
msgid "料架系统"
msgstr "ラックシステム"
#: templates/induction_admin.html:35
msgid "手动阈值"
msgstr "手動しきい値"
#: templates/induction_admin.html:38 templates/induction_admin.html:69
msgid "地址编号"
msgstr "アドレス番号"
#: templates/induction_admin.html:43
msgid "设置阈值"
msgstr "しきい値を設定"
#: templates/induction_admin.html:45
msgid "获取阈值"
msgstr "しきい値を取得"
#: templates/induction_admin.html:54
msgid "随机亮灯"
msgstr "ランダム点灯"
#: templates/induction_admin.html:58 templates/induction_admin.html:159
msgid "发送"
msgstr "送信"
#: templates/induction_admin.html:66 templates/induction_test.html:101
msgid "标定"
msgstr "キャリブレーション"
#: templates/induction_admin.html:93
msgid "参数"
msgstr "パラメータ"
#: templates/induction_admin.html:103
msgid "自动标定"
msgstr "自動キャリブレーション"
#: templates/induction_admin.html:110
msgid "地址检测"
msgstr "アドレス検出"
#: templates/induction_admin.html:115
msgid "亮灯检测"
msgstr "点灯検出"
#: templates/induction_admin.html:122
msgid "传感器地址"
msgstr "センサーアドレス"
#: templates/induction_admin.html:126
msgid "重建库位"
msgstr "庫位再構築"
#: templates/induction_admin.html:130
msgid "重启控制器"
msgstr "コントローラー再起動"
#: templates/induction_admin.html:134
msgid "下载库位表"
msgstr "庫位表をダウンロード"
#: templates/induction_admin.html:141
msgid "串口调试"
msgstr "シリアルポートデバッグ"
#: templates/induction_admin.html:209 templates/induction_admin.html:251
#: templates/induction_admin.html:278 templates/induction_admin.html:300
#: templates/induction_admin.html:337 templates/induction_admin.html:356
#: templates/induction_admin.html:399 templates/induction_debug.html:304
msgid "请谨慎操作"
msgstr "慎重に操作してください"
#: templates/induction_config.html:82
msgid "配置文件"
msgstr "設定ファイル"
#: templates/induction_config.html:86
msgid "选择文件"
msgstr "ファイルを選択"
#: templates/induction_config.html:89
msgid "上传"
msgstr "アップロード"
#: templates/induction_config.html:96
msgid "服务器配置"
msgstr "サーバー設定"
#: templates/induction_config.html:101 templates/induction_config.html:167
#: templates/induction_control.html:57
msgid "服务器地址"
msgstr "サーバーアドレス"
#: templates/induction_config.html:107 templates/induction_config.html:172
#: templates/induction_control.html:62
msgid "料架序列号"
msgstr "ラックシリアル番号"
#: templates/induction_config.html:111 templates/induction_config.html:129
msgid "保存"
msgstr "保存"
#: templates/induction_config.html:116
msgid "设置串口&地址"
msgstr "シリアルポート&アドレスを設定"
#: templates/induction_config.html:131
msgid "同步颜色信息"
msgstr "色情報を同期"
#: templates/induction_config.html:137
msgid "控制器备份&升级"
msgstr "コントローラーバックアップ&アップグレード"
#: templates/induction_config.html:141
msgid "料架升级"
msgstr "ラックアップグレード"
#: templates/induction_config.html:142
msgid "teamview"
msgstr "チームビューア"
#: templates/induction_config.html:152 templates/induction_control.html:42
#: templates/induction_test.html:162
msgid "消息"
msgstr "メッセージ"
#: templates/induction_config.html:157 templates/induction_control.html:47
#: templates/induction_test.html:167
msgid "运行状态"
msgstr "稼働状況"
#: templates/induction_config.html:162 templates/induction_control.html:52
#: templates/induction_test.html:177
msgid "配置文件加载状态"
msgstr "設定ファイル読み込み状態"
#: templates/induction_config.html:177
msgid "操作提醒"
msgstr "操作通知"
#: templates/induction_config.html:182
msgid "串口号&地址"
msgstr "シリアルポート番号&アドレス"
#: templates/induction_config.html:187
msgid "软件版本"
msgstr "ソフトウェアバージョン"
#: templates/induction_config.html:206 templates/induction_config.html:244
#: templates/induction_config.html:283 templates/induction_control.html:128
#: templates/induction_control.html:152 templates/induction_control.html:175
#: templates/induction_test.html:209 templates/induction_test.html:225
#: templates/induction_test.html:277 templates/induction_test.html:300
#: templates/induction_test.html:324 templates/induction_test.html:349
#: templates/induction_test.html:378 templates/induction_test.html:404
#: templates/induction_test.html:425 templates/induction_test.html:447
#: templates/induction_test.html:470 templates/induction_test.html:494
#: templates/induction_test.html:518
msgid "运行中"
msgstr "稼働中"
#: templates/induction_config.html:206 templates/induction_config.html:244
#: templates/induction_test.html:225 templates/induction_test.html:277
#: templates/induction_test.html:300 templates/induction_test.html:324
#: templates/induction_test.html:351 templates/induction_test.html:378
#: templates/induction_test.html:404 templates/induction_test.html:425
#: templates/induction_test.html:447 templates/induction_test.html:470
#: templates/induction_test.html:494 templates/induction_test.html:518
msgid "料架运行中,请关闭后再进行配置"
msgstr "ラックが稼働中です。停止後に設定を行ってください"
#: templates/induction_config.html:211
msgid "请选择文件"
msgstr "ファイルを選択してください"
#: templates/induction_config.html:231
msgid "上传完成!"
msgstr "アップロード完了!"
#: templates/induction_config.html:234
msgid "上传失败!"
msgstr "アップロード失敗!"
#: templates/induction_config.html:249
msgid "不能提交空数据"
msgstr "空データは送信できません"
#: templates/induction_config.html:261
msgid "保存成功"
msgstr "保存成功"
#: templates/induction_config.html:284 templates/induction_control.html:129
#: templates/induction_control.html:153 templates/induction_control.html:176
#: templates/induction_test.html:210
msgid "已关闭"
msgstr "シャットダウン済み"
#: templates/induction_config.html:285 templates/induction_control.html:130
#: templates/induction_control.html:154 templates/induction_control.html:177
#: templates/induction_test.html:211
msgid "未初始化"
msgstr "未初期化"
#: templates/induction_config.html:295 templates/induction_control.html:184
#: templates/induction_control.html:223
msgid "未获取到状态信息"
msgstr "ステータス情報を取得できませんでした"
#: templates/induction_control.html:30
msgid "开关"
msgstr "オン/オフ"
#: templates/induction_control.html:33
msgid "启动"
msgstr "起動"
#: templates/induction_control.html:34
msgid "停止"
msgstr "停止"
#: templates/induction_control.html:67 templates/induction_control.html:77
msgid "服务器连接状态"
msgstr "サーバー接続状態"
#: templates/induction_control.html:72 templates/induction_test.html:182
msgid "串口状态"
msgstr "シリアルポート状態"
#: templates/induction_control.html:86
msgid "运行日志&状态信息"
msgstr "稼働ログ&ステータス情報"
#: templates/induction_control.html:91
msgid "日志下载"
msgstr "ログダウンロード"
#: templates/induction_control.html:94
msgid "下载日志"
msgstr "ログをダウンロード"
#: templates/induction_control.html:101
msgid "日志"
msgstr "ログ"
#: templates/induction_control.html:135
msgid "启动失败"
msgstr "起動失敗"
#: templates/induction_control.html:159 templates/induction_debug.html:298
msgid "停止失败"
msgstr "停止失敗"
#: templates/induction_debug.html:72
msgid "料架状态显示"
msgstr "ラック状態表示"
#: templates/induction_debug.html:76
msgid "开始扫描库位"
msgstr "庫位スキャンを開始"
#: templates/induction_debug.html:78
msgid "停止扫描库位"
msgstr "庫位スキャンを停止"
#: templates/induction_debug.html:156
msgid "开始顺序测试"
msgstr "順序テストを開始"
#: templates/induction_test.html:27
msgid "串口连接测试"
msgstr "シリアルポート接続テスト"
#: templates/induction_test.html:32
msgid "检查串口"
msgstr "シリアルポートをチェック"
#: templates/induction_test.html:33
msgid "扫描串口"
msgstr "シリアルポートをスキャン"
#: templates/induction_test.html:35
msgid "重置主板"
msgstr "メインボードをリセット"
#: templates/induction_test.html:36
msgid "打开供电"
msgstr "電源をオン"
#: templates/induction_test.html:38
msgid "扫描库位"
msgstr "庫位をスキャン"
#: templates/induction_test.html:39
msgid "停止扫描"
msgstr "スキャンを停止"
#: templates/induction_test.html:47
msgid "灯条测试"
msgstr "ライトバーのテスト"
#: templates/induction_test.html:58 templates/induction_test.html:88
#: templates/induction_test.html:121
msgid "颜色"
msgstr "色"
#: templates/induction_test.html:69
msgid "开启"
msgstr "オン"
#: templates/induction_test.html:70
msgid "关闭"
msgstr "オフ"
#: templates/induction_test.html:71
msgid "感应"
msgstr "感応"
#: templates/induction_test.html:77
msgid "库位操作测试"
msgstr "庫位操作テスト"
#: templates/induction_test.html:80
msgid "库位"
msgstr "庫位"
#: templates/induction_test.html:98 templates/induction_test.html:130
msgid "亮灯"
msgstr "点灯"
#: templates/induction_test.html:99 templates/induction_test.html:131
msgid "灭灯"
msgstr "消灯"
#: templates/induction_test.html:100
msgid "重置"
msgstr "リセット"
#: templates/induction_test.html:107
msgid "状态灯测试"
msgstr "ステータスライトテスト"
#: templates/induction_test.html:110
msgid "选择"
msgstr "選択"
#: templates/induction_test.html:138
msgid "下载库位二维码"
msgstr "庫位QRコードをダウンロード"
#: templates/induction_test.html:150
msgid "下载二维码"
msgstr "QRコードをダウンロード"
#: templates/induction_test.html:152
msgid "单个二维码尺寸(含白色底框)尺寸为16*16mm,黑码尺寸为10*10mm"
msgstr "単一QRコードのサイズ(白色枠含む)は1616mm、黒コードのサイズは1010mm"
#: templates/induction_test.html:172
msgid "测试消息"
msgstr "テストメッセージ"
#: templates/induction_test.html:355
msgid "操作前请确保该库位中没有物料"
msgstr "操作前に当該庫位に物料がないことを確認してください"
......@@ -25,6 +25,7 @@ class SerialCommunication():
# self.port = read_com()
# self.uploads_path = Config.UPLOAD_FOLDER
self.serialstate="串口连接正常"
with open(Config.IP_PATH + "/serialcom.txt", "r") as f:
serialcom = f.read()
self.port = serialcom.strip("\n")
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!