Merge branch 'i18n'

This commit is contained in:
yafeilee 2015-04-07 22:26:15 +08:00
commit 79563379cb
29 changed files with 317 additions and 119 deletions

View File

@ -18,7 +18,7 @@
$scope.changeToPreview = -> $scope.changeToPreview = ->
$scope.body_active = false $scope.body_active = false
$scope.previewHTML = '加载中...' $scope.previewHTML = 'Loading...'
$http.post '/admin/posts/preview', { content: $scope.content } $http.post '/admin/posts/preview', { content: $scope.content }
.success (res)-> .success (res)->
$scope.previewHTML = res $scope.previewHTML = res

View File

@ -25,7 +25,7 @@
$scope.publish_fail_msg = res.message $scope.publish_fail_msg = res.message
.error (data, status)-> .error (data, status)->
$scope.publish_success = false $scope.publish_success = false
$scope.publish_fail_msg = '网络错误, 请重试, 错误码为: ' + status $scope.publish_fail_msg = 'Network Error, Retry for a moment, Status Code: ' + status
.finally -> .finally ->
$scope.submitting = false $scope.submitting = false
$scope.timeout = $timeout -> $scope.timeout = $timeout ->

View File

@ -2,6 +2,7 @@
border-top: 1px solid #dddddd; border-top: 1px solid #dddddd;
padding: 1rem 0 2rem; padding: 1rem 0 2rem;
text-align: right; text-align: right;
color: #666;
.link { .link {
margin-right: 1rem; margin-right: 1rem;
} }

View File

@ -950,9 +950,9 @@ $base-font-size: 100%;
// $include-html-tabs-classes: $include-html-classes; // $include-html-tabs-classes: $include-html-classes;
// $tabs-navigation-padding: rem-calc(16); // $tabs-navigation-padding: rem-calc(16);
// $tabs-navigation-bg-color: #efefef ; $tabs-navigation-bg-color: #fff;
// $tabs-navigation-active-bg-color: #fff; $tabs-navigation-active-bg-color: #eee;
// $tabs-navigation-hover-bg-color: scale-color($tabs-navigation-bg-color, $lightness: -6%); $tabs-navigation-hover-bg-color: scale-color($tabs-navigation-bg-color, $lightness: -3%);
// $tabs-navigation-font-color: #222; // $tabs-navigation-font-color: #222;
// $tabs-navigation-font-size: rem-calc(16); // $tabs-navigation-font-size: rem-calc(16);
// $tabs-navigation-font-family: $body-font-family; // $tabs-navigation-font-family: $body-font-family;

View File

@ -9,7 +9,7 @@ class Comment
belongs_to :post belongs_to :post
validates :name, presence: true validates :name, presence: true
validates :email, presence: true, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, message: '地址无效' } validates :email, presence: true, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, message: I18n.t('comment_attributes.email') }
validates :content, presence: true validates :content, presence: true
validates_presence_of :post_id validates_presence_of :post_id

View File

@ -38,6 +38,20 @@ class Post
md.render(content) md.render(content)
end end
def type_en
map = {
'技术' => 'Tech',
'生活' => 'Life',
'创业' => 'Creator',
}
if I18n.locale == :en
map[type]
else
type
end
end
def visited def visited
self.visited_count += 1 self.visited_count += 1
self.save self.save

View File

@ -1,16 +1,16 @@
.row.admin-posts-field .row.admin-posts-field
.small-12.columns .small-12.columns
h3.blog-title 评论管理 h3.blog-title #{t('admin.comments')}
h4.blog-title h4.blog-title
= link_to @post.title, blog_path(@post), target: '_blank' = link_to @post.title, blog_path(@post), target: '_blank'
table width="100%" table width="100%"
thead thead
tr tr
th 名字 th #{t('admin.comments_head.name')}
th 邮箱 th #{t('admin.comments_head.email')}
th 内容 th #{t('admin.comments_head.content')}
th 时间 th #{t('admin.comments_head.created_at')}
th 操作 th #{t('admin.comments_head.operation')}
tbody tbody
- @comments.each do |comment| - @comments.each do |comment|
tr tr
@ -23,5 +23,5 @@
= format_time(comment.created_at) = format_time(comment.created_at)
td td
= link_to '回复', blog_path(@post), target: '_blank', class: 'edit-post-link' = link_to t('admin.comments_head.reply'), blog_path(@post), target: '_blank', class: 'edit-post-link'
= link_to '删除', admin_post_comment_path(@post, comment), method: 'DELETE', 'data-confirm'=> '确认删除?' = link_to t('admin.comments_head.destroy'), admin_post_comment_path(@post, comment), method: 'DELETE', 'data-confirm'=> '确认删除?'

