feat(projects): localize project titles

This commit is contained in:
poyrazavsever
2026-08-30 20:13:31 +03:00
parent ea8fcb9db4
commit 5dc68b2d5a
4 changed files with 31 additions and 11 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ export function HomeProjectsSection() {
<ProjectCardWithPopover
key={project.id}
image={project.image}
title={project.title}
title={getLocalizedValue(project.title, locale)}
description={getLocalizedValue(project.description, locale)}
badge={
project.badge
+1
View File
@@ -121,6 +121,7 @@ export async function ProjectsContent() {
const localizeItems = (items: ProjectItem[]): LocalizedProjectItem[] => {
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,
+21 -6
View File
@@ -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"],
+8 -4
View File
@@ -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),