feat(translations): Add Simplified Chinese translation

- Add simplified Chinese translation files
- Add the Simplified Chinese option in the language selection
- Update the translation index to support Simplified Chinese
This commit is contained in:
YiZixuan
2025-08-13 00:05:16 +08:00
parent d4636d5436
commit f15a00772e
17 changed files with 433 additions and 3 deletions
@@ -119,6 +119,9 @@ export const Header = ({
<DropdownMenuItem onClick={() => setLanguage("ja")} className={language === "ja" ? "bg-accent" : ""}>
{t("japanese")}
</DropdownMenuItem>
<DropdownMenuItem onClick={() => setLanguage("zhcn")} className={language === "zhcn" ? "bg-accent" : ""}>
{t("simplifiedChinese")}
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
@@ -212,4 +215,4 @@ export const Header = ({
</div>
</header>
);
};
};
@@ -8,6 +8,7 @@ export const commonTranslations: CommonTranslations = {
english: "Englisch",
khmer: "Khmer",
german: "Deutsch",
simplifiedChinese: "Simplified Chinese",
goodMorning: "Guten Morgen",
goodAfternoon: "Guten Nachmittag",
goodEvening: "Guten Abend",
@@ -8,6 +8,7 @@ export const commonTranslations: CommonTranslations = {
english: "English",
khmer: "Khmer",
german: "Deutsch",
simplifiedChinese: "Simplified Chinese",
goodMorning: "Good morning",
goodAfternoon: "Good afternoon",
goodEvening: "Good evening",
+3 -1
View File
@@ -2,14 +2,16 @@ import enTranslations from './en';
import kmTranslations from './km';
import deTranslations from './de';
import jaTranslations from './ja';
import zhcnTranslations from './zhcn';
export type Language = "en" | "km" | "de" | "ja";
export type Language = "en" | "km" | "de" | "ja" | "zhcn";
export const translations = {
en: enTranslations,
km: kmTranslations,
de: deTranslations,
ja: jaTranslations,
zhcn: zhcnTranslations,
};
// Type for accessing translations by module and key
+2 -1
View File
@@ -7,6 +7,7 @@ export const commonTranslations: CommonTranslations = {
english: "English",
khmer: "Khmer",
german: "Deutsch",
simplifiedChinese: "简体中文",
japanese: "日本語",
goodMorning: "おはようございます",
goodAfternoon: "こんにちは",
@@ -26,4 +27,4 @@ export const commonTranslations: CommonTranslations = {
description: "説明",
success: "成功",
error: "エラー",
};
};
@@ -8,6 +8,7 @@ export const commonTranslations: CommonTranslations = {
english: "អង់គ្លេស",
khmer: "ខ្មែរ",
german: "Deutsch",
simplifiedChinese: "简体中文",
goodMorning: "អរុណសួស្តី",
goodAfternoon: "ទិវាសួស្តី",
goodEvening: "សាយណ្ហសួស្តី",
@@ -5,6 +5,7 @@ export interface CommonTranslations {
language: string;
english: string;
khmer: string;
simplifiedChinese: string;
goodMorning: string;
goodAfternoon: string;
goodEvening: string;
@@ -0,0 +1,18 @@
import { AboutTranslations } from '../types/about';
export const aboutTranslations: AboutTranslations = {
aboutCheckcle: "关于 Checkcle",
systemDescription: "Checkcle 是一个开源监控平台,可提供有关服务器和服务健康状况的实时洞察、事件管理以及透明化运营。以 MIT 许可证发布。",
systemVersion: "系统版本",
license: "许可证",
mitLicense: "MIT 许可证",
links: "链接",
viewOnGithub: "在 GitHub 上查看",
viewDocumentation: "查看文档",
followOnX: "在 X 上关注",
joinDiscord: "加入 Discord",
quickActions: "快速操作",
quickActionsDescription: "快速访问常用的监控操作和功能。选择下面的操作开始。",
quickTips: "快速提示",
};
@@ -0,0 +1,30 @@
import { CommonTranslations } from '../types/common';
export const commonTranslations: CommonTranslations = {
welcome: "欢迎",
logout: "注销",
language: "语言",
english: "English",
khmer: "Khmer",
german: "Deutsch",
simplifiedChinese: "简体中文",
goodMorning: "早上好",
goodAfternoon: "下午好",
goodEvening: "晚上好",
profile: "个人资料",
settings: "设置",
documentation: "文档",
notifications: "通知",
close: "关闭",
cancel: "取消",
view: "查看",
edit: "编辑",
delete: "删除",
status: "状态",
time: "时间",
title: "标题",
description: "描述",
success: "成功",
error: "错误",
};
@@ -0,0 +1,55 @@
import { IncidentTranslations } from '../types/incident';
export const incidentTranslations: IncidentTranslations = {
incidentManagement: '事件管理',
incidentsManagementDesc: '跟踪和管理服务事件及其解决方案',
unresolvedIncidents: '未解决',
resolvedIncidents: '已解决',
activeIncidents: '活动事件',
criticalIssues: '关键问题',
avgResolutionTime: '平均解决时间',
noIncidents: '没有活动事件',
createIncident: '创建事件',
investigating: '调查中',
identified: '已识别',
monitoring: '监控',
resolved: '已解决',
scheduleIncidentManagement: '计划与事件管理',
incidentName: '事件名称',
incidentStatus: '事件状态',
highPriority: '高优先级',
configurationSettings: '配置设置',
incidentCreatedSuccess: '事件创建成功',
basicInfo: '基本信息',
serviceId: '服务 ID',
assignedTo: '分配给',
unassigned: '未分配',
timeline: '时间线',
incidentTime: '事件时间',
resolutionTime: '解决时间',
systems: '系统',
noSystems: '没有受影响的系统',
impactAnalysis: '影响分析',
rootCause: '根本原因',
resolutionSteps: '解决步骤',
lessonsLearned: '经验',
resolutionDetails: '解决详情',
assignment: '分配',
download: '下载',
downloadPdf: '下载 PDF',
print: '打印',
confidentialNote: '此文档为机密文件,仅供内部使用。',
generatedOn: '生成时间',
enterResolutionSteps: '输入解决此事件的步骤',
enterLessonsLearned: '输入从此事件中学到的经验',
editIncident: '编辑事件',
editIncidentDesc: '更新此事件的详细信息',
updating: '更新中...',
update: '更新',
create: '创建',
creating: '创建中...',
configuration: '配置',
failedToUpdateStatus: '更新状态失败',
inProgress: '进行中',
};
@@ -0,0 +1,25 @@
import { Translations } from '../types';
import { commonTranslations } from './common';
import { menuTranslations } from './menu';
import { loginTranslations } from './login';
import { aboutTranslations } from './about';
import { servicesTranslations } from './services';
import { maintenanceTranslations } from './maintenance';
import { incidentTranslations } from './incident';
import { sslTranslations } from './ssl';
import { settingsTranslations } from './settings';
const zhcnTranslations: Translations = {
common: commonTranslations,
menu: menuTranslations,
login: loginTranslations,
about: aboutTranslations,
services: servicesTranslations,
maintenance: maintenanceTranslations,
incident: incidentTranslations,
ssl: sslTranslations,
settings: settingsTranslations
};
export default zhcnTranslations;
@@ -0,0 +1,23 @@
import { LoginTranslations } from '../types/login';
export const loginTranslations: LoginTranslations = {
signInToYourAccount: "登录您的账号",
dontHaveAccount: "没有账号?",
createOne: "创建一个",
signInWithGoogle: "使用 Google 登录",
orContinueWith: "或",
email: "邮箱",
password: "密码",
forgot: "忘记密码?",
signIn: "登录",
signingIn: "登录中...",
loginSuccessful: "登录成功",
loginSuccessMessage: "您已成功登录。",
loginFailed: "登录失败",
authenticationFailed: "身份验证失败",
bySigningIn: "通过登录,您同意我们的",
termsAndConditions: "条款与条件",
and: "和",
privacyPolicy: "隐私政策",
};
@@ -0,0 +1,68 @@
import { MaintenanceTranslations } from '../types/maintenance';
export const maintenanceTranslations: MaintenanceTranslations = {
scheduledMaintenance: '计划维护',
scheduledMaintenanceDesc: '查看和管理您系统和服务的计划维护窗口',
upcomingMaintenance: '即将',
ongoingMaintenance: '进行中',
completedMaintenance: '已完成',
createMaintenanceWindow: '创建维护',
totalScheduledHours: '总计划小时',
maintenanceName: '维护名称',
maintenanceStatus: '状态',
scheduledStart: '计划开始时间',
scheduledEnd: '计划结束时间',
affectedServices: '受影响的服务',
impact: '影响',
minor: '次要',
major: '主要',
critical: '关键',
none: '无',
actions: '操作',
scheduled: '计划',
inprogress: '进行中',
completed: '已完成',
cancelled: '已取消',
markAsInProgress: '标记为进行中',
markAsCompleted: '标记为已完成',
markAsCancelled: '标记为已取消',
confirmDelete: '确认删除',
deleteMaintenanceConfirmation: '您确定要删除此维护窗口吗?',
thisActionCannotBeUndone: '此操作无法撤销。',
maintenanceDeleted: '维护已删除',
maintenanceDeletedDesc: '维护窗口已成功删除。',
errorDeletingMaintenance: '删除维护窗口时出错。',
statusUpdated: '状态更新',
maintenanceStatusUpdated: '维护状态已成功更新。',
errorUpdatingMaintenanceStatus: '更新维护状态时出错。',
createMaintenance: '创建维护',
createMaintenanceDesc: '为您的服务计划新的维护窗口',
enterTitle: '输入维护标题',
enterDescription: '输入详细的维护描述',
startTime: '开始时间',
endTime: '结束时间',
selectDate: '选择日期',
enterAffectedServices: '输入受影响的服务',
separateServicesWithComma: '用逗号分隔多个服务',
priority: '优先级',
selectPriority: '选择优先级',
selectStatus: '选择状态',
selectImpact: '选择影响',
notifySubscribers: '通知订阅者',
notifySubscribersDesc: '当此维护开始时,向所有订阅者发送通知',
maintenanceCreated: '创建维护',
maintenanceCreatedDesc: '维护窗口已成功计划。',
errorCreatingMaintenance: '创建维护窗口时出错。',
errorFetchingMaintenanceData: '获取维护数据时出错。',
low: '低',
medium: '中',
high: '高',
created: '创建',
lastUpdated: '最后更新',
subscribersWillBeNotified: '订阅者将在维护开始时收到通知',
noNotifications: '不会发送通知',
noScheduledMaintenance: '没有计划的维护',
noMaintenanceWindows: '没有此时间段的维护窗口。通过点击“创建维护”按钮创建一个。',
maintenanceCreatedSuccess: '维护窗口创建成功',
};
+21
View File
@@ -0,0 +1,21 @@
import { MenuTranslations } from '../types/menu';
export const menuTranslations: MenuTranslations = {
uptimeMonitoring: "Uptime 监控",
instanceMonitoring: "实例监控",
sslDomain: "SSL & 域名",
scheduleIncident: "计划与事件",
operationalPage: "运营页面",
reports: "报告",
regionalMonitoring: "区域监控",
settingPanel: "设置面板",
generalSettings: "一般设置",
userManagement: "用户管理",
notificationSettings: "通知设置",
alertsTemplates: "警报模板",
rolesManagement: "角色管理",
dataRetention: "数据保留",
backupSettings: "备份设置",
aboutSystem: "关于系统",
};
@@ -0,0 +1,12 @@
import { ServicesTranslations } from '../types/services';
export const servicesTranslations: ServicesTranslations = {
serviceName: "服务名称",
serviceType: "服务类型",
serviceStatus: "服务状态",
responseTime: "响应时间",
uptime: "Uptime",
lastChecked: "最后检查时间",
noServices: "没有符合您筛选条件的服务。",
};
@@ -0,0 +1,52 @@
import { SettingsTranslations } from '../types/settings';
export const settingsTranslations: SettingsTranslations = {
// Tabs
systemSettings: "系统设置",
mailSettings: "邮件设置",
// System Settings
appName: "应用名称",
appURL: "应用 URL",
senderName: "发送者名称",
senderEmail: "发送者邮箱地址",
hideControls: "隐藏控件",
// Mail Settings
smtpSettings: "SMTP 配置",
smtpEnabled: "启用 SMTP",
smtpHost: "SMTP 主机",
smtpPort: "SMTP 端口",
smtpUsername: "SMTP 用户名",
smtpPassword: "SMTP 密码",
smtpAuthMethod: "认证方法",
enableTLS: "启用 TLS",
localName: "本地名称",
// Test Email
testEmail: "测试邮箱",
sendTestEmail: "发送测试邮箱",
emailTemplate: "邮箱模板",
verification: "验证",
passwordReset: "密码重置",
confirmEmailChange: "确认邮箱变更",
otp: "OTP",
loginAlert: "登录警报",
authCollection: "认证集合",
selectCollection: "选择集合",
toEmailAddress: "收件人邮箱地址",
enterEmailAddress: "输入收件人邮箱地址",
sending: "发送中...",
// Actions and status
save: "保存变更",
saving: "保存中...",
settingsUpdated: "设置已成功更新",
errorSavingSettings: "保存设置时出错",
errorFetchingSettings: "加载设置时出错",
testConnection: "测试连接",
testingConnection: "测试连接中...",
connectionSuccess: "连接成功",
connectionFailed: "连接失败"
};
+116
View File
@@ -0,0 +1,116 @@
import { SSLTranslations } from '../types/ssl';
export const sslTranslations: SSLTranslations = {
// Page and section titles
sslDomainManagement: "SSL & 域名管理",
monitorSSLCertificates: "监控和管理您的域名的 SSL 证书",
addSSLCertificate: "添加 SSL 证书",
editSSLCertificate: "编辑 SSL 证书",
deleteSSLCertificate: "删除 SSL 证书",
sslCertificateDetails: "SSL 证书详情",
detailedInfo: "关于",
viewDetailedInformation: "查看详细信息",
// Status related
valid: "有效",
expiringSoon: "即将过期",
expired: "已过期",
pending: "待处理",
// Statistics and cards
validCertificates: "有效证书",
expiringSoonCertificates: "即将过期",
expiredCertificates: "已过期",
// Form fields
domain: "域",
domainName: "域名",
domainCannotChange: "域名创建后不能更改",
warningThreshold: "警告阈值",
warningThresholdDays: "警告阈值(天)",
expiryThreshold: "过期阈值",
expiryThresholdDays: "过期阈值(天)",
notificationChannel: "通知渠道",
chooseChannel: "选择通知渠道",
whereToSend: "通知渠道",
daysBeforeExpiration: "过期前警告天数",
daysBeforeCritical: "过期前关键警告天数",
getNotifiedExpiration: "获取证书即将过期的通知",
getNotifiedCritical: "获取证书即将过期的关键通知",
// Table headers and fields
issuer: "发行机构",
expirationDate: "过期日期",
daysLeft: "剩余天数",
status: "状态",
lastNotified: "最后通知时间",
actions: "操作",
validFrom: "有效从",
validUntil: "有效至",
validityDays: "有效期天数",
validityPeriod: "有效期",
organization: "组织",
commonName: "通用名称",
serialNumber: "序列号",
algorithm: "算法",
subjectAltNames: "主题备用名称",
subjectAlternativeNames: "主题备用名称",
resolvedIP: "解析 IP",
issuedTo: "颁发给",
days: "天",
// Buttons and actions
addDomain: "添加域名",
refreshAll: "刷新所有",
cancel: "取消",
addCertificate: "添加证书",
check: "检查",
view: "查看",
edit: "编辑",
delete: "删除",
close: "关闭",
saveChanges: "保存更改",
updating: "更新中",
// Sections in detail view
basicInformation: "基本信息",
validity: "有效期",
issuerInfo: "发行机构信息",
technicalDetails: "技术详情",
technicalInformation: "技术信息",
monitoringConfig: "监控配置",
monitoringConfiguration: "监控配置",
recordInfo: "记录信息",
certificateDetails: "证书详情",
// Notifications and messages
sslCertificateAdded: "SSL 证书添加成功",
sslCertificateUpdated: "SSL 证书更新成功",
sslCertificateDeleted: "SSL 证书删除成功",
sslCertificateRefreshed: "SSL 证书为 {domain} 刷新成功",
allCertificatesRefreshed: "所有 {count} 证书刷新成功",
someCertificatesFailed: "{success} 证书刷新成功,{failed} 失败",
failedToAddCertificate: "添加 SSL 证书失败",
failedToLoadCertificates: "加载 SSL 证书失败",
failedToUpdateCertificate: "更新 SSL 证书失败",
failedToDeleteCertificate: "删除 SSL 证书失败",
failedToCheckCertificate: "检查 SSL 证书失败",
noCertificatesToRefresh: "没有证书可刷新",
startingRefreshAll: "开始刷新 {count} 证书",
checkingSSLCertificate: "检查 SSL 证书...",
deleteConfirmation: "确定要删除 {domain} 的证书吗?",
deleteWarning: "此操作无法撤销。这将永久删除证书。",
// Misc
unknown: "未知",
never: "从不",
none: "无",
loadingChannels: "加载通知渠道...",
noChannelsFound: "未找到通知渠道",
noSSLCertificates: "未找到 SSL 证书",
created: "创建时间",
lastUpdated: "最后更新时间",
lastNotification: "最后通知时间",
collectionId: "集合 ID"
};