View File

@ -1,23 +1,22 @@
.row .row
.small-12.columns .small-12.columns
h2.dash-title 统计信息 h2.dash-title #{t('admin.dashboard.head')}
hr hr
table width="100%" table width="100%"
thead thead
tr tr
th 条目 th #{t('admin.dashboard.info')}
th 数据 th #{t('admin.dashboard.data')}
tbody tbody
tr tr
td 总博客数 td #{t('admin.dashboard.posts_count')}
td #{@posts_count} td #{@posts_count}
tr tr
td 总评论数 td #{t('admin.dashboard.comments_count')}
td #{@comments_count} td #{@comments_count}
tr tr
td 总浏览量 td #{t('admin.dashboard.visited_count')}
td #{@visited_count} td #{@visited_count}
tr tr
td 总订阅量 td #{t('admin.dashboard.subscribes_count')}
td #{@subscribes_count} td #{@subscribes_count}

View File

@ -2,19 +2,19 @@
= simple_form_for(@post, url: url, html: {novalidate: '' }) do |f| = simple_form_for(@post, url: url, html: {novalidate: '' }) do |f|
.row .row
.large-6.columns .large-6.columns
= f.input :title, label: '标题', "ng-model"=>"title", input_html: { name: 'title' } = f.input :title, label: t('admin.posts_attributes.title'), "ng-model"=>"title", input_html: { name: 'title' }
.row .row
.small-6.large-3.columns .small-6.large-3.columns
= f.input :type, :as=>:select, :collection=> [ Post::TECH, Post::LIFE, Post::CREATOR ], label: '类别', "ng-model"=>"type", input_html: { name: 'type' } = f.input :type, :as=>:select, :collection=> [ Post::TECH, Post::LIFE, Post::CREATOR ], label: t('admin.posts_attributes.type'), "ng-model"=>"type", input_html: { name: 'type' }
.row .row
.small-12.large-6.columns .small-12.large-6.columns
= label_tag :labels, '标签' = label_tag :labels, t('admin.posts_attributes.labels')
= text_field_tag :labels, @post.labels_content(true), "ng-model"=>"labels", "ng-initial" => '' = text_field_tag :labels, @post.labels_content(true), "ng-model"=>"labels", "ng-initial" => ''
.row .row
.small-12.columns .small-12.columns
p p
| 已有标签: | #{t('admin.posts_attributes.already_labels')}
span span
- Label.all.each do |label| - Label.all.each do |label|
a.tag href="#" ng-click="addTag($event)" #{label.name} a.tag href="#" ng-click="addTag($event)" #{label.name}
@ -22,10 +22,10 @@
/ tabs and upload file field / tabs and upload file field
dl.tabs dl.tabs
dd ng-class="{ active: body_active }" dd ng-class="{ active: body_active }"
a href="" ng-click="changeToBody()" 正文 a href="" ng-click="changeToBody()" #{t('admin.posts_attributes.content')}
dd ng-class="{ active: !body_active }" dd ng-class="{ active: !body_active }"
a href="#" ng-click="changeToPreview()" 预览 a href="#" ng-click="changeToPreview()" #{t('admin.posts_attributes.preview')}
= link_to '上传图片', "#", :id=>'upload_photo' = link_to t('admin.posts_attributes.upload_photo'), "#", :id=>'upload_photo'
input[type="file" style="display: none;"] input[type="file" style="display: none;"]
.content-field ng-show="body_active" ng-model= 'content' .content-field ng-show="body_active" ng-model= 'content'
@ -35,4 +35,4 @@
.row .row
.small-12.large-6.columns.posts-button .small-12.large-6.columns.posts-button
button 提交 button #{t('admin.posts_attributes.submit')}

View File

