From f241aa33b219d0a64dc549c9378796dd6ea900fc Mon Sep 17 00:00:00 2001 From: windingwind <33902321+windingwind@users.noreply.github.com> Date: Mon, 30 Oct 2023 13:55:52 +0800 Subject: [PATCH] fix: missing locales --- addon/locale/en-US/addon.ftl | 4 ++++ addon/locale/ru-RU/addon.ftl | 4 ++++ addon/locale/zh-CN/addon.ftl | 4 ++++ src/modules/editor/menu.ts | 4 ++-- src/modules/editor/popup.ts | 6 +++--- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/addon/locale/en-US/addon.ftl b/addon/locale/en-US/addon.ftl index c1eaf48..5571028 100644 --- a/addon/locale/en-US/addon.ftl +++ b/addon/locale/en-US/addon.ftl @@ -30,6 +30,10 @@ menuEditor-resizeImage = Resize Image templateEditor-templateName = Template Name +editor-resizeImage-title = Resize Image +editor-resizeImage-prompt = Resize image width to: +editor-previewImage-title = Preview Image + tab-name = Note Workspace tab-openInWindow = Drag and drop here to open workspace in new window diff --git a/addon/locale/ru-RU/addon.ftl b/addon/locale/ru-RU/addon.ftl index 407bc04..c202598 100644 --- a/addon/locale/ru-RU/addon.ftl +++ b/addon/locale/ru-RU/addon.ftl @@ -30,6 +30,10 @@ menuEditor-resizeImage=Изменить размер изображения templateEditor-templateName = Имя шаблона +editor-resizeImage-title = Resize Image +editor-resizeImage-prompt = Resize image width to: +editor-previewImage-title = Preview Image + tab-name=Рабочее пространство заметок tab-openInWindow=Перетащите сюда для открытия раб. пространства в новом окне diff --git a/addon/locale/zh-CN/addon.ftl b/addon/locale/zh-CN/addon.ftl index f9ff82b..566444f 100644 --- a/addon/locale/zh-CN/addon.ftl +++ b/addon/locale/zh-CN/addon.ftl @@ -30,6 +30,10 @@ menuEditor-resizeImage=缩放图片 templateEditor-templateName = 模板名称 +editor-resizeImage-title = 缩放图片 +editor-resizeImage-prompt = 缩放图片宽度为: +editor-previewImage-title = 预览图片 + tab-name=笔记工作区 tab-openInWindow=拖放到此处以在新窗口打开 diff --git a/src/modules/editor/menu.ts b/src/modules/editor/menu.ts index 453d00d..0cc95f5 100644 --- a/src/modules/editor/menu.ts +++ b/src/modules/editor/menu.ts @@ -24,12 +24,12 @@ export function initEditorMenu(editor: Zotero.EditorInstance) { tag: "menuitem", id: menuitemID, classList: [config.addonRef], - label: getString("menuEditor.resizeImage"), + label: getString("menuEditor-resizeImage"), icon: `chrome://${config.addonRef}/content/icons/favicon.png`, commandListener: (ev) => { const newWidth = parseFloat( editor._iframeWindow.prompt( - getString("editor.resizeImage.prompt"), + getString("editor-resizeImage-prompt"), // @ts-ignore getEditorCore(editor).view.state.selection.node?.attrs?.width, ) || "", diff --git a/src/modules/editor/popup.ts b/src/modules/editor/popup.ts index d868535..5de48d5 100644 --- a/src/modules/editor/popup.ts +++ b/src/modules/editor/popup.ts @@ -199,7 +199,7 @@ function updateEditorImagePopup(editor: Zotero.EditorInstance) { id: "image-popup-preview", properties: { innerHTML: ICONS.previewImage, - title: getString("editor.previewImage.title"), + title: getString("editor-previewImage-title"), }, removeIfExists: true, enableElementRecord: false, @@ -233,7 +233,7 @@ function updateEditorImagePopup(editor: Zotero.EditorInstance) { id: "image-popup-resize", properties: { innerHTML: ICONS.resizeImage, - title: getString("editor.resizeImage.title"), + title: getString("editor-resizeImage-title"), }, removeIfExists: true, listeners: [ @@ -242,7 +242,7 @@ function updateEditorImagePopup(editor: Zotero.EditorInstance) { listener: (e) => { const newWidth = parseFloat( editor._iframeWindow.prompt( - getString("editor.resizeImage.prompt"), + getString("editor-resizeImage-prompt"), // @ts-ignore getEditorCore(editor).view.state.selection.node?.attrs ?.width,