diff --git a/.gitignore b/.gitignore index 409e6d0..75a5913 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,5 @@ /config/secrets.yml /db/schema.rb /erd.pdf +/public/uploads/tmp/* +/public/uploads/speaker_profile/* \ No newline at end of file diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ce2859d..a837781 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -5,11 +5,11 @@ class ApplicationController < ActionController::Base before_filter :configure_permitted_parameters, if: :devise_controller? before_action :set_locale - def default_url_options(options={}) - if params[:locale] - {locale: I18n.locale} + def self.default_url_options(options={}) + if I18n.locale != I18n.default_locale + options.merge({locale: I18n.locale}) else - {} + options end end diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 34a1a1c..6a1b5e8 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -75,6 +75,12 @@ bg: invalid: не е валиден e-mail адрес password_confirmation: confirmation: не съответства на паролата + speaker_profile: + attributes: + twitter: + invalid: може да съдържа максимум 15 символа, които могат да бъдат само букви, числа или долна черта + github: + invalid: може да съдържа само букви, числа и тирета и не може да започва с тире errors: messages: improbable_phone: 'не е валиден телефонен номер' \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index 30037d9..97b9b2f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -75,6 +75,12 @@ en: invalid: is not a valid e-mail address password_confirmation: confirmation: does not match the password + speaker_profile: + attributes: + twitter: + invalid: can contain a maximum of 15 symbols that need to be alphabet charachters, digits or an underscore + github: + invalid: can contain only alphabet characters, digits or a dash and cannot start with a dash errors: messages: improbable_phone: 'not a valid phone number' \ No newline at end of file diff --git a/config/locales/simple_form.bg.yml b/config/locales/simple_form.bg.yml index 693ee15..a164070 100644 --- a/config/locales/simple_form.bg.yml +++ b/config/locales/simple_form.bg.yml @@ -14,14 +14,12 @@ bg: password_confirmation: Отново въведената отгоре парола speaker_profile: picture: Ваша снимка - first_name: - last_name: organisation: Организацията, която представлявате public_email: E-mail адрес, който ще бъде видим за посетителите mobile_phone: Мобилен телефон, който ще бъде видим само за организаторите biography: Опишете се с няколко изречения, говорейки за себе си в трето лице :) - github: Github username - twitter: Twitter username, без кльомбичка отпред + github: Потребителското Ви име в Github + twitter: Потребителското Ви име в Twitter lecture: title: Заглавието на лекцията Ви subtitle: Подзаглавието на лекцията Ви (ако има такова) diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 1e029c3..30512d9 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -14,14 +14,12 @@ en: password_confirmation: Repeat the password speaker_profile: picture: Your photo - first_name: First name - last_name: Last name organisation: Your organization public_email: E-mail address, visible to the visitors mobile_phone: Mobile phone, visible for the organizers only biography: Describe yourself in a few sentences in third person :). - github: Your Github account - twitter: Your Twitter account + github: Your Github username + twitter: Your Twitter username lecture: title: Title of your talk subtitle: Sub-title of your talk (if applicable)