feat(frontend): add next-intl bilingual i18n for core paths

Wire next-intl without locale routes, add zh-CN/en catalogs, language
switcher, and migrate layout/auth/settings UI copy. Document i18n rules
in AGENTS.md and keep static export builds working.
This commit is contained in:
ryan
2026-07-24 16:25:41 +08:00
parent 9c1369186f
commit 1625cfb2fb
23 changed files with 1638 additions and 355 deletions
+223
View File
@@ -0,0 +1,223 @@
{
"common": {
"save": "Save",
"cancel": "Cancel",
"confirm": "Confirm",
"delete": "Delete",
"loading": "Loading...",
"retry": "Retry",
"optional": "(optional)",
"settings": "Settings",
"search": "Search",
"unknownError": "Something went wrong. Please try again."
},
"layout": {
"nav": {
"home": "Home",
"myFiles": "My Files",
"users": "Users",
"tasks": "Tasks",
"storage": "Storage",
"database": "Database",
"push": "Notifications",
"logs": "System Logs",
"system": "System Config",
"adminSettings": "System Settings",
"demo": "Demo",
"apiDocs": "API Docs",
"usageDocs": "User Guide"
},
"groups": {
"admin": "Admin",
"docs": "Docs"
},
"user": {
"adminRole": "Administrator",
"userRole": "User",
"notLoggedIn": "Not signed in",
"syncing": "Syncing account",
"profile": "My Profile",
"settings": "Settings",
"help": "Help",
"logout": "Sign out"
},
"logoutDialog": {
"title": "Sign out",
"description": "Are you sure you want to sign out?",
"loggingOut": "Signing out…",
"confirm": "Sign out",
"inProgress": "Signing out…",
"failed": "Sign-out failed",
"failedDescription": "An error occurred while signing out. Please try again."
},
"header": {
"notifications": "Notifications",
"settings": "Settings",
"search": "Search",
"toggleFullWidth": "Toggle full width",
"toggleTheme": "Toggle theme",
"changePasswordBanner": "For your account security, please change your password now.",
"changePasswordAction": "Change password",
"bannerTitle": "Announcement",
"bannerLink": "Learn more",
"dismiss": "Dismiss"
}
},
"auth": {
"login": {
"title": "Sign in to your account",
"description": "Welcome back. Enter your credentials to continue.",
"username": "Email or username",
"usernamePlaceholder": "Enter email or username",
"password": "Password",
"passwordPlaceholder": "Enter your password",
"showPassword": "Show password",
"hidePassword": "Hide password",
"submit": "Sign in",
"submitting": "Signing in…",
"success": "Signed in successfully",
"failed": "Sign-in failed. Please try again.",
"incomplete": "Email/username or password is incomplete",
"incompleteDesc": "Please enter both email/username and password before signing in",
"capPending": "Human verification is still running…",
"capRequired": "Please complete human verification first",
"orUse": "Or continue with",
"oauthLogin": "Sign in with {name}",
"oauthFailed": "Third-party sign-in failed",
"noAccount": "Don't have an account?",
"registerNow": "Register",
"codeSent": "A sign-in code was sent to your email",
"codeTipMasked": "A sign-in code was sent to your secure email {email}.",
"codeTipGeneric": "Please enter your sign-in verification code."
},
"otp": {
"title": "Verify your sign-in",
"description": "Enter the 6-digit code sent to your secure email.",
"code": "Verification code",
"resend": "Resend",
"resendIn": "Resend in {seconds}s",
"submit": "Verify",
"submitting": "Verifying…",
"help": "Having trouble signing in?",
"contactSupport": "Contact support"
},
"register": {
"title": "Create your account",
"description": "Fill in the details below to get started.",
"username": "Username",
"usernamePlaceholder": "Enter username",
"nickname": "Nickname",
"nicknamePlaceholder": "Enter nickname",
"email": "Email",
"emailPlaceholder": "Enter email",
"password": "Password",
"passwordPlaceholder": "Enter password (at least 8 characters)",
"emailCode": "Email verification code",
"emailCodePlaceholder": "Enter 6-digit code",
"getCode": "Get code",
"resendIn": "Resend in {seconds}s",
"submit": "Create account",
"submitting": "Creating…",
"success": "Registered and signed in",
"failed": "Registration failed. Please try again.",
"closed": "Registration is currently disabled",
"codeSent": "Verification code sent to your email",
"sendCodeFailed": "Failed to send verification code",
"emailRequired": "Please enter an email address first",
"emailInvalid": "Please enter a valid email address",
"usernamePasswordRequired": "Username and password are required",
"passwordTooShort": "Password must be at least 8 characters",
"emailEmpty": "Email is required",
"codeRequired": "Verification code is required",
"capPending": "Human verification is still running…",
"capRequired": "Please complete human verification first",
"hasAccount": "Already have an account?",
"backToLogin": "Back to sign in"
}
},
"settings": {
"title": "Settings",
"categories": {
"personal": "Personal",
"account": "Account"
},
"items": {
"profile": "Profile",
"profileDesc": "View your account information",
"accessToken": "Access tokens",
"accessTokenDesc": "Manage personal tokens for API access",
"notifications": "Notifications",
"notificationsDesc": "Manage your notification preferences",
"appearance": "Appearance",
"appearanceDesc": "Customize theme and display"
},
"appearance": {
"breadcrumb": "Appearance",
"themeMode": "Theme mode",
"themeModeDesc": "Choose the overall light or dark theme",
"modeLight": "Light",
"modeDark": "Dark",
"modeSystem": "System",
"interface": "Interface",
"interfaceDesc": "Choose color scheme and visual style",
"switched": "Appearance switched to {name}",
"switchFailed": "Failed to switch appearance",
"language": "Language",
"languageDesc": "Choose the interface language",
"comingSoon": "Coming soon",
"comingSoonBody": "More customization options are on the way…"
},
"notifications": {
"breadcrumb": "Notifications",
"display": "Notification display",
"displayDesc": "Configure notification-related display options",
"showBell": "Show notification bell",
"showBellDesc": "Show the notification bell in the top navigation bar"
},
"accessToken": {
"breadcrumb": "Access tokens",
"title": "Personal access tokens",
"generate": "Generate token",
"securityTitle": "Security note:",
"securityBody": "Access tokens have full API permissions for your account. Never share them via source control, chat, or public channels. Create tokens on demand and revoke unused ones promptly.",
"listTitle": "Active tokens",
"listDesc": "All currently available access tokens",
"userToken": "User token",
"empty": "You have not created any access tokens yet",
"generateFirst": "Generate your first token",
"createTitle": "Generate token",
"createDesc": "Give the token a recognizable name for easier management later.",
"name": "Token name",
"adminHint": "When enabled, this token can access /admin/** endpoints (off by default)",
"generateAction": "Generate",
"readyTitle": "Token secret is ready",
"readyBody": "This is the only time you can view the plaintext secret. Copy it now and store it securely.",
"nameRequired": "Please enter a token name",
"createSuccess": "Access token created",
"createFailed": "Failed to create access token",
"deleteSuccess": "Access token revoked",
"deleteFailed": "Failed to delete access token",
"rotateSuccess": "Access token rotated; the old secret is invalid",
"rotateFailed": "Failed to rotate access token",
"deleteConfirm": "Revoke token “{name}”? It will stop working immediately and cannot be recovered.",
"rotateConfirm": "Rotate the secret for token “{name}”? A new secret will be issued and the old one will stop working immediately.",
"subtitle": "Manage API access secrets for development or third-party tools",
"adminBadge": "Admin",
"adminPermission": "Admin permission",
"createdAt": "Created: {date}",
"copy": "Copy",
"rotate": "Rotate",
"revoke": "Revoke",
"copySuccess": "Copied",
"copyFailed": "Copy failed",
"namePlaceholder": "e.g. my-development-key",
"generating": "Generating…",
"importantTitle": "Important:",
"savedConfirm": "I have copied and stored it securely"
}
},
"metadata": {
"title": "Wavelet Platform",
"description": "A general-purpose platform scaffold for secondary development"
}
}
+223
View File
@@ -0,0 +1,223 @@
{
"common": {
"save": "保存",
"cancel": "取消",
"confirm": "确认",
"delete": "删除",
"loading": "加载中...",
"retry": "重试",
"optional": "(可选)",
"settings": "设置",
"search": "搜索",
"unknownError": "发生错误,请重试"
},
"layout": {
"nav": {
"home": "首页",
"myFiles": "我的文件",
"users": "用户管理",
"tasks": "任务管理",
"storage": "存储管理",
"database": "数据管理",
"push": "通知推送",
"logs": "系统日志",
"system": "系统配置",
"adminSettings": "系统设置",
"demo": "规范示例",
"apiDocs": "接口文档",
"usageDocs": "使用文档"
},
"groups": {
"admin": "管理",
"docs": "文档库"
},
"user": {
"adminRole": "系统管理员",
"userRole": "普通用户",
"notLoggedIn": "未登录",
"syncing": "正在同步账户",
"profile": "我的资料",
"settings": "设置",
"help": "使用帮助",
"logout": "退出登录"
},
"logoutDialog": {
"title": "确认登出",
"description": "您确定要登出当前账户吗?",
"loggingOut": "正在登出,请稍候...",
"confirm": "确认登出",
"inProgress": "登出中...",
"failed": "登出失败",
"failedDescription": "登出时发生错误,请重试"
},
"header": {
"notifications": "通知",
"settings": "设置",
"search": "搜索",
"toggleFullWidth": "切换全宽",
"toggleTheme": "主题切换",
"changePasswordBanner": "为了您的账号安全,请立即修改密码!",
"changePasswordAction": "去修改密码",
"bannerTitle": "最新通知",
"bannerLink": "查看详情",
"dismiss": "关闭"
}
},
"auth": {
"login": {
"title": "登录到您的账号",
"description": "欢迎回来,请输入您的账号信息继续。",
"username": "邮箱或用户名",
"usernamePlaceholder": "输入邮箱或用户名",
"password": "密码",
"passwordPlaceholder": "输入您的密码",
"showPassword": "显示密码",
"hidePassword": "隐藏密码",
"submit": "登录",
"submitting": "登录中...",
"success": "登录成功",
"failed": "登录失败,请重试",
"incomplete": "邮箱/用户名或密码未填写完整",
"incompleteDesc": "请先输入邮箱/用户名和密码后再登录",
"capPending": "人机验证尚未完成,请稍候…",
"capRequired": "请先点击「开始验证」完成人机验证",
"orUse": "或者使用",
"oauthLogin": "{name} 登录",
"oauthFailed": "第三方登录失败",
"noAccount": "还没有账号?",
"registerNow": "立即注册",
"codeSent": "登录验证码已发送至您的邮箱,请注意查收",
"codeTipMasked": "已向您的安全邮箱 {email} 发送了登录验证码。",
"codeTipGeneric": "请输入您的登录验证码。"
},
"otp": {
"title": "验证您的登录",
"description": "输入发送到安全邮箱的 6 位验证码。",
"code": "验证码",
"resend": "重新发送",
"resendIn": "{seconds}秒后重发",
"submit": "验证",
"submitting": "验证中...",
"help": "遇到登录问题?",
"contactSupport": "联系客服"
},
"register": {
"title": "创建您的账号",
"description": "填写以下信息,开始使用平台服务。",
"username": "用户名",
"usernamePlaceholder": "请输入用户名",
"nickname": "昵称",
"nicknamePlaceholder": "请输入昵称",
"email": "电子邮箱",
"emailPlaceholder": "请输入电子邮箱",
"password": "密码",
"passwordPlaceholder": "请输入密码(至少 8 位)",
"emailCode": "邮箱验证码",
"emailCodePlaceholder": "请输入 6 位邮箱验证码",
"getCode": "获取验证码",
"resendIn": "{seconds}秒后重发",
"submit": "创建账号",
"submitting": "注册中...",
"success": "注册并登录成功",
"failed": "注册失败,请重试",
"closed": "系统注册功能已关闭",
"codeSent": "验证码已发送至您的邮箱,请查收",
"sendCodeFailed": "发送验证码失败,请重试",
"emailRequired": "请先输入邮箱地址",
"emailInvalid": "请输入有效的邮箱地址",
"usernamePasswordRequired": "用户名和密码不能为空",
"passwordTooShort": "密码长度不能少于 8 位",
"emailEmpty": "邮箱不能为空",
"codeRequired": "验证码不能为空",
"capPending": "人机验证尚未完成,请稍候…",
"capRequired": "请先点击「开始验证」完成人机验证",
"hasAccount": "已经有账号?",
"backToLogin": "返回登录"
}
},
"settings": {
"title": "设置",
"categories": {
"personal": "个人设置",
"account": "账户设置"
},
"items": {
"profile": "个人资料",
"profileDesc": "查看您的账户信息",
"accessToken": "访问令牌 (AccessToken)",
"accessTokenDesc": "管理用于 API 访问的个人 Token",
"notifications": "通知设置",
"notificationsDesc": "设置您的通知偏好",
"appearance": "外观设置",
"appearanceDesc": "自定义界面主题与显示"
},
"appearance": {
"breadcrumb": "外观设置",
"themeMode": "主题模式",
"themeModeDesc": "选择应用程序的整体明暗主题",
"modeLight": "明亮",
"modeDark": "黑暗",
"modeSystem": "自动",
"interface": "界面外观",
"interfaceDesc": "选择界面的配色方案和视觉风格",
"switched": "外观已切换为 {name}",
"switchFailed": "切换失败",
"language": "语言",
"languageDesc": "选择界面显示语言",
"comingSoon": "即将推出",
"comingSoonBody": "更多自定义选项正在开发中..."
},
"notifications": {
"breadcrumb": "通知设置",
"display": "通知显示",
"displayDesc": "设置通知相关的显示选项",
"showBell": "显示通知铃铛",
"showBellDesc": "在顶部导航栏中显示通知铃铛图标"
},
"accessToken": {
"breadcrumb": "访问令牌",
"title": "个人访问令牌 (AccessToken)",
"generate": "生成新令牌",
"securityTitle": "安全提示:",
"securityBody": "访问令牌具有您账户的完整接口调用权限。为了您的账户与资产安全,请切勿通过任何代码库提交、即时通讯工具或公共媒介泄露此令牌。推荐按需创建,不使用时及时撤销。",
"listTitle": "活动令牌列表",
"listDesc": "当前可用的所有访问令牌",
"userToken": "用户令牌",
"empty": "您当前暂无生成任何访问令牌",
"generateFirst": "生成第一个令牌",
"createTitle": "生成新令牌",
"createDesc": "请为新的访问令牌设置一个易于识别的名称,以便将来管理。",
"name": "令牌名称",
"adminHint": "开启后此令牌可访问 /admin/** 管理端点,默认关闭",
"generateAction": "生成令牌",
"readyTitle": "令牌密钥已就绪",
"readyBody": "这是您唯一一次能够查看此访问令牌明文密钥的机会。请立即将其复制并安全地保存。",
"nameRequired": "请输入令牌名称",
"createSuccess": "访问令牌创建成功",
"createFailed": "创建访问令牌失败",
"deleteSuccess": "访问令牌已撤销",
"deleteFailed": "删除访问令牌失败",
"rotateSuccess": "访问令牌轮换成功,旧密钥已失效",
"rotateFailed": "轮换访问令牌失败",
"deleteConfirm": "确定要删除并撤销令牌「{name}」吗?删除后此令牌将立即失效且不可恢复。",
"rotateConfirm": "确定要轮换令牌「{name}」的密钥吗?轮换后系统将生成全新密钥,原令牌密钥将立即失效。",
"subtitle": "管理您的 API 访问密钥,用于开发或第三方工具直接调用系统 API",
"adminBadge": "管理员",
"adminPermission": "管理员权限",
"createdAt": "创建于: {date}",
"copy": "复制",
"rotate": "轮换",
"revoke": "撤销",
"copySuccess": "复制成功",
"copyFailed": "复制失败",
"namePlaceholder": "例如:my-development-key",
"generating": "正在生成...",
"importantTitle": "重要提示:",
"savedConfirm": "我已经复制并妥善保存"
}
},
"metadata": {
"title": "Wavelet Platform",
"description": "通用二次开发标准范式平台"
}
}