fix(labels): replace incorrect ams_30x15 preset with correct AMS holder sizes (#1426)

Reporter — the same person who originally requested the labels
  feature in #809 — discovered that the ams_30x15 preset's 30x15 mm
  dimension didn't actually fit any variant of the MakerWorld AMS
  Filament Label Holder (model 752566) it advertised. Two new
  presets replace it:

  - ams_holder_74x33 (74 x 33 mm) matches the printable label STL
    bundled in the MakerWorld project
  - ams_holder_75x55 (75 x 55 mm) fits the cardstock-insert variant
    the reporter validated on bench

  Both cross the 20 mm height threshold so they land in the roomy
  layout branch — swatch on the left, QR on the right, multi-line
  text (brand, material, hex code, spool ID) in the middle. The
  old 30x15 mm preset couldn't fit a QR code; the new ones do.

  No DB migration: the preset name was never persisted. Callers
  scripting the old ams_30x15 value get a clean 422 at the route's
  Literal validator with the new valid values listed.

  i18n: replaced inventory.labels.templates.ams.{label,hint} with
  amsHolderSmall and amsHolderLarge across all 8 locales with real
  translations; parity guard cleaned of the stale English-fallback
  cognate entries. Parity holds at 4856 leaves per locale.

  Tests: backend label renderer + integration tests cover both new
  presets; LabelTemplatePickerModal test updated for the 6-button
  grid and the new template value in the API-call assertion.
This commit is contained in:
maziggy
2026-05-19 13:14:03 +02:00
parent 0b33862ae9
commit 1677efb2c6
19 changed files with 175 additions and 82 deletions
+7 -7
View File
@@ -160,7 +160,7 @@ const DE_COGNATES = [
'Hex', 'Warm', 'Neutral', 'Navigation', 'Screenshot', 'Architecture',
'Backend & Auth', 'Stream Overlay', 'Bambuddy Backend URL',
'Material (optional)', 'Custom Headers (JSON)', '({{count}}/8)',
'AMS holder (30 × 15 mm)', 'Box label (62 × 29 mm)',
'Box label (62 × 29 mm)',
'Avery L7160 — A4 sheet (38.1 × 63.5 mm × 21)',
'Avery 5160 — US Letter sheet (25.4 × 66.7 mm × 30)',
'China', 'Proxy', 'Start',
@@ -192,7 +192,7 @@ const FR_COGNATES = [
'{{count}} filament', '{{count}} filaments', '{{count}} permissions',
'{{count}} downloads', '{{count}} item', '{{count}} selected',
'({{count}} item)', 'Provisioning...', 'Pressure Advance',
'AMS holder (30 × 15 mm)', 'Box label (62 × 29 mm)',
'Box label (62 × 29 mm)',
'Avery L7160 — A4 sheet (38.1 × 63.5 mm × 21)',
'Avery 5160 — US Letter sheet (25.4 × 66.7 mm × 30)',
'({{count}}/8)', 'Custom Headers (JSON)', 'Permissions',
@@ -223,7 +223,7 @@ const IT_COGNATES = [
'{{name}} - Timelapse', 'Box label (62 × 29 mm)',
'Avery L7160 — A4 sheet (38.1 × 63.5 mm × 21)',
'Avery 5160 — US Letter sheet (25.4 × 66.7 mm × 30)',
'AMS holder (30 × 15 mm)', 'Hex: #{{hex}}',
'Hex: #{{hex}}',
'EC984C,#6CD4BC,A66EB9,D87694',
'Proxy', 'Designer',
];
@@ -234,7 +234,7 @@ const JA_COGNATES = [
'OK', 'Bambu', 'Code',
'EU (DD/MM/YYYY)', 'US (MM/DD/YYYY)', 'ON, true, 1',
'({{count}}/8)', 'Custom Headers (JSON)',
'AMS holder (30 × 15 mm)', 'Box label (62 × 29 mm)',
'Box label (62 × 29 mm)',
'Avery L7160 — A4 sheet (38.1 × 63.5 mm × 21)',
'Avery 5160 — US Letter sheet (25.4 × 66.7 mm × 30)',
'EC984C,#6CD4BC,A66EB9,D87694',
@@ -257,7 +257,7 @@ const PT_BR_COGNATES = [
'Base: {{name}}', 'ETA {{minutes}} min', '{{count}} item',
'{{count}} downloads', '({{count}} item)', '(25%, 50%, 75%)',
'({{count}}/8)', 'Custom Headers (JSON)', '{{name}} - Timelapse',
'AMS holder (30 × 15 mm)', 'Box label (62 × 29 mm)',
'Box label (62 × 29 mm)',
'Avery L7160 — A4 sheet (38.1 × 63.5 mm × 21)',
'Avery 5160 — US Letter sheet (25.4 × 66.7 mm × 30)',
'Cancelling upload...', 'EC984C,#6CD4BC,A66EB9,D87694',
@@ -269,7 +269,7 @@ const PT_BR_COGNATES = [
// Chinese (Simplified): very few cognates beyond brand names.
const ZH_CN_COGNATES = [
'OK', 'Bambu',
'({{count}}/8)', 'Custom Headers (JSON)', 'AMS holder (30 × 15 mm)',
'({{count}}/8)', 'Custom Headers (JSON)',
'Box label (62 × 29 mm)',
'Avery L7160 — A4 sheet (38.1 × 63.5 mm × 21)',
'Avery 5160 — US Letter sheet (25.4 × 66.7 mm × 30)',
@@ -278,7 +278,7 @@ const ZH_CN_COGNATES = [
const ZH_TW_COGNATES = [
'OK', 'Bambu',
'({{count}}/8)', 'Custom Headers (JSON)', 'AMS holder (30 × 15 mm)',
'({{count}}/8)', 'Custom Headers (JSON)',
'Box label (62 × 29 mm)',
'Avery L7160 — A4 sheet (38.1 × 63.5 mm × 21)',
'Avery 5160 — US Letter sheet (25.4 × 66.7 mm × 30)',