@ -1,12 +1,12 @@
.row.admin-posts-field .row.admin-posts-field
.small-12.columns .small-12.columns
h3.blog-title 博客管理 h3.blog-title #{t('admin.posts') }
table width="100%" table width="100%"
thead thead
tr tr
th 标题 th #{t('admin.posts_head.title')}
th 概要 th #{t('admin.posts_head.summary')}
th 操作 th #{t('admin.posts_head.operation')}
tbody tbody
- @posts.each do |post| - @posts.each do |post|
tr tr
@ -24,7 +24,6 @@
i.fi-heart i.fi-heart
span #{ post.liked_count } span #{ post.liked_count }
td td
= link_to '评论', admin_post_comments_path(post.id), class: 'edit-post-link' = link_to t('comment'), admin_post_comments_path(post.id), class: 'edit-post-link'
= link_to '编辑', edit_admin_post_path(post), class: 'edit-post-link' = link_to t('edit'), edit_admin_post_path(post), class: 'edit-post-link'
= link_to '删除', admin_post_path(post), method: 'DELETE', 'data-confirm' => '确认删除?' = link_to t('destroy'), admin_post_path(post), method: 'DELETE', 'data-confirm' => '确认删除?'

View File

@ -1,5 +1,5 @@
.row .row
.small-12.columns .small-12.columns
.admin-posts-field ng-controller="AdminPostsController" .admin-posts-field ng-controller="AdminPostsController"
h3.blog-title 新建博客 h3.blog-title #{t('admin.new_post')}
= render 'form' = render 'form'

View File

@ -1,5 +1,5 @@
- content_for(:title) do - content_for(:title) do
| #{@type ? @type : '时间线'} | #{@type ? @type : t('title.timeline')}
.row ng-controller="ArchivesController" ng-cloak="" .row ng-controller="ArchivesController" ng-cloak=""
.small-12.large-9.large-centered.columns .small-12.large-9.large-centered.columns
ul.archives-field ng-model="type" ng-init=" type= '#{@type}' " ul.archives-field ng-model="type" ng-init=" type= '#{@type}' "
@ -23,7 +23,7 @@
span span
|{{ post.liked_count }} |{{ post.liked_count }}
.no-more-field .no-more-field
p ng-show="no_more_flag" 没有更多内容 p ng-show="no_more_flag" #{t('nocontent')}
.load-more .load-more
button.small ng-click="load()" ng-show="!loading_flag" Load More button.small ng-click="load()" ng-show="!loading_flag" Load More

View File

@ -3,14 +3,14 @@
form novalidate='' name='form' form novalidate='' name='form'
.row .row
.small-12.large-12.columns .small-12.large-12.columns
= text_area_tag(:content, nil, placeholder: '发表你的看法', 'ng-model'=> 'content', 'ng-required'=> true) = text_area_tag(:content, nil, placeholder: t('comment_placeholder.content'), 'ng-model'=> 'content', 'ng-required'=> true)
.row .row
.small-12.large-6.columns .small-12.large-6.columns
= text_field_tag(:name, nil, placeholder: '你的名字', 'ng-model'=> 'name', 'ng-required'=> 'true') = text_field_tag(:name, nil, placeholder: t('comment_placeholder.name'), 'ng-model'=> 'name', 'ng-required'=> 'true')
= text_field_tag(:email, nil, placeholder: '你的邮箱', 'ng-model'=> 'email', 'ng-pattern'=>"/^.+@.+$/", 'ng-required'=>"true") = text_field_tag(:email, nil, placeholder: t('comment_placeholder.email'), 'ng-model'=> 'email', 'ng-pattern'=>"/^.+@.+$/", 'ng-required'=>"true")
button.comment-submit ng-click="submit()" ng-disabled="form.$invalid || submitting" {{ submitting && '发表中' || '发表' }} button.comment-submit ng-click="submit()" ng-disabled="form.$invalid || submitting" {{ submitting && "#{t('comment_placeholder.submitting')}" || "#{t('comment_placeholder.submit')}" }}
p.comment-success ng-show="publish_success" 发布成功 p.comment-success ng-show="publish_success" #{t('comment_placeholder.publish_success')}
p.comment-fail ng-show="publish_success == false" 发布失败: {{ publish_fail_msg }} p.comment-fail ng-show="publish_success == false" #{t('comment_placeholder.publish_fail')}: {{ publish_fail_msg }}
.comment-diag .comment-diag
.comment-wrapper ng-repeat=" comment in comments " .comment-wrapper ng-repeat=" comment in comments "
p.name p.name

View File

