diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsBlockProvider.tsx b/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsBlockProvider.tsx index 0beebedb4..360e2a1bb 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsBlockProvider.tsx +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsBlockProvider.tsx @@ -6,7 +6,6 @@ export const AuditLogsBlockProvider: React.FC = ({ children, ...restProps }) => const auditChangesCollection = useAuditChangesCollection(); const auditLogsCollection = useAuditLogsCollection(); const collectionsCollection = useCollectionsCollection(); - console.log('audit logs blocks'); return ( diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx b/packages/plugins/@hera/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx index c0156381d..8840e885d 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx @@ -144,7 +144,6 @@ export const AuditLogs: any = () => { type: 'void', title: tval('Filter'), 'x-action': 'filter', - // 'x-designer': 'Filter.Action.Designer', 'x-component': 'Filter.Action', 'x-component-props': { icon: 'FilterOutlined', @@ -184,8 +183,7 @@ export const AuditLogs: any = () => { properties: { o80rypwmeeg: { type: 'void', - title: '{{ t("View") }}', - // 'x-designer': 'Action.Designer', + title: tval('View'), 'x-toolbar': 'ActionSchemaToolbar', 'x-settings': 'actionSettings:view', 'x-component': 'Action.Link', @@ -195,7 +193,7 @@ export const AuditLogs: any = () => { properties: { drawer: { type: 'void', - title: '{{ t("View record") }}', + title: tval('View record'), 'x-component': 'Action.Container', 'x-component-props': { className: 'nb-action-popup', diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableColumnInitializers.tsx b/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableColumnInitializers.tsx index 79894126b..1837c67be 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableColumnInitializers.tsx +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableColumnInitializers.tsx @@ -55,8 +55,9 @@ export const auditLogsTableColumnInitializers = new SchemaInitializer({ } return { type: 'void', + 'x-toolbar': 'TableColumnSchemaToolbar', + 'x-settings': 'fieldSettings:TableColumn', 'x-decorator': 'TableV2.Column.Decorator', - 'x-designer': 'TableV2.Column.Designer', 'x-component': 'TableV2.Column', properties: { [s.name]: { diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/locale/index.ts b/packages/plugins/@hera/plugin-audit-logs/src/client/locale/index.ts index 799a97370..03f966a1a 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/locale/index.ts +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/locale/index.ts @@ -1,7 +1,7 @@ import { i18n, tval as nTval } from '@nocobase/client'; import { useTranslation } from 'react-i18next'; -export const NAMESPACE = 'audit-logs'; +export const NAMESPACE = '@hera/plugin-audit-logs'; export function lang(key: string) { return i18n.t(key, { ns: NAMESPACE }); diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/utils.ts b/packages/plugins/@hera/plugin-audit-logs/src/client/utils.ts index 5bca8b711..6b72b1c9b 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/utils.ts +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/utils.ts @@ -158,9 +158,9 @@ export const createSchema = () => { 'x-component': 'Select', 'x-read-pretty': true, enum: [ - { label: "{{ t('Add new') }}", value: 'create', color: 'green' }, - { label: "{{ t('Update') }}", value: 'update', color: 'blue' }, - { label: "{{ t('Delete') }}", value: 'destroy', color: 'red' }, + { label: tval('Add new'), value: 'create', color: 'green' }, + { label: tval('Update'), value: 'update', color: 'blue' }, + { label: tval('Delete'), value: 'destroy', color: 'red' }, ], }, }, @@ -175,7 +175,7 @@ export const createSchema = () => { }, properties: { [uid()]: { - title: '{{ t("View") }}', + title: tval('View'), type: 'void', 'x-action': 'view', 'x-component': 'Action.Link', @@ -189,7 +189,7 @@ export const createSchema = () => { 'x-component-props': { className: 'nb-action-popup', }, - title: '{{ t("View record") }}', + title: tval('View record'), properties: { created_at: { type: 'string', @@ -266,7 +266,7 @@ export const createSchema = () => { column2: { type: 'void', 'x-component': 'Table.Column', - 'x-component-props': { title: "{{ t('Before change') }}" }, + 'x-component-props': { title: tval('Before change') }, properties: { before: { type: 'string', @@ -278,7 +278,7 @@ export const createSchema = () => { column3: { type: 'void', 'x-component': 'Table.Column', - 'x-component-props': { title: "{{ t('After change') }}" }, + 'x-component-props': { title: tval('After change') }, properties: { after: { type: 'string', diff --git a/packages/plugins/@hera/plugin-audit-logs/src/locale/en-US.json b/packages/plugins/@hera/plugin-audit-logs/src/locale/en-US.json index 3dc09f65a..52ab661de 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/locale/en-US.json +++ b/packages/plugins/@hera/plugin-audit-logs/src/locale/en-US.json @@ -1,4 +1,44 @@ { + "Action column": "Action column", + "Action type": "Action type", + "Actions": "Actions", + "Add new": "Add new", + "After change": "After change", + "Audit Changes": "Audit Changes", + "Audit Logs": "Audit Logs", + "Audit logs": "Audit logs", + "Before change": "Before change", + "Cancel": "Cancel", + "Collection display name": "Collection display name", + "Collection name": "Collection name", + "Collection": "Collection", + "Collections": "Collections", + "Column width": "Column width", + "Configure actions": "Configure actions", + "Configure columns": "Configure columns", + "Create record": "Create record", + "Created at": "Created at", + "Created by": "Created by", + "Data changes": "Data changes", + "Delete record": "Delete record", + "Delete": "Delete", "Details of changes": "Details of changes", - "Create record": "Create record" + "Details": "Details", + "Display fields": "Display fields", + "Display association fields": "Display association fields", + "Enable actions": "Enable actions", + "Field display name": "Field display name", + "Field value changes": "Field value changes", + "Field": "Field", + "Filter": "Filter", + "Insert": "Insert", + "Record ID": "Record ID", + "Records per page": "Records per page", + "Refresh": "Refresh", + "Submit": "Submit", + "Update record": "Update record", + "Update": "Update", + "User": "User", + "View record": "View record", + "View": "View" } diff --git a/packages/plugins/@hera/plugin-audit-logs/src/locale/zh-CN.json b/packages/plugins/@hera/plugin-audit-logs/src/locale/zh-CN.json index 783f355b5..73aa73b72 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/locale/zh-CN.json +++ b/packages/plugins/@hera/plugin-audit-logs/src/locale/zh-CN.json @@ -1,4 +1,44 @@ { - "Details of changes": "变更详情", - "Create record": "创建数据" + "Action column": "操作列", + "Action type": "操作类型", + "Actions": "操作", + "Add new": "添加", + "After change": "变化后", + "Audit Changes": "审计变化", + "Audit Logs": "审计日志", + "Audit logs": "审计日志", + "Before change": "变化前", + "Cancel": "取消", + "Collection display name": "数据集显示名称", + "Collection name": "数据集名称", + "Collection": "数据集", + "Collections": "数据集", + "Column width": "列宽", + "Configure actions": "操作配置", + "Configure columns": "列配置", + "Create record": "新增数据", + "Created at": "创建于", + "Created by": "由创建", + "Data changes": "数据变化", + "Delete record": "删除数据", + "Delete": "删除", + "Details of changes": "变化详情", + "Details": "详情", + "Display association fields": "显示关联字段", + "Display fields": "显示字段", + "Enable actions": "启用的操作", + "Field display name": "字段显示名称", + "Field value changes": "字段值变化", + "Field": "字段", + "Filter": "过滤", + "Insert": "插入", + "Record ID": "数据 ID", + "Records per page": "每页数据", + "Refresh": "刷新", + "Submit": "提交", + "Update record": "编辑数据", + "Update": "编辑", + "User": "用户", + "View record": "查看数据", + "View": "查看" }