ref: refs/heads/master
commit 5b61562f2701f9ffcc0d12f194368ec0b8e03d5a
Author: Ladislav Slezak
Date: Mon Aug 17 15:08:09 2009 +0200
app/controllers/system_controller.rb - i18n support
---
.../system/app/controllers/system_controller.rb | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/plugins/system/app/controllers/system_controller.rb b/plugins/system/app/controllers/system_controller.rb
index dc4a01f..8336d58 100644
--- a/plugins/system/app/controllers/system_controller.rb
+++ b/plugins/system/app/controllers/system_controller.rb
@@ -2,6 +2,8 @@
class SystemController < ApplicationController
before_filter :login_required
+ include GetText
+
def initialize
@sys = System.new rescue nil
end
@@ -10,12 +12,12 @@ class SystemController < ApplicationController
if request.put?
begin
if !@sys.nil? and @sys.reboot
- flash[:message] = "Rebooting the machine..."
+ flash[:message] = _("Rebooting the machine...")
else
- flash[:error] = "Cannot reboot the machine!"
+ flash[:error] = _("Cannot reboot the machine!")
end
rescue Exception => e
- flash[:error] = "Cannot reboot the machine!"
+ flash[:error] = _("Cannot reboot the machine!")
end
else
flash[:error] = 'Reboot request is accepted only via PUT method!'
@@ -28,12 +30,12 @@ class SystemController < ApplicationController
if request.put?
begin
if !@sys.nil? and @sys.shutdown
- flash[:message] = "Shuting down the machine..."
+ flash[:message] = _("Shuting down the machine...")
else
- flash[:error] = "Cannot shutdown the machine!"
+ flash[:error] = _("Cannot shutdown the machine!")
end
rescue Exception => e
- flash[:error] = "Cannot shutdown the machine!"
+ flash[:error] = _("Cannot shutdown the machine!")
end
else
flash[:error] = 'Shutdown request is accepted only via PUT method!'
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org