From f116e5222836b43ea90fcbab9b5a5c3b9b62e2e9 Mon Sep 17 00:00:00 2001 From: Nriver <6752679+Nriver@users.noreply.github.com> Date: Tue, 30 Jul 2024 10:15:07 +0800 Subject: [PATCH] add translation for bulk action titles --- src/public/app/widgets/bulk_actions/execute_script.js | 2 +- src/public/app/widgets/bulk_actions/label/add_label.js | 2 +- src/public/app/widgets/bulk_actions/label/delete_label.js | 2 +- src/public/app/widgets/bulk_actions/label/rename_label.js | 2 +- .../app/widgets/bulk_actions/label/update_label_value.js | 2 +- src/public/app/widgets/bulk_actions/note/delete_note.js | 2 +- src/public/translations/cn/translation.json | 3 +++ src/public/translations/en/translation.json | 3 +++ 8 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/public/app/widgets/bulk_actions/execute_script.js b/src/public/app/widgets/bulk_actions/execute_script.js index 7adf39968..c4740ff0d 100644 --- a/src/public/app/widgets/bulk_actions/execute_script.js +++ b/src/public/app/widgets/bulk_actions/execute_script.js @@ -36,7 +36,7 @@ const TPL = ` export default class ExecuteScriptBulkAction extends AbstractBulkAction { static get actionName() { return "executeScript"; } - static get actionTitle() { return "Execute script"; } + static get actionTitle() { return t("execute_script.execute_script"); } doRender() { const $action = $(TPL); diff --git a/src/public/app/widgets/bulk_actions/label/add_label.js b/src/public/app/widgets/bulk_actions/label/add_label.js index 83782038a..ba678dc7c 100644 --- a/src/public/app/widgets/bulk_actions/label/add_label.js +++ b/src/public/app/widgets/bulk_actions/label/add_label.js @@ -40,7 +40,7 @@ const TPL = ` export default class AddLabelBulkAction extends AbstractBulkAction { static get actionName() { return "addLabel"; } - static get actionTitle() { return "Add label"; } + static get actionTitle() { return t("add_label.add_label"); } doRender() { const $action = $(TPL); diff --git a/src/public/app/widgets/bulk_actions/label/delete_label.js b/src/public/app/widgets/bulk_actions/label/delete_label.js index 003d1db94..ba2c393a0 100644 --- a/src/public/app/widgets/bulk_actions/label/delete_label.js +++ b/src/public/app/widgets/bulk_actions/label/delete_label.js @@ -21,7 +21,7 @@ const TPL = ` export default class DeleteLabelBulkAction extends AbstractBulkAction { static get actionName() { return "deleteLabel"; } - static get actionTitle() { return "Delete label"; } + static get actionTitle() { return t("delete_label.delete_label"); } doRender() { const $action = $(TPL); diff --git a/src/public/app/widgets/bulk_actions/label/rename_label.js b/src/public/app/widgets/bulk_actions/label/rename_label.js index 72732166e..c250e795c 100644 --- a/src/public/app/widgets/bulk_actions/label/rename_label.js +++ b/src/public/app/widgets/bulk_actions/label/rename_label.js @@ -30,7 +30,7 @@ const TPL = ` export default class RenameLabelBulkAction extends AbstractBulkAction { static get actionName() { return "renameLabel"; } - static get actionTitle() { return "Rename label"; } + static get actionTitle() { return t("rename_label.rename_label"); } doRender() { const $action = $(TPL); diff --git a/src/public/app/widgets/bulk_actions/label/update_label_value.js b/src/public/app/widgets/bulk_actions/label/update_label_value.js index 0f65fbeb8..e2729f0da 100644 --- a/src/public/app/widgets/bulk_actions/label/update_label_value.js +++ b/src/public/app/widgets/bulk_actions/label/update_label_value.js @@ -35,7 +35,7 @@ const TPL = ` export default class UpdateLabelValueBulkAction extends AbstractBulkAction { static get actionName() { return "updateLabelValue"; } - static get actionTitle() { return "Update label value"; } + static get actionTitle() { return t("update_label_value.update_label_value"); } doRender() { const $action = $(TPL); diff --git a/src/public/app/widgets/bulk_actions/note/delete_note.js b/src/public/app/widgets/bulk_actions/note/delete_note.js index 544e57a07..572099a66 100644 --- a/src/public/app/widgets/bulk_actions/note/delete_note.js +++ b/src/public/app/widgets/bulk_actions/note/delete_note.js @@ -26,7 +26,7 @@ const TPL = ` export default class DeleteNoteBulkAction extends AbstractBulkAction { static get actionName() { return "deleteNote"; } - static get actionTitle() { return "Delete note"; } + static get actionTitle() { return t("delete_note.delete_note"); } doRender() { return $(TPL); diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.json index 3fe64ac00..55752c4ed 100644 --- a/src/public/translations/cn/translation.json +++ b/src/public/translations/cn/translation.json @@ -445,6 +445,7 @@ "help_text_note": "您也可以在不指定值的情况下调用此方法,这种情况下,标签将分配给没有值的笔记。" }, "delete_note": { + "delete_note": "删除笔记", "delete_matched_notes": "删除匹配的笔记", "delete_matched_notes_description": "这将删除匹配的笔记。", "undelete_notes_instruction": "删除后,可以从“最近修改”对话框中恢复它们。", @@ -464,6 +465,7 @@ "nothing_will_happen": "如果笔记无法移动到目标笔记(即这会创建一个树循环),则不会发生任何事情" }, "rename_note": { + "rename_note": "重命名笔记", "rename_note_title_to": "重命名笔记标题为", "new_note_title": "新笔记标题", "click_help_icon": "点击右侧的帮助图标查看所有选项", @@ -487,6 +489,7 @@ "allowed_characters": "允许的字符为字母数字、下划线和冒号。" }, "rename_relation": { + "rename_relation": "重命名关系", "rename_relation_from": "重命名关系,从", "old_name": "旧名称", "to": "改为", diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json index 1bf413ef8..62233356c 100644 --- a/src/public/translations/en/translation.json +++ b/src/public/translations/en/translation.json @@ -445,6 +445,7 @@ "help_text_note": "You can also call this method without value, in such case label will be assigned to the note without value." }, "delete_note": { + "delete_note": "Delete note", "delete_matched_notes": "Delete matched notes", "delete_matched_notes_description": "This will delete matched notes.", "undelete_notes_instruction": "After the deletion, it's possible to undelete them from Recent Changes dialog.", @@ -464,6 +465,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": "Rename note", "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", @@ -487,6 +489,7 @@ "allowed_characters": "Alphanumeric characters, underscore and colon are allowed characters." }, "rename_relation": { + "rename_relation": "Rename relation", "rename_relation_from": "Rename relation from", "old_name": "old name", "to": "To",