@ -3,7 +3,7 @@ h2.blog-title #{post.title}
p.ptag p.ptag
span span
i.fi-list-thumbnails i.fi-list-thumbnails
span #{post.type} span #{post.type_en}
span span
i.fi-pricetag-multiple i.fi-pricetag-multiple
span #{post.labels_content} span #{post.labels_content}

View File

@ -1,3 +1,3 @@
.qrcode-image .qrcode-image
= image_tag( qrcodes_path(str: str) ) = image_tag( qrcodes_path(str: str) )
p 使用手机继续阅读 or 帮我分享至微信朋友圈 p #{t('qrcodetips')}

View File

@ -2,49 +2,45 @@
- content_for(:meta) do - content_for(:meta) do
meta name="description" content="#{ENV['INTRODUCE'].dup.force_encoding('UTF-8')}" meta name="description" content="#{ENV['INTRODUCE'].dup.force_encoding('UTF-8')}"
- content_for(:title) do - content_for(:title) do
| 首页 | #{t('title.home')}
.row .row
.small-12.large-8.columns .small-12.large-8.columns
- unless @newest - unless @newest
h2.blog-title 这里还没有博客 = render 'common/no_blog_here'
p
| 这里还没有博客, 请访问
= link_to '管理页面', new_admin_post_path
| 来创建第一篇博客
- else - else
= render partial: 'post_head', locals: { post: @newest } = render partial: 'post_head', locals: { post: @newest }
.content.markdown .content.markdown
== @newest.sub_content == @newest.sub_content
= link_to "阅读全文 >>", blog_path(@newest), class: 'read-more' = link_to t('home.read'), blog_path(@newest), class: 'read-more'
p.published-at 发表于 #{format_date(@newest.created_at)} p.published-at #{t('home.created_at')} #{format_date(@newest.created_at)}
h4.recent-title RECENT h4.recent-title RECENT
ul.recent-content ul.recent-content
- @recent.each do |re| - @recent.each do |re|
li = link_to "#{re.title}",blog_path(re) li = link_to "#{re.title}",blog_path(re)
.large-3.columns.large-offset-1.self-introduce.self-introduce-index ng-controller='AboutController' .large-3.columns.large-offset-1.self-introduce.self-introduce-index
/*请到 common 调整个人设置*/ /*Adjust it in common/welcome*/
= render 'common/welcome' = render 'common/welcome'
h4 SUBSCRIBE h4 #{t('subscribes.title')}
.row.ng-cloak .row.ng-cloak ng-controller='AboutController'
.small-12.medium-6.large-12.columns .small-12.medium-6.large-12.columns
ul.subscribe-ul ul.subscribe-ul
- if ENV['MAIL_SERVER'].present? - if ENV['MAIL_SERVER'].present?
li li
= link_to '邮件订阅 ', '', "ng-click"=>"click('email')" = link_to t('subscribes.email'), '', "ng-click"=>"click('email')"
.email-subscribe ng-show="type == 'email'" .email-subscribe ng-show="type == 'email'"
= text_field_tag 'email', nil, placeholder: 'your@email.com', 'ng-model'=>'email' = text_field_tag 'email', nil, placeholder: 'your@email.com', 'ng-model'=>'email'
button.small ng-click="subscribe()" ng-disabled="! email_validate()" 订阅 button.small ng-click="subscribe()" ng-disabled="! email_validate()" #{t('subscribes.submit')}
span.subscribe-success ng-show="subscribe_success" 订阅成功 span.subscribe-success ng-show="subscribe_success" #{t('subscribes.submit_success')}
span.subscribe-fail ng-show="subscribe_success == false" {{subscribe_fail_msg}} span.subscribe-fail ng-show="subscribe_success == false" {{subscribe_fail_msg}}
li li
= link_to '微信扫一扫', '', "ng-click"=>"click('weixin')" = link_to t('subscribes.wechat'), '', "ng-click"=>"click('weixin')"
.weixin-subscribe ng-show="type == 'weixin'" .weixin-subscribe ng-show="type == 'weixin'"
= render partial: "qrcode", locals: { str: root_url } = render partial: "qrcode", locals: { str: root_url }
li li
= link_to 'RSS订阅', '', "ng-click"=>"click('rss')" = link_to t('subscribes.rss'), '', "ng-click"=>"click('rss')"
.rss-subscribe ng-show="type == 'rss'" .rss-subscribe ng-show="type == 'rss'"
= link_to rss_blogs_path do = link_to rss_blogs_path do
- image_tag('rss.png') - image_tag('rss.png')

