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
|
||||
|
|
|
@ -73,8 +73,8 @@
|
|||
<% elsif @mode == "groups"%>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th width="200px"><%= _('Name')%></th>
|
||||
<th><%= _('E-mail')%></th>
|
||||
<th width="200px"><%= t(:name)%></th>
|
||||
<th><%= t(:email)%></th>
|
||||
</tr>
|
||||
<% for contact in @contacts %>
|
||||
<input type="hidden" id="contacts_for_group[<%=contact.id%>]" name="contacts_for_group[<%=contact.id%>]" value="<%=@contacts_for_group[contact.id]%>" >
|
||||
|
@ -94,8 +94,8 @@
|
|||
</tr>
|
||||
<% else %>
|
||||
<tr>
|
||||
<th width="200px"><%= _('Name')%></th>
|
||||
<th><%= _('E-mail')%></th>
|
||||
<th width="200px"><%= t(:name)%></th>
|
||||
<th><%= t(:email)%></th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
<% for contact in @contacts %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h1><%=_('Edit/Create contact')%></h1>
|
||||
<h1><%=t(:edit_create_contact)%></h1>
|
||||
<div id="header">
|
||||
<ul id="primary">
|
||||
<li><%=link_folders%></li>
|
||||
|
@ -7,7 +7,7 @@
|
|||
<li><%=link_mail_filters%></li>
|
||||
<li><span><%= t :contacts %></span>
|
||||
<ul id="secondary">
|
||||
<li><%=link_contact_list%></li>
|
||||
<li><%=link_to t(:back_to_contacts), contacts_url%></li>
|
||||
<% if ret = session["return_to"] %>
|
||||
<li><%=link_to(t(:back_to_message), ret) %></li>
|
||||
<% end %>
|
||||
|
@ -63,8 +63,8 @@
|
|||
<table class="edit">
|
||||
<tr>
|
||||
<td colspan=2 class="buttonBar">
|
||||
<input type="submit" name="paction" value="<%=_('Save')%>"/>
|
||||
<input type="submit" name="paction" value="<%=_('Save and add another')%>"/>
|
||||
<input type="submit" name="paction" value="<%=t(:save)%>"/>
|
||||
<input type="submit" name="paction" value="<%=t(:save_and_add_another)%>"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<%= render :partial => 'shared/folders' %>
|
||||
<% } %>
|
||||
|
||||
<h1><%= t :mailbox%></h1>
|
||||
<h1><%= t :mailbox %></h1>
|
||||
<form name="composeMail" id='composeMail' action="/webmail/compose" enctype="multipart/form-data" method="post">
|
||||
<div id="header">
|
||||
<ul id="primary">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue