diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index ccf5658..0e74b24 100755 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -62,10 +62,19 @@ }, "articlePage": { "abstract": "Abstract", - "keywords": "Keywords" + "keywords": "Keywords", + "interactionButtons":{ + "abstract": "Abstract", + "readFile": "Read File", + "download" : "Download", + "share" : "Share", + "cite" : "Cite", + "copied": "Copied" + } + }, "navbar": { - "createNew": "Create New", + "createNew": "Create New", "about": { "navTitle": "About", "aboutProject": "About Scipaper", @@ -73,15 +82,15 @@ "help": "Help" }, "library": { - "navTitle": "My library", + "navTitle": "My library", "publications": "Publications", "favorites": "Favorites", "collections": "Collections", "recentViewed": "History" }, "auth": { - "signIn": "Sign In", - "signUp": "Sign Up" + "signIn": "Sign In", + "signUp": "Sign Up" } }, "footer": { @@ -123,6 +132,17 @@ "title": "Search results", "totalResults":"Total results", "nothingFound": "Nothing found" + }, + "filters": { + "authors":"Authors", + "publicationsType": "Publications Type", + "content":"Content", + "publisher":"Publisher", + "publicationTopic":"Publication Topic", + "appliedFitlers":"Applied Fitlers", + "clearAll":"Clear All", + "enterAuthorsName":"Enter Author Name", + "showAll":"Show All" } } diff --git a/public/locales/ru/translation.json b/public/locales/ru/translation.json index 38f2720..ca2691b 100755 --- a/public/locales/ru/translation.json +++ b/public/locales/ru/translation.json @@ -73,15 +73,15 @@ } }, "navbar": { - "createNew": "Создать статью", + "createNew": "Создать статью", "about": { - "navTitle": "О проекте", + "navTitle": "О проекте", "aboutProject": "О Scipaper", "contacts": "Контакты", "help": "Помощь" }, "library": { - "navTitle": "Моя библиотека", + "navTitle": "Моя библиотека", "publications": "Публикации", "favorites": "Избранное", "collections": "Коллекции", diff --git a/src/components/Cards/CategoryCard.tsx b/src/components/Cards/CategoryCard.tsx index 172e9e9..2d6a42d 100755 --- a/src/components/Cards/CategoryCard.tsx +++ b/src/components/Cards/CategoryCard.tsx @@ -13,7 +13,7 @@ type Props = { } & Omit, "">; function CategoryCard({ count, title, iconChild, className, ...props }: Props) { - const [t, i18next] = useTranslation() + const [t, i18next] = useTranslation(); const iconChildStyle = "h-7 fill-gray-500 stroke-gray-500 group-focus:fill-blue-600 group-active:fill-blue-600 group-focus:stroke-blue-600 group-active:stroke-blue-600"; @@ -43,7 +43,8 @@ function CategoryCard({ count, title, iconChild, className, ...props }: Props) { fontWeightVariant="normal" className="text-xs text-gray-500 group-active:text-blue-600 group-focus:text-blue-600" > - {count} {t("mainPage.article", {count: count}).toString()} + {count}{" "} + {t("mainPage.article_many", { count: count }).toString()} diff --git a/src/components/Filters/Filter.tsx b/src/components/Filters/Filter.tsx index 43f1e0f..16ea49d 100644 --- a/src/components/Filters/Filter.tsx +++ b/src/components/Filters/Filter.tsx @@ -7,7 +7,6 @@ import { useDebounce } from "./functions/debounce"; import { IProduct } from "./IProdutct"; import { useTranslation } from "react-i18next"; - type Props = { className?: string; }; @@ -28,8 +27,7 @@ export default function Fiter({ className }: Props) { }; const debounced = useDebounce(query); - const [t, i18next] = useTranslation() - + const [t, i18next] = useTranslation(); async function fetchProducts() { const response = await axios.get( @@ -99,13 +97,13 @@ export default function Fiter({ className }: Props) { /> -

контент...

+

{t("filters.content")}

-

контент...

+

{t("filters.content")}

-

контент...

+

{t("filters.content")}

diff --git a/src/components/MainPage/sections/MainSection.tsx b/src/components/MainPage/sections/MainSection.tsx index 60caa7b..bd156cc 100755 --- a/src/components/MainPage/sections/MainSection.tsx +++ b/src/components/MainPage/sections/MainSection.tsx @@ -2,16 +2,14 @@ /* Imports */ /* -------------------------------------------------------------------------- */ import React from "react"; -import {t as nextT} from "i18next"; +import { t as nextT } from "i18next"; import { useTranslation } from "react-i18next"; import { SearchBar } from "../../search/SearchBar"; import { formatNumber } from "core/helpers"; export default function MainSection() { const { t, i18n } = useTranslation(); - const amountArticles = 4202020 - - + const amountArticles = 4202020; return (
@@ -21,8 +19,14 @@ export default function MainSection() {
{t("mainPage.search")}
-
{formatNumber(amountArticles)}
-
{nextT("mainPage.article", {count: amountArticles}).toString()}
+
+ {formatNumber(amountArticles)} +
+
+ {nextT("mainPage.article_many", { + count: amountArticles, + }).toString()} +