View File

@ -0,0 +1,5 @@
h2.blog-title #{t('home.no_blog_here')}
p
| No post here, please visit
= link_to ' Manage Post ', new_admin_post_path
| to create the first post.

View File

@ -0,0 +1,5 @@
h2.blog-title #{t('home.no_blog_here')}
p
| 这里还没有博客, 请访问
= link_to '管理页面', new_admin_post_path
| 来创建第一篇博客

View File

@ -0,0 +1,16 @@
/* adjust stylesheet: .self-introduce-index */
h4 WELCOME
p I'm Li Yafei, WinDy is my English name.
h4 ABOUT
ul.aboutme-index
li
span Industry:
span Web Development, Startups, Life
li
span Location:
span Nan Shan District, ShenZhen, China
li
span More:
span
= link_to 'About Me', about_path

View File

@ -1,8 +1,8 @@
/* 样式调整请找 stylesheet: .self-introduce-index */ /* 样式调整请找 stylesheet: .self-introduce-index */
h4 WELCOME h4 欢迎
p 我是李亚飞, WinDy 是我的网名. p 我是李亚飞, WinDy 是我的网名.
h4 ABOUTME h4 关于我
ul.aboutme-index ul.aboutme-index
li li
span 领域: span 领域:

View File

@ -1,7 +1,6 @@
- content_for(:title) do - content_for(:title) do
| 关于我 | #{t('title.about')}
- content_for(:main) do - content_for(:main) do
/! 导航
.about-page ng-app='app' ng-controller='AboutScrollController' .about-page ng-app='app' ng-controller='AboutScrollController'
.top-bar-wrapper.contain-to-grid.fixed ng-class="{ active: ! is_top() }" .top-bar-wrapper.contain-to-grid.fixed ng-class="{ active: ! is_top() }"
.row .row

View File

@ -5,5 +5,10 @@
span.link yafeilee.me span.link yafeilee.me
span.time © 2012 - 2015 span.time © 2012 - 2015
.license .license
| Designed by
span
= link_to 'WinDy', about_path, target: '_blank'
.license
| Built with
span span
= link_to 'wblog', 'https://github.com/windy/wblog', target: '_blank' = link_to 'wblog', 'https://github.com/windy/wblog', target: '_blank'

View File

@ -18,15 +18,15 @@ html
section.top-bar-section section.top-bar-section
ul.left ul.left
li li
= link_to '创建新博客', new_admin_post_path = link_to t('admin.new_post'), new_admin_post_path
li li
= link_to '管理博客', admin_posts_path = link_to t('admin.posts'), admin_posts_path
ul.right ul.right
li li
= link_to '返回首页', root_path = link_to t('admin.back'), root_path
- if admin_username - if admin_username
li li
= link_to admin_username + ' [ 退出 ]', admin_session_path(1), method: 'DELETE' = link_to admin_username + ' [ ' + t('admin.logout') + ' ]', admin_session_path(1), method: 'DELETE'
- flash.each do |name, msg| - flash.each do |name, msg|
- if msg.is_a?(String) - if msg.is_a?(String)
div class=("alert-box #{name.to_sym == :notice ? "success" : "alert"}") data-alert="" div class=("alert-box #{name.to_sym == :notice ? "success" : "alert"}") data-alert=""

View File

@ -7,7 +7,6 @@ html
title title
= content_for?(:title) ? yield(:title) + " | #{ENV['SITE_NAME']}" : ENV['SITE_NAME'] = content_for?(:title) ? yield(:title) + " | #{ENV['SITE_NAME']}" : ENV['SITE_NAME']
= stylesheet_link_tag "application", media: 'all' = stylesheet_link_tag "application", media: 'all'
/ 增加 favico 图标
link href="/favicon.png" type='image/png' rel="icon" link href="/favicon.png" type='image/png' rel="icon"
= javascript_include_tag "vendor/modernizr" = javascript_include_tag "vendor/modernizr"
= javascript_include_tag "application" = javascript_include_tag "application"
@ -31,30 +30,30 @@ html
li li
= link_to root_path do = link_to root_path do
i.fi-home i.fi-home
| 首页 | #{t('head.home')}
li li
= link_to '/tech' do = link_to '/tech' do
i.fi-social-evernote i.fi-social-evernote
| 技术 | #{t('head.tech')}
li li
= link_to '/life' do = link_to '/life' do
i.fi-torsos-male-female i.fi-torsos-male-female
| 生活 | #{t('head.life')}
li li
= link_to '/creator' do = link_to '/creator' do
i.fi-lightbulb i.fi-lightbulb
| 创业 | #{t('head.creator')}
li li
label Archive label Archive
li li
= link_to archives_path do = link_to archives_path do
i.fi-align-justify i.fi-align-justify
| 时间线 | #{t('head.timeline')}
li li
label About label About
= link_to about_path do = link_to about_path do
i.fi-torso i.fi-torso
| 关于我 | #{t('head.about')}
section.main-section ng-app="app" section.main-section ng-app="app"
- flash.each do |name, msg| - flash.each do |name, msg|
- if msg.is_a?(String) - if msg.is_a?(String)

