fix(i18n): use English runtime text and localize system UI

This commit is contained in:
Arthur Koba
2026-10-25 19:44:15 +03:00
parent ada0550571
commit 65a96670d5
289 changed files with 8092 additions and 3426 deletions
+58 -58
View File
@@ -5,62 +5,62 @@
package pages
const (
errPagesProjectNotFound = "pages 项目不存在"
errPagesSlugExists = "pages 项目标识已存在"
errPagesNameRequired = "pages 项目名称不能为空"
errPagesSlugInvalid = "pages 项目标识只能包含小写字母、数字和连字符"
errPagesDeleteReferenced = "pages 项目已被规则引用,不能删除"
errPagesDeploymentNotFound = "pages 部署不存在"
errPagesDeploymentMismatch = "pages 部署不属于该项目"
errPagesDeleteActiveDeploy = "不能删除当前激活的 Pages 部署"
errPagesPackageMissing = "缺少 Pages 部署包"
errPagesPackageURLRequired = "请填写部署包下载链接"
errPagesPackageURLInvalid = "部署包下载链接无效,仅支持 http/https"
errPagesPackageURLDownloadFailed = "从链接下载部署包失败"
errPagesPackageURLTooLarge = "链接指向的部署包超过大小限制"
errPagesPackageNotZip = "pages 部署包必须是 .zip 文件" // legacy alias kept for tests
errPagesPackageUnsupported = "pages 部署包仅支持 zip、tar.gz、tar.xz、tar.bz2、tar、7z 格式"
errPagesPackageInvalidZip = "pages 部署包不是有效 zip 文件" // legacy alias
errPagesPackageInvalid = "pages 部署包不是有效的压缩文件"
errPagesPackageEmpty = "pages 部署包不能为空"
errPagesPackageExtractedTooLarge = "pages 部署包展开后体积超过限制"
errPagesPackageFileTooLarge = "pages 部署包内文件过大"
errPagesAPIProxyPathRequired = "启用 API 反代时,匹配路径不能为空"
errPagesAPIProxyPathPrefix = "API 反代匹配路径必须以 '/' 开头"
errPagesAPIProxyPassRequired = "启用 API 反代时,后端服务地址不能为空" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
errPagesAPIProxyPassInvalid = "API 反代后端服务地址必须是有效的 HTTP/HTTPS URL" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
errPagesPackagePathEmpty = "pages 部署包路径为空"
errPagesPackageUploadMissing = "pages 部署包上传记录不存在"
errPagesPackageNotInActiveConfig = "pages 部署尚未进入激活配置"
errPagesDeploymentHashMissing = "pages 部署包哈希缺失"
errPagesInvalidSnapshotFormat = "配置快照格式无效"
errPagesActorMissing = "无法识别当前用户"
errPagesEntryFileMissing = "当前激活部署中不存在指定入口文件"
errPagesSourceNotFound = "pages 部署源不存在"
errPagesSourceTypeRequired = "请选择 pages 部署源类型"
errPagesSourceTypeUnsupported = "pages 部署源类型不受支持"
errPagesSourceRemoteFields = "远程地址来源不能包含 GitHub 或自动更新配置"
errPagesSourceRemoteURLRequired = "请提供远程部署包地址"
errPagesSourceRemoteURLInvalid = "远程部署包地址无效,仅支持不含用户信息和片段的 http/https 地址"
errPagesSourceGitHubFields = "GitHub Release 来源不能包含远程地址配置"
errPagesSourceRepositoryInvalid = "GitHub 仓库地址无效,仅支持 https://github.com/{owner}/{repo}"
errPagesSourceSelectorInvalid = "GitHub Release 选择方式无效"
errPagesSourceAssetNameInvalid = "GitHub Release 资源名称必须是安全的文件名"
errPagesSourceCheckInterval = "GitHub latest 检查间隔必须在 5 到 1440 分钟之间"
errPagesSourceAutoNotAvailable = "自动更新将在后续阶段开放,当前必须保持关闭"
errPagesSourceReleaseNotFound = "未找到符合配置的 GitHub Release 资源"
errPagesSourceDigestInvalid = "GitHub Release 资源摘要格式无效"
errPagesSourceDigestMismatch = "GitHub Release 资源摘要校验失败"
errPagesSourceConfirmationNeeded = "检测到同一 Release 的资源已被替换,请刷新并确认当前版本"
errPagesSourceConfirmationStale = "确认的版本已变化,请刷新后重新确认"
errPagesSourceInitialCheckWarning = "部署源已保存,但首次检查任务入队失败,请稍后手动检查"
errPagesSourceCheckUnsupported = "远程地址来源不支持检查更新,请使用立即同步"
errPagesSourceActionBusy = "pages 部署源任务正在执行"
errPagesSourceActionInvalid = "pages 部署源任务参数无效"
errPagesSourceActionStale = "pages 部署源配置已变化,本次任务已跳过"
errPagesSourceLeaseLost = "pages 部署源任务执行权已失效"
errPagesSourceLeaseExpired = "上次 pages 部署源任务租约已过期"
errPagesSourceSyncFailed = "pages 部署源同步失败"
errPagesSourceTaskDispatchFailed = "pages 部署源任务入队失败"
errPagesSourceInternal = "pages 部署源操作失败,请稍后重试"
errPagesProjectNotFound = "pages project was not found"
errPagesSlugExists = "pages project slug already exists"
errPagesNameRequired = "pages project name must not be empty"
errPagesSlugInvalid = "pages project slug may only contain lowercase letters, digits and hyphens"
errPagesDeleteReferenced = "pages project is referenced by rules and cannot be deleted"
errPagesDeploymentNotFound = "pages deployment was not found"
errPagesDeploymentMismatch = "pages deployment does not belong to this project"
errPagesDeleteActiveDeploy = "the active Pages deployment cannot be deleted"
errPagesPackageMissing = "missing Pages deployment archive"
errPagesPackageURLRequired = "enter the deployment archive download URL"
errPagesPackageURLInvalid = "invalid deployment archive URL; only HTTP and HTTPS are supported"
errPagesPackageURLDownloadFailed = "Failed to download deployment archive from URL"
errPagesPackageURLTooLarge = "Deployment archive at the URL exceeds the size limit"
errPagesPackageNotZip = "Pages deployment archive must be a .zip file" // legacy alias kept for tests
errPagesPackageUnsupported = "pages archives support zip, tar.gz, tar.xz, tar.bz2, tar and 7z formats only"
errPagesPackageInvalidZip = "Pages deployment archive is not a valid ZIP file" // legacy alias
errPagesPackageInvalid = "pages deployment archive is not a valid compressed archive"
errPagesPackageEmpty = "pages deployment archive must not be empty"
errPagesPackageExtractedTooLarge = "extracted Pages deployment exceeds the size limit"
errPagesPackageFileTooLarge = "a file in the Pages deployment archive exceeds the size limit"
errPagesAPIProxyPathRequired = "match path is required when the API reverse proxy is enabled"
errPagesAPIProxyPathPrefix = "API reverse proxy match path must start with '/'"
errPagesAPIProxyPassRequired = "backend URL is required when the API reverse proxy is enabled" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
errPagesAPIProxyPassInvalid = "API reverse proxy backend must be a valid HTTP/HTTPS URL" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
errPagesPackagePathEmpty = "Pages deployment archive path is empty"
errPagesPackageUploadMissing = "pages deployment archive upload record was not found"
errPagesPackageNotInActiveConfig = "pages deployment is not included in the active configuration"
errPagesDeploymentHashMissing = "pages deployment archive hash is missing"
errPagesInvalidSnapshotFormat = "invalid configuration snapshot format"
errPagesActorMissing = "Unable to identify the current user"
errPagesEntryFileMissing = "The specified entry file does not exist in the active deployment"
errPagesSourceNotFound = "pages deployment source was not found"
errPagesSourceTypeRequired = "select a Pages deployment source type"
errPagesSourceTypeUnsupported = "unsupported Pages deployment source type"
errPagesSourceRemoteFields = "remote URL sources must not include GitHub or automatic update configuration"
errPagesSourceRemoteURLRequired = "provide the remote deployment archive URL"
errPagesSourceRemoteURLInvalid = "invalid remote archive URL; use HTTP/HTTPS without user information or fragments"
errPagesSourceGitHubFields = "GitHub Release sources must not include remote URL configuration"
errPagesSourceRepositoryInvalid = "invalid GitHub repository URL; use https://github.com/{owner}/{repo}"
errPagesSourceSelectorInvalid = "invalid GitHub Release selection mode"
errPagesSourceAssetNameInvalid = "GitHub Release asset name must be a safe filename"
errPagesSourceCheckInterval = "GitHub latest check interval must be between 5 and 1440 minutes"
errPagesSourceAutoNotAvailable = "Automatic updates will be available in a later stage and must remain disabled for now"
errPagesSourceReleaseNotFound = "no GitHub Release asset matches the configuration"
errPagesSourceDigestInvalid = "invalid GitHub Release asset digest format"
errPagesSourceDigestMismatch = "GitHub Release asset digest verification failed"
errPagesSourceConfirmationNeeded = "an asset in the same release was replaced; refresh and confirm the current version"
errPagesSourceConfirmationStale = "the confirmed version has changed; refresh and confirm again"
errPagesSourceInitialCheckWarning = "Deployment source saved, but the initial check could not be enqueued; run a manual check later"
errPagesSourceCheckUnsupported = "remote URL sources do not support update checks; use Sync now"
errPagesSourceActionBusy = "a Pages deployment source task is already running"
errPagesSourceActionInvalid = "invalid Pages deployment source task parameters"
errPagesSourceActionStale = "Pages deployment source configuration changed; task skipped"
errPagesSourceLeaseLost = "pages deployment source task ownership is no longer valid"
errPagesSourceLeaseExpired = "Previous Pages deployment source task lease expired"
errPagesSourceSyncFailed = "pages deployment source synchronization failed"
errPagesSourceTaskDispatchFailed = "failed to enqueue Pages deployment source task"
errPagesSourceInternal = "Pages deployment source operation failed; please try again later"
)