From 688358f67391cadbbb9246f2cf3dc2cfffe9f21d Mon Sep 17 00:00:00 2001 From: Aria Moradi Date: Tue, 14 Feb 2023 16:47:38 +0330 Subject: [PATCH] add translation keys --- src/i18n/locale/en.json | 4 ++++ src/screens/Browse.tsx | 7 +++++-- src/screens/Library.tsx | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/i18n/locale/en.json b/src/i18n/locale/en.json index 4274760e..003ff56e 100644 --- a/src/i18n/locale/en.json +++ b/src/i18n/locale/en.json @@ -6,6 +6,10 @@ "your-library-is-empty": "Your Library is empty", "category-is-empty": "Category is Empty", "could-not-load-manga": "Could not load manga" + }, + "Browse": { + "sources": "Sources", + "extensions": "Extensions" } } } diff --git a/src/screens/Browse.tsx b/src/screens/Browse.tsx index f46e443c..bc5b477e 100644 --- a/src/screens/Browse.tsx +++ b/src/screens/Browse.tsx @@ -11,8 +11,11 @@ import Tab from '@mui/material/Tab'; import TabPanel from 'components/util/TabPanel'; import Sources from 'screens/Sources'; import Extensions from 'screens/Extensions'; +import { useTranslation } from 'react-i18next'; export default function Browse() { + const { t } = useTranslation(); + const [tabNum, setTabNum] = useState(0); return ( @@ -27,8 +30,8 @@ export default function Browse() { scrollButtons allowScrollButtonsMobile > - - + + diff --git a/src/screens/Library.tsx b/src/screens/Library.tsx index 06b530c4..1656f369 100644 --- a/src/screens/Library.tsx +++ b/src/screens/Library.tsx @@ -21,6 +21,7 @@ import { useTranslation } from 'react-i18next'; export default function Library() { const { t } = useTranslation(); + const [lastLibraryUpdate, setLastLibraryUpdate] = useState(Date.now()); const { data: tabsData, error: tabsError, loading } = useQuery('/api/v1/category'); const tabs = tabsData ?? [];