View File

@ -13,7 +13,9 @@ module WBlog
class Application < Rails::Application class Application < Rails::Application
# Configure sensitive parameters which will be filtered from the log file. # Configure sensitive parameters which will be filtered from the log file.
I18n.config.enforce_available_locales = true config.i18n.available_locales = [:en, :'zh-CN']
#I18n.config.enforce_available_locales = true
config.i18n.default_locale = (ENV['LOCALE'] || 'zh-CN').to_sym
config.time_zone = 'Beijing' config.time_zone = 'Beijing'
config.action_controller.action_on_unpermitted_parameters = :log config.action_controller.action_on_unpermitted_parameters = :log

View File

@ -1,22 +1,26 @@
# 必须配置的 # This section MUST be configured
SITE_NAME: "WinDy's Blog" SITE_NAME: "WinDy's Blog"
# 后台登录的用户名与密码, 不填的话无法管理后台 # Admin Dashboard Management, If ADMIN_USER is blank, No One can login into Dashboard
# 建议使用个人邮箱, 如果同时配置了 SENDCLOUD_USER, 则启用邮件通知, 源代码参考: /app/models/comment.rb # Recommend using your personal Email, if SENDCLOUD_USER is setted, System WILL send you notification email.
# For more detail, see: /app/models/comment.rb
ADMIN_USER: 'admin' ADMIN_USER: 'admin'
ADMIN_PASSWORD: 'admin' ADMIN_PASSWORD: 'admin'
# Rails secret token, 用 rake secret 生成一个填这里, 不要跟别人的一样
# Rails secret token, use `rake secret` to generate new one here.
SECRET_TOKEN: 'e4122773d4324fce978c52cde790d84d14f7194f377aea41b7b8302d1d10150e6076a3b7e5e0c1f24ca330cf0a058482c95ea37908bba1722d0761ba5d4e566a' SECRET_TOKEN: 'e4122773d4324fce978c52cde790d84d14f7194f377aea41b7b8302d1d10150e6076a3b7e5e0c1f24ca330cf0a058482c95ea37908bba1722d0761ba5d4e566a'
# SEO 搜索优化, 不填则不显示 #locale: en or zh-CN, zh-CN is default value
# 首页介绍 LOCALE: 'zh-CN'
# META description for SEO
INTRODUCE: '这是李亚飞的博客, 李亚飞是暂住在深圳的一名 Ruby 程序员, 这里是关于技术, 创业, 生活的思考' INTRODUCE: '这是李亚飞的博客, 李亚飞是暂住在深圳的一名 Ruby 程序员, 这里是关于技术, 创业, 生活的思考'
# 可选的 # optional
# google analytics, 如果不需要可以留空 # google analytics, blank it if you don't need
GOOGLE: 'UA-32883596-1' GOOGLE: ''
# 邮件订阅通知与评论邮件通知功能, 留空用户名表示不需要创建博客后发送订阅邮件 # Email Setting, see more: /config/environments/production.rb
MAIL_SERVER: '' MAIL_SERVER: ''
DOMAIN_NAME: '' DOMAIN_NAME: ''
MAIL_USERNAME: '' MAIL_USERNAME: ''

View File

