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: