i18n
xaoxuu 6 years ago
parent 276184fa87
commit 93ae914635
  1. 43
      _config.yml
  2. 41
      languages/en.yml
  3. 41
      languages/zh-CN.yml
  4. 41
      languages/zh-HK.yml
  5. 41
      languages/zh-TW.yml
  6. 8
      layout/_partial/archive.ejs
  7. 6
      layout/_partial/article.ejs
  8. 4
      layout/_partial/footer.ejs
  9. 4
      layout/_partial/header.ejs
  10. 2
      layout/_partial/post.ejs
  11. 14
      layout/_third-party/aplayer.ejs
  12. 9
      layout/_third-party/comments.ejs
  13. 2
      layout/_third-party/recommended_posts.ejs
  14. 4
      layout/_widget/category.ejs
  15. 2
      layout/_widget/header.ejs
  16. 2
      layout/_widget/list.ejs
  17. 4
      layout/_widget/music.ejs
  18. 2
      layout/_widget/tagcloud.ejs
  19. 2
      layout/_widget/toc.ejs

@ -34,32 +34,23 @@ services:
############################### 杂项 ###############################
# 这里的widgets字段是对widget的默认设置,如需修改请参照文档在主目录的config中写。
widgets:
# 文章分类的默认配置
category:
icon: fas fa-folder-open
title: "博文分类"
# 文章标签的默认配置
tagcloud:
icon: fas fa-fire
title: "热门话题"
# 文章目录的默认配置
toc:
icon: fas fa-list
title: "目录"
# 音乐控件的默认配置
music:
display: # 批量控制哪一类页面显示
home: false # 在主页是否显示
tag: false # 在标签页面是否显示
category: false # 在分类页面是否显示
archive: false # 在归档页面是否显示
page: false # layout: page 的页面是否显示
links: true # layout: links 的页面是否显示
post: true # layout: post 的页面是否显示
# 音乐控件的默认配置,如果sidebar或者page里没有提供,就取这里的参数
music:
color: '#1BCDFC' # 主题色
mode: circulation # random (随机) single (单曲) circulation (列表循环) order (列表)
server: netease # netease(网易云音乐)tencent(QQ音乐) xiami(虾米) kugou(酷狗)
type: playlist # song (单曲) album (专辑) playlist (歌单) search (搜索)
id: 746319661 # 歌曲/专辑/歌单 ID
volume: 0.7 # 音量, 0~1
autoplay: false # 自动播放
display: # 批量控制哪一类页面显示
home: false # 在主页是否显示
tag: false # 在标签页面是否显示
category: false # 在分类页面是否显示
archive: false # 在归档页面是否显示
page: false # layout: page 的页面是否显示
links: true # layout: links 的页面是否显示
post: true # layout: post 的页面是否显示
# 推荐文章
recommended_posts:

@ -0,0 +1,41 @@
sidebar:
category: Categories
tagcloud: Tag Cloud
toc: Table of Contents
post:
read_more: Read more
sticky: Sticky
comments: Comments
comments_placeholder: Unable to load comment system, please make sure your network can access
related_posts: Related Posts
copy_button: Copy
copy_success: Copied
copy_failure: Copy failed
prev_page: Previous
next_page: Next
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: "All articles in this blog are licensed under %s unless stating additionally."
footer:
license: 'Blog content follows the [Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en)'
use: Use
theme: as theme
total_views: total visits
total_visitors: total visitors
times: times
search:
placeholder: Search
symbol:
comma: ", "
period: ". "
colon: ": "
brackets_l: "("
brackets_r: ")"
# 下面这是博主相关的
navbar:
home: Home
blogs: Blogs
archives: Archives
friends: Friends

