Skip to content

Commit ada22ff

Browse files
Add translations for banner and skills sections in English and Persian; update Footer and Certifications components for localization and styling improvements.
1 parent 152ec39 commit ada22ff

8 files changed

Lines changed: 56 additions & 29 deletions

File tree

public/locales/en/translation.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"portfolio": "Portfolio",
1010
"services": "Services"
1111
},
12+
"banner": {
13+
"name": "Ahmad Rasouli",
14+
"jobTitle": "Front-End Developer"
15+
},
1216
"name": "Ahmad Rasouli",
1317
"jobTitle": "Front-End Developer & Cybersecurity Specialist",
1418
"about": {
@@ -286,6 +290,12 @@
286290
},
287291
"footer": {
288292
"rights": "All rights reserved",
289-
"contact": "Contact"
293+
"contact": "Contact",
294+
"developedBy": "Developed by",
295+
"openSourceText": "The project is completely open source, but to support me, please fork and star me before cloning.."
296+
},
297+
"skills": {
298+
"title": "Skills & Expertise",
299+
"subtitle": "Professional expertise and technical proficiency"
290300
}
291301
}

public/locales/fa/translation.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"portfolio": "نمونه کارها",
1010
"services": "خدمات"
1111
},
12+
"banner": {
13+
"name": "احمد رسولی",
14+
"jobTitle": "توسعه‌دهنده فرانت‌اند"
15+
},
1216
"name": "احمد رسولی",
1317
"jobTitle": "توسعه‌دهنده فرانت‌اند و متخصص امنیت سایبری",
1418
"about": {
@@ -190,6 +194,12 @@
190194
},
191195
"footer": {
192196
"rights": "تمامی حقوق محفوظ است",
193-
"contact": "تماس"
197+
"contact": "تماس",
198+
"developedBy": "توسعه یافته توسط",
199+
"openSourceText": "این پروژه کاملاً متن‌باز است، اما برای حمایت از من، لطفاً قبل از کلون کردن، فورک و ستاره دهید."
200+
},
201+
"skills": {
202+
"title": "مهارت‌ها و تخصص",
203+
"subtitle": "تخصص حرفه‌ای و مهارت فنی"
194204
}
195205
}

