diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index d44be19b..f27e0bb0 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -60,11 +60,11 @@ class MemosController < ApplicationController end @forum.save - format.html { redirect_to forum_memo_path(@memo.forum_id, @back_memo_id), notice: 'Memo was successfully created.' } + format.html { redirect_to forum_memo_path(@memo.forum_id, @back_memo_id), notice: "#{l :label_memo_create_succ}" } format.json { render json: @memo, status: :created, location: @memo } else back_error_page = @memo.parent_id.nil? ? forum_path(@forum) : forum_memo_path(@forum, @memo.parent_id) - format.html { redirect_to back_error_page, notice: 'Memo was failed created.' } + format.html { redirect_to back_error_page, notice: "#{l :label_memo_create_fail}" } format.json { render json: @memo.errors, status: :unprocessable_entity } end end @@ -104,7 +104,7 @@ class MemosController < ApplicationController if(@memo.update_attribute(:subject, params[:memo][:subject]) && @memo.update_attribute(:content, params[:memo][:content])) respond_to do |format| - format.html {redirect_to forum_memo_path(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id)), notice: 'Memo was successfully updated.'} + format.html {redirect_to forum_memo_path(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id)), notice: "#{l :label_memo_create_succ}"} #format.html redirect_to forum_memo_url(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id)), notice: 'Memo was successfully updated.' end else diff --git a/app/views/forums/_form.html.erb b/app/views/forums/_form.html.erb index 04053dce..d5111e93 100644 --- a/app/views/forums/_form.html.erb +++ b/app/views/forums/_form.html.erb @@ -15,6 +15,6 @@

<%= f.text_field :name, :required => true %>

<%= f.text_field :description, :required => true, :size => 80 %>

- <%= f.submit %> + <%= f.submit :value => (l :label_board_new) %>
<% end %> diff --git a/app/views/forums/new.html.erb b/app/views/forums/new.html.erb index 565816a1..e90dd194 100644 --- a/app/views/forums/new.html.erb +++ b/app/views/forums/new.html.erb @@ -1,6 +1,6 @@ -

New forum

+

<%= l :label_board_new%>

<%= render 'form' %> -<%= link_to 'Back', forums_path %> +<%= link_to l :button_back, forums_path %> diff --git a/config/locales/zh.yml b/config/locales/zh.yml index a12b9f33..82abf54a 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1726,7 +1726,8 @@ zh: label_newbie_faq: '新手指引 & 问答' label_hot_project: '热门项目' - label_memo_create_succ: 回复成功 + label_memo_create_succ: 发布成功 + label_memo_create_fail: 发布失败 label_memo_create: 发布 label_memo_new: 新建主题 label_memo_edit: 修改主题