Add a language-switch system with per-language files
Introduce a hand-rolled i18n layer across all three UIs, each reading its
text from per-language JSON files (English base + Polish + Danish). Nothing
in the converted screens hardcodes English any more.
- Web App (Vue): src/i18n/{en,pl,da}.json + index.js exposing t()/tSplit(),
reactive to the signed-in profile locale. Every view, component, form and
the status labels in lib/format.js go through t().
- API Server panel (Vue): src/i18n/ with its own localStorage-persisted
language (the panel has no user profile) and a header language picker.
Chrome, cards, login and API section titles translated; endpoint reference
descriptions intentionally kept in English. Rebuilt embedded dist.
- Phone App (Flutter): assets/i18n/ + lib/i18n.dart loaded at startup,
driven by AppSettings.locale. Nav, login, lock, dashboard, the full
Settings panel (incl. language picker) and format.dart status labels
translated; remaining detail screens fall back to English.
Language = the language half of the existing BCP-47 locale; the region half
still drives date/number/currency formatting. Missing keys fall back to
English, and plurals use Intl.PluralRules / Intl.plural so Polish gets the
correct one/few/many forms. Settings flags languages without a translation.
Tests updated to assert the localized (Polish) status wording; all pass.
See TRANSLATIONS.md for the format and how to add a language.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
ee28b522c7
commit
b6bb6b1df0
@@ -0,0 +1,163 @@
|
||||
{
|
||||
"app": {
|
||||
"apiServer": "API-server",
|
||||
"switchToLight": "Skift til lyst tema",
|
||||
"switchToDark": "Skift til mørkt tema",
|
||||
"theme": "Tema",
|
||||
"signOut": "Log ud",
|
||||
"loading": "Indlæser…",
|
||||
"standardUserNote": "Logget ind som almindelig bruger — administrationssektioner kræver en administratorrolle",
|
||||
"footer": "DriverVault — bilservice- og vedligeholdelsesregister."
|
||||
},
|
||||
|
||||
"sections": {
|
||||
"overview": "Oversigt",
|
||||
"users": "Brugere",
|
||||
"orgs": "Organisationer",
|
||||
"pocketbase": "PocketBase",
|
||||
"webapp": "Webapp",
|
||||
"plugins": "Plugins",
|
||||
"api": "API"
|
||||
},
|
||||
|
||||
"login": {
|
||||
"title": "Log ind",
|
||||
"subtitle": "Superadmin-konsol til DriverVault API-serveren.",
|
||||
"email": "E-mail",
|
||||
"password": "Adgangskode",
|
||||
"submit": "Log ind",
|
||||
"submitting": "Logger ind…",
|
||||
"invalid": "Ugyldig e-mail eller adgangskode.",
|
||||
"failed": "Kunne ikke logge ind.",
|
||||
"authNote": "Godkender mod PocketBase gennem denne server"
|
||||
},
|
||||
|
||||
"status": {
|
||||
"title": "Status",
|
||||
"unreachable": "utilgængelig",
|
||||
"checking": "Tjekker…",
|
||||
"apiServer": "API-server",
|
||||
"pocketBase": "PocketBase",
|
||||
"webApp": "Webapp",
|
||||
"thisProcess": "denne proces"
|
||||
},
|
||||
|
||||
"common": {
|
||||
"create": "Opret",
|
||||
"save": "Gem",
|
||||
"cancel": "Annuller",
|
||||
"edit": "Rediger",
|
||||
"delete": "Slet",
|
||||
"rename": "Omdøb",
|
||||
"empty": "—",
|
||||
"name": "Navn",
|
||||
"email": "E-mail",
|
||||
"role": "Rolle",
|
||||
"organization": "Organisation"
|
||||
},
|
||||
|
||||
"users": {
|
||||
"title": "Brugere",
|
||||
"allOrgs": "Alle organisationer",
|
||||
"yourOrg": "Din organisation",
|
||||
"newUser": "Ny bruger",
|
||||
"password": "Adgangskode",
|
||||
"passwordUnchanged": "Adgangskode (tom = uændret)",
|
||||
"passwordPlaceholder": "mindst 8 tegn",
|
||||
"orgNone": "— ingen —",
|
||||
"you": "dig",
|
||||
"empty": "Ingen brugere.",
|
||||
"confirmDelete": "Slet {email}? Dette kan ikke fortrydes."
|
||||
},
|
||||
|
||||
"orgs": {
|
||||
"title": "Organisationer",
|
||||
"subtitle": "Enheder, som brugere tilhører",
|
||||
"newOrg": "Ny organisation",
|
||||
"namePlaceholder": "Acme Fleet",
|
||||
"empty": "Ingen organisationer endnu.",
|
||||
"colId": "ID",
|
||||
"confirmDelete": "Slet organisationen \"{name}\"?"
|
||||
},
|
||||
|
||||
"pocketbase": {
|
||||
"title": "PocketBase",
|
||||
"subtitle": "Databaseforbindelse brugt af hvert endpoint",
|
||||
"connected": "forbundet",
|
||||
"noSuperuser": "ingen superbruger",
|
||||
"unreachable": "utilgængelig",
|
||||
"baseUrl": "Basis-URL",
|
||||
"superuserEmail": "Superbrugerens e-mail",
|
||||
"superuserPassword": "Superbrugerens adgangskode",
|
||||
"passwordUnchanged": "uændret",
|
||||
"passwordNotSet": "ikke angivet",
|
||||
"saveApply": "Gem og anvend",
|
||||
"testConnection": "Test forbindelse",
|
||||
"persistedEnv": "gemt i .env",
|
||||
"testOk": "Forbindelse OK — superbruger godkendt.",
|
||||
"testReachableNoAuth": "PocketBase er tilgængelig, men servicekontoen blev ikke godkendt.",
|
||||
"testUnreachable": "PocketBase er ikke tilgængelig på den adresse.",
|
||||
"savedNotice": "Gemt. Serveren bruger nu denne PocketBase."
|
||||
},
|
||||
|
||||
"webapp": {
|
||||
"title": "Webapp",
|
||||
"subtitle": "Adressen, der tjekkes ved statuskontrol, og hvem der må kalde dette API fra en browser",
|
||||
"reachable": "tilgængelig",
|
||||
"unreachable": "utilgængelig",
|
||||
"baseUrl": "Basis-URL",
|
||||
"allowedOrigins": "Tilladte oprindelser",
|
||||
"originsHint": "Kommasepareret, eller {star} for enhver. Native mobilapps er ikke underlagt CORS.",
|
||||
"saveApply": "Gem og anvend",
|
||||
"testConnection": "Test forbindelse",
|
||||
"persistedEnv": "gemt i .env",
|
||||
"testOk": "Webappen er tilgængelig.",
|
||||
"testFailed": "Webappen svarede ikke på sit helbredstjek på den adresse.",
|
||||
"savedNotice": "Gemt. Nye oprindelser gælder fra næste anmodning."
|
||||
},
|
||||
|
||||
"plugins": {
|
||||
"title": "Plugins",
|
||||
"subtitle": "Integrationer med tredjepartstjenester",
|
||||
"registerExternal": "Registrér ekstern",
|
||||
"cancelRegister": "Annuller",
|
||||
"name": "Navn",
|
||||
"baseUrl": "Basis-URL",
|
||||
"provider": "Udbyder",
|
||||
"register": "Registrér",
|
||||
"empty": "Ingen plugins endnu. Registrér et eksternt ovenfor, eller kompilér et indbygget stik.",
|
||||
"builtin": "indbygget",
|
||||
"enabled": "aktiveret",
|
||||
"disabled": "deaktiveret",
|
||||
"health": "Helbred",
|
||||
"configure": "Konfigurer",
|
||||
"close": "Luk",
|
||||
"noConfig": "Dette plugin kræver ingen konfiguration.",
|
||||
"capabilities": "Funktioner",
|
||||
"saved": "Gemt.",
|
||||
"checking": "Tjekker…",
|
||||
"save": "Gem",
|
||||
"saveEnable": "Gem og aktivér",
|
||||
"disable": "Deaktiver",
|
||||
"remove": "Fjern",
|
||||
"builtinNote": "Indbyggede plugins kan deaktiveres, men ikke fjernes",
|
||||
"confirmRemove": "Fjern det eksterne plugin \"{name}\"? Dets gemte konfiguration slettes."
|
||||
},
|
||||
|
||||
"api": {
|
||||
"colEndpoint": "Endpoint",
|
||||
"colDescription": "Beskrivelse",
|
||||
"authNone": "Ingen godkendelse",
|
||||
"authBearer": "Bearer-token",
|
||||
"authManager": "Admin / superadmin",
|
||||
"authSuperadmin": "Superadmin",
|
||||
"groupPublic": "Offentlig",
|
||||
"groupIdentity": "Identitet",
|
||||
"groupCars": "Biler",
|
||||
"groupService": "Serviceposter",
|
||||
"groupParts": "Reservedele",
|
||||
"groupAccount": "Konto",
|
||||
"groupManagement": "Administration",
|
||||
"groupSuperadmin": "Superadmin"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
{
|
||||
"app": {
|
||||
"apiServer": "API server",
|
||||
"switchToLight": "Switch to light theme",
|
||||
"switchToDark": "Switch to dark theme",
|
||||
"theme": "Theme",
|
||||
"signOut": "Sign out",
|
||||
"loading": "Loading…",
|
||||
"standardUserNote": "Signed in as a standard user — management sections need an admin role",
|
||||
"footer": "DriverVault — car maintenance & service tracker."
|
||||
},
|
||||
|
||||
"sections": {
|
||||
"overview": "Overview",
|
||||
"users": "Users",
|
||||
"orgs": "Organizations",
|
||||
"pocketbase": "PocketBase",
|
||||
"webapp": "Web App",
|
||||
"plugins": "Plugins",
|
||||
"api": "API"
|
||||
},
|
||||
|
||||
"login": {
|
||||
"title": "Sign in",
|
||||
"subtitle": "Superadmin console for the DriverVault API Server.",
|
||||
"email": "Email",
|
||||
"password": "Password",
|
||||
"submit": "Sign in",
|
||||
"submitting": "Signing in…",
|
||||
"invalid": "Invalid email or password.",
|
||||
"failed": "Could not sign in.",
|
||||
"authNote": "Authenticates against PocketBase through this server"
|
||||
},
|
||||
|
||||
"status": {
|
||||
"title": "Status",
|
||||
"unreachable": "unreachable",
|
||||
"checking": "Checking…",
|
||||
"apiServer": "API Server",
|
||||
"pocketBase": "PocketBase",
|
||||
"webApp": "Web App",
|
||||
"thisProcess": "this process"
|
||||
},
|
||||
|
||||
"common": {
|
||||
"create": "Create",
|
||||
"save": "Save",
|
||||
"cancel": "Cancel",
|
||||
"edit": "Edit",
|
||||
"delete": "Delete",
|
||||
"rename": "Rename",
|
||||
"empty": "—",
|
||||
"name": "Name",
|
||||
"email": "Email",
|
||||
"role": "Role",
|
||||
"organization": "Organization"
|
||||
},
|
||||
|
||||
"users": {
|
||||
"title": "Users",
|
||||
"allOrgs": "All organizations",
|
||||
"yourOrg": "Your organization",
|
||||
"newUser": "New user",
|
||||
"password": "Password",
|
||||
"passwordUnchanged": "Password (blank = unchanged)",
|
||||
"passwordPlaceholder": "min 8 characters",
|
||||
"orgNone": "— none —",
|
||||
"you": "you",
|
||||
"empty": "No users.",
|
||||
"confirmDelete": "Delete {email}? This cannot be undone."
|
||||
},
|
||||
|
||||
"orgs": {
|
||||
"title": "Organizations",
|
||||
"subtitle": "Tenants users belong to",
|
||||
"newOrg": "New organization",
|
||||
"namePlaceholder": "Acme Fleet",
|
||||
"empty": "No organizations yet.",
|
||||
"colId": "ID",
|
||||
"confirmDelete": "Delete the organization \"{name}\"?"
|
||||
},
|
||||
|
||||
"pocketbase": {
|
||||
"title": "PocketBase",
|
||||
"subtitle": "Database connection used by every endpoint",
|
||||
"connected": "connected",
|
||||
"noSuperuser": "no superuser",
|
||||
"unreachable": "unreachable",
|
||||
"baseUrl": "Base URL",
|
||||
"superuserEmail": "Superuser email",
|
||||
"superuserPassword": "Superuser password",
|
||||
"passwordUnchanged": "unchanged",
|
||||
"passwordNotSet": "not set",
|
||||
"saveApply": "Save & apply",
|
||||
"testConnection": "Test connection",
|
||||
"persistedEnv": "persisted to .env",
|
||||
"testOk": "Connection OK — superuser authenticated.",
|
||||
"testReachableNoAuth": "PocketBase is reachable, but the service account did not authenticate.",
|
||||
"testUnreachable": "PocketBase is not reachable at that address.",
|
||||
"savedNotice": "Saved. The server is now using this PocketBase."
|
||||
},
|
||||
|
||||
"webapp": {
|
||||
"title": "Web App",
|
||||
"subtitle": "Address probed by the status check, and who may call this API from a browser",
|
||||
"reachable": "reachable",
|
||||
"unreachable": "unreachable",
|
||||
"baseUrl": "Base URL",
|
||||
"allowedOrigins": "Allowed origins",
|
||||
"originsHint": "Comma separated, or {star} for any. Native mobile apps are not subject to CORS.",
|
||||
"saveApply": "Save & apply",
|
||||
"testConnection": "Test connection",
|
||||
"persistedEnv": "persisted to .env",
|
||||
"testOk": "Web App is reachable.",
|
||||
"testFailed": "Web App did not answer its health check at that address.",
|
||||
"savedNotice": "Saved. New origins apply to the next request."
|
||||
},
|
||||
|
||||
"plugins": {
|
||||
"title": "Plugins",
|
||||
"subtitle": "Third-party service integrations",
|
||||
"registerExternal": "Register external",
|
||||
"cancelRegister": "Cancel",
|
||||
"name": "Name",
|
||||
"baseUrl": "Base URL",
|
||||
"provider": "Provider",
|
||||
"register": "Register",
|
||||
"empty": "No plugins yet. Register an external one above, or compile a built-in connector.",
|
||||
"builtin": "builtin",
|
||||
"enabled": "enabled",
|
||||
"disabled": "disabled",
|
||||
"health": "Health",
|
||||
"configure": "Configure",
|
||||
"close": "Close",
|
||||
"noConfig": "This plugin takes no configuration.",
|
||||
"capabilities": "Capabilities",
|
||||
"saved": "Saved.",
|
||||
"checking": "Checking…",
|
||||
"save": "Save",
|
||||
"saveEnable": "Save & enable",
|
||||
"disable": "Disable",
|
||||
"remove": "Remove",
|
||||
"builtinNote": "Built-in plugins can be disabled but not removed",
|
||||
"confirmRemove": "Remove the external plugin \"{name}\"? Its saved config is deleted."
|
||||
},
|
||||
|
||||
"api": {
|
||||
"colEndpoint": "Endpoint",
|
||||
"colDescription": "Description",
|
||||
"authNone": "No auth",
|
||||
"authBearer": "Bearer token",
|
||||
"authManager": "Admin / superadmin",
|
||||
"authSuperadmin": "Superadmin",
|
||||
"groupPublic": "Public",
|
||||
"groupIdentity": "Identity",
|
||||
"groupCars": "Cars",
|
||||
"groupService": "Service records",
|
||||
"groupParts": "Parts",
|
||||
"groupAccount": "Account",
|
||||
"groupManagement": "Management",
|
||||
"groupSuperadmin": "Superadmin"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,163 @@
|
||||
{
|
||||
"app": {
|
||||
"apiServer": "Serwer API",
|
||||
"switchToLight": "Przełącz na motyw jasny",
|
||||
"switchToDark": "Przełącz na motyw ciemny",
|
||||
"theme": "Motyw",
|
||||
"signOut": "Wyloguj się",
|
||||
"loading": "Ładowanie…",
|
||||
"standardUserNote": "Zalogowano jako zwykły użytkownik — sekcje zarządzania wymagają roli administratora",
|
||||
"footer": "DriverVault — rejestr serwisu i konserwacji samochodu."
|
||||
},
|
||||
|
||||
"sections": {
|
||||
"overview": "Przegląd",
|
||||
"users": "Użytkownicy",
|
||||
"orgs": "Organizacje",
|
||||
"pocketbase": "PocketBase",
|
||||
"webapp": "Aplikacja webowa",
|
||||
"plugins": "Wtyczki",
|
||||
"api": "API"
|
||||
},
|
||||
|
||||
"login": {
|
||||
"title": "Zaloguj się",
|
||||
"subtitle": "Konsola superadministratora serwera API DriverVault.",
|
||||
"email": "E-mail",
|
||||
"password": "Hasło",
|
||||
"submit": "Zaloguj się",
|
||||
"submitting": "Logowanie…",
|
||||
"invalid": "Nieprawidłowy e-mail lub hasło.",
|
||||
"failed": "Nie udało się zalogować.",
|
||||
"authNote": "Uwierzytelnia w PocketBase za pośrednictwem tego serwera"
|
||||
},
|
||||
|
||||
"status": {
|
||||
"title": "Status",
|
||||
"unreachable": "niedostępny",
|
||||
"checking": "Sprawdzanie…",
|
||||
"apiServer": "Serwer API",
|
||||
"pocketBase": "PocketBase",
|
||||
"webApp": "Aplikacja webowa",
|
||||
"thisProcess": "ten proces"
|
||||
},
|
||||
|
||||
"common": {
|
||||
"create": "Utwórz",
|
||||
"save": "Zapisz",
|
||||
"cancel": "Anuluj",
|
||||
"edit": "Edytuj",
|
||||
"delete": "Usuń",
|
||||
"rename": "Zmień nazwę",
|
||||
"empty": "—",
|
||||
"name": "Nazwa",
|
||||
"email": "E-mail",
|
||||
"role": "Rola",
|
||||
"organization": "Organizacja"
|
||||
},
|
||||
|
||||
"users": {
|
||||
"title": "Użytkownicy",
|
||||
"allOrgs": "Wszystkie organizacje",
|
||||
"yourOrg": "Twoja organizacja",
|
||||
"newUser": "Nowy użytkownik",
|
||||
"password": "Hasło",
|
||||
"passwordUnchanged": "Hasło (puste = bez zmian)",
|
||||
"passwordPlaceholder": "min. 8 znaków",
|
||||
"orgNone": "— brak —",
|
||||
"you": "Ty",
|
||||
"empty": "Brak użytkowników.",
|
||||
"confirmDelete": "Usunąć {email}? Tej operacji nie można cofnąć."
|
||||
},
|
||||
|
||||
"orgs": {
|
||||
"title": "Organizacje",
|
||||
"subtitle": "Podmioty, do których należą użytkownicy",
|
||||
"newOrg": "Nowa organizacja",
|
||||
"namePlaceholder": "Acme Fleet",
|
||||
"empty": "Brak organizacji.",
|
||||
"colId": "ID",
|
||||
"confirmDelete": "Usunąć organizację „{name}”?"
|
||||
},
|
||||
|
||||
"pocketbase": {
|
||||
"title": "PocketBase",
|
||||
"subtitle": "Połączenie z bazą danych używane przez każdy punkt końcowy",
|
||||
"connected": "połączono",
|
||||
"noSuperuser": "brak superużytkownika",
|
||||
"unreachable": "niedostępny",
|
||||
"baseUrl": "Adres bazowy",
|
||||
"superuserEmail": "E-mail superużytkownika",
|
||||
"superuserPassword": "Hasło superużytkownika",
|
||||
"passwordUnchanged": "bez zmian",
|
||||
"passwordNotSet": "nie ustawiono",
|
||||
"saveApply": "Zapisz i zastosuj",
|
||||
"testConnection": "Testuj połączenie",
|
||||
"persistedEnv": "zapisano w .env",
|
||||
"testOk": "Połączenie OK — superużytkownik uwierzytelniony.",
|
||||
"testReachableNoAuth": "PocketBase jest dostępny, ale konto usługowe nie zostało uwierzytelnione.",
|
||||
"testUnreachable": "PocketBase jest niedostępny pod tym adresem.",
|
||||
"savedNotice": "Zapisano. Serwer korzysta teraz z tego PocketBase."
|
||||
},
|
||||
|
||||
"webapp": {
|
||||
"title": "Aplikacja webowa",
|
||||
"subtitle": "Adres sprawdzany podczas kontroli statusu oraz kto może wywoływać to API z przeglądarki",
|
||||
"reachable": "dostępna",
|
||||
"unreachable": "niedostępna",
|
||||
"baseUrl": "Adres bazowy",
|
||||
"allowedOrigins": "Dozwolone źródła",
|
||||
"originsHint": "Oddzielone przecinkami lub {star} dla dowolnego. Natywne aplikacje mobilne nie podlegają CORS.",
|
||||
"saveApply": "Zapisz i zastosuj",
|
||||
"testConnection": "Testuj połączenie",
|
||||
"persistedEnv": "zapisano w .env",
|
||||
"testOk": "Aplikacja webowa jest dostępna.",
|
||||
"testFailed": "Aplikacja webowa nie odpowiedziała na kontrolę stanu pod tym adresem.",
|
||||
"savedNotice": "Zapisano. Nowe źródła obowiązują od następnego żądania."
|
||||
},
|
||||
|
||||
"plugins": {
|
||||
"title": "Wtyczki",
|
||||
"subtitle": "Integracje z usługami zewnętrznymi",
|
||||
"registerExternal": "Zarejestruj zewnętrzną",
|
||||
"cancelRegister": "Anuluj",
|
||||
"name": "Nazwa",
|
||||
"baseUrl": "Adres bazowy",
|
||||
"provider": "Dostawca",
|
||||
"register": "Zarejestruj",
|
||||
"empty": "Brak wtyczek. Zarejestruj zewnętrzną powyżej lub skompiluj wbudowany łącznik.",
|
||||
"builtin": "wbudowana",
|
||||
"enabled": "włączona",
|
||||
"disabled": "wyłączona",
|
||||
"health": "Stan",
|
||||
"configure": "Konfiguruj",
|
||||
"close": "Zamknij",
|
||||
"noConfig": "Ta wtyczka nie wymaga konfiguracji.",
|
||||
"capabilities": "Możliwości",
|
||||
"saved": "Zapisano.",
|
||||
"checking": "Sprawdzanie…",
|
||||
"save": "Zapisz",
|
||||
"saveEnable": "Zapisz i włącz",
|
||||
"disable": "Wyłącz",
|
||||
"remove": "Usuń",
|
||||
"builtinNote": "Wtyczki wbudowane można wyłączyć, ale nie usunąć",
|
||||
"confirmRemove": "Usunąć zewnętrzną wtyczkę „{name}”? Jej zapisana konfiguracja zostanie usunięta."
|
||||
},
|
||||
|
||||
"api": {
|
||||
"colEndpoint": "Punkt końcowy",
|
||||
"colDescription": "Opis",
|
||||
"authNone": "Bez uwierzytelniania",
|
||||
"authBearer": "Token Bearer",
|
||||
"authManager": "Administrator / superadministrator",
|
||||
"authSuperadmin": "Superadministrator",
|
||||
"groupPublic": "Publiczne",
|
||||
"groupIdentity": "Tożsamość",
|
||||
"groupCars": "Samochody",
|
||||
"groupService": "Wpisy serwisowe",
|
||||
"groupParts": "Części",
|
||||
"groupAccount": "Konto",
|
||||
"groupManagement": "Zarządzanie",
|
||||
"groupSuperadmin": "Superadministrator"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user