Patrick Schurig 846c0c7525 feat(i18n): traduire ce qu'on écrit, garder verbatim ce que la machine affiche
Signalé sur /de/appareils/bornes/goecharger/ : la page était allemande sur deux
lignes et anglaise sur tout le reste. Le diagnostic a séparé deux choses que
j'avais mises dans le même sac le 2026-10-12.

LA LIGNE DE PARTAGE, écrite en tête du générateur :

  • les LIBELLÉS QUE NOUS ÉCRIVONS (en-têtes de colonnes, titres de section,
    oui/non, « Documentation fabricant ») → TRADUITS. Ils ne désignent rien à
    l'écran, l'anglais n'y était qu'une friction. REF devient REF_I18N, trois
    jeux de 20 libellés.

  • le CONTENU VENANT DE NYMEA (noms de modèles, clés de registres, libellés de
    champs comme « MAC address », unités) → VERBATIM, en anglais. Ce sont
    exactement les chaînes que l'installateur lit DANS L'APP, qui tourne en
    en_US. Les traduire rendrait la doc inutilisable pour retrouver un champ à
    l'écran.

Et la pièce qui change l'expérience plus que la traduction elle-même : une note
`verbatim`, générée dans la langue de la page, en tête du bloc de référence.
Sans elle le mélange FR/EN passe pour une traduction bâclée ; avec elle c'est
une convention que le lecteur comprend.

L'injection devient sensible à la langue : `locale_of()` déduit la langue du
suffixe du fichier et `process()` rend le bloc en conséquence. Sans ça le même
bloc partait à l'identique dans les trois versions.

TAGLINES ET TITRES — i18n/devices.yaml, 52 entrées

Le tagline vivait en paragraphe libre, écrit UNE SEULE FOIS à la création de la
page : il restait donc en anglais sur les trois versions, y compris la
FRANÇAISE. Il entre dans le bloc badges, donc il est régénéré, donc traduisible
pour toujours. 52 taglines en fr et de ; l'anglais retombe sur l'amont.

Les traductions vivent dans le dépôt de DOC et pas dans les meta.json : trois
des cinq dépôts plugins sont des dépôts nymea amont que l'AGENTS.md interdit de
modifier. Repli sur l'amont pour toute entrée absente.

Deux titres s'affichaient en FRANÇAIS sous /de/ et /en/ — « Compteur ABB B2x »,
« Borne ABB Terra AC » : corrigés, dans la page et dans la nav.

Deux coquilles AMONT corrigées au passage, repérées en relisant les 57 entrées :
meta.json annonçait « Bestel » pour Vestel et « Easeex » pour Easee. Signalées
comme corrections, pas comme traductions, dans i18n/devices.yaml.

48 FICHES FR ÉTAIENT DANS UN ANCIEN FORMAT, ET MENTAIENT

Trouvé en vérifiant : 48 fiches FR n'avaient pas de marqueur `__badges_*__`.
Leurs badges étaient du HTML figé, écrit une fois — goecharger affichait
« NIGHTLY » alors que PORTING_STATUS dit `stable` depuis. Elles sont migrées au
format canonique : badges générés, donc exacts, plus titre localisé, tagline et
intertitre. Reste `hvac/homeconnect.md`, orpheline (plugin hors PORTING_STATUS).

NAV : UN CONSTAT QUI ÉVITE DE REFAIRE L'ESSAI

`literate-nav` ne lit que son `nav_file` : la substitution par suffixe de
mkdocs-static-i18n ne s'y applique PAS. Un `SUMMARY.de.md` généré n'était lu par
personne et la barre latérale allemande gardait les noms français. Testé, puis
retiré — et la raison est écrite dans le générateur pour que personne n'y
revienne. Les libellés de nav passent par `nav_translations` : 31 éléments
traduits par langue au lieu de 29.

RÉFÉRENCE API : LAISSÉE EN ANGLAIS, DÉLIBÉRÉMENT

Les 23 pages de l'API n'ont pas de variante par langue. Leur traduire les
libellés aurait fait voir du FRANÇAIS aux lecteurs /de/ et /en/ par le repli —
une régression. Créer 46 variantes pour traduire dix libellés aurait triplé
28 000 mots de contenu généré pour un gain nul : le reste de la page (noms de
méthodes, de champs, de types, descriptions) est l'API elle-même, et ce sont les
chaînes qu'on écrit dans ses requêtes. À la place, une note explique dans les
trois langues POURQUOI cette référence est en anglais.

Vérifié : build --strict sans avertissement, les deux générateurs rendent « Doc à
jour » en --check, et la fiche goecharger relue dans les trois langues.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-13 08:42:21 +02:00

138 lines
5.3 KiB
Markdown

