From ecd444525a08100ba2a632dacfa0d7d5ed3ce06f Mon Sep 17 00:00:00 2001 From: Gangoke Date: Thu, 28 May 2026 17:40:22 -1000 Subject: [PATCH] additional mappings and translations --- web/themes/default/app.js | 32 +++++++++++++++++++++----------- web/themes/default/index.html | 6 +++--- web/translations/de.json | 23 ++++++++++++++++++++--- web/translations/en.json | 17 +++++++++++++++++ web/translations/es.json | 31 ++++++++++++++++++++++++------- web/translations/zh-cn.json | 17 +++++++++++++++++ 6 files changed, 102 insertions(+), 24 deletions(-) diff --git a/web/themes/default/app.js b/web/themes/default/app.js index aa1add4..e6a34d0 100644 --- a/web/themes/default/app.js +++ b/web/themes/default/app.js @@ -253,8 +253,17 @@ function applyLang(){ setText('fd-objects-hint',T.fd_objects_hint); setText('apd-lbl-ip',T.apd_lbl_ip); setText('apd-lbl-name',T.apd_lbl_name); + var apn=document.getElementById('apd-name');if(apn)apn.setAttribute('placeholder',T.apd_placeholder_name); + setText('apd-cancel',T.apd_cancel); + setText('apd-confirm',T.apd_confirm); + setText('fd-slots-hint',T.fd_slots_hint); + setText('fd-cancel',T.fd_cancel); + setText('fd-print',T.fd_print); setText('store-panel-title','🗂 '+T.panel_browser_title); var srb=document.getElementById('store-refresh-btn');if(srb)srb.textContent=T.store_refresh; + var ssp=document.getElementById('store-search');if(ssp)ssp.setAttribute('placeholder',T.store_search_placeholder); + setText('store-upload-label-prefix',T.store_upload_label_prefix); + setText('store-upload-label-browse',T.store_upload_label_browse); setText('store-empty',T.store_empty); setText('sf-all',T.sf_all);setText('sf-ok',T.sf_ok);setText('sf-err',T.sf_err);setText('sf-new',T.sf_new); setText('ss-date',T.ss_date);setText('ss-name',T.ss_name);setText('ss-dur',T.ss_dur); @@ -274,6 +283,7 @@ function applyLang(){ setText('d-slicer-label',T.lbl_slicer_time); setText('d-lbl-layers',T.lbl_layers); setText('d-lbl-light',T.lbl_light); + setText('d-lbl-nozzle',T.label_nozzle); setText('d-lbl-bed',T.label_bed); // Dashboard buttons setText('d-btn-pause',T.btn_pause); @@ -759,7 +769,7 @@ function applyState(){ var loaded=(s.ams_loaded_slot!=null&&s.ams_loaded_slot>=0&&globalIdx===s.ams_loaded_slot); var activity=(slot.activity||''); var pct=empty?T.ams_empty:(slot.consumables_percent!=null?slot.consumables_percent+'%':'–'); - var slotLabel='Slot '+(globalIdx+1); + var slotLabel=T.label_slot+' '+(globalIdx+1); html+='
' +'
' @@ -770,7 +780,7 @@ function applyState(){ +'
'; }); if(bid===-1&&acePresent){ - html+='
' + html+='
' +'
ACE
' +'
'; } @@ -1503,7 +1513,7 @@ function uploadGcode(file){ var zone=document.getElementById('store-upload-zone'); var status=document.getElementById('store-upload-status'); var label=document.getElementById('store-upload-label'); - if(status) { status.textContent='⏳ Hochladen…'; status.style.display=''; status.className='upload-status-busy'; } + if(status) { status.textContent=T.store_upload_busy; status.style.display=''; status.className='upload-status-busy'; } if(label) label.style.display='none'; if(zone) zone.style.pointerEvents='none'; var fd=new FormData(); @@ -1515,7 +1525,7 @@ function uploadGcode(file){ return r.json(); }) .then(function(){ - if(status){ status.textContent='✓ '+file.name; status.className='upload-status-ok'; } + if(status){ status.textContent=T.store_upload_success.replace('{file}',file.name); status.className='upload-status-ok'; } loadStore(); setTimeout(function(){ if(status){status.style.display='none'; status.className='';} @@ -1524,7 +1534,7 @@ function uploadGcode(file){ }, 3000); }) .catch(function(e){ - if(status){ status.textContent='✗ '+e.message; status.className='upload-status-err'; } + if(status){ status.textContent=T.store_upload_error.replace('{error}',e.message); status.className='upload-status-err'; } if(label) label.style.display=''; if(zone) zone.style.pointerEvents=''; clog('Upload-Fehler: '+e,'msg-err'); @@ -1596,7 +1606,7 @@ function renderStore(){ thumb+ '
'+name+statusBadge+'
'+ lastInfo+ - '
⏱ Schätzung: '+est+'
'+ + '
⏱ '+T.store_estimate+': '+est+'
'+ '
📅 '+date+'
'+ '
'+ ' +
diff --git a/web/translations/de.json b/web/translations/de.json index 10e332d..e2ce354 100644 --- a/web/translations/de.json +++ b/web/translations/de.json @@ -75,7 +75,7 @@ "btn_pause": "⏸ Pause", "btn_resume": "▶ Weiter", "btn_cancel": "✕ Stopp", - "label_nozzle": "Nozzle", + "label_nozzle": "Düse", "label_bed": "Bett", "label_fan": "🌀 Lüfter", "label_light": "💡 Licht", @@ -88,7 +88,7 @@ "panel_print_temps_live": "Temperaturen (Live)", "label_set": "Setzen", "label_off": "Aus", - "panel_temps_nozzle": "Nozzle", + "panel_temps_nozzle": "Düse", "panel_temps_bed": "Heizbett", "panel_temps_chart": "Verlauf (letzte 60 Messungen)", "label_target_c": "Ziel:", @@ -113,7 +113,7 @@ "log_light_on": "Licht an", "log_light_off": "Licht aus", "log_fan": "Lüfter →", - "log_nozzle": "Nozzle →", + "log_nozzle": "Düse →", "log_bed": "Bett →", "log_axis": "Achse", "log_home": "Home", @@ -176,9 +176,19 @@ "skip_sending": "Sende …", "skip_success": "Objekte werden übersprungen.", "fd_objects_hint": "Objekte überspringen (optional):", + "fd_slots_hint": "GCode-Kanal → AMS-Slot zuweisen:", + "fd_cancel": "Abbrechen", + "fd_print": "▶ Drucken", + "fd_no_slots_msg": "Keine belegten AMS-Slots.{br}Druck trotzdem starten?", + "fd_slot": "Slot", + "fd_no_matching_material": "Kein passendes Material", + "fd_used": "GENUTZT", "add_printer": "Drucker hinzufügen", "apd_lbl_ip": "Drucker-IP", "apd_lbl_name": "Name (optional)", + "apd_placeholder_name": "z.B. Kobra X Wohnzimmer", + "apd_cancel": "Abbrechen", + "apd_confirm": "Hinzufügen", "apd_fetching": "Hole Daten vom Drucker…", "apd_success": "Drucker hinzugefügt, Bridge startet neu…", "apd_err_ip": "Bitte IP-Adresse eingeben", @@ -192,6 +202,7 @@ "printers_empty_hint": "Noch kein Drucker eingerichtet.", "nav_browser": "Browser", "panel_browser_title": "Datei-Browser", + "store_search_placeholder": "🔍 Suche…", "store_empty": "Noch keine Dateien hochgeladen.", "store_refresh": "↻ Aktualisieren", "store_print": "▶ Drucken", @@ -204,6 +215,12 @@ "store_web_verify_abort": "Abbrechen", "store_no_results": "Keine Dateien gefunden.", "store_never": "noch nicht gedruckt", + "store_estimate": "Schätzung", + "store_upload_label_prefix": "GCode hierher ziehen oder ", + "store_upload_label_browse": "durchsuchen", + "store_upload_busy": "⏳ Hochladen…", + "store_upload_success": "✓ {file}", + "store_upload_error": "✗ {error}", "sf_all": "Alle", "sf_ok": "✓ Erfolgreich", "sf_err": "✗ Fehler", diff --git a/web/translations/en.json b/web/translations/en.json index de04de8..ac9c887 100644 --- a/web/translations/en.json +++ b/web/translations/en.json @@ -176,9 +176,19 @@ "skip_sending": "Sending …", "skip_success": "Objects will be skipped.", "fd_objects_hint": "Skip objects (optional):", + "fd_slots_hint": "Assign GCode channel to AMS slot:", + "fd_cancel": "Cancel", + "fd_print": "▶ Print", + "fd_no_slots_msg": "No loaded AMS slots.{br}Start print anyway?", + "fd_slot": "Slot", + "fd_no_matching_material": "No matching material", + "fd_used": "USED", "add_printer": "Add printer", "apd_lbl_ip": "Printer IP", "apd_lbl_name": "Name (optional)", + "apd_placeholder_name": "e.g. Kobra X Living Room", + "apd_cancel": "Cancel", + "apd_confirm": "Add", "apd_fetching": "Fetching data from printer…", "apd_success": "Printer added, bridge restarting…", "apd_err_ip": "Please enter an IP address", @@ -192,6 +202,7 @@ "printers_empty_hint": "No printer set up yet.", "nav_browser": "Browser", "panel_browser_title": "File Browser", + "store_search_placeholder": "🔍 Search…", "store_empty": "No files uploaded yet.", "store_refresh": "↻ Refresh", "store_print": "▶ Print", @@ -204,6 +215,12 @@ "store_web_verify_abort": "Abort", "store_no_results": "No files found.", "store_never": "never printed", + "store_estimate": "Estimate", + "store_upload_label_prefix": "Drag GCode here or ", + "store_upload_label_browse": "browse", + "store_upload_busy": "⏳ Uploading…", + "store_upload_success": "✓ {file}", + "store_upload_error": "✗ {error}", "sf_all": "All", "sf_ok": "✓ Completed", "sf_err": "✗ Failed", diff --git a/web/translations/es.json b/web/translations/es.json index 638181d..3ae5d0f 100644 --- a/web/translations/es.json +++ b/web/translations/es.json @@ -75,7 +75,7 @@ "btn_pause": "⏸ Pause", "btn_resume": "▶ Reanudar", "btn_cancel": "✕ Detener", - "label_nozzle": "Nozzle", + "label_nozzle": "Boquilla", "label_bed": "Cama", "label_fan": "🌀 Ventilador", "label_light": "💡 Luz", @@ -88,7 +88,7 @@ "panel_print_temps_live": "Temperaturas (en vivo)", "label_set": "Set", "label_off": "Off", - "panel_temps_nozzle": "Nozzle", + "panel_temps_nozzle": "Boquilla", "panel_temps_bed": "Cama caliente", "panel_temps_chart": "Historial (ultimas 60 lecturas)", "label_target_c": "Objetivo:", @@ -102,7 +102,7 @@ "panel_ams_title": "Filamento", "card_ams": "Filamento", "ams_no_data": "No se recibieron datos de AMS", - "label_slot": "Slot", + "label_slot": "Ranura", "ams_empty": "Vacio", "panel_extras_light": "Luz", "panel_extras_fan": "Ventilador", @@ -113,7 +113,7 @@ "log_light_on": "Luz encendida", "log_light_off": "Luz apagada", "log_fan": "Ventilador →", - "log_nozzle": "Nozzle →", + "log_nozzle": "Boquilla →", "log_bed": "Cama →", "log_axis": "Eje", "log_home": "Home", @@ -137,7 +137,7 @@ "settings_device_id": "ID del dispositivo", "settings_mode_id": "Mode ID", "hint_ip_no_port": "Solo direccion IP, sin puerto (p. ej. 192.168.1.102)", - "settings_default_slot": "Slot predeterminado (un color)", + "settings_default_slot": "Ranura predeterminada (un color)", "settings_slot_auto": "Auto (todos los slots cargados)", "settings_auto_leveling": "Autonivelado antes de imprimir", "settings_camera_on_print": "Encender camara al iniciar impresion", @@ -160,11 +160,11 @@ "slot_edit_unload": "⬆ Descargar", "slot_edit_save": "💾 Guardar", "slot_edit_custom": "p. ej. PLA, PETG, ABS…", - "slot_edit_ok": "AMS Slot", + "slot_edit_ok": "Ranura AMS", "log_dir_all": "Todos", "log_lvl_label": "Level:", "file_ready_btn": "▶ Iniciar impresion", - "file_slots_btn": "🎨 Seleccionar slots", + "file_slots_btn": "🎨 Seleccionar ranuras", "file_cancel_btn": "✕ Cancelar", "nav_printers": "Impresoras", "skip_title": "✂ Omitir objetos", @@ -176,9 +176,19 @@ "skip_sending": "Enviando …", "skip_success": "Se omitiran los objetos.", "fd_objects_hint": "Omitir objetos (opcional):", + "fd_slots_hint": "Asignar canal GCode a la ranura AMS:", + "fd_cancel": "Cancelar", + "fd_print": "▶ Imprimir", + "fd_no_slots_msg": "No hay slots AMS cargados.{br}Iniciar impresion de todos modos?", + "fd_slot": "Ranura", + "fd_no_matching_material": "No hay material compatible", + "fd_used": "USADO", "add_printer": "Agregar impresora", "apd_lbl_ip": "IP de impresora", "apd_lbl_name": "Nombre (opcional)", + "apd_placeholder_name": "p. ej. Kobra X Sala", + "apd_cancel": "Cancelar", + "apd_confirm": "Agregar", "apd_fetching": "Obteniendo datos de la impresora…", "apd_success": "Impresora agregada, reiniciando bridge…", "apd_err_ip": "Introduce una direccion IP", @@ -192,6 +202,7 @@ "printers_empty_hint": "Aun no hay impresora configurada.", "nav_browser": "Explorador", "panel_browser_title": "Explorador de archivos", + "store_search_placeholder": "🔍 Buscar…", "store_empty": "Aun no hay archivos subidos.", "store_refresh": "↻ Actualizar", "store_print": "▶ Imprimir", @@ -204,6 +215,12 @@ "store_web_verify_abort": "Abortar", "store_no_results": "No se encontraron archivos.", "store_never": "nunca impreso", + "store_estimate": "Estimacion", + "store_upload_label_prefix": "Arrastra GCode aqui o ", + "store_upload_label_browse": "buscar", + "store_upload_busy": "⏳ Subiendo…", + "store_upload_success": "✓ {file}", + "store_upload_error": "✗ {error}", "sf_all": "Todos", "sf_ok": "✓ Completado", "sf_err": "✗ Fallido", diff --git a/web/translations/zh-cn.json b/web/translations/zh-cn.json index 91965c2..28521b5 100644 --- a/web/translations/zh-cn.json +++ b/web/translations/zh-cn.json @@ -176,9 +176,19 @@ "skip_sending": "发送中 …", "skip_success": "对象将被跳过。", "fd_objects_hint": "跳过对象 (可选):", + "fd_slots_hint": "将 GCode 通道分配到 AMS 槽位:", + "fd_cancel": "取消", + "fd_print": "▶ 打印", + "fd_no_slots_msg": "没有已装载的 AMS 槽位。{br}仍要开始打印吗?", + "fd_slot": "槽位", + "fd_no_matching_material": "无匹配材料", + "fd_used": "已用", "add_printer": "添加打印机", "apd_lbl_ip": "打印机 IP", "apd_lbl_name": "名称 (可选)", + "apd_placeholder_name": "例如 Kobra X 客厅", + "apd_cancel": "取消", + "apd_confirm": "添加", "apd_fetching": "正在从打印机获取数据…", "apd_success": "打印机已添加,Bridge 正在重启…", "apd_err_ip": "请输入 IP 地址", @@ -192,6 +202,7 @@ "printers_empty_hint": "尚未设置打印机。", "nav_browser": "浏览器", "panel_browser_title": "文件浏览器", + "store_search_placeholder": "🔍 搜索…", "store_empty": "尚未上传文件。", "store_refresh": "↻ 刷新", "store_print": "▶ 打印", @@ -204,6 +215,12 @@ "store_web_verify_abort": "取消", "store_no_results": "未找到文件。", "store_never": "从未打印", + "store_estimate": "估算", + "store_upload_label_prefix": "将 GCode 拖到这里或 ", + "store_upload_label_browse": "浏览", + "store_upload_busy": "⏳ 上传中…", + "store_upload_success": "✓ {file}", + "store_upload_error": "✗ {error}", "sf_all": "全部", "sf_ok": "✓ 已完成", "sf_err": "✗ 失败",