From 209507833e0e67c1b0c9cb8c65fe4d04e01380ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CSalar?= <“salar.sali97@gmail.com”> Date: Fri, 21 Oct 2022 13:00:25 +0300 Subject: [PATCH 1/7] resolve no break space in the english localization --- public/locales/en/translation.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index ccf5658..c8d81d5 100755 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -65,7 +65,7 @@ "keywords": "Keywords" }, "navbar": { - "createNew": "Create New", + "createNew": "Create New", "about": { "navTitle": "About", "aboutProject": "About Scipaper", @@ -73,15 +73,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": { From 2075426ff763721a18450630ed3a86abb7d1d4f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CSalar?= <“salar.sali97@gmail.com”> Date: Fri, 21 Oct 2022 13:08:21 +0300 Subject: [PATCH 2/7] resolve no break space in the russian localization --- public/locales/ru/translation.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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": "Коллекции", From f965eaddbc0e6587a3611bd37633d33b4c36130f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CSalar?= <“salar.sali97@gmail.com”> Date: Fri, 21 Oct 2022 13:26:23 +0300 Subject: [PATCH 3/7] content and filter were added --- public/locales/en/translation.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index c8d81d5..f134e92 100755 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -123,6 +123,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" } } From 47472868e19bddd0e305ba960a41a1c9796714bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CSalar?= <“salar.sali97@gmail.com”> Date: Fri, 21 Oct 2022 13:29:08 +0300 Subject: [PATCH 4/7] content hardcoded resolved --- src/components/Filters/Filter.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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")}

From 28cc9b1a7121d03e1e6d767b7e11fafeb671896f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CSalar?= <“salar.sali97@gmail.com”> Date: Fri, 21 Oct 2022 13:46:47 +0300 Subject: [PATCH 5/7] the translation in the main section has been resolved --- src/components/MainPage/sections/MainSection.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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()} +
From 753223c7a93a7eb76145775abe6d2a02998004f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CSalar?= <“salar.sali97@gmail.com”> Date: Fri, 21 Oct 2022 14:07:48 +0300 Subject: [PATCH 6/7] the translation of interaction buttons has been added --- public/locales/en/translation.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index f134e92..0e74b24 100755 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -62,7 +62,16 @@ }, "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", From 4f9b33e5b9404e72b66c34de588b3db83f4fe8fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CSalar?= <“salar.sali97@gmail.com”> Date: Fri, 21 Oct 2022 14:21:26 +0300 Subject: [PATCH 7/7] resolve article translation --- src/components/Cards/CategoryCard.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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()}