dashboard欢迎页增加多语言支持

This commit is contained in:
jingrow 2025-12-29 16:32:41 +08:00
parent e824630632
commit bd80983bcd
5 changed files with 98 additions and 53 deletions

View File

@ -1,7 +1,7 @@
<template>
<Dialog
:options="{
title: '立即订阅',
title: $t('Subscribe Now'),
size: '2xl'
}"
v-model="showDialog"
@ -9,7 +9,7 @@
<template v-slot:body-content>
<div class="border-0">
<p class="text-base text-gray-800">
您距离创建第一个网站仅几步之遥
{{ $t('You are just a few steps away from creating your first website.') }}
</p>
<div class="mt-6 space-y-6">
<!-- 第一步选择计划 -->
@ -17,7 +17,7 @@
<div v-if="step == 1">
<div class="flex items-center space-x-2">
<TextInsideCircle>1</TextInsideCircle>
<span class="text-base font-medium"> 选择网站计划 </span>
<span class="text-base font-medium">{{ $t('Select Website Plan') }}</span>
</div>
<div class="pl-7">
<SitePlansCards
@ -32,7 +32,7 @@
variant="solid"
@click="confirmPlan"
>
确认计划
{{ $t('Confirm Plan') }}
</Button>
</div>
</div>
@ -42,7 +42,7 @@
<div class="flex items-center space-x-2">
<TextInsideCircle>1</TextInsideCircle>
<span class="text-base font-medium">
已选择网站计划 ({{ selectedPlan.name }})
{{ $t('Website Plan Selected ({name})', { name: selectedPlan.name }) }}
</span>
</div>
<div
@ -62,7 +62,7 @@
<div class="flex items-center space-x-2">
<TextInsideCircle>2</TextInsideCircle>
<span class="text-base font-medium">
更新账单信息
{{ $t('Update Billing Information') }}
</span>
</div>
<div class="pl-7" v-if="step == 2">
@ -76,7 +76,7 @@
<div class="flex items-center space-x-2">
<TextInsideCircle>2</TextInsideCircle>
<span class="text-base font-medium">
账单信息已更新
{{ $t('Billing Information Updated') }}
</span>
</div>
<div
@ -95,7 +95,7 @@
<div v-if="step <= 3">
<div class="flex items-center space-x-2">
<TextInsideCircle>3</TextInsideCircle>
<span class="text-base font-medium"> 添加支付方式 </span>
<span class="text-base font-medium">{{ $t('Add Payment Method') }}</span>
</div>
<div class="mt-4 pl-7" v-if="step == 3">
@ -110,7 +110,7 @@
}"
@click="isAutomatedBilling = true"
>
自动扣款
{{ $t('Automated Billing') }}
</div>
<div
class="w-1/2 cursor-pointer rounded-sm py-1.5 text-center transition-all"
@ -119,7 +119,7 @@
}"
@click="isAutomatedBilling = false"
>
充值
{{ $t('Recharge') }}
</div>
</div>
<div class="mt-2 w-full">
@ -151,13 +151,13 @@
class="text-base font-medium"
v-if="$team.pg.payment_mode === 'Card'"
>
自动计费设置已完成
{{ $t('Automated Billing Setup Completed') }}
</span>
<span
class="text-base font-medium"
v-if="$team.pg.payment_mode === 'Prepaid Credits'"
>
余额支付已开通
{{ $t('Prepaid Credits Payment Enabled') }}
</span>
</div>
<div
@ -170,7 +170,7 @@
class="mt-1.5 pl-7 text-p-base text-gray-800"
v-if="$team.pg.payment_mode === 'Prepaid Credits'"
>
账户余额: {{ $format.userCurrency($team.pg.balance) }}
{{ $t('Account Balance') }}: {{ $format.userCurrency($team.pg.balance) }}
</div>
</div>
</div>
@ -184,7 +184,7 @@
<div class="flex items-center space-x-2">
<TextInsideCircle>4</TextInsideCircle>
<div class="text-base font-medium">
订阅确认
{{ $t('Subscription Confirmation') }}
</div>
</div>
</div>
@ -193,12 +193,12 @@
<div class="flex items-center justify-between space-x-2">
<div class="flex items-center space-x-2">
<TextInsideCircle>4</TextInsideCircle>
<div class="text-base font-medium">正在更新站点计划</div>
<div class="text-base font-medium">{{ $t('Updating Site Plan') }}</div>
</div>
</div>
<div class="mt-3 pl-7">
<Button :loading="true" loadingText="正在更新站点计划...">
站点计划已更新
<Button :loading="true" :loadingText="$t('Updating site plan...')">
{{ $t('Site Plan Updated') }}
</Button>
</div>
</div>
@ -207,7 +207,7 @@
<div class="flex items-center space-x-2">
<TextInsideCircle>4</TextInsideCircle>
<span class="text-base font-medium">
🎉 订阅已确认
🎉 {{ $t('Subscription Confirmed') }}
</span>
</div>
<div
@ -219,8 +219,8 @@
<div class="mt-1.5 pl-7">
<div class="flex items-center space-x-2">
<span class="text-p-base text-gray-800">
您的订阅已确认<br />
如果您的任何站点已被禁用它很快就会重新启用
{{ $t('Your subscription has been confirmed.') }}<br />
{{ $t('If any of your sites have been disabled, they will be re-enabled soon.') }}
</span>
</div>
<div class="flex w-full justify-end">
@ -230,7 +230,7 @@
iconRight="arrow-right"
@click="showDialog = false"
>
返回仪表板
{{ $t('Return to Dashboard') }}
</Button>
</div>
</div>
@ -293,7 +293,7 @@ SitePlansCards: defineAsyncComponent(() => import('./SitePlansCards.vue')),
methods: {
confirmPlan() {
if (!this.selectedPlan) {
toast.error('请选择一个计划');
toast.error(this.$t('Please select a plan'));
return;
}
this.step = 2;
@ -338,7 +338,7 @@ SitePlansCards: defineAsyncComponent(() => import('./SitePlansCards.vue')),
},
onError: () => {
this.isChangingPlan = false;
toast.error('更改计划失败,请稍后重试。');
toast.error(this.$t('Failed to change plan, please try again later.'));
this.showDialog = false;
}
});

