Procházet zdrojové kódy

Make article nav support i18n

Make the “older” and “newer” links in article navigation support i18n
Indonesian translated by Google.
Rain Wang před 10 roky
rodič
revize
63754e7b56
4 změnil soubory, kde provedl 11 přidání a 5 odebrání
  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:
   next: 'Next'
   prev: 'Prev'
+  older: 'Older'
+  newer: 'Newer'
 widget:
   recents: 'recents'
   archives: 'archives'
@@ -24,4 +26,4 @@ profile:
   post: 'post'
   tag: 'tag'
   posts: 'posts'
-  tags: 'tags'
+  tags: 'tags'

+ 2 - 0
languages/id.yml

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

+ 3 - 1
languages/zh-CN.yml

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

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

@@ -2,7 +2,7 @@
 <nav id="article-nav">
   <% if (post.prev){ %>
     <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">
         <% if (post.prev.title){ %>
           <%= post.prev.title %>
@@ -14,9 +14,9 @@
   <% } %>
   <% if (post.next){ %>
     <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>
     </a>
   <% } %>
 </nav>
-<% } %>
+<% } %>