Skip to content

Commit

Permalink
Merge pull request #225 from Maakaf/224-projects-page-need-translations
Browse files Browse the repository at this point in the history
224 projects page need translations
  • Loading branch information
Darkmift authored Mar 27, 2024
2 parents bfe81b4 + 6c45c28 commit 3ee8b25
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/[locale]/projects/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { MempmizedProjectsDisplay } from '@/components/Projects/ProjectDisplay';
import { ProjectFilter } from '@/types';
import { Project, ProjectPaginationFilter } from '@/types/project';
import React, { useCallback, useEffect, useState } from 'react';
import { useTranslations } from 'next-intl';

const ProjectsPage = () => {
const [projects, setProjects] = useState<Project[]>([]);
Expand All @@ -14,6 +15,8 @@ const ProjectsPage = () => {
const [filter, setFilter] = useState(ProjectPaginationFilter.ALL);
const [searchByProjectNameValue, setSearchByProjectNameValue] = useState('');

const t = useTranslations('projects');

/**
* @param {Project} project
* @returns {boolean}
Expand Down Expand Up @@ -111,7 +114,7 @@ const ProjectsPage = () => {
<div className="flex flex-col items-center gap-[5px]">
<h1 className="h1 font-bold">הפרויקטים</h1>
<h2 className="h4-roman text-xl text-center">
עמוד הפרויקטים של הקהילה. תתפנקו...
{t('communityProjects')}
</h2>
</div>
</div>
Expand All @@ -126,7 +129,7 @@ const ProjectsPage = () => {
{/* Project list */}
{loading ? (
<div className="flex flex-col gap-4 h-[75vh] mb-10 w-[90%] md:w-full max-w-[1240px] mx-auto pl-2">
Populating projects...
{t('populatingProjectMessage')}
</div>
) : projects?.length ? (
<MempmizedProjectsDisplay
Expand All @@ -137,7 +140,7 @@ const ProjectsPage = () => {
/>
) : (
<div className="flex flex-col gap-4 h-[75vh] mb-10 w-[90%] md:w-full max-w-[1240px] mx-auto pl-2">
No projects found
{t('noProjectsFound')}
</div>
)}
</>
Expand Down
5 changes: 5 additions & 0 deletions public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,10 @@
"aboutUs": "Who we are",
"terms": "Terms and conditions",
"privacy": "Privacy policy"
},
"projects": {
"communityProjects": "The communioty projects page, enjoy...",
"populatingProjectMessage": "Loading projects...",
"noProjectsFound": "No projects found"
}
}
5 changes: 5 additions & 0 deletions public/locales/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,10 @@
"aboutUs": "מי אנחנו",
"terms": "תנאי השימוש",
"privacy": "הגדרות פרטיות"
},
"projects": {
"communityProjects": "עמוד הפרויקטים של הקהילה. תתפנקו...",
"populatingProjectMessage": "טוען פרוייקטים...",
"noProjectsFound": "לא נמצאו פרוייקטים"
}
}

0 comments on commit 3ee8b25

Please sign in to comment.