Fix AWG notation, add alternator type, migrate to String(localized:)

- Fix AWG 0/00/000/0000 bug (all resolved to 0 in Swift) using negative
  int convention (-1 through -4) with formatAWG() for 1/0–4/0 display
- Add 7.5A fuse size and change fuse type from Int to Double
- Add alternator power source type with distinct bolt.car.fill icon
- Migrate all NSLocalizedString calls to String(localized:defaultValue:)
- Update translations for runtime subtitle (ES/FR/NL: current→maximum),
  usable capacity footer text, and NL override wording
- Store length always in meters, convert at display time in CalculatorView
- Add preview-friendly inits for ComponentLibraryView and LoadsView
- Expand test coverage for calculations, fuses, AWG, and edge cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-27 10:37:53 +01:00
parent 03878b9507
commit ea3b60d75c
24 changed files with 899 additions and 928 deletions

View File

@@ -377,6 +377,7 @@
"charger.source.solar" = "Solar";
"charger.source.wind" = "Wind";
"charger.source.generator" = "Generator";
"charger.source.alternator" = "Alternator";
// MARK: - Share Menu
"overview.share.diagram" = "Wiring Diagram";