diff --git a/src/public/app/widgets/attribute_widgets/attribute_editor.js b/src/public/app/widgets/attribute_widgets/attribute_editor.js
index 303a577b5..aa86ec5cc 100644
--- a/src/public/app/widgets/attribute_widgets/attribute_editor.js
+++ b/src/public/app/widgets/attribute_widgets/attribute_editor.js
@@ -1,3 +1,4 @@
+import { t } from "../../services/i18n.js";
import NoteContextAwareWidget from "../note_context_aware_widget.js";
import noteAutocompleteService from "../../services/note_autocomplete.js";
import server from "../../services/server.js";
@@ -11,11 +12,11 @@ import attributeService from "../../services/attributes.js";
import linkService from "../../services/link.js";
const HELP_TEXT = `
-
To add label, just type e.g. #rock
or if you want to add also value then e.g. #year = 2020
+${t("attribute_editor.help_text_body1")}
-For relation, type ~author = @
which should bring up an autocomplete where you can look up the desired note.
+${t("attribute_editor.help_text_body2")}
-Alternatively you can add label and relation using the +
button on the right side.
`;
+${t("attribute_editor.help_text_body3")}
`;
const TPL = `
@@ -71,8 +72,8 @@ const TPL = `
-
-
+
+
@@ -217,13 +218,13 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget {
y: e.pageY,
orientation: 'left',
items: [
- {title: `Add new label `, command: "addNewLabel", uiIcon: "bx bx-hash"},
- {title: `Add new relation `, command: "addNewRelation", uiIcon: "bx bx-transfer"},
- {title: "----"},
- {title: "Add new label definition", command: "addNewLabelDefinition", uiIcon: "bx bx-empty"},
- {title: "Add new relation definition", command: "addNewRelationDefinition", uiIcon: "bx bx-empty"},
+ { title: t("attribute_editor.add_new_label"), command: "addNewLabel", uiIcon: "bx bx-hash" },
+ { title: t("attribute_editor.add_new_relation"), command: "addNewRelation", uiIcon: "bx bx-transfer" },
+ { title: "----" },
+ { title: t("attribute_editor.add_new_label_definition"), command: "addNewLabelDefinition", uiIcon: "bx bx-empty" },
+ { title: t("attribute_editor.add_new_relation_definition"), command: "addNewRelationDefinition", uiIcon: "bx bx-empty" },
],
- selectMenuItemHandler: ({command}) => this.handleAddNewAttributeCommand(command)
+ selectMenuItemHandler: ({ command }) => this.handleAddNewAttributeCommand(command)
});
}
diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.json
index 186bb6fad..784278a23 100644
--- a/src/public/translations/cn/translation.json
+++ b/src/public/translations/cn/translation.json
@@ -390,5 +390,16 @@
"is_owned_by_note": "由此笔记所有",
"other_notes_with_name": "其它含有 {{attributeType}} 名为 \"{{attributeName}}\" 的的笔记",
"and_more": "... 以及另外 {{count}} 个"
+ },
+ "attribute_editor": {
+ "help_text_body1": "要添加标签,只需输入例如 #rock
或者如果您还想添加值,则例如 #year = 2020
",
+ "help_text_body2": "对于关系,请输入 ~author = @
,这将显示一个自动完成列表,您可以查找所需的笔记。",
+ "help_text_body3": "您也可以使用右侧的 +
按钮添加标签和关系。",
+ "save_attributes": "报错属性 ",
+ "add_a_new_attribute": "添加新属性",
+ "add_new_label": "添加新标签 ",
+ "add_new_relation": "添加新关系 ",
+ "add_new_label_definition": "添加新标签定义",
+ "add_new_relation_definition": "添加新关系定义"
}
}
diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json
index f6f37c7e4..4b8ea4ef6 100644
--- a/src/public/translations/en/translation.json
+++ b/src/public/translations/en/translation.json
@@ -390,5 +390,16 @@
"is_owned_by_note": "is owned by note",
"other_notes_with_name": "Other notes with {{attributeType}} name \"{{attributeName}}\"",
"and_more": "... and {{count}} more."
+ },
+ "attribute_editor": {
+ "help_text_body1": "To add label, just type e.g. #rock
or if you want to add also value then e.g. #year = 2020
",
+ "help_text_body2": "For relation, type ~author = @
which should bring up an autocomplete where you can look up the desired note.",
+ "help_text_body3": "Alternatively you can add label and relation using the +
button on the right side.",
+ "save_attributes": "Save attributes ",
+ "add_a_new_attribute": "Add a new attribute",
+ "add_new_label": "Add new label ",
+ "add_new_relation": "Add new relation ",
+ "add_new_label_definition": "Add new label definition",
+ "add_new_relation_definition": "Add new relation definition"
}
}