Permalink
Browse files

Add locales.

  • Loading branch information...
1 parent 8a4fd3c commit 899d7bafe43d78dbcf56693c86b15850ac5d33fb @huacnlee huacnlee committed Apr 17, 2012
View
@@ -15,3 +15,4 @@ public/t
public/t/**/*
.redcar
Gemfile.lock
+.DS_Store
@@ -79,4 +79,6 @@
#topic_new_tip li { margin-bottom:6px;}
.body a.at_floor { color:#376B43; }
-.body a.at_user { }
+.body a.at_user { }
+
+.topic_body_text_area { width:600px;}
@@ -16,7 +16,7 @@
<div class="clearfix">
<%= f.label :body %>
<div class="input">
- <%= f.text_area :body, :class => "topic_body_text_area xxlarge", :rows => "20" %>
+ <%= f.text_area :body, :class => "topic_body_text_area", :rows => "20" %>
</div>
</div>
<div class="actions">
@@ -9,13 +9,10 @@
<%= f.text_field :title, :class => "span7" %>
</div>
</div>
- <div class="edit_tools">
- <a href="#" onclick="return Topics.addImageClick();" id="add_image">上传图片</a>
- </div>
<div class="clearfix">
<%= f.label :body %>
<div class="input">
- <%= f.text_area :body, :class => "topic_body_text_area xxlarge", :style => "height:400px" %>
+ <%= f.text_area :body, :class => "topic_body_text_area", :style => "height:200px" %>
</div>
</div>
<div class="actions">
@@ -50,7 +50,6 @@
<h2>发贴说明</h2>
<ol>
<li>发布后正文排版会自动安你在文本框里面输入的样子排列.如果里面带有 URL地址,将会自动转变为超级链接。</li>
- <li>可以插入优酷,土豆,酷6的视频,你只用在他们网站使用转载功能,然后复制哪段"Flash代码"然后粘贴到正文里面,系统将会自动转换成播放器。</li>
</ol>
</div>
<% end %>
@@ -0,0 +1,14 @@
+'zh-CN':
+ mongoid:
+ models:
+ homeland/topic: "话题"
+ homeland/reply: "回复"
+ homeland/section: "大节点"
+ homeland/node: "节点"
+ attributes:
+ homeland/topic:
+ title: "标题"
+ body: "正文"
+ user_id: "用户"
+ homeland/reply:
+ body: "回复内容"
@@ -27,6 +27,19 @@ def add_javascripts
end
end
+ def add_locales
+ %w(zh-CN.yml).each do |fname|
+ path = "#{Rails.root}/config/locales/homeland.#{fname}"
+ if File.exists?(path)
+ puts "Skipping config/locales/homeland.#{fname} creation, as file already exists!"
+ else
+ puts "Adding assets (config/locales/homeland.#{fname})..."
+ template "locales/homeland.#{fname}", path
+ end
+ end
+ end
+
+
end
end
end

0 comments on commit 899d7ba

Please sign in to comment.