Mailinglist Archive: yast-commit (1923 mails)

< Previous Next >
[yast-commit] <web-client> dmacvicar_log_viewer : app/controllers/system_controller.rb - i18n support
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Mon, 24 Aug 2009 15:37:53 +0200
  • Message-id: <E1Mlmqy-0005uh-CX@xxxxxxxxxxxxxxxx>
ref: refs/heads/dmacvicar_log_viewer
commit 5b61562f2701f9ffcc0d12f194368ec0b8e03d5a
Author: Ladislav Slezak <lslezak@xxxxxxxxxx>
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 !@xxxxxxx? 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 !@xxxxxxx? 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@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages