Part-DB-server/translations
Sebastian Almberg d73bc42362 Add a component value calculator & image generator
Adds a "Value calculator" tool (Tools menu) that decodes/encodes the value of
common components and generates a clean SVG picture you can attach to a part —
handy for assortments imported with blank thumbnails and sparse data.

Calculator tabs (bidirectional decode <-> encode), each drawing the part to the
selected package with a collapsible appearance panel and an "attach to part"
action (optionally as the master picture):
- Resistor: 4/5/6-band colour code
- Capacitor: value <-> 3-digit code <-> tolerance
- SMD resistor: value <-> 3-digit / 4-digit / EIA-96 code
- Inductor: colour-band code
- SMD inductor: value <-> uH code

Bulk "Generate component images" parts-table action:
- Classifies each selected part (resistor / capacitor / inductor / diode / LED,
  THT or SMD) with ComponentValueGuesser and detects value, voltage, tolerance,
  power, ppm, pitch, diameter, colour, SMD package and marking from the name,
  description and parameters.
- Renders a preview per part, lets you tweak appearance, and attaches the images
  in one go; can also write matching KiCad symbol/footprint/reference-prefix EDA
  fields.

Backend: ComponentValueGuesser (classification + detection + EDA suggestion),
GeneratedImageAttachmentHelper (stores the SVG through the existing attachment
pipeline, so it is sanitised on save), two POST endpoints on PartController
(generate_image, set_eda) guarded by `edit` + CSRF, a new `@tools.value_calculator`
permission, a Tools-tree entry and docs. All drawing is client-side in a Stimulus
controller; the un-sanitised live preview escapes part-derived text and validates
colours as defence-in-depth.

