Added spanish translation and some fixes for rails 2.3.2
This commit is contained in:
parent
631a4c864f
commit
f35db925c2
11 changed files with 26 additions and 1009 deletions
|
@ -3,7 +3,10 @@
|
|||
class ApplicationController < ActionController::Base
|
||||
before_filter :user_login_filter
|
||||
before_filter :add_scripts
|
||||
#before_filter :localize
|
||||
|
||||
|
||||
filter_parameter_logging :password
|
||||
protected
|
||||
def secure_user?() true end
|
||||
def secure_cust?() false end
|
||||
|
@ -35,20 +38,25 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def localize
|
||||
logger.info "LOCALIZEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"
|
||||
# We will use instance vars for the locale so we can make use of them in
|
||||
# the templates.
|
||||
@charset = 'utf-8'
|
||||
logger.info "Paso 1"
|
||||
headers['Content-Type'] = "text/html; charset=#{@charset}"
|
||||
# Here is a very simplified approach to extract the prefered language
|
||||
# from the request. If all fails, just use 'en_EN' as the default.
|
||||
temp = if request.env['HTTP_ACCEPT_LANGUAGE'].nil?
|
||||
logger.info "Paso 2"
|
||||
[]
|
||||
else
|
||||
logger.info "Paso 3"
|
||||
request.env['HTTP_ACCEPT_LANGUAGE'].split(',').first.split('-') rescue []
|
||||
end
|
||||
language = temp.slice(0)
|
||||
dialect = temp.slice(1)
|
||||
@language = language.nil? ? 'en' : language.downcase # default is en
|
||||
logger.info @language
|
||||
# If there is no dialect use the language code ('en' becomes 'en_EN').
|
||||
@dialect = dialect.nil? ? @language.upcase : dialect
|
||||
# The complete locale string consists of
|
||||
|
|
|
@ -58,7 +58,7 @@ class ContactsController < ApplicationController
|
|||
def add_from_mail
|
||||
cstr = params['cstr']
|
||||
retmsg = params['retmsg']
|
||||
@session["return_to"] = url_for(:controller=>'/webmail/webmail',
|
||||
session["return_to"] = url_for(:controller=>'/webmail/webmail',
|
||||
:action=>'folders',
|
||||
:msg_id=>retmsg)
|
||||
# parse string
|
||||
|
@ -106,7 +106,7 @@ class ContactsController < ApplicationController
|
|||
@groups[g.id] = 0
|
||||
}
|
||||
end
|
||||
render :action => "add"
|
||||
render :action => "new"
|
||||
end
|
||||
|
||||
def import_preview
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue