diff --git a/src/public/app/widgets/ribbon_widgets/image_properties.js b/src/public/app/widgets/ribbon_widgets/image_properties.js
index 18bfdd651..7ac67a810 100644
--- a/src/public/app/widgets/ribbon_widgets/image_properties.js
+++ b/src/public/app/widgets/ribbon_widgets/image_properties.js
@@ -3,34 +3,35 @@ import NoteContextAwareWidget from "../note_context_aware_widget.js";
import toastService from "../../services/toast.js";
import openService from "../../services/open.js";
import utils from "../../services/utils.js";
+import { t } from "../../services/i18n.js";
const TPL = `
- Original file name:
+ ${t("image_properties.original_file_name")}:
- File type:
+ ${t("image_properties.file_type")}:
- File size:
+ ${t("image_properties.file_size")}:
-
+
-
+
-
+
-
+
@@ -53,7 +54,7 @@ export default class ImagePropertiesWidget extends NoteContextAwareWidget {
return {
show: this.isEnabled(),
activate: true,
- title: 'Image',
+ title: t("image_properties.title"),
icon: 'bx bx-image'
};
}
@@ -89,14 +90,13 @@ export default class ImagePropertiesWidget extends NoteContextAwareWidget {
const result = await server.upload(`images/${this.noteId}`, fileToUpload);
if (result.uploaded) {
- toastService.showMessage("New image revision has been uploaded.");
+ toastService.showMessage(t("image_properties.upload_success"));
await utils.clearBrowserCache();
this.refresh();
- }
- else {
- toastService.showError(`Upload of a new image revision failed: ${result.message}`);
+ } else {
+ toastService.showError(t("image_properties.upload_failed", { message: result.message }));
}
});
}
diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.json
index 3b9e07459..a5884f76e 100644
--- a/src/public/translations/cn/translation.json
+++ b/src/public/translations/cn/translation.json
@@ -685,9 +685,21 @@
"file_size": "文件大小",
"download": "下载",
"open": "打开",
- "upload_new_revision": "上传新修改",
- "upload_success": "新文件修改已上传。",
- "upload_failed": "新文件修改上传失败。",
+ "upload_new_revision": "上传新版本",
+ "upload_success": "新文件版本已上传。",
+ "upload_failed": "新文件版本上传失败。",
"title": "文件"
+ },
+ "image_properties": {
+ "original_file_name": "原始文件名",
+ "file_type": "文件类型",
+ "file_size": "文件大小",
+ "download": "下载",
+ "open": "打开",
+ "copy_reference_to_clipboard": "复制引用到剪贴板",
+ "upload_new_revision": "上传新版本",
+ "upload_success": "新图像版本已上传。",
+ "upload_failed": "新图像版本上传失败:{{message}}",
+ "title": "图像"
}
}
diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json
index 83f4f86d6..391fed053 100644
--- a/src/public/translations/en/translation.json
+++ b/src/public/translations/en/translation.json
@@ -690,5 +690,17 @@
"upload_success": "New file revision has been uploaded.",
"upload_failed": "Upload of a new file revision failed.",
"title": "File"
+ },
+ "image_properties": {
+ "original_file_name": "Original file name",
+ "file_type": "File type",
+ "file_size": "File size",
+ "download": "Download",
+ "open": "Open",
+ "copy_reference_to_clipboard": "Copy reference to clipboard",
+ "upload_new_revision": "Upload new revision",
+ "upload_success": "New image revision has been uploaded.",
+ "upload_failed": "Upload of a new image revision failed: {{message}}",
+ "title": "Image"
}
}