@ -0,0 +1,41 @@
sidebar:
category: 所有分类
tagcloud: 热门标签
toc: 文章目录
post:
read_more: 阅读全文
sticky: 置顶
comments: 评论
comments_placeholder: 无法加载评论系统,请确保您的网络能够正常访问
related_posts: 相关文章
copy_button: 复制
copy_success: 复制成功
copy_failure: 复制失败
prev_page: 上一页
next_page: 下一页
copyright:
author: 本文作者
link: 本文链接
license_title: 版权声明
license_content: "本博客所有文章除特别声明外,均采用 %s 许可协议。转载请注明出处!"
footer:
license: '博客内容遵循 [署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh)'
use: 本站使用
theme: 作为主题
total_views: 总访问量为
total_visitors: 总访客量
times:
search:
placeholder: 搜索
symbol:
comma: ","
period: "。"
colon: ":"
brackets_l: "("
brackets_r: ")"
# 下面这是博主相关的
navbar:
home: 主页
blogs: 博客
archives: 归档
friends: 朋友

@ -0,0 +1,41 @@
sidebar:
category: 所有分類
tagcloud: 熱門標籤
toc: 文章目錄
post:
read_more: 閱讀全文
sticky: 置頂
comments: 評論
comments_placeholder: 無法加載評論系統,請確保您的網絡能夠正常訪問
related_posts: 相關文章
copy_button: 複製
copy_success: 複製成功
copy_failure: 複製失敗
prev_page: 上一頁
next_page: 下一頁
copyright:
author: 本文作者
link: 文章連結
license_title: 版權聲明
license_content: "本網誌所有文章除特別聲明外,均採用 %s 許可協議。轉載請註明出處!"
footer:
license: '博客內容遵循 [姓名標示-非商業性-相同方式分享 4.0 國際 (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh_TW)'
use: 本站使用
  theme: 作為主題
  total_views: 總訪問量為
  total_visitors: 總訪客量為
  times:
search:
placeholder: 搜尋
symbol:
comma: ","
period: "。"
colon: ":"
brackets_l: "("
brackets_r: ")"
# 下面這是博主相關的
navbar:
home: 主頁
blogs: 博客
archives: 歸檔
friends: 朋友

@ -0,0 +1,41 @@
sidebar:
category: 所有分類
tagcloud: 熱門標籤
toc: 文章目錄
post:
read_more: 閱讀全文
sticky: 置頂
comments: 評論
comments_placeholder: 無法加載評論系統,請確保您的網絡能夠正常訪問
related_posts: 相關文章
copy_button: 複製
copy_success: 複製成功
copy_failure: 複製失敗
prev_page: 上一頁
next_page: 下一頁
copyright:
author: 本文作者
link: 文章連結
license_title: 版權聲明
license_content: "本網誌所有文章除特別聲明外,均採用 %s 許可協議。轉載請註明出處!"
footer:
license: '博客內容遵循 [姓名標示-非商業性-相同方式分享 4.0 國際 (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh_TW)'
use: 本站使用
theme: 作為主題
total_views: 總訪問量為
total_visitors: 總訪客量為
times:
search:
placeholder: 搜尋
symbol:
comma: ","
period: "。"
colon: ":"
brackets_l: "("
brackets_r: ")"
# 下面這是博主相關的
navbar:
home: 主頁
blogs: 博客
archives: 歸檔
friends: 朋友

