feat: 更新翻译内容,添加关于服务和个人信息的多语言支持

This commit is contained in:
joyzhao
2026-01-08 22:04:09 +08:00
parent 4a4fd423b2
commit b425ac4708
3 changed files with 57 additions and 25 deletions

View File

@@ -32,7 +32,7 @@ const pageTitle = t('site.title');
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"></path>
</svg>
<span class="text-purple-500 font-mono text-lg">
Hello World! I'm
{t('hero.greeting')} {personalInfo.name}
</span>
</div>
@@ -72,8 +72,8 @@ const pageTitle = t('site.title');
<!-- Job availability notice -->
<div class="mb-8">
<p class="text-lg font-medium text-purple-500 mb-2">Looking for a Frontend/TS Full-stack Engineer (Remote)? Contact me!</p>
<p class="text-md text-muted-foreground">Exploring the freelance journey, striving to become a digital nomad</p>
<p class="text-lg font-medium text-purple-500 mb-2">{t('hero.lookingForJob')}</p>
<p class="text-md text-muted-foreground">{t('hero.digitalNomad')}</p>
</div>
<!-- Action buttons -->
@@ -85,7 +85,7 @@ const pageTitle = t('site.title');
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"></path>
</svg>
View Projects
{t('hero.viewProjects')}
</a>
<a
@@ -95,7 +95,7 @@ const pageTitle = t('site.title');
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 4.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"></path>
</svg>
Contact Me
{t('hero.contactMe')}
</a>
</div>
@@ -204,7 +204,7 @@ const pageTitle = t('site.title');
<section id="services" class="py-20 bg-gradient-to-br from-slate-50 to-blue-50 dark:from-slate-900 dark:to-slate-800">
<Container client:load>
<h2 class="text-4xl font-bold text-center mb-16 bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent">
Services I Offer
{t('services.title')}
</h2>
<div class="grid md:grid-cols-2 gap-8">
@@ -235,7 +235,7 @@ const pageTitle = t('site.title');
<svg class="h-5 w-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path>
</svg>
查看所有服务
{t('services.viewAll')}
</a>
</div>
</Container>
@@ -251,7 +251,7 @@ const pageTitle = t('site.title');
<!-- Section Title -->
<div class="flex items-center justify-center mb-6">
<h2 class="text-3xl md:text-4xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent">
About Me
{t('about.title')}
</h2>
</div>
@@ -263,10 +263,10 @@ const pageTitle = t('site.title');
<div>
<h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-6 flex items-center">
<span class="mr-2">👋</span>
About Me
{t('about.sectionTitle')}
</h3>
<div class="prose prose-lg dark:prose-invert max-w-none">
{personalInfo.about.en.map((paragraph) => (
{personalInfo.about[lang].map((paragraph) => (
<p class="text-gray-700 dark:text-gray-300 leading-relaxed">
{paragraph}
</p>
@@ -277,7 +277,7 @@ const pageTitle = t('site.title');
<svg class="h-5 w-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
了解更多关于我
{t('about.learnMore')}
</a>
</div>
</div>
@@ -326,7 +326,7 @@ const pageTitle = t('site.title');
<div class="bg-white/20 dark:bg-gray-800/50 backdrop-blur-sm border border-white/30 dark:border-gray-700/40 rounded-xl p-6 flex flex-col">
<h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-6 flex items-center">
<span class="mr-2">💻</span>
My Toolbox
{t('about.toolbox')}
</h3>
<div class="space-y-6 flex-1">

View File

@@ -32,7 +32,7 @@ const pageTitle = t('site.title');
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"></path>
</svg>
<span class="text-purple-500 font-mono text-lg">
你好世界!我是
{t('hero.greeting')} {personalInfo.name}
</span>
</div>
@@ -72,8 +72,8 @@ const pageTitle = t('site.title');
<!-- Job availability notice -->
<div class="mb-8">
<p class="text-lg font-medium text-purple-500 mb-2">如果你正在寻找一名前端/Ts全栈工程师远程工作请联系站长</p>
<p class="text-md text-muted-foreground">探索自由职业者之路,努力成为数字游民中的一员</p>
<p class="text-lg font-medium text-purple-500 mb-2">{t('hero.lookingForJob')}</p>
<p class="text-md text-muted-foreground">{t('hero.digitalNomad')}</p>
</div>
<!-- Action buttons -->
@@ -85,7 +85,7 @@ const pageTitle = t('site.title');
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"></path>
</svg>
查看项目
{t('hero.viewProjects')}
</a>
<a
@@ -95,7 +95,7 @@ const pageTitle = t('site.title');
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 4.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"></path>
</svg>
联系我
{t('hero.contactMe')}
</a>
</div>
@@ -204,7 +204,7 @@ const pageTitle = t('site.title');
<section id="services" class="py-20 px-4 bg-gradient-to-br from-slate-50 to-blue-50 dark:from-slate-900 dark:to-slate-800">
<Container client:load>
<h2 class="text-4xl font-bold text-center mb-16 bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent">
我提供的服务
{t('services.title')}
</h2>
<div class="grid md:grid-cols-2 gap-8">
@@ -235,7 +235,7 @@ const pageTitle = t('site.title');
<svg class="h-5 w-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path>
</svg>
查看所有服务
{t('services.viewAll')}
</a>
</div>
</Container>
@@ -251,7 +251,7 @@ const pageTitle = t('site.title');
<!-- Section Title -->
<div class="flex items-center justify-center mb-6">
<h2 class="text-3xl md:text-4xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent">
关于我
{t('about.title')}
</h2>
</div>
@@ -263,10 +263,10 @@ const pageTitle = t('site.title');
<div>
<h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-6 flex items-center">
<span class="mr-2">👋</span>
关于我
{t('about.sectionTitle')}
</h3>
<div class="prose prose-lg dark:prose-invert max-w-none">
{personalInfo.about.zh.map((paragraph) => (
{personalInfo.about[lang].map((paragraph) => (
<p class="text-gray-700 dark:text-gray-300 leading-relaxed">
{paragraph}
</p>
@@ -278,7 +278,7 @@ const pageTitle = t('site.title');
<svg class="h-5 w-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
了解更多关于我
{t('about.learnMore')}
</a>
</div>
</div>
@@ -327,7 +327,7 @@ const pageTitle = t('site.title');
<div class="bg-white/20 dark:bg-gray-800/50 backdrop-blur-sm border border-white/30 dark:border-gray-700/40 rounded-xl p-6 flex flex-col">
<h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-6 flex items-center">
<span class="mr-2">💻</span>
我的工具箱
{t('about.toolbox')}
</h3>
<div class="space-y-6 flex-1">