Translate remaining frontend
This commit is contained in:
@@ -142,12 +142,22 @@ function normalizeUiError(err: unknown): string {
|
||||
if (message.includes("Duplicate equipmentIdentifier")) {
|
||||
return "Das Betriebsmittelkennzeichen ist in dieser Stromkreisliste bereits vorhanden.";
|
||||
}
|
||||
if (message.includes("Invalid number")) {
|
||||
if (message.includes("Invalid number") || message.includes("Ungültiger Zahlenwert")) {
|
||||
return "Bitte einen gültigen Zahlenwert eingeben.";
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
function formatPhaseTypeLabel(value: string): string {
|
||||
if (value === "three_phase") {
|
||||
return "Dreiphasig";
|
||||
}
|
||||
if (value === "single_phase") {
|
||||
return "Einphasig";
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function isPrintableKey(event: KeyboardEvent<HTMLElement>) {
|
||||
return event.key.length === 1 && !event.metaKey && !event.ctrlKey && !event.altKey;
|
||||
}
|
||||
@@ -2587,7 +2597,7 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
|
||||
>
|
||||
<strong>{device.displayName || device.name}</strong>
|
||||
<span>Name: {device.name}</span>
|
||||
<span>Phase: {device.phaseType}</span>
|
||||
<span>Phasenart: {formatPhaseTypeLabel(device.phaseType)}</span>
|
||||
<span>Anzahl: {device.quantity}</span>
|
||||
<span>Leistung/Gerät: {device.powerPerUnit}</span>
|
||||
<span>Gleichzeitigkeit: {device.simultaneityFactor}</span>
|
||||
|
||||
Reference in New Issue
Block a user