Part-DB-server/translations
Wieland Schopohl 29db029d69
Add SI-prefix-aware sorting column for parts tableFeature/si value sort (#1344)
* Add SI-prefix-aware sorting column for the parts table

Adds an optional "Name (SI)" column that parses numeric values with SI
prefixes (p, n, u/µ, m, k/K, M, G, T) from part names and sorts by the
resulting physical value. This is useful for electronic components where
alphabetical sorting produces wrong results — e.g. 100nF, 10pF, 1uF
should sort as 10pF < 100nF < 1uF.

Implementation:
- New SiValueSort DQL function with platform-specific SQL generation
  for PostgreSQL (POSIX regex), MySQL/MariaDB (REGEXP_SUBSTR), and
  SQLite (PHP callback registered via the existing middleware).
- The regex is start-anchored: only names beginning with a number are
  matched. Part numbers like "MCP2515" or "Crystal 20MHz" are ignored.
- When SI sort is active, NATSORT is appended as a secondary sort so
  that non-matching parts fall back to natural string ordering instead
  of appearing in arbitrary order.
- The column is opt-in (not in default columns) and displays the parsed
  float value, or an empty cell for non-matching names.

* Rename SI column from "Name (SI)" to "SI Value"

The column now shows the parsed numeric value rather than the part name,
so the label should reflect that.

* Support comma as decimal separator in SI value parsing

Part names using European decimal notation (e.g. "4,7 kΩ", "2,2uF")
were parsed incorrectly because the regex only recognized dots. Now
commas are normalized to dots before parsing, matching the existing
pattern used elsewhere in the codebase (PartNormalizer, price providers).
2026-04-15 22:56:34 +02:00
..
.gitignore Initial commit 2019-02-23 16:49:38 +01:00
frontend.cs.xlf New Crowdin updates (#1227) 2026-02-07 19:14:35 +01:00
frontend.da.xlf New Crowdin updates (#1228) 2026-02-15 22:24:00 +01:00
frontend.de.xlf New Crowdin updates (#1228) 2026-02-15 22:24:00 +01:00
frontend.el.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
frontend.en.xlf New Crowdin updates (#1228) 2026-02-15 22:24:00 +01:00
frontend.es.xlf New Crowdin updates (#1227) 2026-02-07 19:14:35 +01:00
frontend.fr.xlf New Crowdin updates (#1227) 2026-02-07 19:14:35 +01:00
frontend.hu.xlf New Crowdin updates (#1228) 2026-02-15 22:24:00 +01:00
frontend.it.xlf New Crowdin updates (#1227) 2026-02-07 19:14:35 +01:00
frontend.ja.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
frontend.nl.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
frontend.pl.xlf New Crowdin updates (#1227) 2026-02-07 19:14:35 +01:00
frontend.ru.xlf New Crowdin updates (#1227) 2026-02-07 19:14:35 +01:00
frontend.uk.xlf New Crowdin updates (#1228) 2026-02-15 22:24:00 +01:00
frontend.zh.xlf New Crowdin updates (#1228) 2026-02-15 22:24:00 +01: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 Add price columns to project BOM table and build price summary (#1345) 2026-04-15 22:13:07 +02:00
messages.de.xlf Add price columns to project BOM table and build price summary (#1345) 2026-04-15 22:13:07 +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 SI-prefix-aware sorting column for parts tableFeature/si value sort (#1344) 2026-04-15 22:56:34 +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 Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01: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.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 Add price columns to project BOM table and build price summary (#1345) 2026-04-15 22:13:07 +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.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.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 New Crowdin updates (#1228) 2026-02-15 22:24:00 +01: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 Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
validators.de.xlf New Crowdin updates (#1294) 2026-03-07 22:51:02 +01: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 (#1228) 2026-02-15 22:24:00 +01:00
validators.fr.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01: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.nl.xlf Remove outdated file source and path notes from translation files (#1225) 2026-02-07 18:33:31 +01:00
validators.pl.xlf New Crowdin updates (#1228) 2026-02-15 22:24:00 +01: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 New Crowdin updates (#1301) 2026-03-15 22:08:38 +01:00