// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.

/**
 * Auto-generated by 'os i18n extract' for locale 'zh-CN'.
 * Edit translations in place; re-run extract (with --merge) to fill new gaps.
 * Do not hand-edit the structure — only the leaf string values.
 */

import type { TranslationData } from '@objectstack/spec/system';

export const zhCNObjects: NonNullable<TranslationData['objects']> = {
  sys_role: {
    label: "角色",
    pluralLabel: "角色",
    description: "用于 RBAC 访问控制的角色定义",
    fields: {
      label: {
        label: "显示名称"
      },
      name: {
        label: "API 名称",
        help: "角色的唯一机器名称（例如 admin、editor、viewer）"
      },
      description: {
        label: "描述"
      },
      permissions: {
        label: "权限",
        help: "权限字符串数组的 JSON 序列化内容"
      },
      active: {
        label: "启用"
      },
      is_default: {
        label: "默认角色",
        help: "自动分配给新用户"
      },
      id: {
        label: "角色 ID"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    },
    _views: {
      active: {
        label: "启用"
      },
      default_roles: {
        label: "默认"
      },
      custom: {
        label: "自定义"
      },
      all_roles: {
        label: "全部"
      }
    },
    _actions: {
      activate_role: {
        label: "激活角色",
        successMessage: "角色已激活"
      },
      deactivate_role: {
        label: "停用角色",
        confirmText: "确定要停用此角色吗？拥有该角色的用户仍保留其分配，但在重新激活之前该角色将不再授予权限。",
        successMessage: "角色已停用"
      },
      set_default_role: {
        label: "设为默认",
        confirmText: "将此角色设为新用户的默认角色吗？现有用户不受影响。",
        successMessage: "已更新默认角色"
      },
      clone_role: {
        label: "克隆角色",
        successMessage: "已克隆角色"
      }
    }
  },
  sys_permission_set: {
    label: "权限集",
    pluralLabel: "权限集",
    description: "用于精细化访问控制的命名权限分组",
    fields: {
      label: {
        label: "显示名称"
      },
      name: {
        label: "API 名称",
        help: "权限集的唯一机器名称"
      },
      description: {
        label: "描述"
      },
      object_permissions: {
        label: "对象权限",
        help: "对象级 CRUD 权限的 JSON 序列化内容"
      },
      field_permissions: {
        label: "字段权限",
        help: "字段级读写权限的 JSON 序列化内容"
      },
      system_permissions: {
        label: "系统权限",
        help: "系统能力名称的 JSON 序列化数组（例如 [\"setup.access\",\"studio.access\",\"manage_users\"]）"
      },
      row_level_security: {
        label: "行级安全",
        help: "行级安全策略的 JSON 序列化数组（USING/CHECK 子句）"
      },
      tab_permissions: {
        label: "标签页权限",
        help: "应用标签页可见性的 JSON 序列化映射（visible | hidden | default_on | default_off）"
      },
      active: {
        label: "启用"
      },
      id: {
        label: "权限集 ID"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    },
    _views: {
      active: {
        label: "启用"
      },
      inactive: {
        label: "停用"
      },
      all_permsets: {
        label: "全部"
      }
    },
    _actions: {
      activate_permission_set: {
        label: "激活",
        successMessage: "权限集已激活"
      },
      deactivate_permission_set: {
        label: "停用",
        confirmText: "确定要停用此权限集吗？现有分配仍将保留，但在重新激活之前将不再授予访问权限。",
        successMessage: "权限集已停用"
      },
      clone_permission_set: {
        label: "克隆",
        successMessage: "已克隆权限集"
      }
    }
  },
  sys_user_permission_set: {
    label: "用户权限集",
    pluralLabel: "用户权限集",
    description: "将权限集直接分配给用户（可按组织范围限定）。",
    fields: {
      id: {
        label: "分配 ID",
        help: "该分配记录的 UUID。"
      },
      user_id: {
        label: "用户",
        help: "指向 sys_user 的外键。"
      },
      permission_set_id: {
        label: "权限集",
        help: "指向 sys_permission_set 的外键。"
      },
      organization_id: {
        label: "组织",
        help: "可选的组织范围。NULL = 在所有组织上下文中都生效。"
      },
      granted_by: {
        label: "授权人",
        help: "授予该权限集的用户。"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    }
  },
  sys_role_permission_set: {
    label: "角色权限集",
    pluralLabel: "角色权限集",
    description: "将权限集绑定到角色。",
    fields: {
      id: {
        label: "绑定 ID",
        help: "角色-权限集绑定记录的 UUID。"
      },
      role_id: {
        label: "角色",
        help: "指向 sys_role 的外键。"
      },
      permission_set_id: {
        label: "权限集",
        help: "指向 sys_permission_set 的外键。"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    }
  }
};
