-
+
-
+
-
+
@@ -72,7 +73,7 @@ export default class FilePropertiesWidget extends NoteContextAwareWidget {
return {
show: this.isEnabled(),
activate: true,
- title: 'File',
+ title: t("file_properties.title"),
icon: 'bx bx-file'
};
}
@@ -103,12 +104,11 @@ export default class FilePropertiesWidget extends NoteContextAwareWidget {
const result = await server.upload(`notes/${this.noteId}/file`, fileToUpload);
if (result.uploaded) {
- toastService.showMessage("New file revision has been uploaded.");
+ toastService.showMessage(t("file_properties.upload_success"));
this.refresh();
- }
- else {
- toastService.showError("Upload of a new file revision failed.");
+ } else {
+ toastService.showError(t("file_properties.upload_failed"));
}
});
}
@@ -126,7 +126,7 @@ export default class FilePropertiesWidget extends NoteContextAwareWidget {
// open doesn't work for protected notes since it works through a browser which isn't in protected session
this.$openButton.toggle(!note.isProtected);
- this.$downloadButton.toggle(!note.isProtected || protectedSessionHolder.isProtectedSessionAvailable())
- this.$uploadNewRevisionButton.toggle(!note.isProtected || protectedSessionHolder.isProtectedSessionAvailable())
+ this.$downloadButton.toggle(!note.isProtected || protectedSessionHolder.isProtectedSessionAvailable());
+ this.$uploadNewRevisionButton.toggle(!note.isProtected || protectedSessionHolder.isProtectedSessionAvailable());
}
}
diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.json
index cf6e6499d..3b9e07459 100644
--- a/src/public/translations/cn/translation.json
+++ b/src/public/translations/cn/translation.json
@@ -677,5 +677,17 @@
"no_edited_notes_found": "今天还没有编辑过的笔记...",
"title": "编辑过的笔记",
"deleted": "(已删除)"
+ },
+ "file_properties": {
+ "note_id": "笔记 ID",
+ "original_file_name": "原始文件名",
+ "file_type": "文件类型",
+ "file_size": "文件大小",
+ "download": "下载",
+ "open": "打开",
+ "upload_new_revision": "上传新修改",
+ "upload_success": "新文件修改已上传。",
+ "upload_failed": "新文件修改上传失败。",
+ "title": "文件"
}
}
diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json
index 12d26e888..83f4f86d6 100644
--- a/src/public/translations/en/translation.json
+++ b/src/public/translations/en/translation.json
@@ -678,5 +678,17 @@
"no_edited_notes_found": "No edited notes on this day yet ...",
"title": "Edited Notes",
"deleted": "(deleted)"
+ },
+ "file_properties": {
+ "note_id": "Note ID",
+ "original_file_name": "Original file name",
+ "file_type": "File type",
+ "file_size": "File size",
+ "download": "Download",
+ "open": "Open",
+ "upload_new_revision": "Upload new revision",
+ "upload_success": "New file revision has been uploaded.",
+ "upload_failed": "Upload of a new file revision failed.",
+ "title": "File"
}
}
|