capitalization

This commit is contained in:
Josh Hawkins 2025-10-25 16:45:47 -05:00
parent 80c423ff9c
commit d890e0478e
3 changed files with 4 additions and 3 deletions

View File

@ -643,7 +643,7 @@ export default function ObjectLifecycle({
)} )}
</div> </div>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<span>{label}</span> <span className="capitalize">{label}</span>
<span className="text-secondary-foreground"> <span className="text-secondary-foreground">
{formattedStart ?? ""} - {formattedEnd ?? ""} {formattedStart ?? ""} - {formattedEnd ?? ""}
</span> </span>

View File

@ -499,7 +499,7 @@ function EventList({
}} }}
role="button" role="button"
> >
<span>{label}</span> <span className="capitalize">{label}</span>
{event.data?.recognized_license_plate && ( {event.data?.recognized_license_plate && (
<> <>
·{" "} ·{" "}

View File

@ -1,6 +1,7 @@
import { ObjectLifecycleSequence } from "@/types/timeline"; import { ObjectLifecycleSequence } from "@/types/timeline";
import { t } from "i18next"; import { t } from "i18next";
import { getTranslatedLabel } from "./i18n"; import { getTranslatedLabel } from "./i18n";
import { capitalizeFirstLetter } from "./stringUtil";
export function getLifecycleItemDescription( export function getLifecycleItemDescription(
lifecycleItem: ObjectLifecycleSequence, lifecycleItem: ObjectLifecycleSequence,
@ -10,7 +11,7 @@ export function getLifecycleItemDescription(
: lifecycleItem.data.sub_label || lifecycleItem.data.label; : lifecycleItem.data.sub_label || lifecycleItem.data.label;
const label = lifecycleItem.data.sub_label const label = lifecycleItem.data.sub_label
? rawLabel ? capitalizeFirstLetter(rawLabel)
: getTranslatedLabel(rawLabel); : getTranslatedLabel(rawLabel);
switch (lifecycleItem.class_type) { switch (lifecycleItem.class_type) {