additional mappings and translations

This commit is contained in:
Gangoke
2026-05-28 17:40:22 -10:00
parent d4bb79a68f
commit ecd444525a
6 changed files with 102 additions and 24 deletions

View File

@@ -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+='<div class="ams-slot'+(active?' active':'')+(loaded?' loaded':'')+(activity?' '+activity:'')+(empty?' empty':'')
+'" style="--slot-color:'+col+';opacity:'+(empty?0.4:1)+';cursor:pointer" onclick="openSlotEdit('+i+')">'
+'<div class="slot-circle" style="background:'+col+'"></div>'
@@ -770,7 +780,7 @@ function applyState(){
+'</div>';
});
if(bid===-1&&acePresent){
html+='<div class="ams-slot ams-slot-bridge" aria-label="Slot 4 connected to ACE">'
html+='<div class="ams-slot ams-slot-bridge" aria-label="'+T.label_slot+' 4">'
+'<div class="bridge-chip">ACE</div>'
+'</div>';
}
@@ -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+
'<div title="'+f.filename+'" style="font-size:12px;font-weight:600;margin-bottom:4px;color:var(--txt)">'+name+statusBadge+'</div>'+
lastInfo+
'<div style="font-size:11px;color:var(--txt2);margin-bottom:2px">⏱ Schätzung: '+est+'</div>'+
'<div style="font-size:11px;color:var(--txt2);margin-bottom:2px">⏱ '+T.store_estimate+': '+est+'</div>'+
'<div style="font-size:11px;color:var(--txt2);margin-bottom:8px">📅 '+date+'</div>'+
'<div style="display:flex;gap:6px;margin-top:auto">'+
'<button onclick="storePrint(\''+f.id+'\',\''+f.filename.replace(/'/g,"\\'")+'\')" '+
@@ -1903,7 +1913,7 @@ function openFilamentDialog(slots){
});
if(!_amsSlots.length){
body.innerHTML='<p style="color:var(--txt2);font-size:13px;text-align:center;padding:16px 0">Keine belegten AMS-Slots.<br>Druck trotzdem starten?</p>';
body.innerHTML='<p style="color:var(--txt2);font-size:13px;text-align:center;padding:16px 0">'+T.fd_no_slots_msg.replace('{br}','<br>')+'</p>';
} else {
body.innerHTML=channels.map(function(gc,i){
var isUsed=(gc&&gc.is_used!==false);
@@ -1917,18 +1927,18 @@ function openFilamentDialog(slots){
var opts=compatible.map(function(s){
var sel=(defaultSlot&&s.slot_index===defaultSlot.slot_index)?'selected':'';
return '<option value="'+s.slot_index+'" data-color="'+s.color_hex+'" data-material="'+s.material+'" '+sel+'>'+
'● Slot '+(s.slot_index+1)+' · '+s.material+'</option>';
'● '+T.fd_slot+' '+(s.slot_index+1)+' · '+s.material+'</option>';
}).join('');
if(!compatible.length){
opts='<option value="-1" data-color="#888888" data-material="" selected>⚠ No matching material</option>';
opts='<option value="-1" data-color="#888888" data-material="" selected>⚠ '+T.fd_no_matching_material+'</option>';
}
// Kanal-Box (links): farbige Box mit Nummer + auto Kontrast-Text
var txt=_contrastText(gc.color_hex);
var slotColor=defaultSlot?defaultSlot.color_hex:'#888';
var slotTxt=_contrastText(slotColor);
var usedBadge=isUsed
? '<span style="font-size:10px;color:var(--ok);font-weight:700;min-width:32px">USED</span>'
: '<span style="font-size:10px;color:var(--txt2);font-weight:700;min-width:32px;opacity:.75">USED</span>';
? '<span style="font-size:10px;color:var(--ok);font-weight:700;min-width:32px">'+T.fd_used+'</span>'
: '<span style="font-size:10px;color:var(--txt2);font-weight:700;min-width:32px;opacity:.75">'+T.fd_used+'</span>';
return '<div style="display:flex;align-items:center;gap:8px;padding:8px;border-radius:6px;background:var(--raised);border:1px solid var(--border)">'+
'<span style="display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;background:'+gc.color_hex+';color:'+txt+';font-weight:700;font-size:13px;border:1px solid var(--border);flex-shrink:0">'+(i+1)+'</span>'+
'<span style="font-size:11px;color:var(--txt2);min-width:36px">'+gc.material+'</span>'+

View File

@@ -247,7 +247,7 @@
<div class="card-title"><span></span> <span id="d-card-temps">Temperaturen</span></div>
<div class="temp-card-inner">
<div class="temp-block">
<div class="temp-label">Nozzle</div>
<div class="temp-label" id="d-lbl-nozzle">Nozzle</div>
<div class="temp-row">
<div class="temp-val" id="d-nt"></div>
<div class="temp-unit">°C</div>
@@ -419,7 +419,7 @@
<input type="file" id="store-upload-input" accept=".gcode,.bgcode"
style="display:none" onchange="uploadGcode(this.files[0]);this.value=''">
<span id="store-upload-icon"></span>
<span id="store-upload-label">GCode hierher ziehen oder <u>durchsuchen</u></span>
<span id="store-upload-label"><span id="store-upload-label-prefix">GCode hierher ziehen oder </span><u id="store-upload-label-browse">durchsuchen</u></span>
<span id="store-upload-status" style="display:none"></span>
</div>
<div id="store-empty" style="display:none;color:var(--txt2);text-align:center;padding:40px 0;font-size:14px">
@@ -522,7 +522,7 @@
<input type="text" id="apd-name" placeholder="z.B. Kobra X Wohnzimmer" style="width:100%;box-sizing:border-box;padding:8px;background:var(--raised);border:1px solid var(--border);border-radius:6px;color:var(--txt);margin-bottom:6px">
<div id="apd-status" style="font-size:12px;margin:8px 0;min-height:16px;color:var(--txt2)"></div>
<div style="display:flex;gap:8px;justify-content:flex-end">
<button onclick="closeAddPrinterDialog()" style="padding:8px 16px;background:var(--raised);border:1px solid var(--border);border-radius:8px;color:var(--txt);cursor:pointer">Abbrechen</button>
<button id="apd-cancel" onclick="closeAddPrinterDialog()" style="padding:8px 16px;background:var(--raised);border:1px solid var(--border);border-radius:8px;color:var(--txt);cursor:pointer">Abbrechen</button>
<button id="apd-confirm" onclick="confirmAddPrinter()" style="padding:8px 18px;background:var(--accent);color:#fff;border:none;border-radius:8px;cursor:pointer;font-weight:600">Hinzufügen</button>
</div>
</div>

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",

View File

@@ -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": "✗ 失败",