@ -1,18 +1,86 @@
en: en:
upload_photo: "上传图片" comment: "Comment"
comment: "查看评论" edit: 'Edit'
announce_at: "发表在 " destroy: 'Destroy'
visited_count: "浏览数 " announce_at: "Published at "
nocontent: "没有更多内容" visited_count: "Viewed "
prev: '← 更早博客' nocontent: "No More Content Here"
next: '更新博客 →' prev: '← Prev Post'
new_post: '新建博客' next: 'Next Post →'
rss_description: '如果你想关注我的每一篇文章,推荐进行订阅, 将右面的链接复制到你的阅读器里吧.' qrcodetips: 'Continue reading with mobile phone or share it to Wechat Puppy'
head_description: 'WinDy的个人中心 - 记录人生经历 - 技术 生活 And 创业'
home:
no_blog_here: 'There is no post here'
read: 'Read More >>'
created_at: 'Posted At'
subscribes:
title: 'SUBSCRIBE'
email: 'Email Subscribe'
wechat: 'Wechat Scan QR Code'
rss: 'RSS Subscribe'
submit: 'Submit'
submit_success: 'Submit Successfully'
head: head:
home: '首页' home: 'Home'
tech: '技术' tech: 'Tech'
life: '生活' life: 'Life'
creator: '创业' creator: 'Startup'
about_me: '关于我' timeline: 'Timeline'
about_me: 'About'
title:
home: 'Home'
timeline: 'Timeline'
about: 'About Me'
comment_attributes:
email: 'Format Validation Failed'
comment_placeholder:
content: 'Write your viewpoint...'
name: 'Your Name'
email: 'Your Email'
submit: 'Submit'
submitting: 'Submitting'
publish_success: 'Publish Successfully'
publish_fail: 'Publish Failed'
admin:
new_post: 'New Post'
posts: 'Manage Posts'
posts_attributes:
title: 'Title'
type: 'Type'
labels: 'Labels'
already_labels: 'Labels Haven: '
content: 'Content'
preview: 'Preview'
upload_photo: 'Upload Photo'
submit: 'Submit'
posts_head:
title: 'Title'
summary: 'Summary'
operation: 'Operation'
comments: 'Manage Comment'
comments_head:
name: 'Name'
email: 'Email'
content: 'Content'
created_at: 'Created at'
operation: 'Operation'
reply: 'Reply'
destroy: 'Destroy'
back: 'Back to Home'
logout: 'Logout'
dashboard:
head: 'System Information'
info: 'Info'
data: 'Data'
posts_count: 'Posts Count'
comments_count: 'Comments Count'
visited_count: 'Visited Count'
subscribes_count: 'Subscribes Count'

86
config/locales/zh-CN.yml Normal file
View File

@ -0,0 +1,86 @@
zh-CN:
comment: "评论"
edit: '编辑'
destroy: '删除'
announce_at: "发表于 "
visited_count: "浏览数 "
nocontent: "没有新的内容"
prev: '← 上一篇'
next: '下一篇 →'
qrcodetips: '扫一扫继续阅读或者帮我分享至朋友圈'
home:
no_blog_here: '这里没有博客'
read: '阅读全文 >>'
created_at: '发表于 '
subscribes:
title: '订阅我'
email: '邮件订阅'
wechat: '微信扫一扫'
rss: 'RSS 订阅'
submit: '提交'
submit_success: '订阅成功'
head:
home: '首页'
tech: '技术'
life: '生活'
creator: '创业'
timeline: '时间线'
about_me: '关于我'
title:
home: '首页'
timeline: '时间线'
about: '关于我'
comment_attributes:
email: '邮件地址错误'
comment_placeholder:
content: '发表你的评论...'
name: '名字'
email: '邮箱'
submit: '提交'
submitting: '提交中'
publish_success: '发表成功'
publish_fail: '发表失败'
admin:
new_post: '新建博客'
posts: '博客管理'
posts_attributes:
title: '标题'
type: '分类'
labels: '标签'
already_labels: '已有标签: '
content: '正文'
preview: '预览'
upload_photo: '上传图片'
submit: '提交'
posts_head:
title: '标题'
summary: '概要'
operation: '操作'
comments: '评论管理'
comments_head:
name: '名字'
email: '邮箱'
content: '内容'
created_at: '创建时间'
operation: '操作'
reply: '回复'
destroy: '删除'
back: '返回首页'
logout: '退出'
dashboard:
head: '系统信息'
info: '信息'
data: '数据'
posts_count: '文章数'
comments_count: '评论数'
visited_count: '浏览数'
subscribes_count: '订阅数'