Translation changes

This commit is contained in:
chris committed 2012-12-03 23:00:04 +08:00
1 parent 9c6c622a49
commit dc3be3c9a1
128 files changed
+295 -1114

No files matched your search

Binary file not shown.
@@ -101,7 +101,6 @@ class Admin::DesignsController < OrbitBackendController
def create
@design = Design.new(params[:design])
if @design.save
flash[:notice] = "Successfully created design and tasks."
redirect_to admin_designs_url
else
render :action => 'new'
@@ -112,7 +112,7 @@ class Admin::PurchasesController < ApplicationController
log = Logger.new(STDOUT)
log.level = Logger::WARN
log.warn("App unzip procress is finished,please restart the server to apply effect")
log.warn(t(:unzip_app))
#TODO Perform touch tmp/restart to restart in production env
end
@@ -159,7 +159,7 @@ class Admin::PurchasesController < ApplicationController
log = Logger.new(STDOUT)
log.level = Logger::WARN
log.warn("App unzip procress is finished,please restart the server to apply effect")
log.warn(t(:unzip_app))
}
temp_file.close
-78
View File
@@ -1,78 +0,0 @@
class Admin::UsersController < ApplicationController
layout "admin"
before_filter :authenticate_user!
before_filter :set_attribute, :only => [:index, :show, :new, :edit]
def index
@users = User.all.entries
end
def show
@user = User.find(params[:id])
get_info_and_roles
end
def new
@user = User.new
get_info_and_roles
end
def create
puts params.to_yaml
@user = User.new(params[:user])
if @user.save
flash[:notice] = t('create.success.user')
redirect_to :action => :index
else
render :action => :new
end
end
def edit
@user = User.find(params[:id])
get_info_and_roles
end
def update
@user = User.find(params[:id])
# Update changes to the avatar
@user.remove_avatar! if params[:file]
@user.avatar = params[:file] if params[:file]
if @user.id.to_s.eql?(session['warden.user.user.key'][1].to_s) && @user.admin != params[:user][:admin].to_i.to_b
flash.now[:error] = t(:cant_revoke_self_admin)
end
if !flash[:error] && @user.update_attributes(params[:user])
flash[:notice] = t('update.success.user')
redirect_to :action => :index
else
get_info_and_roles
render :action => :edit
end
end
def destroy
if params[:id].eql?(session['warden.user.user.key'][1].to_s)
flash[:error] = t(:cant_delete_self)
else
@user = User.find(params[:id])
@user.destroy
end
redirect_to :action => :index
end
protected
def get_info_and_roles
@infos = Info.excludes('disabled' => true)
@roles = Role.excludes('disabled' => true)
end
def set_attribute
@class = 'users'
end
end
@@ -37,7 +37,7 @@ class Desktop::CoAuthorsController < ApplicationController
@co_author.name_id= current_user.id
if @co_author.save
render json: {success:true, msg: "Co-author successfully saved!"}.to_json
render json: {success:true, msg: t('create.sucess.co_author')}.to_json
else
error_msg = @co_author.errors.full_messages.join("<br />")
render json: {success: false, msg: error_msg}.to_json
@@ -48,7 +48,7 @@ class Desktop::CoAuthorsController < ApplicationController
@co_author = CoAuthor.find(params[:id])
if @co_author.update_attributes(params[:co_author])
render json: {success:true, msg: "Co-author successfully update!"}.to_json
render json: {success:true, msg: t('update.sucess.co_author')}.to_json
else
error_msg = @co_author.errors.full_messages.join("<br />")
render json: {success: false, msg: error_msg}.to_json
@@ -44,7 +44,7 @@ class Desktop::JournalPagesController < ApplicationController
@writing_journal = WritingJournal.new(params[:writing_journal])
if @writing_journal.save
render json: {success: true, msg: "Paper successfully saved!"}.to_json
render json: {success: true, msg: t('create.success.paper')}.to_json
else
error_msg = @writing_journal.errors.full_messages.join("<br />")
render json: {success: false, msg: error_msg}.to_json
@@ -56,7 +56,7 @@ class Desktop::JournalPagesController < ApplicationController
@writing_journal= WritingJournal.find(params[:id])
respond_to do |format|
if @writing_journal.update_attributes(params[:writing_journal])
render json: {success: true, msg: "Paper successfully saved!"}.to_json
render json: {success: true, msg: t('update.success.paper')}.to_json
else
error_msg = @writing_journal.errors.full_messages.join("<br />")
render json: {success: false, msg: error_msg}.to_json
@@ -76,7 +76,7 @@ class Desktop::JournalPagesController < ApplicationController
def destroy
@writing_journal = WritingJournal.find(params[:id])
@writing_journal.destroy
render :json => {success: true, msg: "Paper deleted successfully!"}
render :json => {success: true, msg: t('delete.success.paper')}
end
def get_journals_json
+1 -1
View File
@@ -10,7 +10,7 @@ class PagesController < ApplicationController
impressionist(@item)
render_page
else
render :text => 'You need a home page'
render :text => t(:need_home)
end
end