Phone App: finish the admin screen; translate the last English strings
Three loose ends from the last two commits, each of which was named as deliberately-not-done and none of which is worth carrying further. The phone's create-user sheet had no organization picker. The endpoint has taken an `organization` since orgs existed and the Web App has offered the choice all along, so a superadmin on the phone could only ever create accounts in their own org - a silent restriction rather than a stated one. The sheet now loads the orgs and offers them to a superadmin, with the same blank "no organization" option and the same hint as the web. An admin still gets no picker, because the server forces its own org on their members and a picker that cannot change the outcome is a lie. The listing is manager-only and can fail, in which case the picker offers only "no organization" rather than blocking the form. A locked role picker or delete action was greyed out with no reason given. The web has explained itself in a title attribute since those guards existed, and the sentences - admin.cantChangeOwnRole and the rest - have been sitting translated in the phone's own language files since the screen was translated. Hover has no touch equivalent, so the two controls take different routes: a long-press on the role picker shows the reason as a tooltip, and the overflow menu carries it under the action, because a disabled menu item cannot be long-pressed and silently greying it out is the thing being fixed. settings.integrations.* and charging.control.* were English-only in *both* apps - 70 keys, identical text, identical key sets - so they are translated once and land in all four language files. OCPP and CSMS are protocol names and stay; product names (Toyota Connected, MyToyota, Anker Solix, Lexus) stay; everything else follows the wording already in each language's file. The Web App's files are edited as text rather than round-tripped through a JSON dump, because they keep a blank line before every nested block and a dump flattens it - a 900-line translation file is hard enough to read without losing its paragraphs. Both diffs are purely additive as a result. Both apps now have every key in all three languages: 738 in the web, and the phone reports zero fallbacks. A new test locks that in - every key en.json carries must exist in pl.json and da.json - and it was checked by deleting a key and watching it fail, because a guard that cannot fire is not a guard. Verified by flutter analyze (clean), flutter test - 21 pass, 1 of them new - flutter build apk --debug, and npm run build for the Web App. The key checker reports 575 static t() keys in the phone and 738 in the web resolving with no fallbacks in either language. Not verified: still nothing run against a live API Server or on a device. In particular the organization picker's happy path - a superadmin creating an account into a chosen org - has not been exercised end to end; it is the one piece here that touches the API rather than only the language files. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
4372b870ac
commit
dc6febf815
@@ -66,6 +66,25 @@
|
||||
"full": "Optaget",
|
||||
"offPeak": "uden for spidsbelastning",
|
||||
"homeCharger": "Hjemmelader"
|
||||
},
|
||||
|
||||
"control": {
|
||||
"title": "Laderstyring",
|
||||
"connected": "Forbundet",
|
||||
"disconnected": "Offline",
|
||||
"serialPlaceholder": "Laderens serienummer (f.eks. A5191-XXXXXXXX)",
|
||||
"refresh": "Opdater",
|
||||
"status": "Stik",
|
||||
"meter": "Energi",
|
||||
"start": "Start opladning",
|
||||
"stop": "Stop opladning",
|
||||
"limit": "Strømgrænse",
|
||||
"applyLimit": "Anvend grænse",
|
||||
"clearLimit": "Ryd grænse",
|
||||
"reset": "Genstart laderen",
|
||||
"resetConfirm": "Genstart denne lader nu? En igangværende opladning bliver afbrudt. Indtast din adgangskode igen for at bekræfte.",
|
||||
"resetPassword": "Din kontoadgangskode",
|
||||
"connectHint": "Indtast laderens serienummer og opdater. Laderen skal være forbundet til DriverVaults OCPP-backend (opsættes under Indstillinger → Integrationer)."
|
||||
}
|
||||
},
|
||||
|
||||
@@ -222,6 +241,63 @@
|
||||
"saveBio": "Gem beskrivelse"
|
||||
},
|
||||
|
||||
"integrations": {
|
||||
"title": "Integrationer",
|
||||
"subtitle": "Forbind eksterne tjenester til din konto.",
|
||||
"toyota": "Toyota Connected (MyToyota)",
|
||||
"toyotaDesc": "Log ind med din MyToyota-konto for at hente køretøjsdata fra Toyota Connected Europe. Kun Europa.",
|
||||
"enable": "Aktivér for min konto",
|
||||
"enableOrg": "Aktivér for organisationen",
|
||||
"unavailable": "Denne integration er slået fra af administratoren.",
|
||||
"orgDisabled": "Denne integration er slået fra for din organisation.",
|
||||
"scopeMy": "Mine indstillinger",
|
||||
"scopeOrg": "Organisation",
|
||||
"scopeHint": "Organisationens indstillinger gælder for alle i din organisation, der lader et felt stå tomt.",
|
||||
"readOnly": "Denne integrations fælles indstillinger administreres i API-serverens panel; her er de skrivebeskyttede.",
|
||||
"email": "MyToyota-e-mail",
|
||||
"password": "MyToyota-adgangskode",
|
||||
"brand": "Mærke",
|
||||
"brandToyota": "Toyota",
|
||||
"brandLexus": "Lexus",
|
||||
"inherited": "Sat på et højere niveau",
|
||||
"inheritedFrom": "Nedarvet fra {source}",
|
||||
"sourceGlobal": "administratoren",
|
||||
"sourceOrg": "din organisation",
|
||||
"sourceUser": "dig",
|
||||
"passwordKeep": "Lad feltet stå tomt for at beholde den gemte adgangskode.",
|
||||
"test": "Test forbindelsen",
|
||||
"testing": "Tester…",
|
||||
"save": "Gem",
|
||||
"saved": "Gemt ✓",
|
||||
"connected": "Forbundet",
|
||||
"notConnected": "Ikke forbundet",
|
||||
"ankerSolix": "Anker Solix (V1 Smart EV Charger)",
|
||||
"ankerSolixDesc": "Log ind med din Anker-konto for at hente laderdata fra Anker Solix-skyen.",
|
||||
"ankerEmail": "E-mail til Anker-konto",
|
||||
"ankerPassword": "Adgangskode til Anker-konto",
|
||||
"country": "Land",
|
||||
"countryHint": "Landekode på to bogstaver for din Anker-konto (f.eks. DE, GB, US).",
|
||||
"controlMode": "Styringstilstand",
|
||||
"controlModeHint": "Hvordan DriverVault styrer laderen over OCPP.",
|
||||
"controlOff": "Fra (kun overvågning)",
|
||||
"controlOwn": "Eget CSMS (fuld styring)",
|
||||
"controlProxy": "Proxy-CSMS (videresendelse + styring)",
|
||||
"controlTitle": "Laderstyring (OCPP)",
|
||||
"controlOwnHint": "Laderen forbinder direkte til DriverVault som sit centralsystem. Peg laderens OCPP-backend på endepunktet nedenfor.",
|
||||
"controlProxyHint": "DriverVault videresender til Ankers sky og kan indsætte kommandoer. Peg laderens OCPP-backend på endepunktet nedenfor.",
|
||||
"controlProvisionSteps": "I Anker-appen (eller laderens OCPP-indstillinger) sættes OCPP-backend-URL'en til endepunktet og autorisationsnøglen til tokenet ovenfor.",
|
||||
"chargerSerial": "Laderens serienummer",
|
||||
"controlCheck": "Tjek status",
|
||||
"controlGenerate": "Generér token",
|
||||
"controlEndpoint": "OCPP-endepunkt",
|
||||
"controlToken": "Autorisationstoken",
|
||||
"controlTokenOnce": "Kopiér dette token nu — det vises kun én gang og kan ikke hentes frem igen.",
|
||||
"controlRevoke": "Tilbagekald token",
|
||||
"controlRevokeConfirm": "Tilbagekald denne laders styringstoken? Den bliver afbrudt og kan ikke forbinde igen, før du genererer et nyt.",
|
||||
"controlConnected": "Forbundet til styrings-backend",
|
||||
"controlDisconnected": "Ikke forbundet"
|
||||
},
|
||||
|
||||
"org": {
|
||||
"title": "Organisation",
|
||||
"titleAll": "Organisationer",
|
||||
|
||||
@@ -68,6 +68,25 @@
|
||||
"full": "Zajęte",
|
||||
"offPeak": "poza szczytem",
|
||||
"homeCharger": "Ładowarka domowa"
|
||||
},
|
||||
|
||||
"control": {
|
||||
"title": "Sterowanie ładowarką",
|
||||
"connected": "Połączono",
|
||||
"disconnected": "Offline",
|
||||
"serialPlaceholder": "Numer seryjny ładowarki (np. A5191-XXXXXXXX)",
|
||||
"refresh": "Odśwież",
|
||||
"status": "Złącze",
|
||||
"meter": "Energia",
|
||||
"start": "Rozpocznij ładowanie",
|
||||
"stop": "Zatrzymaj ładowanie",
|
||||
"limit": "Limit prądu",
|
||||
"applyLimit": "Zastosuj limit",
|
||||
"clearLimit": "Usuń limit",
|
||||
"reset": "Zrestartuj ładowarkę",
|
||||
"resetConfirm": "Zrestartować teraz tę ładowarkę? Trwająca sesja ładowania zostanie przerwana. Wpisz ponownie hasło, aby potwierdzić.",
|
||||
"resetPassword": "Hasło do Twojego konta",
|
||||
"connectHint": "Wpisz numer seryjny ładowarki i odśwież. Ładowarka musi być połączona z backendem OCPP DriverVault (konfiguracja w Ustawienia → Integracje)."
|
||||
}
|
||||
},
|
||||
|
||||
@@ -226,6 +245,63 @@
|
||||
"saveBio": "Zapisz opis"
|
||||
},
|
||||
|
||||
"integrations": {
|
||||
"title": "Integracje",
|
||||
"subtitle": "Połącz zewnętrzne usługi ze swoim kontem.",
|
||||
"toyota": "Toyota Connected (MyToyota)",
|
||||
"toyotaDesc": "Zaloguj się kontem MyToyota, aby pobierać dane pojazdu z Toyota Connected Europe. Tylko Europa.",
|
||||
"enable": "Włącz dla mojego konta",
|
||||
"enableOrg": "Włącz dla organizacji",
|
||||
"unavailable": "Ta integracja została wyłączona przez administratora.",
|
||||
"orgDisabled": "Ta integracja jest wyłączona dla Twojej organizacji.",
|
||||
"scopeMy": "Moje ustawienia",
|
||||
"scopeOrg": "Organizacja",
|
||||
"scopeHint": "Ustawienia organizacji obowiązują każdego w Twojej organizacji, kto pozostawi pole puste.",
|
||||
"readOnly": "Wspólnymi ustawieniami tej integracji zarządzasz w panelu API Servera; tutaj są tylko do odczytu.",
|
||||
"email": "E-mail MyToyota",
|
||||
"password": "Hasło MyToyota",
|
||||
"brand": "Marka",
|
||||
"brandToyota": "Toyota",
|
||||
"brandLexus": "Lexus",
|
||||
"inherited": "Ustawione na wyższym poziomie",
|
||||
"inheritedFrom": "Odziedziczone od: {source}",
|
||||
"sourceGlobal": "administratora",
|
||||
"sourceOrg": "Twojej organizacji",
|
||||
"sourceUser": "Ciebie",
|
||||
"passwordKeep": "Pozostaw puste, aby zachować zapisane hasło.",
|
||||
"test": "Testuj połączenie",
|
||||
"testing": "Testowanie…",
|
||||
"save": "Zapisz",
|
||||
"saved": "Zapisano ✓",
|
||||
"connected": "Połączono",
|
||||
"notConnected": "Nie połączono",
|
||||
"ankerSolix": "Anker Solix (V1 Smart EV Charger)",
|
||||
"ankerSolixDesc": "Zaloguj się kontem Anker, aby pobierać dane ładowarki EV z chmury Anker Solix.",
|
||||
"ankerEmail": "E-mail konta Anker",
|
||||
"ankerPassword": "Hasło konta Anker",
|
||||
"country": "Kraj",
|
||||
"countryHint": "Dwuliterowy kod kraju Twojego konta Anker (np. DE, GB, US).",
|
||||
"controlMode": "Tryb sterowania",
|
||||
"controlModeHint": "Sposób, w jaki DriverVault steruje ładowarką przez OCPP.",
|
||||
"controlOff": "Wyłączone (tylko monitorowanie)",
|
||||
"controlOwn": "Własny CSMS (pełne sterowanie)",
|
||||
"controlProxy": "CSMS pośredniczący (przekazywanie + sterowanie)",
|
||||
"controlTitle": "Sterowanie ładowarką (OCPP)",
|
||||
"controlOwnHint": "Ładowarka łączy się bezpośrednio z DriverVault jako swoim systemem centralnym. Ustaw backend OCPP ładowarki na poniższy adres.",
|
||||
"controlProxyHint": "DriverVault przekazuje ruch do chmury Anker i może wysyłać własne polecenia. Ustaw backend OCPP ładowarki na poniższy adres.",
|
||||
"controlProvisionSteps": "W aplikacji Anker (lub w ustawieniach OCPP ładowarki) ustaw adres backendu OCPP na powyższy endpoint, a klucz autoryzacji na powyższy token.",
|
||||
"chargerSerial": "Numer seryjny ładowarki",
|
||||
"controlCheck": "Sprawdź status",
|
||||
"controlGenerate": "Wygeneruj token",
|
||||
"controlEndpoint": "Endpoint OCPP",
|
||||
"controlToken": "Token autoryzacji",
|
||||
"controlTokenOnce": "Skopiuj ten token teraz — jest pokazywany tylko raz i nie da się go później odzyskać.",
|
||||
"controlRevoke": "Unieważnij token",
|
||||
"controlRevokeConfirm": "Unieważnić token sterowania tej ładowarki? Rozłączy się i nie połączy ponownie, dopóki nie wygenerujesz nowego.",
|
||||
"controlConnected": "Połączono z backendem sterowania",
|
||||
"controlDisconnected": "Nie połączono"
|
||||
},
|
||||
|
||||
"org": {
|
||||
"title": "Organizacja",
|
||||
"titleAll": "Organizacje",
|
||||
|
||||
Reference in New Issue
Block a user