Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

224 projects page need translations #225

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "לא נמצאו פרוייקטים"
}
}
Loading