mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 03:50:30 +00:00
bee500880e
Finishes the plural work the previous wip commit started. t() picks a count string's form by the language's own Intl.PluralRules, and every locale now spells out the forms its language reaches with whole numbers, about 160 count strings in all: one, few and many in Russian, Ukrainian and Polish, one and few in Czech and Slovak, five forms in Arabic, one in the others, none in Japanese, Korean, Chinese, Thai, Vietnamese and Indonesian. Each language was translated and then reviewed on its own. English no longer reads "1 files", "1 updates available" or "photo(s)". Count labels shown next to a number now take that number too: the atlas and admin statistics, the trip cards, journey and shared trip pills, packing templates, receipts, storage usage, the Studio export note. A heading that shared its key with a counted label keeps a key of its own (the boarding pass heading, the Bookings tab), so languages that put a noun after a number in the singular keep a plural heading. The plugin hosts chip passed its count through .replace() after t() and never got a form; three toasts sent the count as text. Mail and push texts for shared photos and suppressed storage failures pick their form in code through pluralForm. A whole number sent as text counts too, which is how in-app notification params arrive, and the plural rule follows the language of the strings on screen while another one still loads. The parity check knows which forms each language needs and refuses missing and impossible ones. It also reads keys that contain a colon now: it skipped them, which hid 58 missing plugin permission texts in Catalan and 35 in Vietnamese, both translated. The client parity test covers every language of the registry instead of a hand-kept list of 19, and the placeholder spec lets a form spell its number out only where its category is that one number. Brazilian Portuguese error screens were in Breton, and an Arabic dashboard label held Hebrew text.
173 lines
10 KiB
TypeScript
173 lines
10 KiB
TypeScript
import type { TranslationStrings } from '../types';
|
|
|
|
const docsync: TranslationStrings = {
|
|
'docsync.title': '文档同步',
|
|
'docsync.noProviders': '暂无可用的文档服务',
|
|
'docsync.noProvidersHint': '实例管理员可在“管理 → 插件 → 文档”中启用。',
|
|
'docsync.addProvider': '连接文档服务',
|
|
'docsync.test': '测试连接',
|
|
'docsync.connect.optional': '可选',
|
|
'docsync.connected': '已连接',
|
|
'docsync.chooseFolder': '选择文件夹',
|
|
'docsync.noFolders': '此实例上暂未找到任何内容。',
|
|
'docsync.newFolderPlaceholder': '新文件夹名称',
|
|
'docsync.syncNow': '立即同步',
|
|
'docsync.unlink': '断开连接',
|
|
'docsync.confirmUnlink': '文档会保留在 TREK 和文档服务中,消失的只是两者之间的配对。',
|
|
'docsync.syncEnabled': '自动同步',
|
|
'docsync.deletePolicy': '当文档被删除时',
|
|
'docsync.deleteUnlink': '两份副本都保留',
|
|
'docsync.deleteTrash': '移入回收站',
|
|
'docsync.conflictPolicy': '当两边都有改动时',
|
|
'docsync.onConflict.manual': '询问我',
|
|
'docsync.onConflict.trek_wins': '保留 TREK 的副本',
|
|
'docsync.onConflict.provider_wins': '保留存储端的副本',
|
|
'docsync.webhookHint': '把此 URL 粘贴到你的文档服务中,变更就会立即送达。不设置时,TREK 会定时检查。',
|
|
|
|
// 连接表单的字段。这些键与 document_provider_fields 表的 `label` 列一一对应,
|
|
// 该列存的是键的后缀,而不是文字本身。
|
|
'docsync.providerUrl': '地址',
|
|
'docsync.providerApiToken': 'API 令牌',
|
|
'docsync.providerApiKey': 'API 密钥',
|
|
'docsync.providerAppPassword': '应用密码',
|
|
'docsync.providerAppToken': '应用令牌',
|
|
'docsync.providerUsername': '用户名',
|
|
'docsync.providerPassword': '密码',
|
|
'docsync.providerOrganization': '组织 ID',
|
|
'docsync.providerBasePath': '基础文件夹',
|
|
'docsync.providerOTP': '两步验证码',
|
|
'docsync.allowInsecureTls': '接受自签名证书',
|
|
|
|
'docsync.hintPaperlessToken': '在 Paperless 的“My Profile”中创建。它拥有该账户的全部权限。',
|
|
'docsync.hintPapraKey': '在 Papra 的“API keys”中创建。Papra 的密钥始终可以访问你所属的每个组织。',
|
|
'docsync.hintPapraOrg': 'Papra 地址栏中的 org_… 编号。',
|
|
'docsync.hintNextcloudLogin': '你的 Nextcloud 登录名,不是邮箱地址。',
|
|
'docsync.hintNextcloudAppPassword': '设置 → 安全 → 创建新的应用密码。切勿使用账户密码。',
|
|
'docsync.hintOpenCloudToken': '在 OpenCloud 的应用令牌中创建。',
|
|
'docsync.hintBasePath': 'TREK 查找行程文件夹的位置。默认为 /TREK。',
|
|
'docsync.hintSynologyUrl': '请包含端口,例如 https://nas.example.com:5001',
|
|
'docsync.hintSynologyUser': '最好使用只能访问此共享文件夹的专用 DSM 账户。',
|
|
'docsync.hintSynologyOtp': '仅在账户启用了两步验证时需要,且只需一次。',
|
|
|
|
'docsync.linkState.never': '尚未同步',
|
|
'docsync.linkState.ok': '已同步',
|
|
'docsync.linkState.partial': '部分已同步',
|
|
'docsync.linkState.failed': '失败',
|
|
'docsync.linkState.needs_reauth': '请重新登录',
|
|
'docsync.linkState.scope_lost': '文件夹已不存在',
|
|
'docsync.linkState.orphaned': '所有者已退出行程',
|
|
|
|
'docsync.state.pending': '等待中',
|
|
'docsync.state.synced': '已同步',
|
|
'docsync.state.conflict': '冲突',
|
|
'docsync.state.rejected_type': '不允许的类型',
|
|
'docsync.state.too_large': '文件过大',
|
|
'docsync.state.error': '错误',
|
|
'docsync.state.remote_missing': '文档服务中不存在',
|
|
'docsync.state.local_deleted': '已在 TREK 中删除',
|
|
'docsync.state.scope_drift': '已移出该文件夹',
|
|
|
|
'docsync.conflict.resolve': '处理 {count} 个',
|
|
|
|
'docsync.conflict.title': '两份副本都有改动',
|
|
'docsync.conflict.keepTrek': '保留 TREK 版本',
|
|
'docsync.conflict.keepProvider': '保留文档服务的版本',
|
|
'docsync.conflict.keepBoth': '两份都保留',
|
|
|
|
// 失败原因以代码传递,绝不直接转述对方的文字:文档服务会用英文作答,或者返回
|
|
// 代理的 HTML 登录页,两者都不该出现在这里。
|
|
'docsync.error.unreachable': '无法连接到该文档服务。',
|
|
'docsync.error.tls_untrusted': '证书被拒绝。如果你信任此实例,请允许自签名证书。',
|
|
'docsync.error.unauthorized': '凭据被拒绝。',
|
|
'docsync.error.forbidden': '此账户没有执行该操作的权限。',
|
|
'docsync.error.not_found': '在文档服务中未找到。',
|
|
'docsync.error.scope_missing': '已连接的文件夹不再存在。',
|
|
'docsync.error.rate_limited': '文档服务正在限制请求频率。TREK 稍后会重试。',
|
|
'docsync.error.too_large': '该文件超出了文档服务允许的大小。',
|
|
'docsync.error.unsupported_type': '文档服务不接受此文件类型。',
|
|
'docsync.error.quota_exceeded': '文档服务的存储空间已满。',
|
|
'docsync.error.conflict': '该文档在两边都发生了改动。',
|
|
'docsync.error.checksum_mismatch': '传输的内容不完整。',
|
|
'docsync.error.provider_error': '文档服务返回了一个错误。',
|
|
'docsync.error.timeout': '文档服务响应超时。',
|
|
'docsync.error.ssrf_blocked': '不允许使用该地址。',
|
|
'docsync.error.mass_delete_guard': '大量文档同时消失,因此未做任何改动。请检查该文件夹是否仍处于挂载状态。',
|
|
'docsync.error.unknown': '出了点问题。',
|
|
|
|
// ── 对话框 ────────────────────────────────────────────────────────────────
|
|
'docsync.sidebar.connected': '本次行程',
|
|
'docsync.addAnother': '再添加一个',
|
|
'docsync.syncing': '同步中',
|
|
'docsync.card.pickFolder': '已连接,请选择文件夹',
|
|
|
|
'docsync.empty.title': '尚未连接任何服务',
|
|
'docsync.empty.hintOwner': '在左侧挑一个文档服务。TREK 自己也留有一份副本,所以即使它不在了也不会丢东西。',
|
|
'docsync.empty.hintMember': '这由行程所有者来设置。无论如何,文档都会保留在 TREK 中。',
|
|
|
|
// 每个产品各自的归档方式。在连接之前就显示出来,因为下一屏问的正是这些。
|
|
'docsync.model.paperless': '按标签归档',
|
|
'docsync.model.papra': '在组织内按标签归档',
|
|
'docsync.model.nextcloud': '归档到文件夹',
|
|
'docsync.model.opencloud': '归档到空间',
|
|
'docsync.model.synologydrive': '归档到 NAS 上的文件夹',
|
|
|
|
// ── 流向条 ────────────────────────────────────────────────────────────────
|
|
'docsync.flow.trek': 'TREK',
|
|
'docsync.flow.toProvider': '发往文档服务',
|
|
'docsync.flow.toTrek': '来自文档服务',
|
|
'docsync.flow.documents': '文档',
|
|
'docsync.flow.summary.both': '文档双向同步。',
|
|
'docsync.flow.summary.pull': '文档只进不出。',
|
|
'docsync.flow.summary.push': '文档只出不进。',
|
|
'docsync.flow.summaryEditable.both': '正在双向同步。点按某一向即可停用。',
|
|
'docsync.flow.summaryEditable.pull': '只接收。点按另一向也可发送。',
|
|
'docsync.flow.summaryEditable.push': '只发送。点按另一向也可接收。',
|
|
|
|
// ── 单个配对 ──────────────────────────────────────────────────────────────
|
|
'docsync.binding.settings': '设置',
|
|
'docsync.binding.folder': '文件夹',
|
|
'docsync.binding.lastRun': '上次运行',
|
|
'docsync.binding.autoOff': '已暂停',
|
|
'docsync.binding.neverRun': '尚未运行',
|
|
'docsync.binding.deleteHint': '另一侧的副本会怎样。',
|
|
'docsync.binding.conflictHint': '当文档在两边都被修改时,保留哪一份副本。',
|
|
'docsync.binding.autoHint': '在后台检查变更。',
|
|
'docsync.binding.webhookTitle': '即时更新',
|
|
'docsync.binding.copy': '复制',
|
|
'docsync.binding.copied': '已复制',
|
|
|
|
// ── 连接 ──────────────────────────────────────────────────────────────────
|
|
'docsync.connect.submit': '连接',
|
|
'docsync.connect.testing': '正在尝试连接',
|
|
'docsync.connect.okAs': '已连接,登录身份为 {account}',
|
|
'docsync.connect.insecureHint': '适用于自有网络中使用自签名证书的实例。',
|
|
'docsync.connect.about.paperless': 'TREK 会用专属标签归档此行程,绝不碰你归档库里的其他内容。',
|
|
'docsync.connect.about.papra': '选择此行程所属的组织。TREK 会在其中用专属标签归档。',
|
|
'docsync.connect.about.nextcloud': '请使用应用密码,而不是账户密码:它不受两步验证影响,也可以单独吊销。',
|
|
'docsync.connect.about.opencloud': 'TREK 会为此行程单独获得一个空间,与其他内容互不相干。',
|
|
'docsync.connect.about.synologydrive': '最好使用只能访问此行程所用共享文件夹的 DSM 账户。',
|
|
|
|
// ── 选择存放位置 ──────────────────────────────────────────────────────────
|
|
'docsync.scope.title': '此行程应存放在 {provider} 的什么位置?',
|
|
'docsync.scope.intro': '只有这里的内容会被同步。文档服务中的其他内容都不会进入 TREK。',
|
|
'docsync.scope.createTitle': '新建一个',
|
|
'docsync.scope.createAction': '创建',
|
|
'docsync.scope.pickTitle': '或使用已有的',
|
|
'docsync.scope.search': '搜索',
|
|
'docsync.scope.noMatch': '没有匹配的内容。',
|
|
|
|
// ── 需要人来决定的事 ──────────────────────────────────────────────────────
|
|
'docsync.issues.title': '需要查看',
|
|
'docsync.issues.conflict': '两边都有改动。请选择保留哪一份。',
|
|
'docsync.issues.remote_missing': '已从文档服务中消失。TREK 中的副本仍在。',
|
|
'docsync.issues.rejected_type': '这里不允许此文件类型。',
|
|
'docsync.issues.too_large': '超出大小上限。',
|
|
'docsync.issues.error': '传输未能完成。',
|
|
|
|
'docsync.error.unknown_provider': '此实例不提供该文档服务。',
|
|
'docsync.error.provider_disabled': '已暂停:管理员已关闭此文档服务。重新启用后将继续同步。',
|
|
'docsync.binding.reconnect': '重新连接',
|
|
};
|
|
|
|
export default docsync;
|