From b3900fc2b3892f41b9403ee334a6d4c027288c30 Mon Sep 17 00:00:00 2001 From: matthewtrahan Date: Sat, 17 Oct 2026 15:25:49 -0500 Subject: [PATCH] ui: the amber small-overhang card shows again -- the German localization (#184) built its English and German text but never set it, so the card was blank on every part with slivers; one tn() with the German in de.js --- web/i18n/de.js | 4 ++++ web/ui/part.js | 12 ++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/web/i18n/de.js b/web/i18n/de.js index 8ea8574..5cf70b2 100644 --- a/web/i18n/de.js +++ b/web/i18n/de.js @@ -215,6 +215,10 @@ export default { "{n} region": { one: "{n} Bereich", other: "{n} Bereiche" }, "{n} slivers": { one: "{n} Splitter", other: "{n} Splitter" }, "{n} sliver": { one: "{n} Splitter", other: "{n} Splitter" }, + "⚠ {n} overhangs shaded amber are too small for a fin (under {area} mm² each), so they print unsupported this way up and may come out rough. Try Suggest orientation to point them up.": { + one: "⚠ {n} Überhang in Bernstein ist zu klein für eine Finne (unter {area} mm²), wird daher in dieser Lage stützenlos gedruckt und kann rau werden. Versuchen Sie „Ausrichtung vorschlagen“, um ihn nach oben zu drehen.", + other: "⚠ {n} Überhänge in Bernstein sind zu klein für eine Finne (unter {area} mm²), werden daher in dieser Lage stützenlos gedruckt und können rau werden. Versuchen Sie „Ausrichtung vorschlagen“, um sie nach oben zu drehen.", + }, "{n} rough holes": { one: "{n} Restüberhang", other: "{n} Restüberhänge" }, "{n} rough hole": { one: "{n} Restüberhang", other: "{n} Restüberhänge" }, diff --git a/web/ui/part.js b/web/ui/part.js index d611fc7..154fe8d 100644 --- a/web/ui/part.js +++ b/web/ui/part.js @@ -224,14 +224,10 @@ export function paintOverhangs(res = lastResult) { // card; the sliver count in the readout above stays. const warn = el('over-warn'); if (dropped > 0 && highlightSmall) { - const one = dropped === 1; - const deText = `⚠ ${dropped} ${one ? 'Überhang' : 'Überhänge'} in Bernstein ${one ? 'ist' : 'sind'} ` - + `zu klein für eine Finne (unter ${MIN_REGION_AREA} mm²), ${one ? 'wird' : 'werden'} daher in dieser Lage stützenlos ` - + `gedruckt und können rau werden. Versuchen Sie „Ausrichtung vorschlagen“, um sie nach oben zu drehen.`; - const enText = `⚠ ${dropped} overhang${one ? '' : 's'} shaded amber ${one ? 'is' : 'are'} ` - + `too small for a fin (under ${MIN_REGION_AREA} mm² each), so ${one ? 'it prints' : 'they print'} ` - + `unsupported this way up and may come out rough. Try Suggest orientation to point ` - + `${one ? 'it' : 'them'} up.`; + warn.textContent = tn( + '⚠ {n} overhang shaded amber is too small for a fin (under {area} mm² each), so it prints unsupported this way up and may come out rough. Try Suggest orientation to point it up.', + '⚠ {n} overhangs shaded amber are too small for a fin (under {area} mm² each), so they print unsupported this way up and may come out rough. Try Suggest orientation to point them up.', + dropped, { area: MIN_REGION_AREA }); } else { warn.textContent = ''; }