mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-05 13:07:44 +03:00
chore: add SearchFilterDialog i18n
This commit is contained in:
parent
e5a7324231
commit
112c1b5315
@ -96,5 +96,13 @@
|
||||
},
|
||||
"zoneMask": {
|
||||
"filterBy": "Filter by zone mask"
|
||||
},
|
||||
"recognizedLicensePlates": {
|
||||
"title": "Recognized License Plates",
|
||||
"loadFailed": "Failed to load recognized license plates.",
|
||||
"loading": "Loading recognized license plates...",
|
||||
"placeholder": "Type to search license plates...",
|
||||
"noLicensePlatesFound": "No license plates found.",
|
||||
"selectPlatesFromList": "Select one or more plates from the list."
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,5 +96,13 @@
|
||||
},
|
||||
"zoneMask": {
|
||||
"filterBy": "按区域遮罩筛选"
|
||||
}
|
||||
},
|
||||
"recognizedLicensePlates": {
|
||||
"title": "识别的车牌",
|
||||
"loadFailed": "加载识别的车牌失败。",
|
||||
"loading": "正在加载识别的车牌...",
|
||||
"placeholder": "输入以搜索车牌...",
|
||||
"noLicensePlatesFound": "未找到车牌。",
|
||||
"selectPlatesFromList": "从列表中选择一个或多个车牌。"
|
||||
}
|
||||
}
|
||||
|
||||
@ -876,6 +876,8 @@ export function RecognizedLicensePlatesFilterContent({
|
||||
recognizedLicensePlates,
|
||||
setRecognizedLicensePlates,
|
||||
}: RecognizedLicensePlatesFilterContentProps) {
|
||||
const { t } = useTranslation(["components/filter"]);
|
||||
|
||||
const { data: allRecognizedLicensePlates, error } = useSWR<string[]>(
|
||||
"recognized_license_plates",
|
||||
{
|
||||
@ -924,26 +926,28 @@ export function RecognizedLicensePlatesFilterContent({
|
||||
return (
|
||||
<div className="overflow-x-hidden">
|
||||
<DropdownMenuSeparator className="mb-3" />
|
||||
<div className="mb-3 text-lg">Recognized License Plates</div>
|
||||
<div className="mb-3 text-lg">{t("recognizedLicensePlates.title")}</div>
|
||||
{error ? (
|
||||
<p className="text-sm text-red-500">
|
||||
Failed to load recognized license plates.
|
||||
{t("recognizedLicensePlates.loadFailed")}
|
||||
</p>
|
||||
) : !allRecognizedLicensePlates ? (
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Loading recognized license plates...
|
||||
{t("recognizedLicensePlates.loading")}
|
||||
</p>
|
||||
) : (
|
||||
<>
|
||||
<Command className="border border-input bg-background">
|
||||
<CommandInput
|
||||
placeholder="Type to search license plates..."
|
||||
placeholder={t("recognizedLicensePlates.placeholder")}
|
||||
value={inputValue}
|
||||
onValueChange={setInputValue}
|
||||
/>
|
||||
<CommandList className="max-h-[200px] overflow-auto">
|
||||
{filteredRecognizedLicensePlates.length === 0 && inputValue && (
|
||||
<CommandEmpty>No license plates found.</CommandEmpty>
|
||||
<CommandEmpty>
|
||||
{t("recognizedLicensePlates.noLicensePlatesFound")}
|
||||
</CommandEmpty>
|
||||
)}
|
||||
{filteredRecognizedLicensePlates.map((plate) => (
|
||||
<CommandItem
|
||||
@ -986,7 +990,7 @@ export function RecognizedLicensePlatesFilterContent({
|
||||
</>
|
||||
)}
|
||||
<p className="mt-1 text-sm text-muted-foreground">
|
||||
Select one or more plates from the list.
|
||||
{t("recognizedLicensePlates.selectPlatesFromList")}
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user