Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

feat(i18n): add zh-CN for rules, rule groups and admin users (#4928)

Kenrick Tandrian95b11398459c
diff --git a/config/locales/models/rule/zh-CN.yml b/config/locales/models/rule/zh-CN.yml
index c45cb7cb26..e382c79484 100644
--- a/config/locales/models/rule/zh-CN.yml
+++ b/config/locales/models/rule/zh-CN.yml
@@ -1,6 +1,10 @@
---
zh-CN:
activerecord:
+ attributes:
+ rule:
+ new_rule_group_name: 新分组
+ rule_group: 分组
errors:
models:
rule:
@@ -33,5 +37,10 @@ zh-CN:
regex_too_long: 过长(最多 %{count} 个字符)
regex_backreference: 不能使用后向引用(\1 到 \9)
rule:
+ actions:
+ set_transaction_merchant:
+ not_accessible: 位于您无法访问的账户上的商户
+ unassigned: "%{name}(不再分配)"
+ unavailable: 商户已不再可用
conditions:
unsupported_label: 不支持 (%{type})
diff --git a/config/locales/models/rule_group/zh-CN.yml b/config/locales/models/rule_group/zh-CN.yml
new file mode 100644
index 0000000000..6a0f632701
--- /dev/null
+++ b/config/locales/models/rule_group/zh-CN.yml
@@ -0,0 +1,10 @@
+---
+zh-CN:
+ activerecord:
+ models:
+ rule_group:
+ one: "分组"
+ other: "分组"
+ attributes:
+ rule_group:
+ name: "名称"
diff --git a/config/locales/views/admin/sso_identity_blocks/zh-CN.yml b/config/locales/views/admin/sso_identity_blocks/zh-CN.yml
new file mode 100644
index 0000000000..0cebac4d08
--- /dev/null
+++ b/config/locales/views/admin/sso_identity_blocks/zh-CN.yml
@@ -0,0 +1,5 @@
+zh-CN:
+ admin:
+ sso_identity_blocks:
+ destroy:
+ success: "该 SSO 身份可以再次登录或创建账户。"
diff --git a/config/locales/views/admin/sso_providers/zh-CN.yml b/config/locales/views/admin/sso_providers/zh-CN.yml
index 4e4faf7d79..41207b3a85 100644
--- a/config/locales/views/admin/sso_providers/zh-CN.yml
+++ b/config/locales/views/admin/sso_providers/zh-CN.yml
@@ -37,9 +37,11 @@ zh-CN:
new:
title: 添加 SSO 提供商
description: 配置一个新的单点登录认证提供商
+ provider_configuration: 提供商配置
edit:
title: 编辑 SSO 提供商
description: 更新 %{label} 的配置
+ provider_configuration: 提供商配置
create:
success: SSO 提供商创建成功。
update:
diff --git a/config/locales/views/admin/users/zh-CN.yml b/config/locales/views/admin/users/zh-CN.yml
index e1cdfe6917..453088972e 100644
--- a/config/locales/views/admin/users/zh-CN.yml
+++ b/config/locales/views/admin/users/zh-CN.yml
@@ -3,50 +3,116 @@ zh-CN:
admin:
users:
index:
- title: 用户管理
- description: 管理您实例中的用户角色。超级管理员可以访问 SSO 提供商设置和用户管理。
- section_title: 家庭 / 组
- you: (您)
- trial_ends_at: 试用结束于
- not_available: 不适用
- no_users: 未找到用户。
- unnamed_family: 未命名家庭/组
- no_subscription: 无订阅
+ title: "用户管理"
+ description: "管理您实例中的用户角色、家庭/群组归属以及账户移除。超级管理员可以访问 SSO 提供商设置和用户管理。"
+ section_title: "家庭 / 群组"
+ you: "(您)"
+ trial_ends_at: "试用结束于"
+ not_available: "不适用"
+ no_users: "未找到用户。"
+ unnamed_family: "未命名家庭/群组"
+ no_subscription: "无订阅"
family_summary: "%{members} 名成员 · %{accounts} 个账户 · %{transactions} 笔交易"
filters:
- role: 角色
- role_all: 所有角色
- trial_status: 试用状态
- trial_all: 全部
- trial_expiring_soon: 7 天内到期
- trial_trialing: 试用中
- submit: 筛选
+ role: "角色"
+ role_all: "所有角色"
+ trial_status: "试用状态"
+ trial_all: "全部"
+ trial_expiring_soon: "7 天内到期"
+ trial_trialing: "试用中"
+ submit: "筛选"
table:
- user: 用户
- trial_ends_at: 试用结束
- family_accounts: 家庭账户
- family_transactions: 家庭交易
- last_login: 上次登录
- session_count: 会话数
- never: 从未
- role: 角色
- role_descriptions_title: 角色说明
+ user: "用户"
+ trial_ends_at: "试用结束"
+ family_accounts: "家庭账户"
+ family_transactions: "家庭交易"
+ last_login: "上次登录"
+ session_count: "会话数"
+ never: "从未"
+ role: "角色"
+ family: "家庭 / 群组"
+ keep_current_family: "保留当前家庭/群组"
+ create_new_family_option: "+ 创建新家庭/群组"
+ new_family_name: "新家庭/群组名称"
+ new_family_name_placeholder: "输入名称以创建新家庭/群组"
+ new_family_moniker: "新家庭/群组类型"
+ set_password: "设置新密码"
+ password_placeholder: "留空以保留当前密码"
+ actions: "操作"
+ family_monikers:
+ family: "家庭"
+ group: "群组"
+ actions:
+ manage_user: "管理用户"
+ update: "更新用户"
+ delete_user: "删除用户"
+ self_edit_warning: "更改您自己的角色将修改您的管理权限。"
+ self_update_confirm: "确定要更新您自己的账户角色或家庭吗?"
+ last_super_admin_role_locked: "无法更改角色,因为您是系统中最后一位超级管理员。"
+ delete_confirm: "确定要删除此用户吗?此操作无法撤销。"
+ delete_confirm_last_user: "确定要删除此用户吗?这是其家庭/群组中的最后一位用户,因此删除该用户还将同时删除整个家庭/群组及所有关联数据。此操作无法撤销。"
+ remove: "删除用户"
+ role_descriptions_title: "角色说明"
+ removed_sso_identities:
+ title: "已移除的 SSO 身份"
+ description: "这些身份无法创建或重新连接账户。仅在误删时才应再次允许该身份。"
+ allow_again: "再次允许"
+ confirm: "是否允许 %{email} 再次通过 SSO 登录或创建账户?"
roles:
- guest: 访客
- member: 成员
- admin: 管理员
- super_admin: 超级管理员
+ guest: "访客"
+ member: "成员"
+ admin: "管理员"
+ super_admin: "超级管理员"
+ auth_types:
+ sso: "SSO"
+ local: "本地"
+ local_and_sso: "本地 + SSO"
+ sso_provider_tooltip: "SSO 提供商:%{providers}"
role_descriptions:
- guest: 以助手优先的体验为主,并为入门流程保留有意限制的权限。
- member: 基本用户权限。可管理自己的账户、交易和设置。
- admin: 家庭管理员。可访问 API 密钥、导入和 AI 提示词等高级设置。
- super_admin: 实例管理员。可管理 SSO 提供商、用户角色,并可代为登录用户进行支持。
+ guest: "以助手优先的体验为主,并为入门流程保留有意限制的权限。"
+ member: "基本用户权限。可管理自己的账户、交易和设置。"
+ admin: "家庭管理员。可访问 API 密钥、导入和 AI 提示词等高级设置。"
+ super_admin: "实例管理员。可管理 SSO 提供商、用户角色,并可代为登录用户进行支持。"
invitations:
- pending_label: 已邀请(待处理)
- expires: 于 %{date} 过期
- delete: 删除
- delete_all: 全部删除
+ pending_label: "已邀请(待处理)"
+ expires: "于 %{date} 过期"
+ delete: "删除"
+ delete_all: "全部删除"
+ unused_families:
+ title: "未使用的家庭 / 群组"
+ family_id: "家庭 ID:%{id}"
+ delete: "删除未使用的家庭"
+ delete_confirm: "确定要删除此未使用的家庭/群组吗?此操作无法撤销。"
+ empty: "未找到未使用的家庭/群组。"
update:
- success: 用户角色更新成功。
- failure: 更新用户角色失败。
- last_super_admin_error: 无法移除系统中的最后一位超级管理员。
+ success_role: "用户角色更新成功。"
+ success_password: "用户密码更新成功。"
+ success_role_and_password: "用户角色和密码更新成功。"
+ success_family: "用户家庭/群组归属更新成功。"
+ failure: "更新用户详细信息(角色或家庭/群组归属)失败。"
+ family_required: "请选择一个现有家庭/群组,或输入新家庭/群组的名称。"
+ password_and_family_conflict: "密码和家庭/群组归属无法同时更新。"
+ password_disabled: "已禁用设置密码,因为用户只能通过 SSO 登录。"
+ password_too_short: "密码长度必须至少为 8 个字符。"
+ password_missing_case: "密码必须同时包含大写和小写字母。"
+ password_missing_number: "密码必须包含至少一个数字。"
+ password_missing_special: "密码必须包含至少一个特殊字符。"
+ last_super_admin_error: "无法将系统中最后一位超级管理员降级。"
+ destroy:
+ success: "已撤销用户访问权限并安排永久删除。"
+ failure: "移除用户失败。"
+ cannot_remove_self: "您无法在此处移除您自己的账户。"
+ cannot_remove_last_super_admin: "您无法移除最后一位活跃的超级管理员。"
+ confirmation_mismatch: "电子邮件地址不匹配。未移除该用户。"
+ deletion:
+ title: "永久移除用户"
+ warning: "这将立即撤销访问权限并安排永久删除该用户及其数据。此操作无法撤销。"
+ instruction: "输入 %{email} 以确认。"
+ email_label: "用户邮箱"
+ cancel: "取消"
+ submit: "永久移除用户"
+ families:
+ destroy:
+ family_has_active_subscription: "家庭/群组拥有有效订阅,在取消订阅之前无法删除。"
+ family_has_users: "家庭/群组仍包含用户,无法删除。"
+ success: "家庭/群组删除成功。"
diff --git a/config/locales/views/category/dropdowns/zh-CN.yml b/config/locales/views/category/dropdowns/zh-CN.yml
index b4da34709a..ce4998dbfe 100644
--- a/config/locales/views/category/dropdowns/zh-CN.yml
+++ b/config/locales/views/category/dropdowns/zh-CN.yml
@@ -6,7 +6,13 @@ zh-CN:
delete: 删除分类
edit: 编辑分类
show:
+ assign_error: 已创建该分类,但未能分配。请再次选择“创建”以重试。
+ back: 返回
+ choose_parent: 在以下项下创建“%{name}”:
clear: 清空分类
+ create: 创建“%{name}”
+ create_as_subcategory: 添加为子分类…
+ create_error: 无法创建该分类。请重试。
no_categories: 暂无分类
recent: 最近使用
search_placeholder: 搜索分类
diff --git a/config/locales/views/rule_groups/zh-CN.yml b/config/locales/views/rule_groups/zh-CN.yml
new file mode 100644
index 0000000000..404657ecfb
--- /dev/null
+++ b/config/locales/views/rule_groups/zh-CN.yml
@@ -0,0 +1,23 @@
+---
+zh-CN:
+ rule_groups:
+ new:
+ title: 新建规则分组
+ edit:
+ title: 重命名分组“%{name}”
+ form:
+ name_label: 名称
+ name_placeholder: 例如:日用品
+ hint: 分组仅用于整理规则列表。规则仍会自上而下依次运行。
+ create:
+ success: 已创建分组
+ update:
+ success: 已重命名分组
+ destroy:
+ success: 已删除分组。其规则保留在原位置且不再属于任何分组。
+ activation:
+ activated: “%{name}”中的所有规则均已开启
+ deactivated: “%{name}”中的所有规则均已关闭
+ partially_switched:
+ one: 1 条规则无法切换。请打开该规则查看原因。
+ other: "%{count} 条规则无法切换。请打开查看原因。"
diff --git a/config/locales/views/rules/zh-CN.yml b/config/locales/views/rules/zh-CN.yml
index 34f794d666..a3e7d2fdd9 100644
--- a/config/locales/views/rules/zh-CN.yml
+++ b/config/locales/views/rules/zh-CN.yml
@@ -14,6 +14,46 @@ zh-CN:
classifier_rules:
category_classifier: 交易分类器
merchant_matcher: 商户匹配器
+ filters:
+ search_label: 搜索规则
+ search_placeholder: 搜索名称、条件和操作
+ reset: 重置
+ button: 筛选
+ done: 完成
+ active_label: 已启用的筛选
+ remove: "移除筛选 %{filter}"
+ status:
+ label: 状态
+ all: 所有状态
+ active: 已启用
+ inactive: 已停用
+ action_type:
+ label: 操作
+ all: 所有操作
+ condition_type:
+ label: 条件
+ all: 所有条件
+ account:
+ label: 账户
+ all: 所有账户
+ group:
+ label: 分组
+ all: 所有分组
+ none: 无分组
+ group:
+ rules_count:
+ one: 1 条规则
+ other: "%{count} 条规则"
+ inactive_count:
+ one: 1 条已停用
+ other: "%{count} 条已停用"
+ empty: 此分组中暂无规则。请在规则表单中选择该分组。
+ activate_all: 开启所有规则
+ deactivate_all: 关闭所有规则
+ rename: 重命名
+ delete: 删除分组
+ delete_confirm_title: "删除分组“%{name}”?"
+ delete_confirm_body: 规则保留在原位置且不再属于任何分组。不会删除任何规则。
rule:
edit: 编辑
re_apply_rule: 重新应用规则
@@ -41,6 +81,12 @@ zh-CN:
then: 然后
stop_processing_label: 停止处理后续规则
stop_processing_description: 列表中靠后的规则不会更改此规则匹配的交易。
+ group_label: 分组(可选)
+ group_select_label: 分组
+ no_group: 无分组
+ new_group_label: 或新分组
+ new_group_placeholder: 新分组的名称
+ group_hint: 分组仅用于整理列表。分组中的规则在其分组所在位置依次运行。
index:
page_title: 规则
delete_all_rules: 删除所有规则
@@ -48,6 +94,12 @@ zh-CN:
ai_cost_warning: 启用 AI 的规则操作会产生费用。请务必尽可能精确地筛选,以避免不必要的成本。
rules_heading: 规则
order_hint: 规则按从上到下的顺序运行。一旦某条规则设置了交易上的某个字段,靠后的规则就不会再更改该字段。每个匹配的规则都会添加标签。拖动规则可更改顺序。
+ new_group: 新建分组
+ reorder_group: "移动分组 %{name}。按 Enter 或空格键抓取,然后使用方向键移动。"
+ filters:
+ no_matches: 没有符合搜索或筛选条件的规则。
+ drag_disabled: 在搜索或筛选处于激活状态时已禁用排序。重置它们以更改顺序。
+ fold_rule: "折叠或展开规则 %{name}"
reorder_rule: "移动规则 %{name}。按 Enter 或空格键抓取,然后使用方向键移动。"
no_rules_title: 还没有规则
no_rules_description: 设置规则后,您每次账户同步时都可以对交易和其他数据执行操作。