src/Components/About/About.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ function About() {
157157
<div className="max-w-7xl mx-auto">
158158
{/* Header Section */}
159159
<div className="text-center mb-20">
160-
<h3 className="text-5xl md:text-6xl font-bold bg-gradient-to-r from-gray-900 via-blue-800 to-purple-800 bg-clip-text text-transparent mb-4">
160+
<h3 className="text-5xl p-2 md:text-6xl font-bold bg-gradient-to-r from-gray-900 via-blue-800 to-purple-800 bg-clip-text text-transparent mb-4">
161161
{t('about.title')}
162162
</h3>
163163
<div className="w-24 h-1 bg-gradient-to-r from-blue-500 to-purple-600 mx-auto rounded-full"></div>

src/Components/Education/Education.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function EducationTimeline() {
1919

2020
<div className="max-w-7xl mx-auto">
2121
<div className="text-center mb-20">
22-
<h3 className="text-5xl md:text-6xl font-bold bg-gradient-to-r from-gray-900 via-blue-800 to-purple-800 bg-clip-text text-transparent mb-4">
22+
<h3 className="text-5xl pb-2 md:text-6xl font-bold bg-gradient-to-r from-gray-900 via-blue-800 to-purple-800 bg-clip-text text-transparent mb-4">
2323
{t('education.title')}
2424
</h3>
2525
<div className="w-24 h-1 bg-gradient-to-r from-blue-500 to-purple-600 mx-auto rounded-full"></div>

src/Components/Skill/Skill.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import React, { useState, useEffect } from 'react';
2+
import { useTranslation } from 'react-i18next';
23
import skillsData from './Skill.json';
34

45
function Skills() {
6+
const { t } = useTranslation();
57
const [skills, setSkills] = useState([]);
68

79
useEffect(() => {
@@ -32,10 +34,10 @@ function Skills() {
3234
<div className="max-w-6xl mx-auto">
3335
<div className="text-center mb-16">
3436
<h3 className="text-4xl md:text-5xl font-bold bg-gradient-to-r from-gray-900 via-blue-800 to-purple-800 bg-clip-text text-transparent mb-3">
35-
Skills & Expertise
37+
{t('skills.title')}
3638
</h3>
3739
<div className="w-20 h-1 bg-gradient-to-r from-blue-500 to-purple-600 mx-auto rounded-full"></div>
38-
<p className="text-gray-600 mt-6 text-sm">Professional expertise and technical proficiency</p>
40+
<p className="text-gray-600 mt-6 text-sm">{t('skills.subtitle')}</p>
3941
</div>
4042

4143
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-7 gap-4">

src/Components/banner/Banner.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useState } from 'react';
22
import PropTypes from 'prop-types';
3-
3+
import { useTranslation } from 'react-i18next';
44
import {
55
FaGithub,
66
FaTelegram,
@@ -21,7 +21,10 @@ const iconComponents = {
2121

2222
function Banner() {
2323
const [hue, setHue] = useState(220);
24-
const {name, jobTitle, profileImage, socialLinks} = data;
24+
const { t } = useTranslation();
25+
const {profileImage, socialLinks} = data;
26+
const name = t('banner.name');
27+
const jobTitle = t('banner.jobTitle');
2528

2629
return (<section
2730
id="home"
@@ -56,7 +59,7 @@ function Banner() {
5659

5760
{/* متن اصلی */}
5861
<div className="space-y-6" data-aos="fade-up" data-aos-duration="1000">
59-
<h1 className="text-5xl md:text-6xl font-bold bg-gradient-to-r from-blue-400
62+
<h1 className="text-5xl pb-2 md:text-6xl font-bold bg-gradient-to-r from-blue-400
6063
to-cyan-400 bg-clip-text text-transparent">
6164
{name}
6265
</h1>

src/Components/certifica/Certifications.jsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import React from 'react';
22
import certifications from './Certifications.json'; // Fix problem for Vercel server
3+
import { useTranslation } from 'react-i18next';
34

45
function Certifications() {
6+
const { t } = useTranslation();
57
return (
68
<section className="relative py-20 px-4 md:px-8" id="certifications">
79
{/* Animated Gradient Circles */}
@@ -10,24 +12,24 @@ function Certifications() {
1012

1113
<div className="max-w-7xl mx-auto">
1214
<div className="text-center mb-20">
13-
<h3 className="text-5xl md:text-6xl font-bold bg-gradient-to-r from-gray-900 via-blue-800 to-purple-800 bg-clip-text text-transparent mb-4">
14-
Certifications
15+
<h3 className="text-5xl pt-2 md:text-6xl font-bold bg-gradient-to-r from-gray-900 via-blue-800 to-purple-800 bg-clip-text text-transparent mb-4">
16+
{t('certifications.title')}
1517
</h3>
1618
<div className="w-24 h-1 bg-gradient-to-r from-blue-500 to-purple-600 mx-auto rounded-full"></div>
1719
</div>
1820

1921
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8">
20-
{certifications.map((certification) => (
22+
{certifications.map((certification, index) => (
2123
<div
22-
key={certification.id}
23-
className="relative bg-white/20 backdrop-blur-lg border border-white/30 rounded-2xl p-6
24+
key={certification.id || index}
25+
className="relative bg-white/20 backdrop-blur-lg border border-white/30 rounded-2xl p-6
2426
shadow-xl hover:shadow-2xl transition-all duration-500 hover:-translate-y-2 group overflow-hidden"
25-
>Fix problem for Vircel server
26-
<div className="absolute inset-0 bg-gradient-to-br from-blue-500/10 via-purple-500/10 to-pink-500/10
27+
>
28+
<div className="absolute inset-0 bg-gradient-to-br from-blue-500/10 via-purple-500/10 to-pink-500/10
2729
opacity-0 group-hover:opacity-100 transition-opacity duration-500 rounded-2xl"></div>
28-
<div className="absolute top-0 right-0 w-16 h-16 bg-gradient-to-br from-blue-400/20 to-purple-400/20
30+
<div className="absolute top-0 right-0 w-16 h-16 bg-gradient-to-br from-blue-400/20 to-purple-400/20
2931
rounded-bl-2xl opacity-50"></div>
30-
<div className="absolute bottom-0 left-0 w-12 h-12 bg-gradient-to-tr from-pink-400/20 to-orange-400/20
32+
<div className="absolute bottom-0 left-0 w-12 h-12 bg-gradient-to-tr from-pink-400/20 to-orange-400/20
3133
rounded-tr-2xl opacity-50"></div>
3234

3335
<a
@@ -42,14 +44,14 @@ function Certifications() {
4244
className="w-full h-48 object-contain rounded-xl border-2 border-white/30 bg-white/10 backdrop-blur-sm"
4345
/>
4446
</a>
45-
47+
4648
<div className="space-y-3 relative z-10">
4749
<h4 className="text-xl font-semibold text-gray-800 group-hover:text-gray-900 transition-colors">
4850
{certification.title}
4951
</h4>
5052
<p className="text-sm font-medium text-gray-900">{certification.issuer}</p>
5153
<p className="text-sm text-gray-500 bg-white/50 backdrop-blur-sm px-3 py-1 rounded-full inline-block">
52-
Issued {certification.issuedDate}
54+
{certification.issuedDate}
5355
</p>
5456
</div>
5557
</div>

src/Components/footer/Footer.jsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3+
import { useTranslation } from 'react-i18next';
34
import {
45
FaGithub,
56
FaTelegram,
@@ -31,22 +32,21 @@ const footerData = {
3132
},
3233
],
3334
copyright: {
34-
text: "The project is completely open source, but to support me, please fork and star me before cloning..",
35+
text: "footer.openSourceText",
3536
author: {
36-
name: "Ahmad Rasouli",
37+
name: "name",
3738
email: "darkcodeit@protonmail.com"
3839
},
39-
40+
4041
}
4142
};
4243

4344
function Footer() {
45+
const { t } = useTranslation();
46+
4447
return (
4548
<footer className=" text-gray-300 py-12 relative overflow-hidden">
4649
{/* Animated Gradient Circles */}
47-
<div className="absolute top-0 left-20 w-48 h-48 bg-gradient-to-r from-slate-400 to-gray-600 rounded-full mix-blend-multiply filter blur-xl opacity-10 animate-pulse"></div>
48-
<div className="absolute bottom-0 right-20 w-48 h-48 bg-gradient-to-r from-blue-400 to-purple-600 rounded-full mix-blend-multiply filter blur-xl opacity-10 animate-pulse delay-1000"></div>
49-
5050
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
5151
<div className="flex flex-col items-center">
5252

@@ -71,15 +71,15 @@ function Footer() {
7171

7272
{/* Copyright Text */}
7373
<div className="flex flex-col md:flex-row items-center text-center text-gray-400 text-sm space-y-2 md:space-y-0 md:space-x-4">
74-
<p>{footerData.copyright.text}</p>
74+
<p>{t(footerData.copyright.text)}</p>
7575
<div className="hidden md:block"></div>
7676
<p>
77-
Developed by{" "}
77+
{t('footer.developedBy')}{" "}
7878
<a
7979
href={`mailto:${footerData.copyright.author.email}`}
8080
className="text-blue-400 hover:text-blue-300 transition-colors"
8181
>
82-
{footerData.copyright.author.name}
82+
{t(footerData.copyright.author.name)}
8383
</a>
8484
</p>
8585

0 commit comments

Comments
 (0)