mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 03:01:21 +02:00
feat(ams): name the expected slot when a paused print hits an AMS runout (#2587)
The firmware's runout HMS text says "insert into the same AMS slot", which is wrong under AMS Filament Backup: the firmware won't re-accept the depleted slot and advances to the next compatible one. Bambuddy parsed print.ams.tray_now only and dropped tray_tar/tray_pre, so the expected slot never reached the UI. Capture tray_tar/tray_pre on PrinterState and, while paused, resolve them to global tray IDs (expected_tray/previous_tray) on both the REST and WebSocket status payloads via a shared resolver: single-AMS passthrough, multi-AMS snow-mapping resolution, AMS-HT/external passthrough, and an honest null when the slot can't be placed. The AMS graphic highlights the expected slot (amber) and the ran-out slot (red); the HMS modal re-describes runout codes to name both, falling back to "check the printer" when unresolved. Runout copy translated in all 11 locales. Reporter @Jostxxl confirmed tray_pre=1/tray_tar=2 during the pause (ran out in Slot 2, printer expected Slot 3).
This commit is contained in:
@@ -141,6 +141,7 @@ function isAlwaysAllowedIdentical(value) {
|
||||
// German loanwords / cognates from English are extensive. Most short technical
|
||||
// UI labels are identical in DE. List below curates the legitimate ones.
|
||||
const DE_COGNATES = [
|
||||
'{{ams}} · Slot {{slot}}', // #2587 runout slot label — "Slot" is the DE term too
|
||||
'Name', 'Status', 'Tag', 'Tags', 'Online', 'Offline', 'Standard', 'Modus',
|
||||
'Stop', 'Reset', 'Test', 'Code', 'Token', 'Server', 'Port', 'Bug', 'Job',
|
||||
'Bambu Cloud', 'Orca Cloud', // brand names — same in every locale
|
||||
@@ -220,6 +221,7 @@ const FR_COGNATES = [
|
||||
|
||||
// Italian cognates.
|
||||
const IT_COGNATES = [
|
||||
'{{ams}} · Slot {{slot}}', // #2587 runout slot label — "Slot" is the IT term too
|
||||
'Bambu Cloud', 'Orca Cloud', // brand names — same in every locale
|
||||
'AMS Filament Backup', // Bambu Lab product/firmware feature name
|
||||
'Email', // common loanword in Italian, used verbatim in UI labels
|
||||
@@ -267,6 +269,7 @@ const JA_COGNATES = [
|
||||
|
||||
// Portuguese (BR) cognates.
|
||||
const PT_BR_COGNATES = [
|
||||
'{{ams}} · Slot {{slot}}', // #2587 runout slot label — "Slot" is the PT-BR term too
|
||||
'Bambu Cloud', 'Orca Cloud', // brand names — same in every locale
|
||||
'AMS Filament Backup', // Bambu Lab product/firmware feature name
|
||||
'Pipeline', 'Pipelines', // #1425 — Slicer Pipelines (PT-BR)
|
||||
@@ -341,6 +344,7 @@ const KO_COGNATES = [
|
||||
|
||||
// Spanish cognates — words/phrases that are genuinely identical in Spanish.
|
||||
const ES_COGNATES = [
|
||||
'{{ams}} · Slot {{slot}}', // #2587 runout slot label — "Slot" is the ES term too
|
||||
'Bambu Cloud', 'Orca Cloud', // brand names — same in every locale
|
||||
'AMS Filament Backup', // Bambu Lab product/firmware feature name
|
||||
'Pipeline', 'Pipelines', // #1425 — Slicer Pipelines (ES)
|
||||
@@ -363,6 +367,7 @@ const ES_COGNATES = [
|
||||
// Turkish cognates — technical UI labels that Turkish speakers use verbatim
|
||||
// from English (loanwords + acronyms + format strings). Curated, not a shortcut.
|
||||
const TR_COGNATES = [
|
||||
'{{ams}} · Slot {{slot}}', // #2587 runout slot label — "Slot" is the TR term too
|
||||
'Filament', 'Firmware', 'Disk', 'Hex', 'Test', 'Port', 'Model', 'Metal',
|
||||
'Bambu Cloud', 'Orca Cloud', // brand names — same in every locale
|
||||
'AMS Filament Backup', // Bambu Lab product/firmware feature name
|
||||
|
||||
Reference in New Issue
Block a user