简繁转换
This commit is contained in:
parent
2eb8596e0a
commit
0b58e05ae8
|
@ -2339,6 +2339,29 @@ spec:
|
||||||
value: true
|
value: true
|
||||||
- label: 关闭
|
- label: 关闭
|
||||||
value: false
|
value: false
|
||||||
|
- $formkit: group
|
||||||
|
name: translate
|
||||||
|
label: 简繁转换
|
||||||
|
value:
|
||||||
|
defaultEncoding: 2
|
||||||
|
translateEnable: true
|
||||||
|
children:
|
||||||
|
- $formkit: radio
|
||||||
|
name: defaultEncoding
|
||||||
|
label: 默认语言
|
||||||
|
options:
|
||||||
|
- label: 简体中文
|
||||||
|
value: 2
|
||||||
|
- label: 繁體中文
|
||||||
|
value: 1
|
||||||
|
- $formkit: radio
|
||||||
|
name: translateEnable
|
||||||
|
label: 允许切换语言
|
||||||
|
options:
|
||||||
|
- label: 打开
|
||||||
|
value: true
|
||||||
|
- label: 关闭
|
||||||
|
value: false
|
||||||
- $formkit: textarea
|
- $formkit: textarea
|
||||||
name: fontFamily
|
name: fontFamily
|
||||||
label: 全局字体
|
label: 全局字体
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -389,7 +389,6 @@ function addRightMenuClickEvent() {
|
||||||
});
|
});
|
||||||
$('#menu-translate').on('click', function () {
|
$('#menu-translate').on('click', function () {
|
||||||
rm.hideRightMenu();
|
rm.hideRightMenu();
|
||||||
translateInitialization();
|
|
||||||
});
|
});
|
||||||
$('#menu-copy').on('click', rm.copyPageUrl);
|
$('#menu-copy').on('click', rm.copyPageUrl);
|
||||||
$('#menu-pastetext').on('click', rm.pasteText);
|
$('#menu-pastetext').on('click', rm.pasteText);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div id="rightside">
|
<div id="rightside">
|
||||||
<div id="rightside-config-hide">
|
<div id="rightside-config-hide">
|
||||||
<button th:if="${htmlType == 'post' && theme.config.tool.rightside.readmode}" id="readmode" type="button" title="阅读模式"><i class="haofont hao-icon-book-open"></i></button>
|
<button th:if="${htmlType == 'post' && theme.config.tool.rightside.readmode}" id="readmode" type="button" title="阅读模式"><i class="haofont hao-icon-book-open"></i></button>
|
||||||
<!-- <button id="translateLink" type="button" title="简繁转换">繁</button> -->
|
<button th:if="${theme.config.style.translate.translateEnable}" id="translateLink" type="button" title="简繁转换">繁</button>
|
||||||
<button id="darkmode" type="button" title="浅色和深色模式转换"><i class="haofont hao-icon-circle-half-stroke"></i></button>
|
<button id="darkmode" type="button" title="浅色和深色模式转换"><i class="haofont hao-icon-circle-half-stroke"></i></button>
|
||||||
<button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="haofont hao-icon-arrows-left-right"></i></button>
|
<button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="haofont hao-icon-arrows-left-right"></i></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -259,6 +259,14 @@
|
||||||
bgDark: "[(${theme.config.style.themeDarkSkin})]",
|
bgDark: "[(${theme.config.style.themeDarkSkin})]",
|
||||||
position: "top-center",
|
position: "top-center",
|
||||||
},
|
},
|
||||||
|
translate: {
|
||||||
|
defaultEncoding:[[${theme.config.style.translate.defaultEncoding}]],
|
||||||
|
translateDelay:0,
|
||||||
|
msgToTraditionalChinese:"简",
|
||||||
|
msgToSimplifiedChinese:"繁",
|
||||||
|
rightMenuMsgToTraditionalChinese:"轉為繁體",
|
||||||
|
rightMenuMsgToSimplifiedChinese:"转为简体"
|
||||||
|
},
|
||||||
prism: {
|
prism: {
|
||||||
enable: [[${ theme.config.code.enable }]],
|
enable: [[${ theme.config.code.enable }]],
|
||||||
enable_title: [[${ theme.config.code.enable_title }]],
|
enable_title: [[${ theme.config.code.enable_title }]],
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
<script th:src="${assets_link + '/js/utils.js' + theme_version}"></script>
|
<script th:src="${assets_link + '/js/utils.js' + theme_version}"></script>
|
||||||
<script th:src="${assets_link + '/js/main.js' + theme_version}"></script>
|
<script th:src="${assets_link + '/js/main.js' + theme_version}"></script>
|
||||||
<script charset="utf-8" data-pjax th:src="${assets_link + '/zhheo/blogex.js' + theme_version}"></script>
|
<script charset="utf-8" data-pjax th:src="${assets_link + '/zhheo/blogex.js' + theme_version}"></script>
|
||||||
|
<script th:src="${assets_link + '/js/tw_cn.js' + theme_version}"></script>
|
||||||
<!-- https://instant.page/ 网站预加载, 放在 </body> 之前 -->
|
<!-- https://instant.page/ 网站预加载, 放在 </body> 之前 -->
|
||||||
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/instant.page/5.1.0/instantpage.min.js" type="module"></script>
|
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/instant.page/5.1.0/instantpage.min.js" type="module"></script>
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="rightMenu-item" id="menu-darkmode">
|
<div class="rightMenu-item" id="menu-darkmode">
|
||||||
<i class="haofont hao-icon-circle-half-stroke"></i>
|
<i class="haofont hao-icon-circle-half-stroke"></i>
|
||||||
<span class="menu-darkmode-text">显示模式</span>
|
<span class="menu-darkmode-text">深色模式</span>
|
||||||
|
</div>
|
||||||
|
<div th:if="${theme.config.style.translate.translateEnable}" class="rightMenu-item" id="menu-translate">
|
||||||
|
<i class="haofont hao-icon-language"></i>
|
||||||
|
<span>轉為繁體</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue