Skip to content

Commit

Permalink
fix: add i18n in preview-media (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
kovsu authored Sep 27, 2024
1 parent e6459a5 commit 935c87d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/renderer/src/components/ui/media/preview-media.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { MediaModel } from "@follow/shared/hono"
import type { FC } from "react"
import { Fragment, useCallback, useEffect, useRef, useState } from "react"
import { Blurhash } from "react-blurhash"
import { useTranslation } from "react-i18next"
import { Keyboard, Mousewheel } from "swiper/modules"
import type { SwiperRef } from "swiper/react"
import { Swiper, SwiperSlide } from "swiper/react"
Expand All @@ -25,6 +26,7 @@ const Wrapper: Component<{
entryId?: string
}> = ({ children, src, showActions, entryId }) => {
const { dismiss } = useCurrentModal()
const { t } = useTranslation(["shortcuts", "external"])

return (
<div className="center relative size-full px-20 pb-8 pt-10" onClick={dismiss}>
Expand All @@ -50,7 +52,7 @@ const Wrapper: Component<{
<Fragment>
{!!window.electron && (
<ActionButton
tooltip="Download"
tooltip={t("external:header.download")}
onClick={() => {
tipcClient?.download(src)
}}
Expand All @@ -59,7 +61,7 @@ const Wrapper: Component<{
</ActionButton>
)}
<ActionButton
tooltip={COPY_MAP.OpenInBrowser()}
tooltip={t(COPY_MAP.OpenInBrowser())}
onClick={() => {
window.open(src)
}}
Expand Down

0 comments on commit 935c87d

Please sign in to comment.