Skip to content

Commit b7a8f45

Browse files
committed
fixed some problems with the old site
1 parent 320bc26 commit b7a8f45

7 files changed

Lines changed: 332 additions & 198 deletions

File tree

bun.lockb

2.29 KB
Binary file not shown.

components/LanguageSwitcher.jsx

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
import { useRouter } from 'next/router'
2-
import { Button } from "@/components/ui/button"
3-
import { Globe } from 'lucide-react'
4-
import { useTranslation } from '@/utils/translation'
1+
import { useRouter } from 'next/router';
2+
import { Button } from '@/components/ui/button';
3+
import { Globe } from 'lucide-react';
54

65
export function LanguageSwitcher() {
7-
const router = useRouter()
8-
const { t } = useTranslation()
6+
const router = useRouter();
97

108
const toggleLanguage = () => {
11-
const newLocale = router.locale === 'fa' ? 'en' : 'fa'
12-
const { pathname, asPath, query } = router
13-
router.push({ pathname, query }, asPath, { locale: newLocale })
14-
document.dir = { fa: 'rtl', en: 'ltr' }[newLocale]
15-
}
9+
const newLocale = router.locale === 'fa' ? 'en' : 'fa';
10+
const { pathname, asPath, query } = router;
11+
12+
router.push({ pathname, query }, asPath, { locale: newLocale });
13+
14+
document.documentElement.dir = newLocale === 'fa' ? 'rtl' : 'ltr';
15+
document.documentElement.lang = newLocale;
16+
};
1617

1718
return (
1819
<Button variant="ghost" size="icon" onClick={toggleLanguage}>
1920
<Globe className="h-4 w-4" />
20-
<span className="sr-only">{t('navigation.toggle_language')}</span>
21+
<span className="sr-only">تغییر زبان</span>
2122
</Button>
22-
)
23-
}
23+
);
24+
}

data/features.js

Lines changed: 62 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,103 @@
1-
import { Lock, LineChart, Layers, CaseSensitive, PackageOpen, Users } from "lucide-react";
1+
import {
2+
Layers,
3+
Zap,
4+
Type,
5+
Package,
6+
Shield,
7+
Users,
8+
Wrench,
9+
Smartphone
10+
} from "lucide-react";
211

