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

View File

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