@ -1,6 +1,6 @@
<% if (is_tag()) { %>
<script>
window.subData= { title:'<%= theme.widgets.tagcloud.title %> : <%= page.tag %>'}
window.subData= { title:'<%- __('sidebar.tagcloud') %> : <%= page.tag %>'}
</script>
<% } else if (is_archive()) { %>
<script>
@ -8,7 +8,7 @@
</script>
<% } else if (is_category()) { %>
<script>
window.subData= { title:'<%= theme.widgets.category.title %> : <%= page.category %>'}
window.subData= { title:'<%- __('sidebar.category') %> : <%= page.category %>'}
</script>
<% } %>
@ -27,7 +27,7 @@
<% if (page.prev != 0) { %>
<a class="prev" rel="prev" href="<%= url_for(page.prev_link) %>">
<section class="post prev" >
<i class="fas fa-chevron-left" aria-hidden="true"></i>&nbsp;上一页&nbsp;
<i class="fas fa-chevron-left" aria-hidden="true"></i>&nbsp;<%- __('post.prev_page') %>&nbsp;
</section>
</a>
<% } %>
@ -37,7 +37,7 @@
<% if (page.next != 0) { %>
<a class="next" rel="next" href="<%= url_for(page.next_link) %>">
<section class="post next">
&nbsp;下一页&nbsp;<i class="fas fa-chevron-right" aria-hidden="true"></i>
&nbsp;<%- __('post.next_page') %>&nbsp;<i class="fas fa-chevron-right" aria-hidden="true"></i>
</section>
</a>
<% } %>

