+
+
Hello {name} v{ver}
-
-
- 使用这个模板之前,请阅读官方教程, 确保自己已经理解了插件的基本开发流程。
-
+
+
+
+ -
+
+ {@html i18n.makesure}
+
+
+
+
+
+
-
- Before using this template, please read the offical sample, make sure that you've known about the pipeline for plugin developing.
-
diff --git a/src/i18n/en_US.json b/src/i18n/en_US.json
index 64b8849..012adc1 100644
--- a/src/i18n/en_US.json
+++ b/src/i18n/en_US.json
@@ -1,3 +1,6 @@
{
- "name": "SiYuan"
+ "name": "SiYuan",
+ "hello": {
+ "makesure": "Before using this template, please read the
offical sample, make sure that you've known about the pipeline for plugin developing."
+ }
}
\ No newline at end of file
diff --git a/src/i18n/zh_CN.json b/src/i18n/zh_CN.json
index 99335c3..f601228 100644
--- a/src/i18n/zh_CN.json
+++ b/src/i18n/zh_CN.json
@@ -1,3 +1,6 @@
{
- "name": "思源"
+ "name": "思源",
+ "hello": {
+ "makesure": "使用这个模板之前,请阅读
官方教程, 确保自己已经理解了插件的基本开发流程。"
+ }
}
\ No newline at end of file
diff --git a/src/index.ts b/src/index.ts
index 31f794b..1d75664 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -20,7 +20,7 @@ export default class SamplePlugin extends Plugin {
{
icon: "iconEmoji",
"title": "Hello SiYuan",
- "callback": () => this.openHelloDialog()
+ "callback": () => this.openHelloInDialog()
}
)
}
@@ -41,7 +41,7 @@ export default class SamplePlugin extends Plugin {
});
}
- private openHelloDialog() {
+ private openHelloInDialog() {
this.counter.hello++;
let dialog = new Dialog({
title: "Hello World",
@@ -55,6 +55,7 @@ export default class SamplePlugin extends Plugin {
target: dialog.element.querySelector("#helloPanel"),
props: {
name: `[${this.counter.hello}]${this.i18n.name}`,
+ i18n: this.i18n.hello
}
});
}