312
const featuresData = [
413
{
514
icon: Layers,
615
title: {
7-
en: 'Modern Interface',
8-
fa: 'ظاهر مدرن'
16+
en: "Multiple Desktop Environments",
17+
fa: "محیط‌های دسکتاپ متنوع"
918
},
1019
desc: {
11-
en: 'Choose between GNOME and KDE for a sleek, modern desktop experience.',
12-
fa: 'برای تجربه دسکتاپ مدرن و شیک، بین GNOME و KDE انتخاب کنید.'
20+
en: "Official editions with KDE Plasma (flagship), GNOME, XFCE and more ready to use out of the box.",
21+
fa: "نسخه‌های رسمی با KDE Plasma (پرچم‌دار)، GNOME، XFCE و محیط‌های دیگر آماده استفاده بلافاصله پس از نصب."
1322
}
1423
},
1524
{
16-
icon: LineChart,
25+
icon: Zap,
1726
title: {
18-
en: 'Performance',
19-
fa: 'عملکرد'
27+
en: "Rolling Release Model",
28+
fa: "مدل رولینگ ریلیز"
2029
},
2130
desc: {
22-
en: 'Optimized for speed and efficiency, Parch runs smoothly on a wide range of hardware.',
23-
fa: 'پارچ برای سرعت و کارایی بهینه شده است، و روی بسیاری از سخت‌افزار‌ها تجربهٔ روان و نرمی ارائه می‌دهد.'
31+
en: "Always up-to-date with the latest software, kernels and security patches just like Arch Linux.",
32+
fa: "همیشه به‌روز با جدیدترین نرم‌افزارها، کرنل‌ها و پچ‌های امنیتی دقیقاً مانند آرچ لینوکس."
2433
}
2534
},
2635
{
27-
icon: Lock,
36+
icon: Type,
2837
title: {
29-
en: 'Security',
30-
fa: 'امنیت'
38+
en: "Perfect Persian Support",
39+
fa: "پشتیبانی کامل پارسی"
3140
},
3241
desc: {
33-
en: 'Built with security in mind, featuring regular updates and a robust firewall.',
34-
fa: 'ساخته شده با در نظر گرفتن امنیت، دارای به‌روز‌رسانی های منظم و فایروال قوی.'
42+
en: "Beautiful optimized Persian fonts, full RTL layout, Jalali calendar, Persian keyboard and Firefox fixes from the first boot.",
43+
fa: "فونت‌های پارسی زیبا و بهینه‌شده، پشتیبانی کامل راست‌به‌چپ، تقویم جلالی، کیبورد پارسی و رفع مشکلات فایرفاکس از همان لحظه اول."
3544
}
3645
},
3746
{
38-
icon: CaseSensitive,
47+
icon: Package,
3948
title: {
40-
en: 'Optimized Fonts',
41-
fa: 'فونت‌های بهینه'
49+
en: "Calamares Graphical Installer",
50+
fa: "نصب‌گر گرافیکی Calamares"
4251
},
4352
desc: {
44-
en: 'An unparalleled experience with optimized Persian fonts for enhanced readability and aesthetics.',
45-
fa: 'تجربه‌ای بی‌نظیر با فونت‌های پارسی، بهینه‌شده برای خوانایی و زیبایی بیشتر.'
53+
en: "Fast, simple and reliable installation in minutes with the user-friendly Calamares installer.",
54+
fa: "نصب سریع، ساده و قابل اعتماد در چند دقیقه با نصب‌گر محبوب و کاربرپسند Calamares."
4655
}
4756
},
4857
{
49-
icon: PackageOpen,
58+
icon: Shield,
5059
title: {
51-
en: 'Graphical Installer',
52-
fa: 'نصب کننده گرافیکی'
60+
en: "Security & Privacy Focused",
61+
fa: "تمرکز بر امنیت و حریم خصوصی"
5362
},
5463
desc: {
55-
en: 'Easy and quick installation with a graphical user interface that helps you set up the distribution effortlessly.',
56-
fa: 'نصب آسان و سریع با رابط کاربری گرافیکی که به شما کمک می‌کند تا به راحتی توزیع را راه‌اندازی کنید.'
64+
en: "No telemetry, automatic security updates, hardened configurations and privacy-respecting defaults.",
65+
fa: "بدون جمع‌آوری داده، به‌روزرسانی‌های امنیتی خودکار، تنظیمات سخت‌شده و پیش‌فرض‌های احترام‌گذار به حریم خصوصی."
66+
}
67+
},
68+
{
69+
icon: Wrench,
70+
title: {
71+
en: "Powerful Tools & Helpers",
72+
fa: "ابزارهای اختصاصی پارچ"
73+
},
74+
desc: {
75+
en: "Parch-specific scripts like waydroid-helper, gaming setups, Dorood welcome app and more.",
76+
fa: "اسکریپت‌های اختصاصی پارچ مانند waydroid-helper، تنظیمات گیمینگ، برنامه خوش‌آمدگویی درود و ابزارهای بیشتر."
77+
}
78+
},
79+
{
80+
icon: Smartphone,
81+
title: {
82+
en: "Waydroid & Android Apps",
83+
fa: "اجرای برنامه‌های اندروید"
84+
},
85+
desc: {
86+
en: "Run Android applications seamlessly with Waydroid easy setup with our helper script.",
87+
fa: "اجرای روان برنامه‌های اندروید با وی‌دروید نصب آسان با اسکریپت اختصاصی ما."
5788
}
5889
},
5990
{
6091
icon: Users,
6192
title: {
62-
en: 'Community Centric',
63-
fa: 'جامعه محور'
93+
en: "Active Persian Community",
94+
fa: "جامعه پارسی‌زبان فعال"
6495
},
6596
desc: {
66-
en: "Our distribution aims to create an active, collaborative community where every user can shape the project's future.",
67-
fa: "توزیع ما با هدف ایجاد یک جامعه فعال و مشارکتی طراحی شده است که هر کاربر می‌تواند در شکل‌گیری آینده پروژه نقش داشته باشد."
97+
en: "One of the most vibrant Persian Linux communities with forum, Matrix rooms, wiki and constant contributions.",
98+
fa: "یکی از فعال‌ترین جوامع لینوکس پارسی‌زبان با انجمن، اتاق‌های ماتریکس، ویکی و مشارکت مداوم کاربران."
6899
}
69100
},
70-
]
101+
];
71102

