mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 09:02:15 +03:00
Implement smart capitalization based on locale (#17860)
This commit is contained in:
@@ -151,7 +151,7 @@ function ThumbnailRow({
|
||||
|
||||
return (
|
||||
<div className="rounded-lg bg-background_alt p-2 md:px-4">
|
||||
<div className="flex flex-row items-center text-lg capitalize">
|
||||
<div className="flex flex-row items-center text-lg smart-capitalize">
|
||||
{t(objectType, { ns: "objects" })}
|
||||
{searchResults && (
|
||||
<span className="ml-3 text-sm text-secondary-foreground">
|
||||
@@ -190,7 +190,7 @@ function ThumbnailRow({
|
||||
/>
|
||||
</TooltipTrigger>
|
||||
<TooltipPortal>
|
||||
<TooltipContent className="capitalize">
|
||||
<TooltipContent className="smart-capitalize">
|
||||
<ExploreMoreLink objectType={objectType} />
|
||||
</TooltipContent>
|
||||
</TooltipPortal>
|
||||
|
||||
@@ -597,7 +597,7 @@ export default function SearchView({
|
||||
<Tooltip>
|
||||
<TooltipTrigger>
|
||||
<Chip
|
||||
className={`flex select-none items-center justify-between space-x-1 bg-gray-500 bg-gradient-to-br from-gray-400 to-gray-500 text-xs capitalize text-white`}
|
||||
className={`flex select-none items-center justify-between space-x-1 bg-gray-500 bg-gradient-to-br from-gray-400 to-gray-500 text-xs text-white smart-capitalize`}
|
||||
>
|
||||
{value.search_source == "thumbnail" ? (
|
||||
<LuImage className="size-3" />
|
||||
|
||||
@@ -431,7 +431,7 @@ export default function CameraSettingsView({
|
||||
}}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormLabel className="font-normal capitalize">
|
||||
<FormLabel className="font-normal smart-capitalize">
|
||||
{zone.name.replaceAll("_", " ")}
|
||||
</FormLabel>
|
||||
</FormItem>
|
||||
@@ -536,7 +536,7 @@ export default function CameraSettingsView({
|
||||
}}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormLabel className="font-normal capitalize">
|
||||
<FormLabel className="font-normal smart-capitalize">
|
||||
{zone.name.replaceAll("_", " ")}
|
||||
</FormLabel>
|
||||
</FormItem>
|
||||
|
||||
@@ -680,7 +680,7 @@ export function CameraNotificationSwitch({
|
||||
)}
|
||||
<div className="flex flex-col">
|
||||
<Label
|
||||
className="text-md cursor-pointer capitalize text-primary"
|
||||
className="text-md cursor-pointer text-primary smart-capitalize"
|
||||
htmlFor="camera"
|
||||
>
|
||||
{camera.replaceAll("_", " ")}
|
||||
|
||||
@@ -197,7 +197,7 @@ export default function ObjectSettingsView({
|
||||
<div className="mb-2 flex flex-col">
|
||||
<div className="flex items-center gap-2">
|
||||
<Label
|
||||
className="mb-0 cursor-pointer capitalize text-primary"
|
||||
className="mb-0 cursor-pointer text-primary smart-capitalize"
|
||||
htmlFor={param}
|
||||
>
|
||||
{title}
|
||||
@@ -239,7 +239,7 @@ export default function ObjectSettingsView({
|
||||
<div className="mb-2 flex flex-col">
|
||||
<div className="flex items-center gap-2">
|
||||
<Label
|
||||
className="mb-0 cursor-pointer capitalize text-primary"
|
||||
className="mb-0 cursor-pointer text-primary smart-capitalize"
|
||||
htmlFor="debugdraw"
|
||||
>
|
||||
{t("debug.objectShapeFilterDrawing.title")}
|
||||
|
||||
@@ -259,7 +259,7 @@ export default function CameraMetrics({
|
||||
)}
|
||||
<div className="flex w-full flex-col gap-3">
|
||||
<div className="flex flex-row items-center justify-between">
|
||||
<div className="text-sm font-medium capitalize text-muted-foreground">
|
||||
<div className="text-sm font-medium text-muted-foreground smart-capitalize">
|
||||
{camera.name.replaceAll("_", " ")}
|
||||
</div>
|
||||
<Tooltip>
|
||||
|
||||
@@ -105,7 +105,7 @@ export default function EnrichmentMetrics({
|
||||
<>
|
||||
{embeddingInferenceTimeSeries.map((series) => (
|
||||
<div className="rounded-lg bg-background_alt p-2.5 md:rounded-2xl">
|
||||
<div className="mb-5 capitalize">{series.name}</div>
|
||||
<div className="mb-5 smart-capitalize">{series.name}</div>
|
||||
{series.name.endsWith("Speed") ? (
|
||||
<ThresholdBarGraph
|
||||
key={series.name}
|
||||
|
||||
Reference in New Issue
Block a user