From c9637bac50d2e1c3e52db9451fb541284b78ad88 Mon Sep 17 00:00:00 2001 From: yafeilee Date: Fri, 17 Apr 2015 15:13:30 +0800 Subject: [PATCH] label none translation --- app/models/post.rb | 2 +- config/locales/en.yml | 1 + config/locales/zh-CN.yml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/post.rb b/app/models/post.rb index d8db819..cf40b01 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -73,7 +73,7 @@ class Post def labels_content( need_blank=false ) content = self.labels.collect { |label| label.name }.join(", ") - content = '无' if content.blank? and !need_blank + content = I18n.t('none') if content.blank? and !need_blank content end diff --git a/config/locales/en.yml b/config/locales/en.yml index 3821ab2..989bac9 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -8,6 +8,7 @@ en: nocontent: "No More Content Here" prev: '← Prev Post' next: 'Next Post →' + none: 'None' qrcodetips: 'Continue reading with mobile phone or share it to Wechat Puppy' home: diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index c037ae9..54d6c5e 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -8,6 +8,7 @@ zh-CN: nocontent: "没有新的内容" prev: '← 上一篇' next: '下一篇 →' + none: '无' qrcodetips: '扫一扫继续阅读或者帮我分享至朋友圈' home: