Fixed a few bugs, added Arabic to language options, added translations
This commit is contained in:
parent
e73ed71e32
commit
b82c862cad
@ -1310,6 +1310,12 @@ ul.warnings li,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.link-dump {
|
||||||
|
a {
|
||||||
|
margin: 0.25em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#main article #registration-admin-menu {
|
#main article #registration-admin-menu {
|
||||||
margin: 1em 0 0;
|
margin: 1em 0 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
@ -221,7 +221,7 @@ class ApplicationController < LinguaFrancaApplicationController
|
|||||||
current_user,
|
current_user,
|
||||||
Time.now.strftime("%d/%m/%Y %H:%M")
|
Time.now.strftime("%d/%m/%Y %H:%M")
|
||||||
]
|
]
|
||||||
end# if Rails.env.preview? || Rails.env.production?
|
end if Rails.env.preview? || Rails.env.production?
|
||||||
end
|
end
|
||||||
|
|
||||||
# raise the error if we are in development so that we can debug it
|
# raise the error if we are in development so that we can debug it
|
||||||
|
@ -600,12 +600,12 @@ class ConferencesController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
if params[:location].present? && params[:location].gsub(/[\s\W]/, '').present? && (l = Geocoder.search(params[:location], language: 'en')).present?
|
if params[:location].present? && params[:location].gsub(/[\s\W]/, '').present? && (l = Geocoder.search(params[:location], language: 'en')).present?
|
||||||
corrected = view_context.location(l.first)
|
corrected = view_context.location(l.first, @this_conference.locale)
|
||||||
|
|
||||||
if corrected.present?
|
if corrected.present?
|
||||||
@registration.city = corrected
|
@registration.city = corrected
|
||||||
if params[:location].gsub(/[\s,]/, '').downcase != @registration.city.gsub(/[\s,]/, '').downcase
|
if params[:location].gsub(/[\s,]/, '').downcase != @registration.city.gsub(/[\s,]/, '').downcase
|
||||||
@warnings << view_context._('warnings.messages.location_corrected',"Your location was corrected from \"#{params[:location]}\" to \"#{corrected}\". If this doesn't reflect your intended location, you can change this again in the contact info step.", vars: {original: params[:location], corrected: corrected})
|
@warnings << view_context._('warnings.messages.location_corrected', vars: {original: params[:location], corrected: corrected})
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@errors[:location] = :unknown
|
@errors[:location] = :unknown
|
||||||
@ -1995,7 +1995,7 @@ class ConferencesController < ApplicationController
|
|||||||
steps -= [:questions] unless status == :open
|
steps -= [:questions] unless status == :open
|
||||||
steps -= [:payment] unless status == :open && conference.paypal_email_address.present? && conference.paypal_username.present? && conference.paypal_password.present? && conference.paypal_signature.present?
|
steps -= [:payment] unless status == :open && conference.paypal_email_address.present? && conference.paypal_username.present? && conference.paypal_password.present? && conference.paypal_signature.present?
|
||||||
if @registration.present?
|
if @registration.present?
|
||||||
if view_context.same_city?(@registration.city, conference.location)
|
if view_context.same_city?(@registration.city, view_context.location(conference.location, conference.locale))
|
||||||
steps -= [:questions]
|
steps -= [:questions]
|
||||||
else
|
else
|
||||||
steps -= [:hosting]
|
steps -= [:hosting]
|
||||||
|
@ -525,11 +525,6 @@ module ApplicationHelper
|
|||||||
subdomain == 'test'
|
subdomain == 'test'
|
||||||
end
|
end
|
||||||
|
|
||||||
#def location(location)
|
|
||||||
# territory = Carmen::Country.coded(location.country).subregions.coded(location.territory)
|
|
||||||
# location.city + (territory ? ' ' + territory.name : '') + ', ' + Carmen::Country.coded(location.country).name
|
|
||||||
#end
|
|
||||||
|
|
||||||
def rand_hash(length = 16, model = nil, field = nil)
|
def rand_hash(length = 16, model = nil, field = nil)
|
||||||
if field
|
if field
|
||||||
hash = rand_hash(length)
|
hash = rand_hash(length)
|
||||||
@ -580,7 +575,7 @@ module ApplicationHelper
|
|||||||
YAML.load(File.read(Rails.root.join("config/#{name.to_s}.yml")))[Rails.env].symbolize_keys
|
YAML.load(File.read(Rails.root.join("config/#{name.to_s}.yml")))[Rails.env].symbolize_keys
|
||||||
end
|
end
|
||||||
|
|
||||||
def location(location)
|
def location(location, locale = I18n.locale)
|
||||||
return nil if location.blank?
|
return nil if location.blank?
|
||||||
|
|
||||||
city = nil
|
city = nil
|
||||||
@ -613,11 +608,11 @@ module ApplicationHelper
|
|||||||
|
|
||||||
hash = Hash.new
|
hash = Hash.new
|
||||||
hash[:city] = _!(city) unless city.blank?
|
hash[:city] = _!(city) unless city.blank?
|
||||||
hash[:region] = _("geography.subregions.#{country}.#{region}") unless region.blank? || country.blank?
|
hash[:region] = _("geography.subregions.#{country}.#{region}", locale: locale) unless region.blank? || country.blank?
|
||||||
hash[:country] = _("geography.countries.#{country}") unless country.blank?
|
hash[:country] = _("geography.countries.#{country}", locale: locale) unless country.blank?
|
||||||
|
|
||||||
# return the formatted location or the first value if we only have one value
|
# return the formatted location or the first value if we only have one value
|
||||||
return hash.length > 1 ? _("geography.formats.#{hash.keys.join('_')}", vars: hash) : hash.values.first
|
return hash.length > 1 ? _("geography.formats.#{hash.keys.join('_')}", locale: locale, vars: hash) : hash.values.first
|
||||||
end
|
end
|
||||||
|
|
||||||
def same_city?(location1, location2)
|
def same_city?(location1, location2)
|
||||||
|
@ -40,6 +40,10 @@ class User < ActiveRecord::Base
|
|||||||
role == 'administrator'
|
role == 'administrator'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.AVAILABLE_LANGUAGES
|
||||||
|
[:en, :es, :fr, :ar]
|
||||||
|
end
|
||||||
|
|
||||||
def self.get(email)
|
def self.get(email)
|
||||||
user = where(email: email).first
|
user = where(email: email).first
|
||||||
|
|
||||||
|
@ -9,14 +9,15 @@
|
|||||||
= link_to (_'actions.conference.edit_registration'), register_path(@conference.slug), class: :button
|
= link_to (_'actions.conference.edit_registration'), register_path(@conference.slug), class: :button
|
||||||
- if @conferences.present?
|
- if @conferences.present?
|
||||||
%h3=_'articles.user_settings.headings.Your_Conferences'
|
%h3=_'articles.user_settings.headings.Your_Conferences'
|
||||||
- @conferences.each do | conference |
|
.link-dump
|
||||||
= link_to (_!conference.title), administration_step_path(conference.slug, :edit), class: :button
|
- @conferences.each do | conference |
|
||||||
|
= link_to (_!conference.title), administration_step_path(conference.slug, :edit), class: :button
|
||||||
|
|
||||||
|
|
||||||
= form_tag update_settings_path do
|
= form_tag update_settings_path do
|
||||||
= textfield :name, current_user.name, required: true, heading: 'articles.conference_registration.headings.name', big: true
|
= textfield :name, current_user.name, required: true, heading: 'articles.conference_registration.headings.name', big: true
|
||||||
= checkboxes :languages, [:en, :es, :fr], current_user.languages || [I18n.locale], 'languages', heading: 'articles.conference_registration.headings.languages'
|
= checkboxes :languages, User.AVAILABLE_LANGUAGES, current_user.languages || [I18n.locale], 'languages', heading: 'articles.conference_registration.headings.languages'
|
||||||
= radiobuttons :preferred_language, [:en, :es, :fr], current_user.locale || I18n.locale, 'languages', heading: 'articles.conference_registration.headings.preferred_language'
|
= radiobuttons :preferred_language, I18n.backend.enabled_locales, current_user.locale || I18n.locale, 'languages', heading: 'articles.conference_registration.headings.preferred_language'
|
||||||
= checkbox :email_subscribe, current_user.is_subscribed != false, 'articles.user_settings.email_subscribe', heading: 'articles.user_settings.headings.email_subscribe', help: 'articles.user_settings.paragraphs.email_subscribe', inline: true, right_help: true
|
= checkbox :email_subscribe, current_user.is_subscribed != false, 'articles.user_settings.email_subscribe', heading: 'articles.user_settings.headings.email_subscribe', help: 'articles.user_settings.paragraphs.email_subscribe', inline: true, right_help: true
|
||||||
.actions
|
.actions
|
||||||
= button_tag :save, value: :save
|
= button_tag :save, value: :save
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
= form_tag register_path(@this_conference.slug) do
|
= form_tag register_path(@this_conference.slug) do
|
||||||
= textfield :name, @name, required: true, heading: 'articles.conference_registration.headings.name', big: true
|
= textfield :name, @name, required: true, heading: 'articles.conference_registration.headings.name', big: true
|
||||||
= textfield :location, (params[:location] || @registration.city || location(lookup_ip_location)), required: true, heading: 'articles.conference_registration.headings.location'
|
= textfield :location, (params[:location] || @registration.city || location(lookup_ip_location)), required: true, heading: 'articles.conference_registration.headings.location'
|
||||||
= checkboxes :languages, [:en, :es, :fr], current_user.languages || [I18n.locale], 'languages', heading: 'articles.conference_registration.headings.languages'
|
= checkboxes :languages, User.AVAILABLE_LANGUAGES, current_user.languages || [I18n.locale], 'languages', heading: 'articles.conference_registration.headings.languages'
|
||||||
.actions.next-prev
|
.actions.next-prev
|
||||||
= button_tag (params[:step] == :save ? :save : :next), value: :contact_info
|
= button_tag (params[:step] == :save ? :save : :next), value: :contact_info
|
||||||
= button_tag :previous, value: :prev_contact_info, class: :subdued, formnovalidate: true
|
= button_tag :previous, value: :prev_contact_info, class: :subdued, formnovalidate: true
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
= textarea :info, @info, help: 'articles.workshops.paragraphs.info', lang: @translation, original_value: @is_translating ? richtext(@workshop.info!, 4).html_safe : nil, original_lang: @workshop.locale
|
= textarea :info, @info, help: 'articles.workshops.paragraphs.info', lang: @translation, original_value: @is_translating ? richtext(@workshop.info!, 4).html_safe : nil, original_lang: @workshop.locale
|
||||||
- if !@is_translating && (@workshop.id.blank? || @can_edit)
|
- if !@is_translating && (@workshop.id.blank? || @can_edit)
|
||||||
= columns(medium: 6) do
|
= columns(medium: 6) do
|
||||||
= checkboxes :languages, [:en, :es, :fr], @languages, 'languages', vertical: true, heading: 'articles.workshops.headings.languages', help: 'articles.workshops.paragraphs.languages'
|
= checkboxes :languages, User.AVAILABLE_LANGUAGES, @languages, 'languages', vertical: true, heading: 'articles.workshops.headings.languages', help: 'articles.workshops.paragraphs.languages'
|
||||||
= radiobuttons :theme, Workshop.all_themes, @workshop.theme, 'workshop.options.theme', vertical: true, heading: 'articles.workshops.headings.theme', help: 'articles.workshops.paragraphs.theme', other: true
|
= radiobuttons :theme, Workshop.all_themes, @workshop.theme, 'workshop.options.theme', vertical: true, heading: 'articles.workshops.headings.theme', help: 'articles.workshops.paragraphs.theme', other: true
|
||||||
= columns(medium: 6) do
|
= columns(medium: 6) do
|
||||||
= checkboxes :needs, Workshop.all_needs, JSON.parse(@workshop.needs || '[]'), 'workshop.options.needs', vertical: true, heading: 'articles.workshops.headings.needs', help: 'articles.workshops.paragraphs.needs'
|
= checkboxes :needs, Workshop.all_needs, JSON.parse(@workshop.needs || '[]'), 'workshop.options.needs', vertical: true, heading: 'articles.workshops.headings.needs', help: 'articles.workshops.paragraphs.needs'
|
||||||
|
@ -168,6 +168,7 @@ en:
|
|||||||
one: 1 error prohibited this %{model} from being saved
|
one: 1 error prohibited this %{model} from being saved
|
||||||
other: "%{count} errors prohibited this %{model} from being saved"
|
other: "%{count} errors prohibited this %{model} from being saved"
|
||||||
warnings:
|
warnings:
|
||||||
|
messages:
|
||||||
location_corrected: Your location was corrected from "%{original}" to "%{corrected}". If this doesn't reflect your intended location, you can change this again in the contact info step.
|
location_corrected: Your location was corrected from "%{original}" to "%{corrected}". If this doesn't reflect your intended location, you can change this again in the contact info step.
|
||||||
housing:
|
housing:
|
||||||
space:
|
space:
|
||||||
|
@ -721,7 +721,7 @@ es:
|
|||||||
preferred_language: ¿Qué idioma prefieres usar?
|
preferred_language: ¿Qué idioma prefieres usar?
|
||||||
Allergies: ¿Eres alergico a algo?
|
Allergies: ¿Eres alergico a algo?
|
||||||
Workshops: Talleres
|
Workshops: Talleres
|
||||||
Your_Workshops: Talleres
|
Your_Workshops: Tus talleres
|
||||||
add_facilitator: Añadir un(a) facilitador(a)
|
add_facilitator: Añadir un(a) facilitador(a)
|
||||||
Policy_Agreement: Acuerdo del Espacio Mas Seguro
|
Policy_Agreement: Acuerdo del Espacio Mas Seguro
|
||||||
Preview: Vista previa
|
Preview: Vista previa
|
||||||
@ -755,16 +755,21 @@ es:
|
|||||||
hosting: Hospedaje
|
hosting: Hospedaje
|
||||||
Hosting: Hospedaje
|
Hosting: Hospedaje
|
||||||
Workshops_You_Have_Requested: Talleres que ha solicitado para facilitar
|
Workshops_You_Have_Requested: Talleres que ha solicitado para facilitar
|
||||||
|
All_Workshops: Todos los otros talleres
|
||||||
|
host:
|
||||||
|
considerations: Consideraciones especiales
|
||||||
|
space: Espacio Disponible
|
||||||
|
availability: Disponibilidad
|
||||||
|
address: Dirección
|
||||||
paragraphs:
|
paragraphs:
|
||||||
info: Describa su taller en detalle. Resaltar el texto para modificar el formato.
|
|
||||||
Workshops_You_Have_Requested: La siguiente es una lista de todos los talleres que ha solicitado para facilitar.
|
Workshops_You_Have_Requested: La siguiente es una lista de todos los talleres que ha solicitado para facilitar.
|
||||||
Workshops_Looking_For_Facilitators: ¿Le gustaría ayudar a facilitar un taller propuesto por otra persona? A continuación se muestra una lista de los talleres que necesitan facilitadorxs. Si están interesadxs en ayudar, pueden facilitar uno de estos talleres.
|
Workshops_Looking_For_Facilitators: ¿Le gustaría ayudar a facilitar un taller propuesto por otra persona? A continuación se muestra una lista de los talleres que necesitan facilitadorxs. Si están interesadxs en ayudar, pueden facilitar uno de estos talleres.
|
||||||
All_Workshops: Todos los otros talleres
|
Your_Workshops: La siguiente es una lista de todos los talleres que están facilitando.
|
||||||
host:
|
host:
|
||||||
address: Tu dirección y número telefónico serán compartidos con lxs visitantes y lxs organizadorxs de Bike!Bike!
|
address: Tu dirección y número telefónico serán compartidos con lxs visitantes y lxs organizadorxs de Bike!Bike!
|
||||||
space: ¿Cuántos espacios tienes para compartir?
|
space: ¿Cuántos espacios tienes para compartir?
|
||||||
availability: Lo más común, es que lxs asistentes lleguen y se vayan los días en que inicia y finaliza la conferencia pero a menudo algunxs visitantes llegan unos días antes y se van unos días después. ¿Cuándo estará disponible tu espacio?
|
availability: Lo más común, es que lxs asistentes lleguen y se vayan los días en que inicia y finaliza la conferencia pero a menudo algunxs visitantes llegan unos días antes y se van unos días después. ¿Cuándo estará disponible tu espacio?
|
||||||
considerations: Los organizadores tratarán de emparejar de la mejor manera posible anfitriones con invitadxs. ¿Cuál de las siguientes consideraciones crees que lxs organizadores deben tener en cuenta al momento de escoger a quien vaya a quedarse contigo?
|
considerations: Lxs organizadores tratarán de emparejar de la mejor manera posible anfitriones con invitadxs. ¿Cuál de las siguientes consideraciones crees que lxs organizadores deben tener en cuenta al momento de escoger a quien vaya a quedarse contigo?
|
||||||
notes: Deja un mensaje a los organizadores respecto a lo que deben considerar al momento de escoger a la persona que vas a hospedar.
|
notes: Deja un mensaje a los organizadores respecto a lo que deben considerar al momento de escoger a la persona que vas a hospedar.
|
||||||
Policy_Agreement: Asegurar que todos los asistentes se sientan bienvenidos, seguro y respetada en todo momento es especialmente importante para todos nosotros. Por favor asegúrese de que plenamente ha leído y entendido nuestra política de espacios más seguros a continuación, si tiene alguna pregunta o preocupación que usted puede llegar a los organizadores en cualquier momento.
|
Policy_Agreement: Asegurar que todos los asistentes se sientan bienvenidos, seguro y respetada en todo momento es especialmente importante para todos nosotros. Por favor asegúrese de que plenamente ha leído y entendido nuestra política de espacios más seguros a continuación, si tiene alguna pregunta o preocupación que usted puede llegar a los organizadores en cualquier momento.
|
||||||
facebook_sign_in: De manera alternativa puedes registrarte usando tu cuenta de Facebook y así evitarás tener que esperar a que te enviemos un correo electrónico
|
facebook_sign_in: De manera alternativa puedes registrarte usando tu cuenta de Facebook y así evitarás tener que esperar a que te enviemos un correo electrónico
|
||||||
@ -805,11 +810,6 @@ es:
|
|||||||
house: Espacio interior
|
house: Espacio interior
|
||||||
none: Yo encontraré donde dormir.
|
none: Yo encontraré donde dormir.
|
||||||
tent: Espacio para tienda de campaña
|
tent: Espacio para tienda de campaña
|
||||||
host:
|
|
||||||
considerations: Consideraciones especiales
|
|
||||||
space: Espacio Disponible
|
|
||||||
availability: Disponibilidad
|
|
||||||
address: Dirección
|
|
||||||
host:
|
host:
|
||||||
considerations:
|
considerations:
|
||||||
vegan: Sólo veganxs y vegetarianxs
|
vegan: Sólo veganxs y vegetarianxs
|
||||||
@ -865,6 +865,7 @@ es:
|
|||||||
languages: ¿En qué idioma se presentará el taller? Habrá traducción o traductor(a) disponible?
|
languages: ¿En qué idioma se presentará el taller? Habrá traducción o traductor(a) disponible?
|
||||||
needs: Si necesitan alguno de los siguientes, lxs organizadorxs de la conferencia harán todo lo posible para proporcionarlos. Si tienen cualquier otra solicitud, pueden incluirlo en la sección de comentarios.
|
needs: Si necesitan alguno de los siguientes, lxs organizadorxs de la conferencia harán todo lo posible para proporcionarlos. Si tienen cualquier otra solicitud, pueden incluirlo en la sección de comentarios.
|
||||||
needs_facilitators: ¿Están buscando ayuda para su taller? Cualquier persona que está registrada para la conferencia puede ayudar a facilitar un taller en cualquier momento, pero si marcan esta casilla mejorarán las posibilidades de encontrar colaboradores.
|
needs_facilitators: ¿Están buscando ayuda para su taller? Cualquier persona que está registrada para la conferencia puede ayudar a facilitar un taller en cualquier momento, pero si marcan esta casilla mejorarán las posibilidades de encontrar colaboradores.
|
||||||
|
info: Describa su taller en detalle. Resaltar el texto para modificar el formato.
|
||||||
headings:
|
headings:
|
||||||
needs_facilitators: ¿Necesitan ayuda?
|
needs_facilitators: ¿Necesitan ayuda?
|
||||||
Comments: Comentarios
|
Comments: Comentarios
|
||||||
@ -917,8 +918,8 @@ es:
|
|||||||
learning: Con el espíritu de fomentar el crecimiento personal, promovemos los espacios de aprendizaje y la formulación de preguntas en lenguaje incluyente.
|
learning: Con el espíritu de fomentar el crecimiento personal, promovemos los espacios de aprendizaje y la formulación de preguntas en lenguaje incluyente.
|
||||||
open_minds: Alentamos la apertura de mentes y de corazones.
|
open_minds: Alentamos la apertura de mentes y de corazones.
|
||||||
permission_denied:
|
permission_denied:
|
||||||
paragraphs:
|
|
||||||
headings:
|
headings:
|
||||||
|
confirmation_sent: Confirmar correo electrónico
|
||||||
confirm_email: Por favor confirma tu dirección de correo electrónico.
|
confirm_email: Por favor confirma tu dirección de correo electrónico.
|
||||||
contact:
|
contact:
|
||||||
headings:
|
headings:
|
||||||
@ -952,7 +953,7 @@ es:
|
|||||||
address: Dirección
|
address: Dirección
|
||||||
phone: Número telefónico
|
phone: Número telefónico
|
||||||
bed_space: Número de Camas
|
bed_space: Número de Camas
|
||||||
floor_space: Número de Camas
|
floor_space: Espacios para dormir en el piso
|
||||||
tent_space: Espacios para tienda de campaña
|
tent_space: Espacios para tienda de campaña
|
||||||
first_day: Primer día
|
first_day: Primer día
|
||||||
last_day: Último día
|
last_day: Último día
|
||||||
@ -981,6 +982,9 @@ es:
|
|||||||
continue: Continuar
|
continue: Continuar
|
||||||
previous: Anterior
|
previous: Anterior
|
||||||
next: Siguiente
|
next: Siguiente
|
||||||
|
aria:
|
||||||
|
remove_interest: Haga clic en si ya no está interesado en este taller
|
||||||
|
show_interest: Haga clic en si usted está interesado en este taller
|
||||||
links:
|
links:
|
||||||
footer:
|
footer:
|
||||||
help_text:
|
help_text:
|
||||||
@ -1182,4 +1186,5 @@ es:
|
|||||||
race_gender: Políticas de raza, género o clase
|
race_gender: Políticas de raza, género o clase
|
||||||
needs_facilitators: Se necesitan mas facilitadorxs
|
needs_facilitators: Se necesitan mas facilitadorxs
|
||||||
warnings:
|
warnings:
|
||||||
location_corrected: Tu ubicación fue corregida de "%{original}" a "%{corrected}". Si esto no refleja tu ubicación prevista, puedes cambiarla nuevamente en el paso de "información de contacto".
|
messages:
|
||||||
|
location_corrected: Tu ubicación fue corregida de "%{original}" a "%{corrected}". Si esto no refleja tu ubicación prevista, puedes cambiarla nuevamente en el paso de "información de contacto".
|
||||||
|
Loading…
x
Reference in New Issue
Block a user