diff --git a/src/public/app/widgets/ribbon_widgets/script_executor.js b/src/public/app/widgets/ribbon_widgets/script_executor.js index 892897b3a..0afc389b7 100644 --- a/src/public/app/widgets/ribbon_widgets/script_executor.js +++ b/src/public/app/widgets/ribbon_widgets/script_executor.js @@ -1,5 +1,6 @@ import NoteContextAwareWidget from "../note_context_aware_widget.js"; import keyboardActionService from "../../services/keyboard_actions.js"; +import { t } from "../../services/i18n.js"; const TPL = `
@@ -37,7 +38,7 @@ export default class ScriptExecutorWidget extends NoteContextAwareWidget { return { show: this.isEnabled(), activate: true, - title: this.isTriliumSqlite() ? 'Query' : 'Script', + title: this.isTriliumSqlite() ? t('script_executor.query') : t('script_executor.script'), icon: 'bx bx-run' }; } @@ -52,7 +53,7 @@ export default class ScriptExecutorWidget extends NoteContextAwareWidget { async refreshWithNote(note) { const executeTitle = note.getLabelValue('executeButton') - || (this.isTriliumSqlite() ? 'Execute Query' : 'Execute Script'); + || (this.isTriliumSqlite() ? t('script_executor.execute_query') : t('script_executor.execute_script')); this.$executeButton.text(executeTitle); this.$executeButton.attr('title', executeTitle); diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.json index d0d398b12..c1fc35339 100644 --- a/src/public/translations/cn/translation.json +++ b/src/public/translations/cn/translation.json @@ -746,5 +746,11 @@ "unknown_attribute_type": "未知的属性类型 '{{type}}'", "add_new_attribute": "添加新属性", "remove_this_attribute": "移除此属性" + }, + "script_executor": { + "query": "查询", + "script": "脚本", + "execute_query": "执行查询", + "execute_script": "执行脚本" } } diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json index 3b9ae57f7..094a5c09e 100644 --- a/src/public/translations/en/translation.json +++ b/src/public/translations/en/translation.json @@ -747,5 +747,11 @@ "unknown_attribute_type": "Unknown attribute type '{{type}}'", "add_new_attribute": "Add new attribute", "remove_this_attribute": "Remove this attribute" + }, + "script_executor": { + "query": "Query", + "script": "Script", + "execute_query": "Execute Query", + "execute_script": "Execute Script" } }