add translation for ribbon widgets: inherited_attribute_list.js

This commit is contained in:
Nriver 2024-08-05 10:43:11 +08:00
parent 6743eb8d1b
commit 931e319fbf
3 changed files with 11 additions and 2 deletions

View File

@ -2,6 +2,7 @@ import NoteContextAwareWidget from "../note_context_aware_widget.js";
import AttributeDetailWidget from "../attribute_widgets/attribute_detail.js"; import AttributeDetailWidget from "../attribute_widgets/attribute_detail.js";
import attributeRenderer from "../../services/attribute_renderer.js"; import attributeRenderer from "../../services/attribute_renderer.js";
import attributeService from "../../services/attributes.js"; import attributeService from "../../services/attributes.js";
import { t } from "../../services/i18n.js";
const TPL = ` const TPL = `
<div class="inherited-attributes-widget"> <div class="inherited-attributes-widget">
@ -44,7 +45,7 @@ export default class InheritedAttributesWidget extends NoteContextAwareWidget {
getTitle() { getTitle() {
return { return {
show: !this.note.isLaunchBarConfig(), show: !this.note.isLaunchBarConfig(),
title: "Inherited Attributes", title: t("inherited_attribute_list.title"),
icon: "bx bx-list-plus" icon: "bx bx-list-plus"
}; };
} }
@ -63,7 +64,7 @@ export default class InheritedAttributesWidget extends NoteContextAwareWidget {
const inheritedAttributes = this.getInheritedAttributes(note); const inheritedAttributes = this.getInheritedAttributes(note);
if (inheritedAttributes.length === 0) { if (inheritedAttributes.length === 0) {
this.$container.append("No inherited attributes."); this.$container.append(t("inherited_attribute_list.no_inherited_attributes"));
return; return;
} }

View File

@ -701,5 +701,9 @@
"upload_success": "新图像版本已上传。", "upload_success": "新图像版本已上传。",
"upload_failed": "新图像版本上传失败:{{message}}", "upload_failed": "新图像版本上传失败:{{message}}",
"title": "图像" "title": "图像"
},
"inherited_attribute_list": {
"title": "继承的属性",
"no_inherited_attributes": "没有继承的属性。"
} }
} }

View File

@ -702,5 +702,9 @@
"upload_success": "New image revision has been uploaded.", "upload_success": "New image revision has been uploaded.",
"upload_failed": "Upload of a new image revision failed: {{message}}", "upload_failed": "Upload of a new image revision failed: {{message}}",
"title": "Image" "title": "Image"
},
"inherited_attribute_list": {
"title": "Inherited Attributes",
"no_inherited_attributes": "No inherited attributes."
} }
} }