From 3ff361495e51b09dcb55c0c04f9523dab85aae5b Mon Sep 17 00:00:00 2001 From: Nriver <6752679+Nriver@users.noreply.github.com> Date: Tue, 30 Jul 2024 10:06:54 +0800 Subject: [PATCH] add translation for bulk action of relation --- .../bulk_actions/relation/add_relation.js | 17 +++++----- .../bulk_actions/relation/delete_relation.js | 11 +++--- .../bulk_actions/relation/rename_relation.js | 17 +++++----- .../relation/update_relation_target.js | 21 ++++++------ src/public/translations/cn/translation.json | 34 ++++++++++++++++++- src/public/translations/en/translation.json | 34 ++++++++++++++++++- 6 files changed, 101 insertions(+), 33 deletions(-) diff --git a/src/public/app/widgets/bulk_actions/relation/add_relation.js b/src/public/app/widgets/bulk_actions/relation/add_relation.js index 846aa870e..de8240c7d 100644 --- a/src/public/app/widgets/bulk_actions/relation/add_relation.js +++ b/src/public/app/widgets/bulk_actions/relation/add_relation.js @@ -1,24 +1,25 @@ import SpacedUpdate from "../../../services/spaced_update.js"; import AbstractBulkAction from "../abstract_bulk_action.js"; import noteAutocompleteService from "../../../services/note_autocomplete.js"; +import { t } from "../../../services/i18n.js"; const TPL = `
note
变量(正在重命名的笔记)丰富动态内容。 例如:",
@@ -471,5 +472,36 @@
"example_new_title": "NEW: ${note.title}
- 匹配的笔记标题以“NEW: ”为前缀",
"example_date_prefix": "${note.dateCreatedObj.format('MM-DD:')}: ${note.title}
- 匹配的笔记以笔记的创建月份-日期为前缀",
"api_docs": "有关详细信息,请参阅笔记及其dateCreatedObj / utcDateCreatedObj 属性的API文档。"
+ },
+ "add_relation": {
+ "add_relation": "添加关系",
+ "relation_name": "关系名称",
+ "allowed_characters": "允许的字符为字母数字、下划线和冒号。",
+ "to": "到",
+ "target_note": "目标笔记",
+ "create_relation_on_all_matched_notes": "在所有匹配的笔记上创建指定的关系。"
+ },
+ "delete_relation": {
+ "delete_relation": "删除关系",
+ "relation_name": "关系名称",
+ "allowed_characters": "允许的字符为字母数字、下划线和冒号。"
+ },
+ "rename_relation": {
+ "rename_relation_from": "重命名关系,从",
+ "old_name": "旧名称",
+ "to": "改为",
+ "new_name": "新名称",
+ "allowed_characters": "允许的字符为字母数字、下划线和冒号。"
+ },
+ "update_relation_target": {
+ "update_relation": "更新关系",
+ "relation_name": "关系名称",
+ "allowed_characters": "允许的字符为字母数字、下划线和冒号。",
+ "to": "到",
+ "target_note": "目标笔记",
+ "on_all_matched_notes": "在所有匹配的笔记上",
+ "create_given_relation": "如果笔记还没有关系,则创建给定关系",
+ "change_target_note": "或更改现有关系的目标笔记",
+ "update_relation_target": "更新关系目标"
}
}
diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json
index b72ca5f8f..1bf413ef8 100644
--- a/src/public/translations/en/translation.json
+++ b/src/public/translations/en/translation.json
@@ -428,6 +428,7 @@
"label_name_title": "Alphanumeric characters, underscore and colon are allowed characters."
},
"rename_label": {
+ "rename_label": "Rename label",
"rename_label_from": "Rename label from",
"old_name_placeholder": "old name",
"to": "To",
@@ -463,7 +464,7 @@
"nothing_will_happen": "nothing will happen if note cannot be moved to the target note (i.e. this would create a tree cycle)"
},
"rename_note": {
- "rename_note_title_to": "Rename note title to:",
+ "rename_note_title_to": "Rename note title to",
"new_note_title": "new note title",
"click_help_icon": "Click help icon on the right to see all the options",
"evaluated_as_js_string": "The given value is evaluated as JavaScript string and thus can be enriched with dynamic content via the injected note
variable (note being renamed). Examples:",
@@ -471,5 +472,36 @@
"example_new_title": "NEW: ${note.title}
- matched notes titles are prefixed with 'NEW: '",
"example_date_prefix": "${note.dateCreatedObj.format('MM-DD:')}: ${note.title}
- matched notes are prefixed with note's creation month-date",
"api_docs": "See API docs for note and its dateCreatedObj / utcDateCreatedObj properties for details."
+ },
+ "add_relation": {
+ "add_relation": "Add relation",
+ "relation_name": "relation name",
+ "allowed_characters": "Alphanumeric characters, underscore and colon are allowed characters.",
+ "to": "to",
+ "target_note": "target note",
+ "create_relation_on_all_matched_notes": "On all matched notes create given relation."
+ },
+ "delete_relation": {
+ "delete_relation": "Delete relation",
+ "relation_name": "relation name",
+ "allowed_characters": "Alphanumeric characters, underscore and colon are allowed characters."
+ },
+ "rename_relation": {
+ "rename_relation_from": "Rename relation from",
+ "old_name": "old name",
+ "to": "To",
+ "new_name": "new name",
+ "allowed_characters": "Alphanumeric characters, underscore and colon are allowed characters."
+ },
+ "update_relation_target": {
+ "update_relation": "Update relation",
+ "relation_name": "relation name",
+ "allowed_characters": "Alphanumeric characters, underscore and colon are allowed characters.",
+ "to": "to",
+ "target_note": "target note",
+ "on_all_matched_notes": "On all matched notes",
+ "create_given_relation": "create given relation if note doesn't have one yet",
+ "change_target_note": "or change target note of the existing relation",
+ "update_relation_target": "Update relation target"
}
}