Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/[locale]/(app)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export async function generateMetadata({ params }: { params: Promise<{ locale: s
const { locale } = await params;

const isEnglish = locale === "en";
// OG images use "zh" for zh-CN (the file is default-og-image_zh.jpg)
const ogImageLocale = locale === "zh-CN" ? "zh" : locale;
const title = isEnglish ? "Build Your Perfect Workout" : "Créez Votre Entraînement Parfait";
const description = isEnglish
? "Create free workout routines with our comprehensive exercise database. Track your progress and achieve your fitness goals. 🏋️"
Expand All @@ -31,7 +33,7 @@ export async function generateMetadata({ params }: { params: Promise<{ locale: s
description,
images: [
{
url: `${getServerUrl()}/images/default-og-image_${locale}.jpg`,
url: `${getServerUrl()}/images/default-og-image_${ogImageLocale}.jpg`,
width: SiteConfig.seo.ogImage.width,
height: SiteConfig.seo.ogImage.height,
alt: title,
Expand All @@ -41,7 +43,7 @@ export async function generateMetadata({ params }: { params: Promise<{ locale: s
twitter: {
title: `${title} | ${SiteConfig.title}`,
description,
images: [`${getServerUrl()}/images/default-og-image_${locale}.jpg`],
images: [`${getServerUrl()}/images/default-og-image_${ogImageLocale}.jpg`],
},
};
}
Expand Down
4 changes: 2 additions & 2 deletions src/shared/lib/structured-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export function generateStructuredData({
: locale === "zh-CN"
? "最新更新包括改进的运动数据库和更好的用户体验"
: "La dernière mise à jour inclut une base de données d'exercices améliorée et une meilleure expérience utilisateur",
screenshot: image || `${baseUrl}/images/default-og-image_${locale}.jpg`,
screenshot: image || `${baseUrl}/images/default-og-image_${locale === "zh-CN" ? "zh" : locale}.jpg`,
aggregateRating: {
"@type": "AggregateRating",
ratingValue: "4.8",
Expand Down Expand Up @@ -247,7 +247,7 @@ export function generateStructuredData({
},
datePublished: datePublished || new Date().toISOString(),
dateModified: dateModified || new Date().toISOString(),
image: image || `${baseUrl}/images/default-og-image_${locale}.jpg`,
image: image || `${baseUrl}/images/default-og-image_${locale === "zh-CN" ? "zh" : locale}.jpg`,
mainEntityOfPage: {
"@type": "WebPage",
"@id": url,
Expand Down