translation for nodes
This commit is contained in:
1 parent
1e614a6c18
commit
0ff92fe429
4 files changed
+5
-2
No files matched your search
@@ -24,6 +24,7 @@
|
|||||||
"newFile": "New File...",
|
"newFile": "New File...",
|
||||||
"newFolder": "New Folder...",
|
"newFolder": "New Folder...",
|
||||||
"newWindow": "New Window",
|
"newWindow": "New Window",
|
||||||
|
"nodeDefinition": "NODES",
|
||||||
"open": "Open...",
|
"open": "Open...",
|
||||||
"openProject": "Open Project",
|
"openProject": "Open Project",
|
||||||
"paste": "Paste",
|
"paste": "Paste",
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
"newFile": "新建行为树...",
|
"newFile": "新建行为树...",
|
||||||
"newFolder": "新建目录...",
|
"newFolder": "新建目录...",
|
||||||
"newWindow": "新建窗口",
|
"newWindow": "新建窗口",
|
||||||
|
"nodeDefinition": "节点定义",
|
||||||
"open": "打开...",
|
"open": "打开...",
|
||||||
"openProject": "打开项目",
|
"openProject": "打开项目",
|
||||||
"paste": "粘贴",
|
"paste": "粘贴",
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ export const Explorer: FC = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (workspace.nodeTree) {
|
if (workspace.nodeTree) {
|
||||||
|
workspace.nodeTree.title = t("nodeDefinition");
|
||||||
workspace.nodeTree.icon = (
|
workspace.nodeTree.icon = (
|
||||||
<Flex justify="center" align="center" style={{ height: "100%" }}>
|
<Flex justify="center" align="center" style={{ height: "100%" }}>
|
||||||
<PiTreeStructureFill size={19} />
|
<PiTreeStructureFill size={19} />
|
||||||
|
|||||||
@@ -445,7 +445,7 @@ export const useWorkspace = create<WorkspaceStore>((set, get) => ({
|
|||||||
const workspace = get();
|
const workspace = get();
|
||||||
const nodeDefData = readJson(`${workspace.workdir}/node-config.b3-setting`) as NodeDef[];
|
const nodeDefData = readJson(`${workspace.workdir}/node-config.b3-setting`) as NodeDef[];
|
||||||
const nodeTree: NodeTreeType = {
|
const nodeTree: NodeTreeType = {
|
||||||
title: "NODES",
|
title: i18n.t("nodeDefinition"),
|
||||||
children: [],
|
children: [],
|
||||||
style: {
|
style: {
|
||||||
fontWeight: "bold",
|
fontWeight: "bold",
|
||||||
@@ -455,7 +455,7 @@ export const useWorkspace = create<WorkspaceStore>((set, get) => ({
|
|||||||
const nodeDefs: Map<string, NodeDef> = new Map();
|
const nodeDefs: Map<string, NodeDef> = new Map();
|
||||||
for (const v of nodeDefData) {
|
for (const v of nodeDefData) {
|
||||||
nodeDefs.set(v.name, v);
|
nodeDefs.set(v.name, v);
|
||||||
let catalog: NodeTreeType | undefined = nodeTree.children?.find((nt) => nt.title === v.type);
|
let catalog = nodeTree.children?.find((nt) => nt.title === v.type);
|
||||||
if (!catalog) {
|
if (!catalog) {
|
||||||
catalog = {
|
catalog = {
|
||||||
title: v.type,
|
title: v.type,
|
||||||
|
|||||||
Reference in new issue
Block a user