From 8ddf2dc7db521139546b6d03b4749527c9df7919 Mon Sep 17 00:00:00 2001 From: ahasani194 Date: Mon, 16 Jun 2025 15:21:44 +0330 Subject: [PATCH] feat: update copyright year placeholders and enhance footer styling; add new project titles and descriptions in Persian; implement locale handling in various components --- messages/en.d.json.ts | 2 +- messages/en.json | 2 +- messages/fa.json | 6 +++++- src/app/{ => [locale]}/[...not_found]/layout.tsx | 2 +- src/app/{ => [locale]}/[...not_found]/page.tsx | 0 src/app/[locale]/layout.tsx | 2 +- src/components/layout/footer/Footer.tsx | 10 +++++++--- src/components/layout/navbar/index.tsx | 4 ++-- src/components/layout/sectionTitle/index.tsx | 7 ++++++- src/components/layout/sectionTitle/sectionTitle.d.ts | 3 +++ src/components/pages/about/TopInfo.tsx | 5 ++++- src/components/pages/contact/TouchUs.tsx | 5 +++++ src/components/pages/home/HomeStorySection.tsx | 5 +++++ src/components/pages/home/Products.tsx | 2 +- src/components/pages/home/Projects.tsx | 1 + 15 files changed, 43 insertions(+), 13 deletions(-) rename src/app/{ => [locale]}/[...not_found]/layout.tsx (92%) rename src/app/{ => [locale]}/[...not_found]/page.tsx (100%) diff --git a/messages/en.d.json.ts b/messages/en.d.json.ts index 07bdb07..03bd71c 100644 --- a/messages/en.d.json.ts +++ b/messages/en.d.json.ts @@ -49,7 +49,7 @@ declare const messages: { "footer_links_quick_links": "Quick Links", "footer_links_who_we_are": "Who We Are", "footer_links_contact": "Contact", - "footer_copyright": "Copyright © 2025 All Rights Reserved.", + "footer_copyright": "Copyright © {year} All Rights Reserved.", "footer_links_address": "123 Industrial Ave, Suite 456, City, Country", "com_home_story_title": "Our Story", diff --git a/messages/en.json b/messages/en.json index 69e819a..5e29f07 100644 --- a/messages/en.json +++ b/messages/en.json @@ -46,7 +46,7 @@ "footer_links_quick_links": "Quick Links", "footer_links_who_we_are": "Who We Are", "footer_links_contact": "Contact", - "footer_copyright": "Copyright © 2025 All Rights Reserved.", + "footer_copyright": "Copyright © {year} All Rights Reserved.", "footer_links_address": "123 Industrial Ave, Suite 456, City, Country", "com_home_story_title": "Our Story", diff --git a/messages/fa.json b/messages/fa.json index ddb7c2c..f44a34b 100644 --- a/messages/fa.json +++ b/messages/fa.json @@ -36,13 +36,17 @@ "com_home_products_title": "آجرهای با کیفیت برای پروژه‌های شما", "com_home_products_description": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است.", + "com_home_projects_title": "پروژه‌های موفق ما", + "com_home_projects_title_bold": "ابتکارات", + "com_home_projects_description": "ابتکارات پروژه‌های موفق ما نشان‌دهنده تعهد ما به برتری و نوآوری در صنایع مختلف است.", + "footer_title": "راهکارهای صنعتی برای دنیای مدرن", "footer_description": "ما متعهد به ارائه راهکارهای صنعتی شخصی‌سازی شده هستیم که نیازهای منحصر به فرد مشتریانمان را برآورده می‌کند. تیم متخصص ما به ارائه محصولات و خدمات با کیفیت بالا که موفقیت را در بازار رقابتی امروز تضمین می‌کند، متعهد است.", "footer_slogan": "ما متعهد به ارائه راهکارهای صنعتی شخصی‌سازی شده هستیم.", "footer_links_quick_links": "لینک‌های سریع", "footer_links_who_we_are": "ما که هستیم", "footer_links_contact": "تماس", - "footer_copyright": "کلیه حقوق محفوظ است © ۲۰۲۵", + "footer_copyright": "کلیه حقوق محفوظ است © {year}", "footer_links_address": "خیابان صنعتی ۱۲۳، واحد ۴۵۶، شهر، کشور", "com_home_story_title": "داستان ما", diff --git a/src/app/[...not_found]/layout.tsx b/src/app/[locale]/[...not_found]/layout.tsx similarity index 92% rename from src/app/[...not_found]/layout.tsx rename to src/app/[locale]/[...not_found]/layout.tsx index 569c61c..f8a6818 100644 --- a/src/app/[...not_found]/layout.tsx +++ b/src/app/[locale]/[...not_found]/layout.tsx @@ -20,7 +20,7 @@ export default async function ErrorLayout({ const fontClass = locale === 'fa' ? 'font-fa' : 'font-en'; let messages; try { - messages = (await import(`../../../messages/${locale}.json`)).default; + messages = (await import(`../../../../messages/${locale}.json`)).default; } catch (error) { notFound(); } diff --git a/src/app/[...not_found]/page.tsx b/src/app/[locale]/[...not_found]/page.tsx similarity index 100% rename from src/app/[...not_found]/page.tsx rename to src/app/[locale]/[...not_found]/page.tsx diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx index bf15173..1a9bcaa 100644 --- a/src/app/[locale]/layout.tsx +++ b/src/app/[locale]/layout.tsx @@ -27,7 +27,7 @@ export async function generateMetadata({ params }: { params: IPageParams }) { locale, url, }, - authors: [{ name: t('meta.author') }], + // authors: [{ name: t('meta.author') }], }; } diff --git a/src/components/layout/footer/Footer.tsx b/src/components/layout/footer/Footer.tsx index 4894683..7bfa8a8 100644 --- a/src/components/layout/footer/Footer.tsx +++ b/src/components/layout/footer/Footer.tsx @@ -21,7 +21,7 @@ export default function Footer() { const whoAreWeLinks = getWhoAreWeLinks(t, locale); return ( -
+
-

{t('footer_title')}

+

+ {t('footer_title')} +

{t('footer_description')}
@@ -77,7 +79,9 @@ export default function Footer() {
-

{t('footer_copyright')}

+

+ {t('footer_copyright', { year: new Date().getFullYear() })} +

diff --git a/src/components/layout/navbar/index.tsx b/src/components/layout/navbar/index.tsx index 7690ae3..815d16d 100644 --- a/src/components/layout/navbar/index.tsx +++ b/src/components/layout/navbar/index.tsx @@ -40,8 +40,8 @@ export default function Navbar() { return ( <> -