Skip to content

Commit

Permalink
i18n - translate to English
Browse files Browse the repository at this point in the history
  • Loading branch information
noams24 committed Mar 18, 2024
1 parent 7f03728 commit 66055ce
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 39 deletions.
31 changes: 0 additions & 31 deletions app/[locale]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import BeOurFriends from '@/components/BeOurFriends/BeOurFriends';
import Paths from '@/components/Paths/Paths';
import WhatNow from '@/components/Home/WhatNow';
import MembersPics from '@/components/MembersPics';

import { getTranslations } from 'next-intl/server';
import { useTranslations } from 'next-intl';
import { HOST } from '@/config/consts';

export async function generateMetadata() {
Expand Down Expand Up @@ -34,35 +32,6 @@ export async function generateMetadata() {
}

export default function Home() {
const t = useTranslations('components.home');

// const BeOurFriendsCards = [
// {
// title: 'קבלת נסיון בפרויקטים מגוונים',
// description: 'קהילת מעקף מנגישה לכם פרויקטים מעניינים ואקסקלוסיביים',
// },
// { title: 'קשרים', description: 'צרו קשרים עם אנשים נוספים מהמקצוע שלכם' },
// {
// title: 'שמירה על רלוונטיות בשוק',
// description: 'מקום שמאפשר להתעדכן בשינויים האחרונים ולא להישאר מאחור',
// },
// {
// title: 'משרות',
// description:
// 'עצם ההשתתפות בקהילה מאפשרת להיחשף להזדמנויות רבות ומגוונות של תעסוקה',
// },
// {
// title: 'ליווי ותמיכה של חברים מהתחום',
// description:
// 'בקהילה תוכלו להיעזר בקלות בענייני קוד. יש לנו מומחים לכל השפות וכל הבעיות',
// },
// {
// title: 'קהילה מטורפת',
// description:
// 'על אף שהקהילה שלנו הולכת וגדלה, איכות האנשים נשמרת. בואו להכיר חברים חדשים.',
// },
// ];
// console.log(t('beOurFriends.cards'))
return (
<section className="mb-8">
<TitleSection />
Expand Down
13 changes: 10 additions & 3 deletions components/Header/HeaderItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,23 @@ import { NavDropdown } from './NavDropdown';
import Link from 'next/link';

interface HeaderItemsProps {
headerText: string[];
headerText: {
projects: string;
aboutUs: string;
community: string;
newbies: string;
members: string;
maintainers: string;
};
}

const HeaderItems = ({headerText}: any) => {
const HeaderItems = ({ headerText }: HeaderItemsProps) => {
const pathname = usePathname();
const currentPage = pathname.split('/').at(-1);
return (
<ul className="hidden md:flex md:gap-10">
<li className="flex items-center gap-2 cursor-pointer body-roman">
<NavDropdown headerText= {headerText}/>
<NavDropdown headerText={headerText} />
</li>
<li
className={`cursor-pointer body-roman ${
Expand Down
13 changes: 11 additions & 2 deletions components/Header/NavDropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { Dropdown } from '../utils/Dropdown';

type CommunityDropdownItems = {
Expand All @@ -8,8 +7,18 @@ type CommunityDropdownItems = {
linkPath?: string;
};

export const NavDropdown = ({headerText} : any) => {
interface NavDropdownProps {
headerText: {
projects: string;
aboutUs: string;
community: string;
newbies: string;
members: string;
maintainers: string;
};
}

export const NavDropdown = ({ headerText }: NavDropdownProps) => {
const communityDropdownItems: CommunityDropdownItems[] = [
{
title: 'Newbies',
Expand Down
3 changes: 0 additions & 3 deletions components/Maintainers/FaqsSection.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { LINKS } from '@/config/consts';
import Faqs from '../Common/Faqs';
import { useTranslations } from 'next-intl';

// const t = useTranslations('maintainers');

const faqs = [
{
Expand Down

0 comments on commit 66055ce

Please sign in to comment.