# Keba
<!-- BEGIN GENERATED: __badges_keba__ -->
<span class="badge testing">TESTING</span> <span class="badge origin-etm">ETM</span> <span class="badge consumer">CONSUMER</span>
Control wallboxes made by Keba.
<!-- END GENERATED -->
Keba charging stations (P30 and P31 ranges), communicating over **Modbus TCP**
on the local network.
## 1. Hardware required
- A Keba P30 or P31 charging station
- An Ethernet connection to the hub's network
## 2. Enabling Modbus TCP
Modbus TCP is **disabled by default** on Keba charging stations.
Enable it from the station's web interface (port `502`).
!!! warning "Modbus activation"
Without this step the station will not answer PowerSync.
## 3. Adding in PowerSync
Added by **automatic discovery** on the network, or **manually** (IP address,
port 502). See [Adding a device](../../installation/application.md).
## 4. Verification
`connected`, `pluggedIn` and then `charging` reflect the state of the session.
---
## Reference
<!-- BEGIN GENERATED: integrationpluginkeba.json -->
!!! info "Application labels"
The keys and labels below are the ones the application shows,
**in English**. They are left verbatim so that you find them
word for word on screen.
**Manufacturer:** Keba
**Plugin:** `Keba`
#### Supported models
| Model | Role | Transport | Pairing | Quantities |
| --- | --- | --- | --- | --- |
| **Keba KeContact** | EV charger, Consumption meter | Modbus TCP | Auto-discovery / Manual | 31 |
| **KeConnect German Edition** | EV charger | Modbus TCP | Auto-discovery / Manual | 19 |
#### Per-model detail
??? abstract "Keba KeContact — `keba`"
_Settings:_
| Key | Label | Type | Range | Default | Read-only |
| --- | --- | --- | --- | --- | --- |
| `macAddress` | MAC address | QString | — | — | yes |
| `hostName` | Host name | QString | — | — | no |
| `address` | IP address | QString | — | — | no |
| `serialNumber` | Serial number | QString | — | — | yes |
| `model` | Product name | QString | — | — | yes |
_Measured quantities:_
| Key | Quantity | Type | Unit |
| --- | --- | --- | --- |
| `connected` | Connected | bool | — |
| `power` | Charging enabled | bool | — |
| `systemEnabled` | System enabled | bool | — |
| `phaseCount` | Number of connected phases | uint | — |
| `activity` | Activity | QString | — |
| `plugState` | Plug state | QString | — |
| `pluggedIn` | Car plugged in | bool | — |
| `charging` | Charging | bool | — |
| `maxChargingCurrent` | Maximal charging current | double | Ampere |
| `maxChargingCurrentPercent` | Maximal charging current in percent | uint | Percentage |
| `maxChargingCurrentHardware` | Maximal hardware charging current | uint | Ampere |
| `voltagePhaseA` | Voltage phase A | int | Volt |
| `voltagePhaseB` | Voltage phase B | int | Volt |
| `voltagePhaseC` | Voltage phase C | int | Volt |
| `currentPhaseA` | Current phase A | double | Ampere |
| `currentPhaseB` | Current phase B | double | Ampere |
| `currentPhaseC` | Current phase C | double | Ampere |
| `currentPower` | Power consumption | double | Watt |
| `powerFactor` | Power factor | double | Percentage |
| `sessionId` | Session ID | uint | — |
| `sessionTime` | Session time | int | Minutes |
| `sessionEnergy` | Session energy | double | KiloWattHour |
| `totalEnergyConsumed` | Total energy consumed | double | KiloWattHour |
| `outputX2` | Output X2 | bool | — |
| `input` | Input | bool | — |
| `uptime` | Uptime | int | Minutes |
| `error1` | Error 1 | int | — |
| `error2` | Error 2 | int | — |
| `failsafeMode` | Failsafe mode | bool | — |
| `firmware` | Firmware | QString | — |
| `hostAddress` | Host address | QString | — |
??? abstract "KeConnect German Edition — `kebaSimple`"
_Settings:_
| Key | Label | Type | Range | Default | Read-only |
| --- | --- | --- | --- | --- | --- |
| `macAddress` | MAC address | QString | — | — | yes |
| `hostName` | Host name | QString | — | — | no |
| `address` | IP address | QString | — | — | no |
| `serialNumber` | Serial number | QString | — | — | yes |
| `model` | Product name | QString | — | — | yes |
_Measured quantities:_
| Key | Quantity | Type | Unit |
| --- | --- | --- | --- |
| `connected` | Connected | bool | — |
| `power` | Charging enabled | bool | — |
| `systemEnabled` | System enabled | bool | — |
| `phaseCount` | Number of connected phases | uint | — |
| `activity` | Activity | QString | — |
| `plugState` | Plug state | QString | — |
| `pluggedIn` | Car plugged in | bool | — |
| `charging` | Charging | bool | — |
| `maxChargingCurrent` | Maximal charging current | double | Ampere |
| `maxChargingCurrentPercent` | Maximal charging current in percent | uint | Percentage |
| `maxChargingCurrentHardware` | Maximal hardware charging current | uint | Ampere |
| `outputX2` | Output X2 | bool | — |
| `input` | Input | bool | — |
| `uptime` | Uptime | int | Minutes |
| `error1` | Error 1 | int | — |
| `error2` | Error 2 | int | — |
| `failsafeMode` | Failsafe mode | bool | — |
| `firmware` | Firmware | QString | — |
| `hostAddress` | Host address | QString | — |
<!-- END GENERATED -->