diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cf114293..575976df 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -3,6 +3,16 @@ class ApplicationController < ActionController::Base protect_from_forgery before_filter :get_conferences before_filter :store_location + before_action :set_locale + + def set_locale + I18n.locale = params[:locale] || I18n.default_locale + end + + def default_url_options(options={}) + logger.debug "default_url_options is passed options: #{options.inspect}\n" + { :locale => ((I18n.locale == I18n.default_locale) ? nil : I18n.locale) } + end def store_location session[:return_to] = request.fullpath if request.get? and controller_name != "user_sessions" and controller_name != "sessions" diff --git a/app/views/admin/conference/_sidebar.html.haml b/app/views/admin/conference/_sidebar.html.haml index 769e4532..e2849c5a 100644 --- a/app/views/admin/conference/_sidebar.html.haml +++ b/app/views/admin/conference/_sidebar.html.haml @@ -1,26 +1,26 @@ .well.sidebar-nav %ul.nav.nav-pills.nav-stacked %li{:class=> active_nav_li(admin_conference_path(@conference.short_title))} - = link_to "Conference", admin_conference_path(@conference.short_title) + = link_to t('.conference'), admin_conference_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_venue_info_path(@conference.short_title))} - = link_to "Venue", admin_conference_venue_info_path(@conference.short_title) + = link_to t('.venue'), admin_conference_venue_info_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_callforpapers_path(@conference.short_title))} - = link_to "Call for Papers", admin_conference_callforpapers_path(@conference.short_title) + = link_to t('.cfp'), admin_conference_callforpapers_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_rooms_path(@conference.short_title))} - = link_to "Rooms", admin_conference_rooms_path(@conference.short_title) + = link_to t('.rooms'), admin_conference_rooms_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_tracks_path(@conference.short_title))} - = link_to "Tracks", admin_conference_tracks_path(@conference.short_title) + = link_to t('.tracks'), admin_conference_tracks_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_eventtypes_path(@conference.short_title))} - = link_to "Event Types", admin_conference_eventtypes_path(@conference.short_title) + = link_to t('.event_types'), admin_conference_eventtypes_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_difficulty_levels_path(@conference.short_title))} - = link_to "Difficulty Levels", admin_conference_difficulty_levels_path(@conference.short_title) + = link_to t('.difficulty_levels'), admin_conference_difficulty_levels_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_social_events_path(@conference.short_title))} - = link_to "Social Events", admin_conference_social_events_path(@conference.short_title) + = link_to t('.social_events'), admin_conference_social_events_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_supporter_levels_path(@conference.short_title))} - = link_to "Supporter Levels", admin_conference_supporter_levels_path(@conference.short_title) + = link_to t('.supporter_levels'), admin_conference_supporter_levels_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_emails_path(@conference.short_title))} - = link_to "Emails", admin_conference_emails_path(@conference.short_title) + = link_to t('.emails'), admin_conference_emails_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_questions_path(@conference.short_title))} - = link_to "Questions", admin_conference_questions_path(@conference.short_title) + = link_to t('.questions'), admin_conference_questions_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_volunteers_info_path(@conference.short_title))} - = link_to "Volunteers", admin_conference_volunteers_info_path(@conference.short_title) + = link_to t('.volunteers'), admin_conference_volunteers_info_path(@conference.short_title) diff --git a/app/views/admin/conference/new.html.haml b/app/views/admin/conference/new.html.haml index f77d9d0b..1a8d67f4 100644 --- a/app/views/admin/conference/new.html.haml +++ b/app/views/admin/conference/new.html.haml @@ -1,17 +1,14 @@ .row .col-md-6.col-md-offset-3 = semantic_form_for(@conference, :url => admin_conference_index_path) do |f| - = f.inputs 'Basic Information' do - = f.input :title, hint: "The name of your conference as it shall appear throughout the site. Example: 'OpenSUSE Conference 2013'", - input_html: { required: 'required' } - = f.input :short_title, hint: "A short and unique handle for your conference, using only lower-case letters, numbers and underscores. This will be used to identify your conference in URLs etc. Example: 'froscon2011'", - input_html: { required: 'required' } - = f.input :social_tag, hint: "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'", - input_html: { required: 'required' } - = f.input :contact_email, hint: 'Contact email address for your conference. Will be used as reply-to address in emails sent out by the system.' - = f.inputs 'Scheduling' do - = f.input :timezone, as: :time_zone, hint: 'Please select in what time zone your conference will take place.' - = f.input :start_date, as: :string, input_html: { id: 'conference-start-datepicker', readonly: 'readonly', required: 'required' } - = f.input :end_date, as: :string, input_html: { id: 'conference-end-datepicker', readonly: 'readonly', required: 'required' } + = f.inputs t ".basic_info" do + = f.input :title, :hint => t('.title_hint') + = f.input :short_title, :hint => t('.short_title_hint') + = f.input :social_tag, :hint => t('.social_tag_hint') + = f.input :contact_email, :hint => t('.contact_email_hint') + = f.inputs "Scheduling" do + = f.input :timezone, :as => :time_zone, :hint => t('.timezone_hint') + = f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" } + = f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" } = f.actions do = f.action :submit, button_html: {class: 'btn btn-success pull-right'} diff --git a/app/views/admin/conference/show.html.haml b/app/views/admin/conference/show.html.haml index 334a6bd8..c0c4ce91 100644 --- a/app/views/admin/conference/show.html.haml +++ b/app/views/admin/conference/show.html.haml @@ -3,13 +3,13 @@ = render 'admin/conference/sidebar' .col-md-9 = semantic_form_for(@conference, :url => admin_conference_path(@conference.short_title),:html => {:multipart => true}) do |f| - = f.input :title, :hint => "The full name of the conference, such as 'OpenSUSE Conference 2013'" - = f.input :short_title, :hint => "A short title, such as 'osc2013', to be used in URLs" - = f.input :social_tag, :hint => "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'" - = f.input :contact_email, :hint => "Contact email address for your conference. Will be used as reply-to address in emails sent out by the system." + = f.input :title, :hint => t('.title_hint') + = f.input :short_title, :hint => t('.short_title_hint') + = f.input :social_tag, :hint => t('.social_tag_hint') + = f.input :contact_email, :hint => t('.contact_email_hint') = f.inputs :name => "Scheduling" do - = f.input :timezone, :as => :time_zone, :hint => "The conference time zone" + = f.input :timezone, :as => :time_zone, :hint => t('.timezone_hint') = f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" } = f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" } = f.input :registration_start_date, :as => :string, :input_html => { :id => "conference-reg-start-datepicker", :readonly => "readonly" } @@ -18,13 +18,19 @@ = f.inputs :name => "Media" do - if !@conference.logo.blank? = image_tag @conference.logo(:thumb) - = f.input :logo, :label => "Conference Logo", :hint => "This will be displayed on the front page." - = f.input :media_type, :as => :select, :label => "Conference Promo Media Type", :class=>"form-control", :collection => Conference.media_types.values, :include_blank => false, :hint => "This media-item will be used to represent this conference at various places in OSEM." - = f.input :media_id, :label => "Conference Promo Media ID", :as => :string - %p{:class => "help-block media-type", :id => "youtube-help"} Go to your YouTube video, click on "share" and copy everything behind http://youtu.be/" - %p{:class => "help-block media-type", :id => "slideshare-help", :style => "display:none"} Go to your SlideShare, click on "share" -> "embed" and copy the id - %p{:class => "help-block media-type", :id => "flickr-help", :style => "display:none"} Go to your flickr image, click on "Grab the link" -> "Show short url" and copy everything behind https://flic.kr/p/ - %p{:class => "help-block media-type", :id => "vimeo-help", :style => "display:none"} Go to your vimeo video, click on "share" and copy everything behind http://vimeo.com/ - %p{:class => "help-block media-type", :id => "speakerdeck-help", :style => "display:none"} Go to your SpeakerDeck, click on "share" -> "embed" and copy the data-id - %p{:class => "help-block media-type", :id => "instagram-help", :style => "display:none"} Go to your Instagram photo page and copy everything behind instagram.com/p/ (without trailing /# hash symbol) + = f.input :logo, :label => t('.logo_label'), :hint => t('.logo_hint') + = f.input :media_type, :as => :select, :label => t('.media_type_label'), :class=>"form-control", :collection => Conference.media_types.values, :include_blank => false, :hint => t('.media_type_hint') + = f.input :media_id, :label => t('.media_id_label'), :as => :string + %p{:class => "help-block media-type", :id => "youtube-help"} + = t('.media_youtube-help') + %p{:class => "help-block media-type", :id => "slideshare-help", :style => "display:none"} + = t('.media_slideshare-help') + %p{:class => "help-block media-type", :id => "flickr-help", :style => "display:none"} + = t('.media_flickr-help') + %p{:class => "help-block media-type", :id => "vimeo-help", :style => "display:none"} + = t('.media_vimeo-help') + %p{:class => "help-block media-type", :id => "speakerdeck-help", :style => "display:none"} + = t('.media_speakerdeck-help') + %p{:class => "help-block media-type", :id => "instagram-help", :style => "display:none"} + = t('.media_instagram-help') = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index f9b27f71..e6c4d317 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -1,5 +1,6 @@ .row .col-md-12.page-header - %h2.text-center Upcoming Conferences + %h2.text-center + = t "upcoming_conferences" - @current.each do |conference| - = render :partial => "conference_details", :locals => {:conference => conference} \ No newline at end of file + = render :partial => "conference_details", :locals => {:conference => conference} diff --git a/config/application.rb b/config/application.rb index 4c76b590..a1cf32e4 100644 --- a/config/application.rb +++ b/config/application.rb @@ -32,8 +32,9 @@ module Osem # config.time_zone = 'Central Time (US & Canada)' # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de + config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '*.{rb,yml}').to_s] + config.i18n.default_locale = :en + config.i18n.fallbacks = true # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" diff --git a/config/locales/dates_en.yml b/config/locales/dates_en.yml new file mode 100644 index 00000000..ed325996 --- /dev/null +++ b/config/locales/dates_en.yml @@ -0,0 +1,204 @@ +en: + date: + abbr_day_names: + - Sun + - Mon + - Tue + - Wed + - Thu + - Fri + - Sat + abbr_month_names: + - + - Jan + - Feb + - Mar + - Apr + - May + - Jun + - Jul + - Aug + - Sep + - Oct + - Nov + - Dec + day_names: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + formats: + default: ! '%Y-%m-%d' + long: ! '%B %d, %Y' + short: ! '%b %d' + month_names: + - + - January + - February + - March + - April + - May + - June + - July + - August + - September + - October + - November + - December + order: + - :year + - :month + - :day + datetime: + distance_in_words: + about_x_hours: + one: about 1 hour + other: about %{count} hours + about_x_months: + one: about 1 month + other: about %{count} months + about_x_years: + one: about 1 year + other: about %{count} years + almost_x_years: + one: almost 1 year + other: almost %{count} years + half_a_minute: half a minute + less_than_x_minutes: + one: less than a minute + other: less than %{count} minutes + less_than_x_seconds: + one: less than 1 second + other: less than %{count} seconds + over_x_years: + one: over 1 year + other: over %{count} years + x_days: + one: 1 day + other: ! '%{count} days' + x_minutes: + one: 1 minute + other: ! '%{count} minutes' + x_months: + one: 1 month + other: ! '%{count} months' + x_seconds: + one: 1 second + other: ! '%{count} seconds' + prompts: + day: Day + hour: Hour + minute: Minute + month: Month + second: Seconds + year: Year + errors: + format: ! '%{attribute} %{message}' + messages: + accepted: must be accepted + blank: can't be blank + present: must be blank + confirmation: ! "doesn't match %{attribute}" + empty: can't be empty + equal_to: must be equal to %{count} + even: must be even + exclusion: is reserved + greater_than: must be greater than %{count} + greater_than_or_equal_to: must be greater than or equal to %{count} + inclusion: is not included in the list + invalid: is invalid + less_than: must be less than %{count} + less_than_or_equal_to: must be less than or equal to %{count} + not_a_number: is not a number + not_an_integer: must be an integer + odd: must be odd + record_invalid: ! 'Validation failed: %{errors}' + restrict_dependent_destroy: + one: "Cannot delete record because a dependent %{record} exists" + many: "Cannot delete record because dependent %{record} exist" + taken: has already been taken + too_long: + one: is too long (maximum is 1 character) + other: is too long (maximum is %{count} characters) + too_short: + one: is too short (minimum is 1 character) + other: is too short (minimum is %{count} characters) + wrong_length: + one: is the wrong length (should be 1 character) + other: is the wrong length (should be %{count} characters) + other_than: "must be other than %{count}" + template: + body: ! 'There were problems with the following fields:' + header: + one: 1 error prohibited this %{model} from being saved + other: ! '%{count} errors prohibited this %{model} from being saved' + helpers: + select: + prompt: Please select + submit: + create: Create %{model} + submit: Save %{model} + update: Update %{model} + number: + currency: + format: + delimiter: ! ',' + format: ! '%u%n' + precision: 2 + separator: . + significant: false + strip_insignificant_zeros: false + unit: $ + format: + delimiter: ! ',' + precision: 3 + separator: . + significant: false + strip_insignificant_zeros: false + human: + decimal_units: + format: ! '%n %u' + units: + billion: Billion + million: Million + quadrillion: Quadrillion + thousand: Thousand + trillion: Trillion + unit: '' + format: + delimiter: '' + precision: 3 + significant: true + strip_insignificant_zeros: true + storage_units: + format: ! '%n %u' + units: + byte: + one: Byte + other: Bytes + gb: GB + kb: KB + mb: MB + tb: TB + percentage: + format: + delimiter: '' + format: "%n%" + precision: + format: + delimiter: '' + support: + array: + last_word_connector: ! ', and ' + two_words_connector: ! ' and ' + words_connector: ! ', ' + time: + am: am + formats: + default: ! '%a, %d %b %Y %H:%M:%S %z' + long: ! '%B %d, %Y %H:%M' + short: ! '%d %b %H:%M' + pm: pm \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index 179c14ca..d1204795 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2,4 +2,52 @@ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. en: - hello: "Hello world" + # home page + upcoming_conferences: "Upcoming Conferences" + modify_registration: "Modify Registration" + register: "Register" + schedule: "Schedule" + view_proposals: "View My Proposals" + submit_proposal: "Submit Proposal" + + admin: + conference: + sidebar: + conference: "Conferencesss" + venue: "Venue" + cfp: "Call for Papers" + rooms: "Rooms" + tracks: "Tracks" + event_types: "Event Types" + difficulty_levels: "Difficulty Levels" + social_events: "Social Events" + supporter_levels: "Supporter Levels" + emails: "Emails" + questions: "Questions" + volunteers: "Volunteers" + new: + basic_info: "Basic Information" + title_hint: "The name of your conference as it shall appear throughout the site. Example: 'openSUSE Conference 2013'" + short_title_hint: "A short and unique handle for your conference, using only lower-case letters, numbers and underscores. This will be used to identify your conference in URLs etc. Example: 'froscon2011'" + social_tag_hint: "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'" + contact_email_hint: "Contact email address for your conference. Will be used as reply-to address in emails sent out by the system." + timezone_hint: "Please select in what time zone your conference will take place." + + show: + basic_info: "Basic Information" + title_hint: "The full name of the conference, such as 'OpenSUSE Conference 2013'" + short_title_hint: "A short title, such as 'osc2013', to be used in URLs" + social_tag_hint: "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'" + contact_email_hint: "Contact email address for your conference. Will be used as reply-to address in emails sent out by the system." + timezone_hint: "The conference time zone" + logo_label: "Conference Logo" + logo_hint: "This will be displayed on the front page." + media_type_label: "Conference Promo Media Type" + media_type_hint: "This media-item will be used to represent this conference at various places in OSEM." + media_id_label: "Conference Promo Media ID" + media_youtube-help: "Go to your YouTube video, click on 'share' and copy everything behind http://youtu.be/" + media_slideshare-help: "Go to your SlideShare, click on 'share' -> 'embed' and copy the id" + media_flickr-help: Go to your flickr image, click on "Grab the link" -> "Show short url" and copy everything behind https://flic.kr/p/ + media_vimeo-help: "Go to your vimeo video, click on 'share' and copy everything behind http://vimeo.com/" + media_speakerdeck-help: "Go to your SpeakerDeck, click on 'share' -> 'embed' and copy the data-id" + media_instagram-help: "Go to your Instagram photo page and copy everything behind instagram.com/p/ (without trailing /# hash symbol)" \ No newline at end of file diff --git a/config/locales/models_en.yml b/config/locales/models_en.yml new file mode 100644 index 00000000..a8da4c69 --- /dev/null +++ b/config/locales/models_en.yml @@ -0,0 +1,405 @@ +#TODO translate buttons' label +en: + models: + answer: answer #g + call_for_papers: call_for_papers #g + comment: comment #g + conference: conference #g + dietary_choice: dietary_choice #g + difficulty_level: difficulty_level #g + email_settings: email_settings #g + event: event #g + event_attachment: event_attachment #g + event_person: event_person #g + event_type: event_type #g + habtm_conferences: habtm_conferences #g + habtm_events: habtm_events #g + habtm_qanswers: habtm_qanswers #g + habtm_questions: habtm_questions #g + habtm_registrations: habtm_registrations #g + habtm_roles: habtm_roles #g + habtm_social_events: habtm_social_events #g + habtm_users: habtm_users #g + habtm_vchoices: habtm_vchoices #g + paper_trail/version: paper_trail/version #g + person: person #g + qanswer: qanswer #g + question: question #g + question_type: question_type #g + registration: registration #g + role: role #g + room: room #g + social_event: social_event #g + supporter_level: supporter_level #g + supporter_registration: supporter_registration #g + track: track #g + user: user #g + vchoice: vchoice #g + vday: vday #g + venue: venue #g + vote: vote #g + vposition: vposition #g + + attributes: + answer: + qanswers: qanswers #g + questions: questions #g + title: title #g + + call_for_papers: + conference: :activerecord.models.conference #g + description: description #g + end_date: end_date #g + hard_deadline: hard_deadline #g + rating: rating #g + rating_desc: rating_desc #g + schedule_changes: schedule_changes #g + schedule_public: schedule_public #g + start_date: start_date #g + + comment: + body: body #g + commentable: :activerecord.models.commentable #g + commentable_type: commentable_type #g + lft: lft #g + rgt: rgt #g + subject: subject #g + title: title #g + user: :activerecord.models.user #g + + conference: + call_for_papers: :activerecord.models.call_for_papers #g + conferences_questions: conferences_questions #g + contact_email: contact_email #g + dietary_choices: dietary_choices #g + difficulty_levels: difficulty_levels #g + email_settings: :activerecord.models.email_settings #g + end_date: end_date #g + event_types: event_types #g + events: events #g + guid: guid #g + html_export_path: html_export_path #g + logo_content_type: logo_content_type #g + logo_file_name: logo_file_name #g + logo_file_size: logo_file_size #g + logo_updated_at: logo_updated_at #g + media_type: media_type #g + questions: questions #g + registration_end_date: registration_end_date #g + registration_start_date: registration_start_date #g + registrations: registrations #g + revision: revision #g + rooms: rooms #g + short_title: short_title #g + social_events: social_events #g + social_tag: social_tag #g + start_date: start_date #g + supporter_levels: supporter_levels #g + supporter_registrations: supporter_registrations #g + timezone: timezone #g + title: title #g + tracks: tracks #g + use_dietary_choices: use_dietary_choices #g + use_difficulty_levels: use_difficulty_levels #g + use_supporter_levels: use_supporter_levels #g + use_vdays: use_vdays #g + use_volunteers: use_volunteers #g + use_vpositions: use_vpositions #g + vchoices: vchoices #g + vdays: vdays #g + venue: :activerecord.models.venue #g + versions: versions #g + vpositions: vpositions #g + + dietary_choice: + conference: :activerecord.models.conference #g + registrations: registrations #g + title: title #g + + difficulty_level: + color: color #g + conference: :activerecord.models.conference #g + description: description #g + events: events #g + title: title #g + + email_settings: + accepted_email_template: accepted_email_template #g + accepted_subject: accepted_subject #g + confirmed_email_template: confirmed_email_template #g + confirmed_without_registration_subject: confirmed_without_registration_subject #g + registration_email_template: registration_email_template #g + registration_subject: registration_subject #g + rejected_email_template: rejected_email_template #g + rejected_subject: rejected_subject #g + send_on_accepted: send_on_accepted #g + send_on_confirmed_without_registration: send_on_confirmed_without_registration #g + send_on_registration: send_on_registration #g + send_on_rejected: send_on_rejected #g + + event: + abstract: abstract #g + comment_threads: comment_threads #g + conference: :activerecord.models.conference #g + description: description #g + difficulty_level: :activerecord.models.difficulty_level #g + event_attachments: event_attachments #g + event_people: event_people #g + event_type: :activerecord.models.event_type #g + events_registrations: events_registrations #g + guid: guid #g + language: language #g + logo_content_type: logo_content_type #g + logo_file_name: logo_file_name #g + logo_file_size: logo_file_size #g + logo_updated_at: logo_updated_at #g + max_participants: max_participants #g + media_type: media_type #g + people: people #g + progress: progress #g + proposal_additional_speakers: proposal_additional_speakers #g + public: public #g + registrations: registrations #g + require_registration: require_registration #g + room: :activerecord.models.room #g + speakers: speakers #g + start_time: start_time #g + state: state #g + subtitle: subtitle #g + time_slots: time_slots #g + title: title #g + track: :activerecord.models.track #g + versions: versions #g + voters: voters #g + votes: votes #g + + event_attachment: + attachment_content_type: attachment_content_type #g + attachment_file_name: attachment_file_name #g + attachment_file_size: attachment_file_size #g + attachment_updated_at: attachment_updated_at #g + event: :activerecord.models.event #g + public: public #g + title: title #g + versions: versions #g + + event_person: + comment: comment #g + event: :activerecord.models.event #g + event_role: event_role #g + person: :activerecord.models.person #g + + event_type: + conference: :activerecord.models.conference #g + length: length #g + maximum_abstract_length: maximum_abstract_length #g + minimum_abstract_length: minimum_abstract_length #g + title: title #g + + habtm_conferences: + conference: :activerecord.models.conference #g + left_side: :activerecord.models.left_side #g + + habtm_events: + event: :activerecord.models.event #g + left_side: :activerecord.models.left_side #g + + habtm_qanswers: + left_side: :activerecord.models.left_side #g + qanswer: :activerecord.models.qanswer #g + + habtm_questions: + left_side: :activerecord.models.left_side #g + question: :activerecord.models.question #g + + habtm_registrations: + left_side: :activerecord.models.left_side #g + registration: :activerecord.models.registration #g + + habtm_roles: + left_side: :activerecord.models.left_side #g + role: :activerecord.models.role #g + + habtm_social_events: + left_side: :activerecord.models.left_side #g + social_event: :activerecord.models.social_event #g + + habtm_users: + left_side: :activerecord.models.left_side #g + user: :activerecord.models.user #g + + habtm_vchoices: + left_side: :activerecord.models.left_side #g + vchoice: :activerecord.models.vchoice #g + + paper_trail/version: + event: event #g + item: :activerecord.models.item #g + item_type: item_type #g + object: object #g + object_changes: object_changes #g + whodunnit: whodunnit #g + + person: + avatar_content_type: avatar_content_type #g + avatar_file_name: avatar_file_name #g + avatar_file_size: avatar_file_size #g + avatar_updated_at: avatar_updated_at #g + biography: biography #g + company: company #g + email: email #g + email_public: email_public #g + event_people: event_people #g + events: events #g + first_name: first_name #g + guid: guid #g + irc_nickname: irc_nickname #g + languages: languages #g + last_name: last_name #g + mobile: mobile #g + public_name: public_name #g + registrations: registrations #g + tshirt: tshirt #g + user: :activerecord.models.user #g + volunteer_experience: volunteer_experience #g + voted_events: voted_events #g + votes: votes #g + + qanswer: + answer: :activerecord.models.answer #g + qanswers_registrations: qanswers_registrations #g + question: :activerecord.models.question #g + registrations: registrations #g + + question: + answers: answers #g + conferences: conferences #g + global: global #g + qanswers: qanswers #g + question_type: :activerecord.models.question_type #g + questions_conferences: questions_conferences #g + title: title #g + + question_type: + questions: questions #g + title: title #g + + registration: + arrival: arrival #g + attended: attended #g + attending_social_events: attending_social_events #g + attending_with_partner: attending_with_partner #g + conference: :activerecord.models.conference #g + departure: departure #g + dietary_choice: :activerecord.models.dietary_choice #g + events: events #g + handicapped_access_required: handicapped_access_required #g + other_dietary_choice: other_dietary_choice #g + other_special_needs: other_special_needs #g + person: :activerecord.models.person #g + qanswers: qanswers #g + registrations_events: registrations_events #g + registrations_qanswers: registrations_qanswers #g + registrations_social_events: registrations_social_events #g + registrations_vchoices: registrations_vchoices #g + social_events: social_events #g + supporter_level: :activerecord.models.supporter_level #g + supporter_registration: :activerecord.models.supporter_registration #g + using_affiliated_lodging: using_affiliated_lodging #g + vchoices: vchoices #g + volunteer: volunteer #g + + role: + name: name #g + roles_users: roles_users #g + users: users #g + + room: + conference: :activerecord.models.conference #g + events: events #g + guid: guid #g + name: name #g + public: public #g + size: size #g + + social_event: + conference: :activerecord.models.conference #g + date: date #g + description: description #g + registrations: registrations #g + socialevents_registrations: socialevents_registrations #g + title: title #g + + supporter_level: + conference: :activerecord.models.conference #g + supporter_registrations: supporter_registrations #g + title: title #g + url: url #g + + supporter_registration: + code: code #g + code_is_valid: code_is_valid #g + email: email #g + name: name #g + registration: :activerecord.models.registration #g + supporter_level: :activerecord.models.supporter_level #g + + track: + color: color #g + conference: :activerecord.models.conference #g + description: description #g + guid: guid #g + name: name #g + + user: + confirmation_sent_at: confirmation_sent_at #g + confirmation_token: confirmation_token #g + confirmed_at: confirmed_at #g + current_sign_in_at: current_sign_in_at #g + current_sign_in_ip: current_sign_in_ip #g + email: email #g + encrypted_password: encrypted_password #g + last_sign_in_at: last_sign_in_at #g + last_sign_in_ip: last_sign_in_ip #g + person: :activerecord.models.person #g + remember_created_at: remember_created_at #g + reset_password_sent_at: reset_password_sent_at #g + reset_password_token: reset_password_token #g + roles: roles #g + unconfirmed_email: unconfirmed_email #g + users_roles: users_roles #g + + vchoice: + registrations: registrations #g + vchoices_registrations: vchoices_registrations #g + vday: :activerecord.models.vday #g + vposition: :activerecord.models.vposition #g + + vday: + conference: :activerecord.models.conference #g + day: day #g + description: description #g + vchoices: vchoices #g + vpositions: vpositions #g + + venue: + address: address #g + conferences: conferences #g + description: description #g + guid: guid #g + name: name #g + offline_map_bounds: offline_map_bounds #g + offline_map_url: offline_map_url #g + website: website #g + + vote: + event: :activerecord.models.event #g + person: :activerecord.models.person #g + rating: rating #g + + vposition: + conference: :activerecord.models.conference #g + description: description #g + title: title #g + vchoices: vchoices #g + vdays: vdays #g diff --git a/config/routes.rb b/config/routes.rb index 78e9d930..05fc69bd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,83 +1,66 @@ Osem::Application.routes.draw do + scope "(:locale)", locale: /#{I18n.available_locales.join("|")}/ do - devise_for :users, :controllers => { :registrations => :registrations }, :path => 'accounts' + devise_for :users, :controllers => { :registrations => :registrations }, :path => 'accounts' - namespace :admin do - resources :users - resources :people - resources :conference do - get "/schedule" => "schedule#show" - patch "/schedule" => "schedule#update" - get "/stats" => "stats#index" - get "/registrations" => "registrations#show" - get "/registrations/new" => "registrations#new" - patch "/registrations/new" => "registrations#create" - get "/registrations/edit" => "registrations#edit" - patch "/registrations/edit" => "registrations#update" - delete "/registrations" => "registrations#delete" - patch "/registrations/change_field" => "registrations#change_field" - get "/venue" => "venue#show", :as => "venue_info" - patch "/venue" => "venue#update", :as => "venue_update" - get "/dietary_choices" => "dietchoices#show", :as => "dietary_list" - patch "/dietary_choices" => "dietchoices#update", :as => "dietary_update" - get "/volunteers_list" => "volunteers#show" - get "/volunteers" => "volunteers#index", :as => "volunteers_info" - patch "/volunteers" => "volunteers#update", :as => "volunteers_update" + namespace :admin do + resources :users + resources :people + resources :conference do + get "/schedule" => "schedule#show" + put "/schedule" => "schedule#update" + get "/stats" => "stats#index" + get "/registrations" => "registrations#show" + get "/registrations/new" => "registrations#new" + put "/registrations/new" => "registrations#create" + get "/registrations/edit" => "registrations#edit" + put "/registrations/edit" => "registrations#update" + delete "/registrations" => "registrations#delete" + put "/registrations/change_field" => "registrations#change_field" + get "/venue" => "venue#show", :as => "venue_info" + put "/venue" => "venue#update", :as => "venue_update" + get "/dietary_choices" => "dietchoices#show", :as => "dietary_list" + put "/dietary_choices" => "dietchoices#update", :as => "dietary_update" + get "/volunteers_list" => "volunteers#show" + get "/volunteers" => "volunteers#index", :as => "volunteers_info" + put "/volunteers" => "volunteers#update", :as => "volunteers_update" - resources :difficulty_levels, only: [:show, :update, :index] - - resources :rooms, only: [:show, :update, :index] - - resources :tracks, only: [:show, :update, :index] - - resources :eventtypes, only: [:show, :index] do - collection do - patch :update + resources :difficulty_levels, only: [:show, :update, :index] + resources :rooms, only: [:show, :update, :index] + resources :tracks, only: [:show, :update, :index] + resources :eventtypes, only: [:show, :update, :index] + resources :social_events, only: [:show, :update, :index] + resources :supporter_levels, only: [:show, :update, :index] + resources :emails, only: [:show, :update, :index] + resources :callforpapers, only: [:show, :update, :index] + put "/questions/update_conference" => "questions#update_conference" + resources :questions + resources :events do + member do + post :comment + put :update_state + put :update_track + get :vote + end + resource :speaker, :only => [:edit, :update] end + resources :supporters end + end - resources :social_events, only: [:show, :update, :index] - - resources :supporter_levels, only: [:show, :update, :index] - - resources :emails, only: [:show, :update, :index] - - resources :callforpapers, only: [:create] do - collection do - patch :update - get :show - end + resources :conference, :only => [] do + resources :proposal do + resources :event_attachment, :controller => "event_attachments" + put "/confirm" => "proposal#confirm" end - - patch "/questions/update_conference" => "questions#update_conference" - resources :questions - - resources :events do - member do - post :comment - patch :update_state - patch :update_track - get :vote - end - resource :speaker, :only => [:edit, :update] + resource :schedule, :only => [] do + get "/" => "schedule#index" + end + member do + get "/register" => "conference_registration#register" + put "/register" => "conference_registration#update" + delete "/register" => "conference_registration#unregister" end - - resources :supporters - end - end - - resources :conference, :only => [] do - resources :proposal do - resources :event_attachment, :controller => "event_attachments" - patch "/confirm" => "proposal#confirm" - end - resource :schedule, :only => [] do - get "/" => "schedule#index" - end - member do - get "/register" => "conference_registration#register" - patch "/register" => "conference_registration#update" - delete "/register" => "conference_registration#unregister" end end @@ -97,7 +80,11 @@ Osem::Application.routes.draw do end end - get "/admin" => redirect("/admin/conference") + scope "(:locale)", locale: /#{I18n.available_locales.join("|")}/ do + get "/admin" => redirect("/admin/conference") + end - root :to => "home#index" + scope "(:locale)", locale: /#{I18n.available_locales.join("|")}/ do + root :to => "home#index" + end end