Fixed a few bugs, added Arabic to language options, added translations

This commit is contained in:
Godwin
2016-08-02 17:17:52 -07:00
parent e73ed71e32
commit b82c862cad
10 changed files with 43 additions and 31 deletions
+1 -1
View File
@@ -221,7 +221,7 @@ class ApplicationController < LinguaFrancaApplicationController
current_user,
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
# raise the error if we are in development so that we can debug it
+3 -3
View File
@@ -600,12 +600,12 @@ class ConferencesController < ApplicationController
end
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?
@registration.city = corrected
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
else
@errors[:location] = :unknown
@@ -1995,7 +1995,7 @@ class ConferencesController < ApplicationController
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?
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]
else
steps -= [:hosting]