summaryrefslogtreecommitdiff
path: root/app/controllers/profiles/preferences_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/profiles/preferences_controller.rb')
-rw-r--r--app/controllers/profiles/preferences_controller.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/controllers/profiles/preferences_controller.rb b/app/controllers/profiles/preferences_controller.rb
index a9a06ecc808..1559a191ba2 100644
--- a/app/controllers/profiles/preferences_controller.rb
+++ b/app/controllers/profiles/preferences_controller.rb
@@ -1,3 +1,4 @@
+#encoding: utf-8
class Profiles::PreferencesController < Profiles::ApplicationController
before_action :user
@@ -7,13 +8,13 @@ class Profiles::PreferencesController < Profiles::ApplicationController
def update
begin
if @user.update_attributes(preferences_params)
- flash[:notice] = 'Preferences saved.'
+ flash[:notice] = '偏好设置已保存。'
else
- flash[:alert] = 'Failed to save preferences.'
+ flash[:alert] = '保存偏好设置失败。'
end
rescue ArgumentError => e
# Raised when `dashboard` is given an invalid value.
- flash[:alert] = "Failed to save preferences (#{e.message})."
+ flash[:alert] = "保存偏好设置失败(#{e.message})。"
end
respond_to do |format|