72-
export default featuresData;
103+
export default featuresData;

i18n/en.js

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default {
1111
description: 'ParchLinux, which stands for Persian Arch, is a Linux distribution based on the popular and versatile Arch Linux. It aims to provide a streamlined, user-friendly experience while maintaining the customizability and performance that Arch Linux is known for.',
1212
downloadButton: 'Download',
1313
learnMoreButton: 'Learn More',
14-
title: 'Parch GNU/Linux',
14+
title: 'Parch GNU/Linux'
1515
},
1616

1717
navigation: {
@@ -24,7 +24,7 @@ export default {
2424
join: 'Join',
2525
team: 'Team',
2626
toggle_language: 'Toggle Language',
27-
toggle_theme: 'Toggle Theme',
27+
toggle_theme: 'Toggle Theme'
2828
},
2929

3030
team: {
@@ -50,19 +50,19 @@ export default {
5050
forum: 'Forums',
5151
wiki: 'Wiki',
5252
chat: 'Chat',
53-
contrib: 'Contribute',
53+
contrib: 'Contribute'
5454
},
5555
text: {
5656
forum: 'Connect with other Parch users and get help.',
5757
wiki: 'Explore our comprehensive documentation.',
5858
chat: 'Join our IRC or Matrix channels for real-time discussions.',
59-
contrib: 'Help improve Parch by contributing code or translations.',
59+
contrib: 'Help improve Parch by contributing code or translations.'
6060
},
6161
link: {
6262
forum: 'Open Parch Forum',
6363
wiki: 'Open Parch Wiki',
6464
chat: 'Go to Parch Matrix',
65-
contrib: 'Parch Repositories',
65+
contrib: 'Parch Repositories'
6666
}
6767
},
6868

@@ -72,21 +72,32 @@ export default {
7272
},
7373

7474
details: {
75-
comp() {
76-
return ({ text, build_date, size, hash, maintainer }) => (
77-
<>
78-
<p><strong>Name</strong>: {text}</p>
79-
<p><strong>Build Date</strong>: {Intl.DateTimeFormat('en-US').format(new Date(build_date))}</p>
80-
<p><strong>Size</strong>: {size}</p>
81-
{hash && <p><strong>Hash</strong>: {hash}</p>}
82-
{maintainer && <p><strong>Maintainer</strong>: {maintainer}</p>}
83-
</>
84-
)
75+
comp: () => {
76+
return (props = {}) => {
77+
const {
78+
text = 'N/A',
79+
build_date = null,
80+
size = 'N/A',
81+
hash = null,
82+
maintainer = null
83+
} = props
84+
85+
return (
86+
<>
87+
<p><strong>Name</strong>: {text}</p>
88+
<p><strong>Build Date</strong>: {build_date ? Intl.DateTimeFormat('en-US', { year: 'numeric', month: 'long', day: 'numeric' }).format(new Date(build_date)) : 'N/A'}</p>
89+
<p><strong>Size</strong>: {size}</p>
90+
{hash && <p><strong>SHA256 Hash</strong>: <code className="break-all text-sm">{hash}</code></p>}
91+
{maintainer && <p><strong>Maintainer</strong>: {maintainer}</p>}
92+
</>
93+
)
94+
}
8595
},
86-
download: text => `Download ${text}`,
96+
download: (text = 'ISO') => `Download ${text}`,
8797
changelog: 'View Changelog',
88-
balenaEtcher: 'Flash with Balena Etcher'
98+
balenaEtcher: 'Flash with Balena Etcher',
99+
title: 'Image Details'
89100
},
90101

91-
error_404: "Error 404 - Page Not Found"
92-
}
102+
error_404: 'Error 404 - Page Not Found'
103+
}

0 commit comments

Comments
 (0)