View File

@ -39,7 +39,7 @@ export default {
return [
{
name: '欢迎',
name: this.$t('Welcome'),
icon: () => h(DoorOpen),
route: '/welcome',
isActive: routeName === 'Welcome',
@ -100,7 +100,7 @@ export default {
disabled: enforce2FA,
},
{
name: 'Jingrow服务器',
name: this.$t('Jingrow Servers'),
icon: () => h(Server),
route: '/servers',
isActive:
@ -110,7 +110,7 @@ export default {
disabled: enforce2FA,
},
{
name: '域名',
name: this.$t('Domain'),
icon: () => h(Globe),
route: '/domains',
isActive:
@ -119,7 +119,7 @@ export default {
disabled: enforce2FA,
},
{
name: '服务器',
name: this.$t('Servers'),
icon: () => h(Server),
route: '/jsite-servers',
isActive:
@ -138,26 +138,26 @@ export default {
disabled: enforce2FA,
},
{
name: '开发工具',
name: this.$t('Developer Tools'),
icon: () => h(Code),
route: '/devtools',
condition: onboardingComplete && !isSaasUser && this.$team.pg.is_developer && this.$team.pg.is_pro,
disabled: enforce2FA,
children: [
{
name: 'SQL 实验室',
name: this.$t('SQL Playground'),
icon: () => h(DatabaseZap),
route: '/sql-playground',
isActive: routeName === 'SQL Playground',
},
{
name: '日志浏览器',
name: this.$t('Log Browser'),
icon: () => h(Logs),
route: '/log-browser',
isActive: routeName === 'Log Browser',
},
{
name: '数据库分析器',
name: this.$t('Database Analyzer'),
icon: () => h(Activity),
route: '/database-analyzer',
isActive: routeName === 'DB Analyzer',
@ -169,7 +169,7 @@ export default {
disabled: enforce2FA,
},
{
name: '充值',
name: this.$t('Recharge'),
icon: () => h(CreditCard),
route: '/recharge',
isActive: routeName.startsWith('RechargeCredits'),
@ -187,7 +187,7 @@ export default {
disabled: enforce2FA,
},
{
name: '合作伙伴门户',
name: this.$t('Partner Portal'),
icon: () => h(Globe),
route: '/partners',
isActive: routeName.startsWith('Partner'),

View File

@ -1,13 +1,13 @@
<template>
<div class="mx-auto max-w-2xl rounded-lg border-0 px-2 sm:border sm:p-8">
<div class="prose prose-sm max-w-none">
<h1 class="text-2xl font-semibold">欢迎来到 今果 Jingrow</h1>
<h1 class="text-2xl font-semibold">{{ $t('Welcome to Jingrow') }}</h1>
<p>
Jingrow是一站式通用数字化平台"一切皆页面"的革新理念帮助您快速构建从个人工作到团队协作的一站式数字化解决方案通过AI Agent智能体可视化工作流编排零代码可视化数据建模自动化任务团队协作角色与权限管理文件库知识库笔记会议待办事项通知智能报表等模块引领数字化协作新趋势
{{ $t('Jingrow is a one-stop universal digital platform that helps you quickly build comprehensive digital solutions from personal work to team collaboration through innovative concepts like "Everything is a Page". Through modules such as AI Agent, visual workflow orchestration, zero-code visual data modeling, automated tasks, team collaboration, role and permission management, file library, knowledge base, notes, meetings, to-do items, notifications, and intelligent reports, leading the new trend of digital collaboration.') }}
</p>
</div>
<p class="mt-6 text-base text-gray-800">
从这里开始让一切数字化系统化智能化自动化
{{ $t('Start here to make everything digital, systematic, intelligent, and automated.') }}
</p>
<div class="mt-6 space-y-6">
<!-- 步骤 1 - 账户已创建 -->
@ -16,7 +16,7 @@
<div class="flex items-center justify-between space-x-2">
<div class="flex items-center space-x-2">
<TextInsideCircle>1</TextInsideCircle>
<span class="text-base font-medium"> 账户已创建 </span>
<span class="text-base font-medium">{{ $t('Account Created') }}</span>
</div>
<div
class="grid h-4 w-4 place-items-center rounded-full bg-green-500/90"
@ -32,7 +32,7 @@
<div v-if="!$team.pg.payment_mode">
<div class="flex items-center space-x-2">
<TextInsideCircle>2</TextInsideCircle>
<span class="text-base font-medium"> 余额充值 </span>
<span class="text-base font-medium">{{ $t('Account Recharge') }}</span>
</div>
<div class="mt-4 pl-7">
@ -55,13 +55,13 @@
class="text-base font-medium"
v-if="$team.pg.payment_mode === 'Card'"
>
自动扣费设置已完成
{{ $t('Automated Billing Setup Completed') }}
</span>
<span
class="text-base font-medium"
v-if="$team.pg.payment_mode === 'Prepaid Credits'"
>
余额支付已开通
{{ $t('Prepaid Credits Payment Enabled') }}
</span>
</div>
<div
@ -74,7 +74,7 @@
class="mt-1.5 pl-7 text-p-base text-gray-800"
v-if="$team.pg.payment_mode === 'Prepaid Credits'"
>
账户余额: {{ $format.userCurrency($team.pg.balance) }}
{{ $t('Account Balance') }}: {{ $format.userCurrency($team.pg.balance) }}
</div>
</div>
</div>
@ -88,22 +88,22 @@
class="text-base font-medium"
v-if="pendingSiteRequest.status == 'Error'"
>
创建您的 {{ pendingSiteRequest.title }} 试用站点时出错
{{ $t('Error creating your {title} trial site', { title: pendingSiteRequest.title }) }}
</span>
<span class="text-base font-medium" v-else>
创建您的 {{ pendingSiteRequest.title }} 试用站点
{{ $t('Create your {title} trial site', { title: pendingSiteRequest.title }) }}
</span>
</div>
</div>
<div class="mt-2 pl-7" v-if="pendingSiteRequest.status == 'Error'">
<p class="mt-2 text-p-base text-gray-800">
请点击下方按钮联系 今果 Jingrow支持团队
{{ $t('Please click the button below to contact Jingrow support team.') }}
</p>
<Button class="mt-2" link="/support"> 联系支持 </Button>
<Button class="mt-2" link="/support">{{ $t('Contact Support') }}</Button>
</div>
<div class="mt-2 pl-7" v-else>
<p class="mt-2 text-p-base text-gray-800">
您可以点击下方按钮免费试用 {{ pendingSiteRequest.title }} 应用程序
{{ $t('You can click the button below to try the {title} application for free.', { title: pendingSiteRequest.title }) }}
</p>
<Button
class="mt-2"
@ -115,7 +115,7 @@
},
}"
>
继续
{{ $t('Continue') }}
</Button>
</div>
</div>
@ -124,7 +124,7 @@
<div class="flex items-center space-x-2">
<TextInsideCircle>3</TextInsideCircle>
<span class="text-base font-medium">
您的试用站点已准备就绪
{{ $t('Your trial site is ready') }}
</span>
</div>
<div
@ -145,21 +145,21 @@
</a>
</div>
<p class="mt-2 text-p-base text-gray-800">
您的试用将于
{{ $t('Your trial will expire on') }}
<span class="font-medium">
{{ $format.date(trialSite.trial_end_date, 'LL') }} </span
> 到期立即设置账单以确保您的站点访问不受影响
>. {{ $t('Set up billing now to ensure your site access is not affected.') }}
</p>
</div>
</div>
<div v-else class="rounded-md">
<div class="flex items-center space-x-2">
<TextInsideCircle>3</TextInsideCircle>
<div class="text-base font-medium">创建您的第一个数字化平台</div>
<div class="text-base font-medium">{{ $t('Create your first digital platform') }}</div>
</div>
<Button class="ml-7 mt-4" :route="'/sites/new'">
创建
{{ $t('Create') }}
</Button>
</div>
</div>

View File

@ -11,7 +11,7 @@ import { sentryVitePlugin } from '@sentry/vite-plugin';
import vitePluginTranslate from './vite-plugin-translate.mjs';
// 语言配置:设置目标语言,默认为 'en'(英文),可设置为 'zh'(中文)等
const locale = process.env.DASHBOARD_LOCALE || 'en';
const locale = process.env.DASHBOARD_LOCALE || 'zh';
export default defineConfig({
plugins: [

View File

@ -1030,3 +1030,48 @@ Failed to enable two-factor authentication,启用双因素认证失败,
Disabling two-factor authentication...,正在禁用双因素认证...,
Two-factor authentication disabled successfully,双因素认证已成功禁用,
Failed to disable two-factor authentication,禁用双因素认证失败,
Welcome to Jingrow,欢迎来到 今果 Jingrow,
Jingrow is a one-stop universal digital platform that helps you quickly build comprehensive digital solutions from personal work to team collaboration through innovative concepts like "Everything is a Page". Through modules such as AI Agent, visual workflow orchestration, zero-code visual data modeling, automated tasks, team collaboration, role and permission management, file library, knowledge base, notes, meetings, to-do items, notifications, and intelligent reports, leading the new trend of digital collaboration.,Jingrow是一站式通用数字化平台以"一切皆页面"的革新理念帮助您快速构建从个人工作到团队协作的一站式数字化解决方案。通过AI Agent智能体、可视化工作流编排、零代码可视化数据建模、自动化任务、团队协作、角色与权限管理、文件库、知识库、笔记会议待办事项通知、智能报表等模块引领数字化协作新趋势。,
Start here to make everything digital, systematic, intelligent, and automated.,从这里开始,让一切数字化、系统化、智能化、自动化。,
Account Created,账户已创建,
Automated Billing Setup Completed,自动扣费设置已完成,
Prepaid Credits Payment Enabled,余额支付已开通,
Error creating your {title} trial site,创建您的 {title} 试用站点时出错,
Create your {title} trial site,创建您的 {title} 试用站点,
Please click the button below to contact Jingrow support team.,请点击下方按钮联系 今果 Jingrow支持团队。,
Contact Support,联系支持,
You can click the button below to try the {title} application for free.,您可以点击下方按钮免费试用 {title} 应用程序。,
Continue,继续,
Your trial site is ready,您的试用站点已准备就绪,
Your trial will expire on,您的试用将于,
Set up billing now to ensure your site access is not affected.,立即设置账单以确保您的站点访问不受影响。,
Create your first digital platform,创建您的第一个数字化平台,
Subscribe Now,立即订阅,
You are just a few steps away from creating your first website.,您距离创建第一个网站仅几步之遥。,
Select Website Plan,选择网站计划,
Confirm Plan,确认计划,
Website Plan Selected ({name}),已选择网站计划 ({name}),
Update Billing Information,更新账单信息,
Billing Information Updated,账单信息已更新,
Add Payment Method,添加支付方式,
Automated Billing,自动扣款,
Subscription Confirmation,订阅确认,
Updating Site Plan,正在更新站点计划,
Updating site plan...,正在更新站点计划...,
Site Plan Updated,站点计划已更新,
Subscription Confirmed,订阅已确认,
Your subscription has been confirmed.,您的订阅已确认。,
If any of your sites have been disabled, they will be re-enabled soon.,如果您的任何站点已被禁用,它很快就会重新启用。,
Return to Dashboard,返回仪表板,
Please select a plan,请选择一个计划,
Failed to change plan, please try again later.,更改计划失败,请稍后重试。,
Welcome,欢迎,
Jingrow Servers,Jingrow服务器,
Domain,域名,
Servers,服务器,
Developer Tools,开发工具,
SQL Playground,SQL 实验室,
Log Browser,日志浏览器,
Database Analyzer,数据库分析器,
Recharge,充值,
Partner Portal,合作伙伴门户,

Can't render this file because it has a wrong number of fields in line 390.