aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/dashboard/preview/LinkContentSection.tsx
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2024-11-17 00:33:28 +0000
committerGitHub <noreply@github.com>2024-11-17 00:33:28 +0000
commit4354ee7ba1c6ac9a9567944ae6169b1664e0ea8a (patch)
treee27c9070930514d77582bae00b3350274116179c /apps/web/components/dashboard/preview/LinkContentSection.tsx
parent9f2c7be23769bb0f4102736a683710b1a1939661 (diff)
downloadkarakeep-4354ee7ba1c6ac9a9567944ae6169b1664e0ea8a.tar.zst
feature: Add i18n support. Fixes #57 (#635)
* feature(web): Add basic scaffolding for i18n * refactor: Switch most of the app's strings to use i18n strings * fix: Remove unused i18next-resources-for-ts command * Add user setting * More translations * Drop the german translation for now
Diffstat (limited to 'apps/web/components/dashboard/preview/LinkContentSection.tsx')
-rw-r--r--apps/web/components/dashboard/preview/LinkContentSection.tsx12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/web/components/dashboard/preview/LinkContentSection.tsx b/apps/web/components/dashboard/preview/LinkContentSection.tsx
index bf0d8f90..320fc561 100644
--- a/apps/web/components/dashboard/preview/LinkContentSection.tsx
+++ b/apps/web/components/dashboard/preview/LinkContentSection.tsx
@@ -8,6 +8,7 @@ import {
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
+import { useTranslation } from "@/lib/i18n/client";
import { ScrollArea } from "@radix-ui/react-scroll-area";
import {
@@ -79,6 +80,7 @@ export default function LinkContentSection({
}: {
bookmark: ZBookmark;
}) {
+ const { t } = useTranslation();
const [section, setSection] = useState<string>("cached");
if (bookmark.content.type != BookmarkTypes.LINK) {
@@ -104,21 +106,23 @@ export default function LinkContentSection({
</SelectTrigger>
<SelectContent>
<SelectGroup>
- <SelectItem value="cached">Cached Content</SelectItem>
+ <SelectItem value="cached">
+ {t("preview.cached_content")}
+ </SelectItem>
<SelectItem
value="screenshot"
disabled={!bookmark.content.screenshotAssetId}
>
- Screenshot
+ {t("common.screenshot")}
</SelectItem>
<SelectItem
value="archive"
disabled={!bookmark.content.fullPageArchiveAssetId}
>
- Archive
+ {t("common.archive")}
</SelectItem>
<SelectItem value="video" disabled={!bookmark.content.videoAssetId}>
- Video
+ {t("common.video")}
</SelectItem>
</SelectGroup>
</SelectContent>