@@ -16,7 +16,6 @@ import {
1616} from "@/types/live" ;
1717import { getIconForLabel } from "@/utils/iconUtil" ;
1818import Chip from "../indicators/Chip" ;
19- import { capitalizeFirstLetter } from "@/utils/stringUtil" ;
2019import { cn } from "@/lib/utils" ;
2120import { TbExclamationCircle } from "react-icons/tb" ;
2221import { TooltipPortal } from "@radix-ui/react-tooltip" ;
@@ -26,6 +25,8 @@ import { LuVideoOff } from "react-icons/lu";
2625import { Trans , useTranslation } from "react-i18next" ;
2726import { useCameraFriendlyName } from "@/hooks/use-camera-friendly-name" ;
2827import { ImageShadowOverlay } from "../overlay/ImageShadowOverlay" ;
28+ import { getTranslatedLabel } from "@/utils/i18n" ;
29+ import { formatList } from "@/utils/stringUtil" ;
2930
3031type LivePlayerProps = {
3132 cameraRef ?: ( ref : HTMLDivElement | null ) => void ;
@@ -367,20 +368,22 @@ export default function LivePlayer({
367368 </ div >
368369 < TooltipPortal >
369370 < TooltipContent className = "smart-capitalize" >
370- { [
371- ...new Set ( [
372- ...( objects || [ ] ) . map ( ( { label, sub_label } ) =>
373- label . endsWith ( "verified" )
374- ? sub_label
375- : label . replaceAll ( "_" , " " ) ,
376- ) ,
377- ] ) ,
378- ]
379- . filter ( ( label ) => label ?. includes ( "-verified" ) == false )
380- . map ( ( label ) => capitalizeFirstLetter ( label ) )
381- . sort ( )
382- . join ( ", " )
383- . replaceAll ( "-verified" , "" ) }
371+ { formatList (
372+ [
373+ ...new Set ( [
374+ ...( objects || [ ] ) . map ( ( { label, sub_label } ) =>
375+ label . endsWith ( "verified" )
376+ ? sub_label
377+ : label . replaceAll ( "_" , " " ) ,
378+ ) ,
379+ ] ) ,
380+ ]
381+ . filter ( ( label ) => label ?. includes ( "-verified" ) == false )
382+ . map ( ( label ) =>
383+ getTranslatedLabel ( label . replace ( "-verified" , "" ) ) ,
384+ )
385+ . sort ( ) ,
386+ ) }
384387 </ TooltipContent >
385388 </ TooltipPortal >
386389 </ Tooltip >
0 commit comments