diff --git a/packages/react/src/components/channel/ChannelCard.tsx b/packages/react/src/components/channel/ChannelCard.tsx index 1a168ea5e..1ae3f9a7e 100644 --- a/packages/react/src/components/channel/ChannelCard.tsx +++ b/packages/react/src/components/channel/ChannelCard.tsx @@ -7,6 +7,7 @@ import { ChannelImg } from "./ChannelImg"; import { TopicBadge } from "../topic/TopicBadge"; import { ChannelSocials } from "./ChannelSocials"; import { Link, useNavigate } from "react-router-dom"; +import { usePreferredName } from "@/store/settings"; type WithNonOptional = Pick< T, @@ -75,6 +76,11 @@ export function ChannelCard({ [channelHref, navigate], ); + const preferredName = usePreferredName({ + name, + english_name, + }); + switch (size) { case "xs": case "sm": @@ -93,7 +99,9 @@ export function ChannelCard({ {org} {group && ` / ${group}`} -
{name}
+
+ {preferredName} +
{showSubscribers && t("component.channelInfo.subscriberCount", { @@ -111,7 +119,11 @@ export function ChannelCard({ {size === "sm" && (
{top_topics?.map((topic) => ( - + ))}
)} @@ -167,19 +179,10 @@ export function ChannelCard({ className={`z-10 h-24 w-24 ${inactive && "brightness-75 saturate-50"}`} channelId={id} /> - {/* {inactive && ( -
- )} */}
- {name} + {preferredName}
diff --git a/packages/react/src/components/language/ClipLanguageSelector.tsx b/packages/react/src/components/language/ClipLanguageSelector.tsx index f031e2237..cb4c06f9d 100644 --- a/packages/react/src/components/language/ClipLanguageSelector.tsx +++ b/packages/react/src/components/language/ClipLanguageSelector.tsx @@ -11,6 +11,7 @@ import { Popover, PopoverTrigger, PopoverContent } from "@/shadcn/ui/popover"; import { Button } from "@/shadcn/ui/button"; import { cn } from "@/lib/utils"; import { clipLanguageAtom } from "@/store/settings"; +import { useTranslation } from "react-i18next"; // Define the toggle atom const toggleClipLanguageAtom = atom( @@ -32,6 +33,7 @@ export const ClipLanguageSelector: React.FC = () => { const [selectedLangs] = useAtom(clipLanguageAtom); const toggleLanguage = useSetAtom(toggleClipLanguageAtom); const [open, setOpen] = React.useState(false); + const { t } = useTranslation(); return ( @@ -41,16 +43,23 @@ export const ClipLanguageSelector: React.FC = () => { role="combobox" size="icon-lg" aria-expanded={open} + title={t("views.settings.clipLanguageSelection")} > -
+
+
+
+
+ Select clip language{" "} {/* */} - {/* {t("No language found.")} */} - + {CLIPPER_LANGS.map((lang) => ( & @@ -180,6 +181,8 @@ export function VideoCard({ ); + const chName = usePreferredName(video.channel); + return (
onClick && onClick("channel", e)} > - {video.channel.name} + {chName} )} {size != "xs" && ( diff --git a/packages/react/src/index.css b/packages/react/src/index.css index bf1b6889f..88e44a8b8 100644 --- a/packages/react/src/index.css +++ b/packages/react/src/index.css @@ -21,3 +21,12 @@ /* font-family: "Noto Sans", sans-serif; */ } } + +.tsqd-parent-container .tsqd-transitions-container>div { + /* button[aria-label="Open Tanstack query devtools"] aint it.*/ + margin-top: 50px; +} + +.jotai-devtools-trigger-button { + margin-top: 100px; +} \ No newline at end of file diff --git a/packages/react/src/routes/channel.tsx b/packages/react/src/routes/channel.tsx index 50d2f9fec..8e0cf1c23 100644 --- a/packages/react/src/routes/channel.tsx +++ b/packages/react/src/routes/channel.tsx @@ -7,6 +7,7 @@ import { formatCount } from "@/lib/time"; import { getChannelBannerImages } from "@/lib/utils"; import { useChannel } from "@/services/channel.service"; import { Tabs, TabsList, TabsTrigger } from "@/shadcn/ui/tabs"; +import { usePreferredName } from "@/store/settings"; import { useState } from "react"; import { Helmet } from "react-helmet-async"; import { useTranslation } from "react-i18next"; @@ -33,12 +34,14 @@ export default function Channel() { const { data: channel } = useChannel(id!); + const preferredName = usePreferredName(channel ?? {}); + if (!id || !channel) return ; return ( <> - {channel.name} - Holodex + {preferredName} - Holodex
- {channel?.name} + {preferredName}
{t("component.channelInfo.subscriberCount", { @@ -83,7 +86,12 @@ export default function Channel() {
{channel?.top_topics?.map((topic) => ( - + ))}
diff --git a/packages/react/src/routes/home.tsx b/packages/react/src/routes/home.tsx index a7ea9d88d..a7c62018d 100644 --- a/packages/react/src/routes/home.tsx +++ b/packages/react/src/routes/home.tsx @@ -133,7 +133,7 @@ export function Home() { {t("views.home.recentVideoToggles.subber")}
- + {tab === "clips" && }