From 5dc68b2d5a63f6892700c19cfdbc573029cf2b1b Mon Sep 17 00:00:00 2001 From: poyrazavsever Date: Sun, 30 Aug 2026 20:13:31 +0300 Subject: [PATCH] feat(projects): localize project titles --- components/home-projects-section.tsx | 2 +- components/projects-content.tsx | 1 + data/projects.ts | 27 +++++++++++++++++++++------ lib/command-palette-links.ts | 12 ++++++++---- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/components/home-projects-section.tsx b/components/home-projects-section.tsx index 760c043..45db64f 100644 --- a/components/home-projects-section.tsx +++ b/components/home-projects-section.tsx @@ -47,7 +47,7 @@ export function HomeProjectsSection() { { return items.map((item) => ({ ...item, + title: getLocalizedValue(item.title, locale), description: getLocalizedValue(item.description, locale), architecture: getLocalizedValue(item.architecture, locale), badge: item.badge ? getLocalizedValue(item.badge, locale) : undefined, diff --git a/data/projects.ts b/data/projects.ts index 2992321..df8427d 100644 --- a/data/projects.ts +++ b/data/projects.ts @@ -1,6 +1,9 @@ export type ProjectItem = { id: string; - title: string; + title: { + tr: string; + en: string; + } | string; description: { tr: string; en: string; @@ -48,7 +51,10 @@ const OSTIM_TECHNOLOGIES = [ export const WEB_APPS: ProjectItem[] = [ { id: "ostim-web-portal", - title: "OSTİM Web Portalı", + title: { + tr: "OSTİM Web Portalı", + en: "OSTİM Web Portal", + }, badge: { tr: "Kurumsal Portal", en: "Corporate Portal", @@ -66,7 +72,10 @@ export const WEB_APPS: ProjectItem[] = [ }, { id: "ostim-employment", - title: "OSTİM İstihdam", + title: { + tr: "OSTİM İstihdam", + en: "OSTİM Employment", + }, badge: { tr: "İstihdam Portalı", en: "Employment Portal", @@ -84,7 +93,10 @@ export const WEB_APPS: ProjectItem[] = [ }, { id: "ostim-foreign-trade", - title: "OSTİM Dış Ticaret", + title: { + tr: "OSTİM Dış Ticaret", + en: "OSTİM Foreign Trade", + }, badge: { tr: "Dış Ticaret Portalı", en: "Foreign Trade Portal", @@ -121,7 +133,10 @@ export const WEB_APPS: ProjectItem[] = [ }, { id: "ataturk-chronology", - title: "Atatürk Kronolojisi", + title: { + tr: "Atatürk Kronolojisi", + en: "Atatürk Chronology", + }, badge: { tr: "Açık Kaynak", en: "Open Source", @@ -241,7 +256,7 @@ export const EXTENSIONS: ProjectItem[] = [ export const FIGMA_TEMPLATES: ProjectItem[] = [ { id: "hsd-website", - title: "HSD Community Web Site", + title: "HSD Community Website", badge: "Figma", image: "/projects/hsd.png", technologies: ["Figma"], diff --git a/lib/command-palette-links.ts b/lib/command-palette-links.ts index c9bacd5..5052697 100644 --- a/lib/command-palette-links.ts +++ b/lib/command-palette-links.ts @@ -217,11 +217,12 @@ export function getCommandPaletteGroups( const projectItems: CommandPaletteItem[] = [ ...MOBILE_APPS.map((item) => { + const title = getLocalizedValue(item.title, locale); const description = getLocalizedValue(item.description, locale); const badgeStr = item.badge ? getLocalizedValue(item.badge, locale) : ""; return { id: `mobile-project-${item.id}`, - label: item.title, + label: title, href: "/projects", icon: "mdi:cellphone", keywords: [ @@ -233,11 +234,12 @@ export function getCommandPaletteGroups( }; }), ...WEB_APPS.map((item) => { + const title = getLocalizedValue(item.title, locale); const description = getLocalizedValue(item.description, locale); const badgeStr = item.badge ? getLocalizedValue(item.badge, locale) : ""; return { id: `web-project-${item.id}`, - label: item.title, + label: title, href: item.href ?? "/projects", icon: "mdi:web", external: Boolean(item.href), @@ -250,11 +252,12 @@ export function getCommandPaletteGroups( }; }), ...EXTENSIONS.map((item) => { + const title = getLocalizedValue(item.title, locale); const description = getLocalizedValue(item.description, locale); const badgeStr = item.badge ? getLocalizedValue(item.badge, locale) : ""; return { id: `extension-project-${item.id}`, - label: item.title, + label: title, href: item.href ?? "/projects", icon: "mdi:puzzle-outline", external: Boolean(item.href), @@ -268,11 +271,12 @@ export function getCommandPaletteGroups( }; }), ...FIGMA_TEMPLATES.map((item) => { + const title = getLocalizedValue(item.title, locale); const description = getLocalizedValue(item.description, locale); const badgeStr = item.badge ? getLocalizedValue(item.badge, locale) : ""; return { id: `figma-project-${item.id}`, - label: item.title, + label: title, href: item.href ?? "/projects", icon: "mdi:figma", external: Boolean(item.href),