Skip to content

Commit

Permalink
add translation for mermaid.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Nriver committed Sep 13, 2024
1 parent 83388ec commit f5b2149
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/public/app/widgets/mermaid.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { t } from "../services/i18n.js";
import libraryLoader from "../services/library_loader.js";
import NoteContextAwareWidget from "./note_context_aware_widget.js";
import server from "../services/server.js";
Expand Down Expand Up @@ -27,7 +28,7 @@ const TPL = `<div class="mermaid-widget">
</style>
<div class="mermaid-error alert alert-warning">
<p><strong>The diagram could not be displayed. See <a href="https://mermaid-js.github.io/mermaid/#/flowchart?id=graph">help and examples</a>.</strong></p>
<p><strong>${t('mermaid.diagram_error')}</strong></p>
<p class="error-content"></p>
</div>
Expand Down
3 changes: 3 additions & 0 deletions src/public/translations/cn/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1343,5 +1343,8 @@
"highlights_list_2": {
"title": "高亮列表",
"options": "选项"
},
"mermaid": {
"diagram_error": "图表无法显示。 请参考 <a href=\"https://mermaid-js.github.io/mermaid/#/flowchart?id=graph\">帮助文档和示例</a>。"
}
}
3 changes: 3 additions & 0 deletions src/public/translations/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1343,5 +1343,8 @@
"highlights_list_2": {
"title": "Highlights List",
"options": "Options"
},
"mermaid": {
"diagram_error": "The diagram could not be displayed. See <a href=\"https://mermaid-js.github.io/mermaid/#/flowchart?id=graph\">help and examples</a>."
}
}

0 comments on commit f5b2149

Please sign in to comment.