feat(projects): localize project titles
This commit is contained in:
@@ -47,7 +47,7 @@ export function HomeProjectsSection() {
|
|||||||
<ProjectCardWithPopover
|
<ProjectCardWithPopover
|
||||||
key={project.id}
|
key={project.id}
|
||||||
image={project.image}
|
image={project.image}
|
||||||
title={project.title}
|
title={getLocalizedValue(project.title, locale)}
|
||||||
description={getLocalizedValue(project.description, locale)}
|
description={getLocalizedValue(project.description, locale)}
|
||||||
badge={
|
badge={
|
||||||
project.badge
|
project.badge
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ export async function ProjectsContent() {
|
|||||||
const localizeItems = (items: ProjectItem[]): LocalizedProjectItem[] => {
|
const localizeItems = (items: ProjectItem[]): LocalizedProjectItem[] => {
|
||||||
return items.map((item) => ({
|
return items.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
|
title: getLocalizedValue(item.title, locale),
|
||||||
description: getLocalizedValue(item.description, locale),
|
description: getLocalizedValue(item.description, locale),
|
||||||
architecture: getLocalizedValue(item.architecture, locale),
|
architecture: getLocalizedValue(item.architecture, locale),
|
||||||
badge: item.badge ? getLocalizedValue(item.badge, locale) : undefined,
|
badge: item.badge ? getLocalizedValue(item.badge, locale) : undefined,
|
||||||
|
|||||||
+21
-6
@@ -1,6 +1,9 @@
|
|||||||
export type ProjectItem = {
|
export type ProjectItem = {
|
||||||
id: string;
|
id: string;
|
||||||
title: string;
|
title: {
|
||||||
|
tr: string;
|
||||||
|
en: string;
|
||||||
|
} | string;
|
||||||
description: {
|
description: {
|
||||||
tr: string;
|
tr: string;
|
||||||
en: string;
|
en: string;
|
||||||
@@ -48,7 +51,10 @@ const OSTIM_TECHNOLOGIES = [
|
|||||||
export const WEB_APPS: ProjectItem[] = [
|
export const WEB_APPS: ProjectItem[] = [
|
||||||
{
|
{
|
||||||
id: "ostim-web-portal",
|
id: "ostim-web-portal",
|
||||||
title: "OSTİM Web Portalı",
|
title: {
|
||||||
|
tr: "OSTİM Web Portalı",
|
||||||
|
en: "OSTİM Web Portal",
|
||||||
|
},
|
||||||
badge: {
|
badge: {
|
||||||
tr: "Kurumsal Portal",
|
tr: "Kurumsal Portal",
|
||||||
en: "Corporate Portal",
|
en: "Corporate Portal",
|
||||||
@@ -66,7 +72,10 @@ export const WEB_APPS: ProjectItem[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "ostim-employment",
|
id: "ostim-employment",
|
||||||
title: "OSTİM İstihdam",
|
title: {
|
||||||
|
tr: "OSTİM İstihdam",
|
||||||
|
en: "OSTİM Employment",
|
||||||
|
},
|
||||||
badge: {
|
badge: {
|
||||||
tr: "İstihdam Portalı",
|
tr: "İstihdam Portalı",
|
||||||
en: "Employment Portal",
|
en: "Employment Portal",
|
||||||
@@ -84,7 +93,10 @@ export const WEB_APPS: ProjectItem[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "ostim-foreign-trade",
|
id: "ostim-foreign-trade",
|
||||||
title: "OSTİM Dış Ticaret",
|
title: {
|
||||||
|
tr: "OSTİM Dış Ticaret",
|
||||||
|
en: "OSTİM Foreign Trade",
|
||||||
|
},
|
||||||
badge: {
|
badge: {
|
||||||
tr: "Dış Ticaret Portalı",
|
tr: "Dış Ticaret Portalı",
|
||||||
en: "Foreign Trade Portal",
|
en: "Foreign Trade Portal",
|
||||||
@@ -121,7 +133,10 @@ export const WEB_APPS: ProjectItem[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "ataturk-chronology",
|
id: "ataturk-chronology",
|
||||||
title: "Atatürk Kronolojisi",
|
title: {
|
||||||
|
tr: "Atatürk Kronolojisi",
|
||||||
|
en: "Atatürk Chronology",
|
||||||
|
},
|
||||||
badge: {
|
badge: {
|
||||||
tr: "Açık Kaynak",
|
tr: "Açık Kaynak",
|
||||||
en: "Open Source",
|
en: "Open Source",
|
||||||
@@ -241,7 +256,7 @@ export const EXTENSIONS: ProjectItem[] = [
|
|||||||
export const FIGMA_TEMPLATES: ProjectItem[] = [
|
export const FIGMA_TEMPLATES: ProjectItem[] = [
|
||||||
{
|
{
|
||||||
id: "hsd-website",
|
id: "hsd-website",
|
||||||
title: "HSD Community Web Site",
|
title: "HSD Community Website",
|
||||||
badge: "Figma",
|
badge: "Figma",
|
||||||
image: "/projects/hsd.png",
|
image: "/projects/hsd.png",
|
||||||
technologies: ["Figma"],
|
technologies: ["Figma"],
|
||||||
|
|||||||
@@ -217,11 +217,12 @@ export function getCommandPaletteGroups(
|
|||||||
|
|
||||||
const projectItems: CommandPaletteItem[] = [
|
const projectItems: CommandPaletteItem[] = [
|
||||||
...MOBILE_APPS.map((item) => {
|
...MOBILE_APPS.map((item) => {
|
||||||
|
const title = getLocalizedValue(item.title, locale);
|
||||||
const description = getLocalizedValue(item.description, locale);
|
const description = getLocalizedValue(item.description, locale);
|
||||||
const badgeStr = item.badge ? getLocalizedValue(item.badge, locale) : "";
|
const badgeStr = item.badge ? getLocalizedValue(item.badge, locale) : "";
|
||||||
return {
|
return {
|
||||||
id: `mobile-project-${item.id}`,
|
id: `mobile-project-${item.id}`,
|
||||||
label: item.title,
|
label: title,
|
||||||
href: "/projects",
|
href: "/projects",
|
||||||
icon: "mdi:cellphone",
|
icon: "mdi:cellphone",
|
||||||
keywords: [
|
keywords: [
|
||||||
@@ -233,11 +234,12 @@ export function getCommandPaletteGroups(
|
|||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
...WEB_APPS.map((item) => {
|
...WEB_APPS.map((item) => {
|
||||||
|
const title = getLocalizedValue(item.title, locale);
|
||||||
const description = getLocalizedValue(item.description, locale);
|
const description = getLocalizedValue(item.description, locale);
|
||||||
const badgeStr = item.badge ? getLocalizedValue(item.badge, locale) : "";
|
const badgeStr = item.badge ? getLocalizedValue(item.badge, locale) : "";
|
||||||
return {
|
return {
|
||||||
id: `web-project-${item.id}`,
|
id: `web-project-${item.id}`,
|
||||||
label: item.title,
|
label: title,
|
||||||
href: item.href ?? "/projects",
|
href: item.href ?? "/projects",
|
||||||
icon: "mdi:web",
|
icon: "mdi:web",
|
||||||
external: Boolean(item.href),
|
external: Boolean(item.href),
|
||||||
@@ -250,11 +252,12 @@ export function getCommandPaletteGroups(
|
|||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
...EXTENSIONS.map((item) => {
|
...EXTENSIONS.map((item) => {
|
||||||
|
const title = getLocalizedValue(item.title, locale);
|
||||||
const description = getLocalizedValue(item.description, locale);
|
const description = getLocalizedValue(item.description, locale);
|
||||||
const badgeStr = item.badge ? getLocalizedValue(item.badge, locale) : "";
|
const badgeStr = item.badge ? getLocalizedValue(item.badge, locale) : "";
|
||||||
return {
|
return {
|
||||||
id: `extension-project-${item.id}`,
|
id: `extension-project-${item.id}`,
|
||||||
label: item.title,
|
label: title,
|
||||||
href: item.href ?? "/projects",
|
href: item.href ?? "/projects",
|
||||||
icon: "mdi:puzzle-outline",
|
icon: "mdi:puzzle-outline",
|
||||||
external: Boolean(item.href),
|
external: Boolean(item.href),
|
||||||
@@ -268,11 +271,12 @@ export function getCommandPaletteGroups(
|
|||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
...FIGMA_TEMPLATES.map((item) => {
|
...FIGMA_TEMPLATES.map((item) => {
|
||||||
|
const title = getLocalizedValue(item.title, locale);
|
||||||
const description = getLocalizedValue(item.description, locale);
|
const description = getLocalizedValue(item.description, locale);
|
||||||
const badgeStr = item.badge ? getLocalizedValue(item.badge, locale) : "";
|
const badgeStr = item.badge ? getLocalizedValue(item.badge, locale) : "";
|
||||||
return {
|
return {
|
||||||
id: `figma-project-${item.id}`,
|
id: `figma-project-${item.id}`,
|
||||||
label: item.title,
|
label: title,
|
||||||
href: item.href ?? "/projects",
|
href: item.href ?? "/projects",
|
||||||
icon: "mdi:figma",
|
icon: "mdi:figma",
|
||||||
external: Boolean(item.href),
|
external: Boolean(item.href),
|
||||||
|
|||||||
Reference in New Issue
Block a user