Tests: unit tests for ComponentValueGuesser and functional tests for the
endpoints, including permission and CSRF enforcement and the persisted side
effects.
2026-07-30 17:49:18 +02:00
..
.gitignore Initial commit 2019-02-23 16:49:38 +01:00
frontend.cs.xlf Translate Swal buttons 2026-06-21 15:10:39 +02:00
frontend.da.xlf Translate Swal buttons 2026-06-21 15:10:39 +02:00
frontend.de.xlf New Crowdin updates (#1419) 2026-06-29 00:12:20 +02:00
frontend.el.xlf Translate Swal buttons 2026-06-21 15:10:39 +02:00
frontend.en.xlf Add a component value calculator & image generator 2026-07-30 17:49:18 +02:00
frontend.es.xlf Translate Swal buttons 2026-06-21 15:10:39 +02:00
frontend.fr.xlf Translate Swal buttons 2026-06-21 15:10:39 +02:00
frontend.hu.xlf Translate Swal buttons 2026-06-21 15:10:39 +02:00
frontend.it.xlf Translate Swal buttons 2026-06-21 15:10:39 +02:00
frontend.ja.xlf Translate Swal buttons 2026-06-21 15:10:39 +02:00
frontend.ko.xlf New Crowdin updates (#1450) 2026-07-19 15:43:25 +02:00
frontend.nl.xlf Translate Swal buttons 2026-06-21 15:10:39 +02:00
frontend.pl.xlf Translate Swal buttons 2026-06-21 15:10:39 +02:00
frontend.pt_BR.xlf Translate Swal buttons 2026-06-21 15:10:39 +02:00
frontend.ru.xlf Translate Swal buttons 2026-06-21 15:10:39 +02:00
frontend.uk.xlf Translate Swal buttons 2026-06-21 15:10:39 +02:00
frontend.zh.xlf New Crowdin updates (#1419) 2026-06-29 00:12:20 +02:00
messages.cs.xlf Add price columns to project BOM table and build price summary (#1345) 2026-04-15 22:13:07 +02:00
messages.da.xlf New Crowdin updates (#1325) 2026-04-15 23:38:40 +02:00
messages.de.xlf New Crowdin updates (#1451) 2026-07-19 23:54:26 +02:00
messages.el.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
messages.en.xlf Add a component value calculator & image generator 2026-07-30 17:49:18 +02:00
messages.es.xlf Add price columns to project BOM table and build price summary (#1345) 2026-04-15 22:13:07 +02:00
messages.fr.xlf New Crowdin updates (#1325) 2026-04-15 23:38:40 +02:00
messages.hu.xlf Add price columns to project BOM table and build price summary (#1345) 2026-04-15 22:13:07 +02:00
messages.it.xlf Add price columns to project BOM table and build price summary (#1345) 2026-04-15 22:13:07 +02:00
messages.ja.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
messages.ko.xlf New Crowdin updates (#1450) 2026-07-19 15:43:25 +02:00
messages.nl.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
messages.pl.xlf Add price columns to project BOM table and build price summary (#1345) 2026-04-15 22:13:07 +02:00
messages.ru.xlf Add price columns to project BOM table and build price summary (#1345) 2026-04-15 22:13:07 +02:00
messages.zh.xlf New Crowdin updates (#1419) 2026-06-29 00:12:20 +02:00
SchebTwoFactorBundle+intl-icu.de.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
SchebTwoFactorBundle+intl-icu.en.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
SchebTwoFactorBundle.de.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
SchebTwoFactorBundle.en.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
security.cs.xlf New Crowdin updates (#1227) 2026-02-07 19:14:35 +01:00
security.da.xlf New Crowdin updates (#1228) 2026-02-15 22:24:00 +01:00
security.de.xlf New Crowdin updates (#1228) 2026-02-15 22:24:00 +01:00
security.el.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
security.en.xlf New Crowdin updates (#1228) 2026-02-15 22:24:00 +01:00
security.es.xlf New Crowdin updates (#1227) 2026-02-07 19:14:35 +01:00
security.fr.xlf New Crowdin updates (#1227) 2026-02-07 19:14:35 +01:00
security.hr.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
security.hu.xlf New Crowdin updates (#1228) 2026-02-15 22:24:00 +01:00
security.it.xlf New Crowdin updates (#1227) 2026-02-07 19:14:35 +01:00
security.ja.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
security.ko.xlf New Crowdin updates (#1450) 2026-07-19 15:43:25 +02:00
security.nl.xlf New Crowdin updates (#1228) 2026-02-15 22:24:00 +01:00
security.pl.xlf New Crowdin updates (#1227) 2026-02-07 19:14:35 +01:00
security.pt_BR.xlf New Crowdin updates (#1358) 2026-05-03 01:24:24 +02:00
security.ru.xlf New Crowdin updates (#1227) 2026-02-07 19:14:35 +01:00
security.uk.xlf New Crowdin updates (#1228) 2026-02-15 22:24:00 +01:00
security.vi.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
security.zh.xlf Perform a full translation of Simplified Chinese. (#1426) 2026-06-25 20:41:55 +02:00
validators.cs.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
validators.da.xlf New Crowdin updates (#1325) 2026-04-15 23:38:40 +02:00
validators.de.xlf New Crowdin updates (#1419) 2026-06-29 00:12:20 +02:00
validators.el.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
validators.en.xlf New Crowdin updates (#1419) 2026-06-29 00:12:20 +02:00
validators.fr.xlf New Crowdin updates (#1325) 2026-04-15 23:38:40 +02:00
validators.hr.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
validators.hu.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
validators.it.xlf New Crowdin updates (#1265) 2026-03-01 23:21:02 +01:00
validators.ja.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
validators.ko.xlf New Crowdin updates (#1450) 2026-07-19 15:43:25 +02:00
validators.nl.xlf New Crowdin updates (#1364) 2026-05-25 22:40:38 +02:00
validators.pl.xlf New Crowdin updates (#1228) 2026-02-15 22:24:00 +01:00
validators.pt_BR.xlf New Crowdin updates (#1358) 2026-05-03 01:24:24 +02:00
validators.ru.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
validators.uk.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
validators.zh.xlf Perform a full translation of Simplified Chinese. (#1426) 2026-06-25 20:41:55 +02:00