Skip to content

Commit 0bceb47

Browse files
committed
优化 文档底部 增加翻译入口
1 parent 779c115 commit 0bceb47

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

en/_navbar.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
* [Docs](/README.md)
22
* [Extension-Tutorial](/ExtensionTutorial/README.md)
33
* [API](/ExtensionDocs/Api/README.md)
4-
* [CLi](/cli/README.md)
54

65
<ul class="nav-href">
76
<li class="dropdown">

index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,11 @@
8686
plugins: [
8787
function(hook, vm) {
8888
hook.afterEach(function(html) {
89-
var url = '//github.com/dcloudio/hbuilderx-extension-docs/tree/master' + vm
90-
.route.file;
91-
return html + '<hr align=center color=#987cb9 size=1>发现错误?想参与编辑?<a href=' +
92-
url + ' target=_blank>在 GitHub 上编辑此页面!</a>';
89+
var url = '//github.com/dcloudio/hbuilderx-extension-docs/tree/master' + vm.route.file;
90+
if (lan.substr(0, 2) != 'zh') {
91+
return html + '<hr align=center color=#987cb9 size=1>Found mistake? Want to participate in editing?<a href=' +url + ' target=_blank> Edit this page on GitHub</a>' + '<br/><br/><span>HBuilderX plug-in development document, not translated into English, welcome to contribute. <span>' + `<a href="https://github.com/dcloudio/hbuilderx-extension-docs/tree/master/en" target="_blank">Translate this document on github</a>`;
92+
};
93+
return html + '<hr align=center color=#987cb9 size=1>发现错误?想参与编辑?<a href=' +url + ' target=_blank> 在 GitHub 上编辑此页面!</a>' + '<br/><br/><span>HBuilderX插件开发文档尚未翻译,欢迎参与贡献。<span>' + `<a href="https://github.com/dcloudio/hbuilderx-extension-docs/tree/master/en" target="_blank">在 Github 上翻译页面!</a>`;
9394
});
9495
}
9596
]

0 commit comments

Comments
 (0)