瀏覽代碼

Make article nav support i18n

Make the “older” and “newer” links in article navigation support i18n
Indonesian translated by Google.
Rain Wang 10 年之前
父節點
當前提交
63754e7b56
共有 4 個文件被更改,包括 11 次插入5 次删除
  1. 3 1
      languages/en.yml
  2. 2 0
      languages/id.yml
  3. 3 1
      languages/zh-CN.yml
  4. 3 3
      layout/_partial/post/nav.ejs

+ 3 - 1
languages/en.yml

@@ -8,6 +8,8 @@ index:
 nav:
 nav:
   next: 'Next'
   next: 'Next'
   prev: 'Prev'
   prev: 'Prev'
+  older: 'Older'
+  newer: 'Newer'
 widget:
 widget:
   recents: 'recents'
   recents: 'recents'
   archives: 'archives'
   archives: 'archives'
@@ -24,4 +26,4 @@ profile:
   post: 'post'
   post: 'post'
   tag: 'tag'
   tag: 'tag'
   posts: 'posts'
   posts: 'posts'
-  tags: 'tags'
+  tags: 'tags'

+ 2 - 0
languages/id.yml

@@ -8,6 +8,8 @@ index:
 nav:
 nav:
   next: 'Berikutnya'
   next: 'Berikutnya'
   prev: 'Sebelumnya'
   prev: 'Sebelumnya'
+  older: 'Lebih Tua'
+  newer: 'Lebih baru'
 widget:
 widget:
   recents: 'terbaru'
   recents: 'terbaru'
   archives: 'arsip'
   archives: 'arsip'

+ 3 - 1
languages/zh-CN.yml

@@ -8,6 +8,8 @@ index:
 nav:
 nav:
   next: '下一页'
   next: '下一页'
   prev: '上一页'
   prev: '上一页'
+  older: '下一篇'
+  newer: '上一篇'
 widget:
 widget:
   recents: '最新文章'
   recents: '最新文章'
   archives: '归档'
   archives: '归档'
@@ -24,4 +26,4 @@ profile:
   post: '文章'
   post: '文章'
   tag: '标签'
   tag: '标签'
   posts: '文章'
   posts: '文章'
-  tags: '标签'
+  tags: '标签'

+ 3 - 3
layout/_partial/post/nav.ejs

@@ -2,7 +2,7 @@
 <nav id="article-nav">
 <nav id="article-nav">
   <% if (post.prev){ %>
   <% if (post.prev){ %>
     <a href="<%- url_for(post.prev.path) %>" id="article-nav-newer" class="article-nav-link-wrap">
     <a href="<%- url_for(post.prev.path) %>" id="article-nav-newer" class="article-nav-link-wrap">
-      <strong class="article-nav-caption">Newer</strong>
+      <strong class="article-nav-caption"><%= __('nav.newer') %></strong>
       <div class="article-nav-title">
       <div class="article-nav-title">
         <% if (post.prev.title){ %>
         <% if (post.prev.title){ %>
           <%= post.prev.title %>
           <%= post.prev.title %>
@@ -14,9 +14,9 @@
   <% } %>
   <% } %>
   <% if (post.next){ %>
   <% if (post.next){ %>
     <a href="<%- url_for(post.next.path) %>" id="article-nav-older" class="article-nav-link-wrap">
     <a href="<%- url_for(post.next.path) %>" id="article-nav-older" class="article-nav-link-wrap">
-      <strong class="article-nav-caption">Older</strong>
+      <strong class="article-nav-caption"><%= __('nav.older') %></strong>
       <div class="article-nav-title"><%= post.next.title %></div>
       <div class="article-nav-title"><%= post.next.title %></div>
     </a>
     </a>
   <% } %>
   <% } %>
 </nav>
 </nav>
-<% } %>
+<% } %>