Add i18n, format

This commit is contained in:
leccelecce 2025-03-24 14:36:58 +00:00
parent 75b19674ce
commit 4d3208d1a1
2 changed files with 22 additions and 10 deletions

View File

@ -544,10 +544,12 @@
"trainDate": "Train Date",
"baseModel": "Base Model",
"supportedDetectors": "Supported Detectors",
"dimensions": "Dimensions",
"cameras": "Cameras",
"loading": "Loading model information...",
"error": "Failed to load model information",
"availableModels": "Available Models",
"loadingAvailableModels": "Loading available models...",
"modelSelect": "Your available models on Frigate+ can be selected here. Note that only models compatible with your current detector configuration can be selected."
},
"toast": {

View File

@ -331,16 +331,21 @@ export default function FrigatePlusSettingsView({
<SelectTrigger>
{frigatePlusSettings.model.id &&
availableModels?.[frigatePlusSettings.model.id]
? (new Date(
? new Date(
availableModels[
frigatePlusSettings.model.id
].trainDate,
).toLocaleString() + " (" + availableModels[
frigatePlusSettings.model.id
].width + "x" + availableModels[
frigatePlusSettings.model.id
].height) + ")"
: "Retrieving models..."}
).toLocaleString() +
" (" +
availableModels[frigatePlusSettings.model.id]
.width +
"x" +
availableModels[frigatePlusSettings.model.id]
.height +
")"
: t(
"frigatePlus.modelInfo.loadingAvailableModels",
)}
</SelectTrigger>
<SelectContent>
<SelectGroup>
@ -363,11 +368,16 @@ export default function FrigatePlusSettingsView({
).toLocaleString()}{" "}
({model.baseModel})
<div>
Supported Detectors: ({model.supportedDetectors.join(", ")})
{t(
"frigatePlus.modelInfo.supportedDetectors",
)}
: ({model.supportedDetectors.join(", ")}
)
</div>
<div>
Dimensions ({model.width + "x" + model.height})
</div>
{t("frigatePlus.modelInfo.dimensions")}{" "}
({model.width + "x" + model.height})
</div>
<div className="text-xs text-muted-foreground">
{id}
</div>