From e561a9d59df02f3895ff2f1a93b8c6c39f3ee0bb Mon Sep 17 00:00:00 2001 From: Daniele Pancottini Date: Thu, 22 Dec 2022 10:53:30 +0100 Subject: [PATCH] Almost finished translations --- site/components/common/Footer/Footer.tsx | 37 +- site/components/common/Layout/Layout.tsx | 6 +- .../common/Navbar/NavBarFiltersDrawer.tsx | 123 ++-- site/components/common/Navbar/Navbar.tsx | 23 +- .../components/common/Searchbar/Searchbar.tsx | 6 +- .../product/ProductSidebar/ProductSidebar.tsx | 20 +- .../product/ProductView/ProductView.tsx | 6 +- site/pages/product/[slug].tsx | 2 +- site/static_data/navBarLinks.json | 21 +- site/static_data/navBarMenuData.json | 598 ++++++++++++------ .../static_data/productDetailsMetafields.json | 193 ++++-- 11 files changed, 673 insertions(+), 362 deletions(-) diff --git a/site/components/common/Footer/Footer.tsx b/site/components/common/Footer/Footer.tsx index 674d53b7e..5e6a4b7d1 100644 --- a/site/components/common/Footer/Footer.tsx +++ b/site/components/common/Footer/Footer.tsx @@ -9,6 +9,7 @@ import { Logo, Container } from '@components/ui' import { I18nWidget } from '@components/common' import ThemeSwitcher from '@components/ui/ThemeSwitcher' import s from './Footer.module.css' +import navBarLinks from '../../../static_data/navBarLinks.json' interface Props { className?: string @@ -16,29 +17,18 @@ interface Props { pages?: Page[] } -const links = [ - { - name: 'Home', - url: '/', - }, - { - name: 'About', - url: '/about' - }, - { - name: 'News', - url: '/news' - }, - { - name: 'Contact', - url: '/contact' - } -] +interface FooterLink { + label: string + href: string +} const Footer: FC = ({ className, pages }) => { const { sitePages } = usePages(pages) const rootClassName = cn(s.root, className) + const { locale = 'it' } = useRouter() + const links = navBarLinks[locale as keyof typeof navBarLinks] + return (