Skip to content

Commit

Permalink
Merge pull request hexojs#53 from taur-firiath/master
Browse files Browse the repository at this point in the history
Add RU language and translation constant includes
  • Loading branch information
Xuanwo committed Jan 8, 2016
2 parents 85b9a55 + ce89428 commit ec0e2ce
Show file tree
Hide file tree
Showing 16 changed files with 67 additions and 20 deletions.
9 changes: 8 additions & 1 deletion languages/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@ comment: Comments
archive_a: Archives
archive_b: "Archives: %s"
page: Page %d
recent_posts: Recent Posts
recent_posts: Recent Posts
newer: Newer
older: Older
share: Share
powered_by: Powered by
rss_feed: RSS Feed
category: Category
tag: Tag
7 changes: 7 additions & 0 deletions languages/no.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ archive_a: Arkiv
archive_b: "Arkiv: %s"
page: Side %d
recent_posts: Siste innlegg
newer: Newer
older: Older
share: Share
powered_by: Powered by
rss_feed: RSS Feed
category: Category
tag: Tag
19 changes: 19 additions & 0 deletions languages/ru.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
categories: Категории
search: Поиск
tags: Метки
tagcloud: Облако меток
tweets: Твиты
prev: Назад
next: Вперед
comment: Комментарии
archive_a: Архив
archive_b: "Архив: %s"
page: Страница %d
recent_posts: Недавние записи
newer: Следующий
older: Предыдущий
share: Поделиться
powered_by: Создано с помощью
rss_feed: RSS-каналы
category: Категория
tag: Метка
9 changes: 8 additions & 1 deletion languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@ comment: 留言
archive_a: 归档
archive_b: 归档:%s
page: 第 %d 页
recent_posts: 最新文章
recent_posts: 最新文章
newer: Newer
older: Older
share: Share
powered_by: Powered by
rss_feed: RSS Feed
category: Category
tag: Tag
9 changes: 8 additions & 1 deletion languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@ comment: 留言
archive_a: 彙整
archive_b: 彙整:%s
page: 第 %d 頁
recent_posts: 最新文章
recent_posts: 最新文章
newer: Newer
older: Older
share: Share
powered_by: Powered by
rss_feed: RSS Feed
category: Category
tag: Tag
4 changes: 2 additions & 2 deletions layout/_partial/archive.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<% if (page.total > 1){ %>
<nav id="page-nav">
<%- paginator({
prev_text: '&laquo; Prev',
next_text: 'Next &raquo;'
prev_text: "&laquo; __('prev')",
next_text: "__('next') &raquo;"
}) %>
</nav>
<% } %>
4 changes: 2 additions & 2 deletions layout/_partial/article.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<% } %>
</div>
<footer class="article-footer">
<a data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="article-share-link">Share</a>
<a data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="article-share-link"><%= __('share') %></a>
<% if (post.comments && config.disqus_shortname){ %>
<a href="<%- post.permalink %>#disqus_thread" class="article-comment-link">Comments</a>
<a href="<%- post.permalink %>#disqus_thread" class="article-comment-link"><%= __('comment') %></a>
<% } %>
<%- partial('post/tag') %>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion layout/_partial/footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="outer">
<div id="footer-info" class="inner">
&copy; <%= date(new Date(), 'YYYY') %> <%= config.author || config.title %><br>
Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
<%= __('powered_by') %> <a href="http://hexo.io/" target="_blank">Hexo</a>
</div>
</div>
</footer>
6 changes: 3 additions & 3 deletions layout/_partial/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
var title = page.title;
if (is_archive()){
title = 'Archives';
title = __('archive_a');
if (is_month()){
title += ': ' + page.year + '/' + page.month;
} else if (is_year()){
title += ': ' + page.year;
}
} else if (is_category()){
title = 'Category: ' + page.category;
title = __('category') + ': ' + page.category;
} else if (is_tag()){
title = 'Tag: ' + page.tag;
title = __('tag') + ': ' + page.tag;
}
%>
<title><% if (title){ %><%= title %> | <% } %><%= config.title %></title>
Expand Down
4 changes: 2 additions & 2 deletions layout/_partial/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
</nav>
<nav id="sub-nav">
<% if (theme.rss){ %>
<a id="nav-rss-link" class="nav-icon" href="<%- theme.rss %>" title="RSS Feed"></a>
<a id="nav-rss-link" class="nav-icon" href="<%- theme.rss %>" title="<%= __('rss_feed') %>"></a>
<% } %>
<a id="nav-search-btn" class="nav-icon" title="Search"></a>
<a id="nav-search-btn" class="nav-icon" title="<%= __('search') %>"></a>
</nav>
<div id="search-form-wrap">
<%- search_form({button: '&#xF002;'}) %>
Expand Down
4 changes: 2 additions & 2 deletions layout/_partial/post/nav.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -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"><%= __('newer') %></strong>
<div class="article-nav-title">
<% if (post.prev.title){ %>
<%= post.prev.title %>
Expand All @@ -14,7 +14,7 @@
<% } %>
<% 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"><%= __('older') %></strong>
<div class="article-nav-title"><%= post.next.title %></div>
</a>
<% } %>
Expand Down
2 changes: 1 addition & 1 deletion layout/_widget/archive.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% if (site.posts.length){ %>
<div class="widget-wrap">
<h3 class="widget-title">Archives</h3>
<h3 class="widget-title"><%= __('archive_a') %></h3>
<div class="widget">
<%- list_archives({show_count: theme.show_count, type: theme.archive_type}) %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion layout/_widget/category.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% if (site.categories.length){ %>
<div class="widget-wrap">
<h3 class="widget-title">Categories</h3>
<h3 class="widget-title"><%= __('categories') %></h3>
<div class="widget">
<%- list_categories({show_count: theme.show_count}) %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion layout/_widget/recent_posts.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% if (site.posts.length){ %>
<div class="widget-wrap">
<h3 class="widget-title">Recents</h3>
<h3 class="widget-title"><%= __('recent_posts') %></h3>
<div class="widget">
<ul>
<% site.posts.sort('date', -1).limit(5).each(function(post){ %>
Expand Down
2 changes: 1 addition & 1 deletion layout/_widget/tag.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% if (site.tags.length){ %>
<div class="widget-wrap">
<h3 class="widget-title">Tags</h3>
<h3 class="widget-title"><%= __('tags') %></h3>
<div class="widget">
<%- list_tags({show_count: theme.show_count}) %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion layout/_widget/tagcloud.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% if (site.tags.length){ %>
<div class="widget-wrap">
<h3 class="widget-title">Tag Cloud</h3>
<h3 class="widget-title"><%= __('tagcloud') %></h3>
<div class="widget tagcloud">
<%- tagcloud() %>
</div>
Expand Down

0 comments on commit ec0e2ce

Please sign in to comment.