mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-03 14:03:40 +01:00
Merge pull request #1124 from benphelps/fix-1123
Add translation for some missing items
This commit is contained in:
commit
f149d292bc
@ -60,9 +60,15 @@
|
|||||||
"tx": "TX",
|
"tx": "TX",
|
||||||
"mem": "MEM",
|
"mem": "MEM",
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
"running": "Running",
|
||||||
"offline": "Offline",
|
"offline": "Offline",
|
||||||
"error": "Error",
|
"error": "Error",
|
||||||
"unknown": "Unknown"
|
"unknown": "Unknown",
|
||||||
|
"starting": "Starting",
|
||||||
|
"unhealthy": "Unhealthy",
|
||||||
|
"not_found": "Not Found",
|
||||||
|
"exited": "Exited",
|
||||||
|
"partial": "Partial"
|
||||||
},
|
},
|
||||||
"ping": {
|
"ping": {
|
||||||
"error": "Error",
|
"error": "Error",
|
||||||
@ -365,7 +371,10 @@
|
|||||||
"update_available": "Update Available",
|
"update_available": "Update Available",
|
||||||
"up_to_date": "Up to Date",
|
"up_to_date": "Up to Date",
|
||||||
"child_bridges": "Child Bridges",
|
"child_bridges": "Child Bridges",
|
||||||
"child_bridges_status": "{{ok}}/{{total}}"
|
"child_bridges_status": "{{ok}}/{{total}}",
|
||||||
|
"up": "Up",
|
||||||
|
"pending": "Pending",
|
||||||
|
"down": "Down"
|
||||||
},
|
},
|
||||||
"healthchecks": {
|
"healthchecks": {
|
||||||
"new": "New",
|
"new": "New",
|
||||||
|
@ -12,34 +12,43 @@ export default function Status({ service }) {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let statusLabel = "";
|
||||||
|
|
||||||
if (data && data.status?.includes("running")) {
|
if (data && data.status?.includes("running")) {
|
||||||
if (data.health === "starting") {
|
if (data.health === "starting") {
|
||||||
return (
|
return (
|
||||||
<div className="w-auto px-1.5 py-0.5 text-center bg-theme-500/10 dark:bg-theme-900/50 rounded-b-[3px] overflow-hidden" title={data.health}>
|
<div className="w-auto px-1.5 py-0.5 text-center bg-theme-500/10 dark:bg-theme-900/50 rounded-b-[3px] overflow-hidden" title={t("docker.starting")}>
|
||||||
<div className="text-[8px] font-bold text-blue-500/80 uppercase">{data.health}</div>
|
<div className="text-[8px] font-bold text-blue-500/80 uppercase">{t("docker.starting")}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.health === "unhealthy") {
|
if (data.health === "unhealthy") {
|
||||||
return (
|
return (
|
||||||
<div className="w-auto px-1.5 py-0.5 text-center bg-theme-500/10 dark:bg-theme-900/50 rounded-b-[3px] overflow-hidden" title={data.health}>
|
<div className="w-auto px-1.5 py-0.5 text-center bg-theme-500/10 dark:bg-theme-900/50 rounded-b-[3px] overflow-hidden" title={t("docker.unhealthy")}>
|
||||||
<div className="text-[8px] font-bold text-orange-400/50 dark:text-orange-400/80 uppercase">{data.health}</div>
|
<div className="text-[8px] font-bold text-orange-400/50 dark:text-orange-400/80 uppercase">{t("docker.unhealthy")}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!data.health) {
|
||||||
|
statusLabel = data.status.replace("running", t("docker.running"))
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-auto px-1.5 py-0.5 text-center bg-theme-500/10 dark:bg-theme-900/50 rounded-b-[3px] overflow-hidden" title={data.health || data.status}>
|
<div className="w-auto px-1.5 py-0.5 text-center bg-theme-500/10 dark:bg-theme-900/50 rounded-b-[3px] overflow-hidden" title={data.health || statusLabel}>
|
||||||
<div className="text-[8px] font-bold text-emerald-500/80 uppercase">{data.health || data.status}</div>
|
<div className="text-[8px] font-bold text-emerald-500/80 uppercase">{data.health || statusLabel}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data && (data.status === "not found" || data.status === "exited" || data.status?.startsWith("partial"))) {
|
if (data && (data.status === "not found" || data.status === "exited" || data.status?.startsWith("partial"))) {
|
||||||
|
if (data.status === "not found") statusLabel = t("docker.not_found")
|
||||||
|
else if (data.status === "exited") statusLabel = t("docker.exited")
|
||||||
|
else statusLabel = data.status.replace("partial", t("docker.partial"))
|
||||||
return (
|
return (
|
||||||
<div className="w-auto px-1.5 py-0.5 text-center bg-theme-500/10 dark:bg-theme-900/50 rounded-b-[3px] overflow-hidden" title={data.status}>
|
<div className="w-auto px-1.5 py-0.5 text-center bg-theme-500/10 dark:bg-theme-900/50 rounded-b-[3px] overflow-hidden" title={statusLabel}>
|
||||||
<div className="text-[8px] font-bold text-orange-400/50 dark:text-orange-400/80 uppercase">{data.status}</div>
|
<div className="text-[8px] font-bold text-orange-400/50 dark:text-orange-400/80 uppercase">{statusLabel}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ export default function Component({ service }) {
|
|||||||
<Container service={service}>
|
<Container service={service}>
|
||||||
<Block
|
<Block
|
||||||
label="widget.status"
|
label="widget.status"
|
||||||
value={`${homebridgeData.status[0].toUpperCase()}${homebridgeData.status.substr(1)}`}
|
value={t(`homebridge.${homebridgeData.status}`)}
|
||||||
/>
|
/>
|
||||||
<Block
|
<Block
|
||||||
label="homebridge.updates"
|
label="homebridge.updates"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user