explore i18n fix

This commit is contained in:
Josh Hawkins 2025-05-19 15:13:54 -05:00
parent db54e6e480
commit 67961c9906
2 changed files with 3 additions and 11 deletions

View File

@ -1,6 +1,7 @@
{
"documentTitle": "Explore - Frigate",
"generativeAI": "Generative AI",
"exploreMore": "Explore more {{label}} objects",
"exploreIsUnavailable": {
"title": "Explore is Unavailable",
"embeddingsReindexing": {

View File

@ -190,8 +190,8 @@ function ThumbnailRow({
/>
</TooltipTrigger>
<TooltipPortal>
<TooltipContent className="smart-capitalize">
<ExploreMoreLink objectType={objectType} />
<TooltipContent>
{t("exploreMore", { label: objectType })}
</TooltipContent>
</TooltipPortal>
</Tooltip>
@ -283,12 +283,3 @@ function ExploreThumbnailImage({
</SearchResultActions>
);
}
function ExploreMoreLink({ objectType }: { objectType: string }) {
const formattedType = objectType.replaceAll("_", " ");
const label = formattedType.endsWith("s")
? `${formattedType}es`
: `${formattedType}s`;
return <div>Explore More {label}</div>;
}