diff --git a/packages/core/client/src/locale/en-US.json b/packages/core/client/src/locale/en-US.json index 930fed2c53..adea6f965f 100644 --- a/packages/core/client/src/locale/en-US.json +++ b/packages/core/client/src/locale/en-US.json @@ -476,6 +476,8 @@ "Action permissions": "Action permissions", "Menu permissions": "Menu permissions", "Menu item name": "Menu item name", + "Input value": "Input value", + "Output value": "Output value", "Allow access": "Allow access", "Action name": "Action name", "Allow action": "Allow action", diff --git a/packages/core/client/src/locale/zh-CN.json b/packages/core/client/src/locale/zh-CN.json index 6fff8bcf54..db0ad0da99 100644 --- a/packages/core/client/src/locale/zh-CN.json +++ b/packages/core/client/src/locale/zh-CN.json @@ -1033,6 +1033,8 @@ "Left": "左", "Center": "居中", "Right": "右", + "Input value": "输入值", + "Output value": "输出值", "Divider line color": "分割线颜色", "Label align": "字段标题对齐方式", "Label width": "字段标题宽度", diff --git a/packages/plugins/@nocobase/plugin-variable-helpers/src/client/index.tsx b/packages/plugins/@nocobase/plugin-variable-helpers/src/client/index.tsx index 1ddd04b67f..fa301f8df5 100644 --- a/packages/plugins/@nocobase/plugin-variable-helpers/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-variable-helpers/src/client/index.tsx @@ -8,14 +8,14 @@ */ import { Plugin } from '@nocobase/client'; -import { filterGroups, variableFilters } from '../json-template-filters'; +import { helperGroups, helpers } from '../json-template-helpers'; export class PluginVariableFiltersClient extends Plugin { async afterAdd() { - filterGroups.forEach((group) => { + helperGroups.forEach((group) => { this.app.jsonTemplateParser.registerFilterGroup(group); }); - variableFilters.forEach((filter) => { + helpers.forEach((filter) => { this.app.jsonTemplateParser.registerFilter(filter); }); } diff --git a/packages/plugins/@nocobase/plugin-variable-helpers/src/json-template-filters/array.ts b/packages/plugins/@nocobase/plugin-variable-helpers/src/json-template-helpers/array.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-variable-helpers/src/json-template-filters/array.ts rename to packages/plugins/@nocobase/plugin-variable-helpers/src/json-template-helpers/array.ts diff --git a/packages/plugins/@nocobase/plugin-variable-helpers/src/json-template-filters/date.ts b/packages/plugins/@nocobase/plugin-variable-helpers/src/json-template-helpers/date.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-variable-helpers/src/json-template-filters/date.ts rename to packages/plugins/@nocobase/plugin-variable-helpers/src/json-template-helpers/date.ts diff --git a/packages/plugins/@nocobase/plugin-variable-helpers/src/json-template-filters/index.ts b/packages/plugins/@nocobase/plugin-variable-helpers/src/json-template-helpers/index.ts similarity index 96% rename from packages/plugins/@nocobase/plugin-variable-helpers/src/json-template-filters/index.ts rename to packages/plugins/@nocobase/plugin-variable-helpers/src/json-template-helpers/index.ts index 589cd83b16..511f86f820 100644 --- a/packages/plugins/@nocobase/plugin-variable-helpers/src/json-template-filters/index.ts +++ b/packages/plugins/@nocobase/plugin-variable-helpers/src/json-template-helpers/index.ts @@ -9,13 +9,13 @@ import { first } from './array'; import { dateAdd, dateFormat, dateSubtract } from './date'; -const NAMESPACE = 'variable-filters'; +const NAMESPACE = 'variable-helpers'; function tval(text: string) { return `{{t(${JSON.stringify(text)}, ${JSON.stringify({ ns: NAMESPACE, nsMode: 'fallback' })})}}`; } -export const variableFilters = [ +export const helpers = [ { name: 'date_format', title: 'format', @@ -112,7 +112,7 @@ export const variableFilters = [ }, ]; -export const filterGroups = [ +export const helperGroups = [ { name: 'date', title: "{{t('Date')}}", diff --git a/packages/plugins/@nocobase/plugin-variable-helpers/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-variable-helpers/src/server/plugin.ts index d6561ab2ab..0383bd91a5 100644 --- a/packages/plugins/@nocobase/plugin-variable-helpers/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-variable-helpers/src/server/plugin.ts @@ -8,18 +8,18 @@ */ import { Plugin } from '@nocobase/server'; -import { variableFilters, filterGroups } from '../json-template-filters'; +import { helperGroups, helpers } from '../json-template-helpers'; export class PluginVariableFiltersServer extends Plugin { async afterAdd() {} async beforeLoad() {} async load() { - filterGroups.forEach((group) => { + helperGroups.forEach((group) => { this.app.jsonTemplateParser.registerFilterGroup(group); }); - variableFilters.forEach((filter) => { + helpers.forEach((filter) => { this.app.jsonTemplateParser.registerFilter(filter); }); }