@ -7,7 +7,7 @@
<% if(post.layout == 'post'){ %>
<section class='meta' id="footer-meta">
<time class="metatag time" itemprop="dateUpdated" datetime="<%- moment(post.updated).format() %>" content="<%- date(post.updated, config.date_format) %>"><i class="fas fa-pencil-alt fa-fw" aria-hidden="true"></i>
&nbsp;本文最后更新于:<%- date(post.updated, config.date_format) %>
&nbsp;<%- date(post.updated, config.date_format) %>
</time>
<% if (post.tags && post.tags.length) { %>
<%
@ -29,7 +29,7 @@
<% if(post.prev){ %>
<section class="prev">
<span class="art-item-left">
<h6><i class="fas fa-chevron-left" aria-hidden="true"></i>&nbsp;上一篇</h6>
<h6><i class="fas fa-chevron-left" aria-hidden="true"></i>&nbsp;<%- __('post.prev_page') %></h6>
<h4>
<a href="<%=url_for(post.prev.path)%>" rel="prev" title="<%=post.prev.title%>">
<% if(post.prev.title){ %>
@ -56,7 +56,7 @@
<% if(post.next){ %>
<section class="next">
<span class="art-item-right" aria-hidden="true">
<h6>下一篇&nbsp;<i class="fas fa-chevron-right" aria-hidden="true"></i></h6>
<h6><%- __('post.next_page') %>&nbsp;<i class="fas fa-chevron-right" aria-hidden="true"></i></h6>
<h4>
<a href="<%=url_for(post.next.path)%>" rel="prev" title="<%=post.next.title%>">
<% if(post.next.title){ %>

@ -9,7 +9,7 @@
</div>
<%}%>
<br>
<div>博客内容遵循 <a target="_blank" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" class="licenses">知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议</a></div>
<div>本站使用 <a href="https://xaoxuu.com/wiki/material-x/" target="_blank" class="codename">Material X</a> 作为主题<% if (theme.services && theme.services.busuanzi == true) { %>,总访问量为 <span id="busuanzi_value_site_pv"><i class="fas fa-spinner fa-spin fa-fw" aria-hidden="true"></i></span> 次<% } %>。
<div><%- markdown(__('footer.license')) %></div>
<div><%- __('footer.use') %> <a href="https://xaoxuu.com/wiki/material-x/" target="_blank" class="codename">Material X</a> <%- __('footer.theme') %><% if (theme.services && theme.services.busuanzi == true) { %><%- __('symbol.comma') %><%- __('footer.total_views') %> <span id="busuanzi_value_site_pv"><i class="fas fa-spinner fa-spin fa-fw" aria-hidden="true"></i></span> <%- __('footer.times') %><% } %><%- __('symbol.period') %>
</div>
</footer>

@ -15,7 +15,7 @@
<li>
<a id="<%= url_for(value.url).replace(/\/|%/g, "")?url_for(value.url).replace(/\/|%/g, ""):"home" %>"
class="nav flat-box" href="<%= url_for(value.url) %>">
<i class='<%=value.icon%> fa-fw'></i>&nbsp;<%=value.name%>
<i class='<%= value.icon %> fa-fw'></i>&nbsp;<%= __('navbar.'+value.name) %>
</a>
</li>
<%})%>
@ -26,7 +26,7 @@
<% if (theme.search.enable === true) { %>
<div class="m_search">
<form name="searchform" class="form u-search-form">
<input type="text" class="input u-search-input" placeholder="搜索" />
<input type="text" class="input u-search-input" placeholder="<%- __('search.placeholder') %>" />
<span class="icon"><i class="fas fa-search fa-fw"></i></span>
</form>
</div>

@ -6,7 +6,7 @@
<div class="readmore">
<a href="<%- url_for(post.path) %>" class="flat-box">
<i class="fas fa-book-open fa-fw" aria-hidden="true"></i>
阅读全文
<%- __('post.read_more') %>
</a>
</div>
<% } %>

@ -1,14 +1,14 @@
<% if (theme.services && theme.services.music == true) { %>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.css">
<div class="aplayer"
data-theme="<%- aplayer_theme %>"
data-theme="<%- aplayer_theme != undefined ? aplayer_theme : theme.music.color %>"
<%if(aplayer_mini){%>data-mini=true <%}%>
<%if(aplayer_autoplay){%>data-autoplay=true <%}%>
data-mode="<%- aplayer_mode %>"
data-server="<%= aplayer_server %>"
data-type="<%= aplayer_type %>"
data-id="<%= aplayer_id %>"
data-volume="<%= aplayer_volume %>">
<%if(aplayer_autoplay != undefined ? aplayer_autoplay : theme.music.autoplay){%>data-autoplay=true <%}%>
data-mode="<%- aplayer_mode != undefined ? aplayer_mode : theme.music.mode %>"
data-server="<%= aplayer_server != undefined ? aplayer_server : theme.music.server %>"
data-type="<%= aplayer_type != undefined ? aplayer_type : theme.music.type %>"
data-id="<%= aplayer_id != undefined ? aplayer_id : theme.music.id %>"
data-volume="<%= aplayer_volume != undefined ? aplayer_volume : theme.music.volume %>">
</div>
<script src="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/meting@1.1.0/dist/Meting.min.js"></script>

@ -21,26 +21,23 @@
<% } %>
<% if (displayComments) { %>
<h4><i class="fas fa-comments fa-fw" aria-hidden="true"></i>&nbsp;评论</h4>
<h4><i class="fas fa-comments fa-fw" aria-hidden="true"></i>&nbsp;<%- __('post.comments') %></h4>
<% if (config.disqus_shortname) { %>
<section id="comments">
<div id="disqus_thread">
无法加载评论系统,请确保您的网络能够正常访问 <a href="https://disqus.com">Disqus</a> 。
<%- __(post.comments_placeholder) %> <a href="https://disqus.com">Disqus</a> 。
</div>
</section>
<% } %>
<% if (config.livere_uid){ %>
<section id="comments">
<div id="lv-container" data-id="city" data-uid="<%= config.livere_uid %>">
<noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
<noscript> <%- __(post.comments_placeholder) %></noscript>
</div>
</section>
<% } %>
<% if (config.valine){ %>
<% if (config.valine.enable && config.valine.app_id && config.valine.app_key){ %>
<div class="subtitle">
<h6><b>文明评论,请勿灌水。</b>为了便于区分和接收回复提醒,请您在留言时填写一下<b>昵称</b>和<b>邮箱</b>。</h6>
<div>
<section id="comments">
<div id="valine_container" class="valine_thread">
<i class="fas fa-spinner fa-spin fa-fw"></i>

@ -1,7 +1,7 @@
<% var post_list = recommended_posts(page, site) %>
<% if(post_list.length > 0) { %>
<div class="recommended_posts">
<h4><i class="fas fa-bookmark fa-fw" aria-hidden="true"></i>&nbsp;你可能感兴趣的文章</h4>
<h4><i class="fas fa-bookmark fa-fw" aria-hidden="true"></i>&nbsp;<%- __('post.related_posts') %></h4>
<ul>
<% post_list.forEach(function(link) { %>
<li><a href="<%= link.permalink %>"><%= link.title %></a></li>

@ -1,10 +1,10 @@
<% if (site.categories.length){ %>
<section class='<%- item.widget %>'>
<%- partial('header', {item: item, defIcon: theme.widgets.category.icon, defTitle: theme.widgets.category.title}) %>
<%- partial('header', {item: item, defIcon: 'fas fa-folder-open', defTitle: __('sidebar.category')}) %>
<div class='content <%= theme.style %>'>
<ul class="entry">
<% site.categories.sort('name').each(function(category){ %>
<li><a class="flat-box" title="<%- url_for(category.path) %>" href="<%- url_for(category.path) %>"><div class='name'><%- category.name %></div><div class='badge'>(共<%- category.posts.length %>篇)</div></a></li>
<li><a class="flat-box" title="<%- url_for(category.path) %>" href="<%- url_for(category.path) %>"><div class='name'><%- category.name %></div><div class='badge'><%- __('symbol.brackets_l') %><%- category.posts.length %><%- __('symbol.brackets_r') %></div></a></li>
<% }) %>
</ul>
</div>

@ -5,7 +5,7 @@
<header class='<%= theme.style %>'>
<div><i class="<%- icon %> fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;<%- title %></div>
<% if (item.widget == 'toc') { %>
<div class='wrapper'><a class="s-toc rightBtn" title="固定到顶部" rel="external nofollow noopener noreferrer" href="javascript:void(0)"><i class="fas fa-thumbtack fa-fw"></i></a></div>
<div class='wrapper'><a class="s-toc rightBtn" rel="external nofollow noopener noreferrer" href="javascript:void(0)"><i class="fas fa-thumbtack fa-fw"></i></a></div>
<% } else if(item.more && item.more.url) { %>
<a class="rightBtn<%- item.more.animate ? ' ' + item.more.animate : '' %>" target="_blank"
rel="external nofollow noopener noreferrer"

@ -15,7 +15,7 @@
&nbsp;&nbsp;<%- row.name %>
</div>
<% if(row.desc) { %>
<div class='badge'>(<%- row.desc %>)</div>
<div class='badge'><%- __('symbol.brackets_l') %><%- row.desc %><%- __('symbol.brackets_r') %></div>
<% } %>
</a></li>
<% }) %>

@ -1,7 +1,7 @@
<%
var needDisplay = false;
if (theme.widgets.music && theme.widgets.music.display) {
let display = theme.widgets.music.display;
if (theme.music && theme.music.display) {
let display = theme.music.display;
if (page.layout == 'page') {
if (display.page != false) {
needDisplay = true;

@ -1,6 +1,6 @@
<% if (site.tags.length){ %>
<section class='<%- item.widget %>'>
<%- partial('header', {item: item, defIcon: theme.widgets.tagcloud.icon, defTitle: theme.widgets.tagcloud.title}) %>
<%- partial('header', {item: item, defIcon: 'fas fa-fire', defTitle: __('sidebar.tagcloud')}) %>
<div class='content <%= theme.style %>'>
<%- tagcloud(site.tags, {
min_font: 14,

@ -1,6 +1,6 @@
<% if(page.layout == 'post' && page.content && page.toc!==false && toc(page.content).length > 0){ %>
<section class='toc-wrapper'>
<%- partial('header', {item: item, defIcon: theme.widgets.toc.icon, defTitle: theme.widgets.toc.title}) %>
<%- partial('header', {item: item, defIcon: 'fas fa-list', defTitle: __('sidebar.toc')}) %>
<div class='content <%= theme.style %>'>
<%- toc(page.content, {list_number: false}) %>
</div>

Loading…
Cancel
Save