Project

General

Profile

« Previous | Next » 

Revision e9eb9974

Added by Marc Dequènes over 15 years ago

  • ID e9eb9974c0a14dda5d64e5a0cd5d5445f22690a7

[fix] corrected remaining mistakes with the references, and gettext-related code

View differences:

postman
# http://www.ruby-doc.org/stdlib/libdoc/net/imap/rdoc/index.html
Dir.chdir(File.dirname(File.expand_path(__FILE__)))
APP_ROOT = File.dirname(File.expand_path(__FILE__))
Dir.chdir(APP_ROOT)
$: << "./lib"
#require 'socket'
......
order.commands.each do |cmdstr|
logger.info "Executing command: #{cmdstr}"
begin
result = execute_cmd(order.user, cmdstr, order.refs)
result = execute_cmd(order.user, cmdstr, order.references)
if result.nil?
result = OpenStruct.new
result.cmd = cmdstr
......
list = CyborgHood::DnsDomain.find_by_manager(user)
txt_list = list.collect{|z| z.cn }.sort.join(", ")
result.ok = true
result.message = _("You are manager of the following zones: %s.") + txt_list
result.message = sprintf(_("You are manager of the following zones: %s."), txt_list)
when "GET"
return if cmdline.empty?
case cmdline.shift.upcase
......
logger.info "Processing result: #{result_tag} (#{order.message})"
logger.info "Extra processing information: " + order.system_message if order.system_message
if order.user and order.user.preferredLanguage
logger.debug "User preference for langage: " + order.user.preferredLanguage
locale = order.user.preferredLanguage
if order.user
if order.user.preferredLanguage
logger.debug "User preference for langage: " + order.user.preferredLanguage
locale = order.user.preferredLanguage
else
logger.debug "No user preference for langage, using english"
locale = "en"
end
else
logger.debug "No user preference for langage, using english"
locale = "en"
end
clear_cache
unless order.ok
if order.warn_sender

Also available in: Unified diff