add booth in alias

Booth can be replaced with any alias by replacing it in alias.en.yml.
This commit is contained in:
Rahul 2019-07-22 00:59:17 +05:30
parent 8eb059276f
commit bf7a7932ba
29 changed files with 81 additions and 74 deletions

View file

@ -1,4 +1,4 @@
- headers = ['Booth ID',
- headers = ["#{(t'booth').capitalize } ID",
'Title',
'Description',
'Reasoning',
@ -6,7 +6,7 @@
'Submitter Relationship',
'Website Url',
'State']
= CSV.generate_line ['All booths']
= CSV.generate_line ["All #{(t'booth').pluralize}"]
= CSV.generate_line headers
- @booths.each do |booth|
= CSV.generate_line([booth.id,

View file

@ -1,6 +1,6 @@
prawn_document(force_download: true, filename: "#{@file_name}.pdf", page_layout: :landscape) do |pdf|
booths_array = []
header_array = ['Booth ID',
header_array = ["#{(t'booth').capitalize } ID",
'Title',
'Description',
'Reasoning',
@ -21,6 +21,6 @@ prawn_document(force_download: true, filename: "#{@file_name}.pdf", page_layout:
row << booth.state
booths_array << row
end
pdf.text "#{@conference.short_title} booths", font_size: 25, align: :center
pdf.text "#{@conference.short_title} #{(t'booth').pluralize}", font_size: 25, align: :center
pdf.table booths_array, header: true, cell_style: {size: 8, border_width: 1},column_widths: [45,70,153,152,70,80,105,45]
end

View file

@ -1,9 +1,9 @@
# frozen_string_literal: true
wb.add_worksheet(name: 'all booths') do |sheet|
wb.add_worksheet(name: "all #{(t 'booth').pluralize}") do |sheet|
bold_style = wb.styles.add_style(b: true)
wrap_text = wb.styles.add_style alignment: {wrap_text: true}
row = ['Booth ID',
row = ["#{(t 'booth').capitalize} ID",
'Title',
'Description',
'Reasoning',

View file

@ -2,12 +2,12 @@
- if booth.transition_possible? :accept
- if can? :accept, booth
- if @conference.booth_limit > 0
- confirm_message = ' You are able to accept '+ pluralize(@conference.booth_limit - (@conference.booths.accepted.count + @conference.booths.confirmed.count), 'more booth') + " (booth limit set to #{@conference.booth_limit}). Are you sure you want to accept this one?"
- confirm_message = ' You are able to accept '+ pluralize(@conference.booth_limit - (@conference.booths.accepted.count + @conference.booths.confirmed.count), "more #{t'booth'}") + " (#{t'booth'} limit set to #{@conference.booth_limit}). Are you sure you want to accept this one?"
- if @conference.email_settings.send_on_booths_acceptance
- link = 'Accept with email'
- confirm_message = "By accepting this booth, an email will be sent informing the submitter for the acceptance. You may change the state to \'To accept\' until you are completely sure." + confirm_message
- confirm_message = "By accepting this #{t'booth'}, an email will be sent informing the submitter for the acceptance. You may change the state to \'To accept\' until you are completely sure." + confirm_message
- else
- link = 'Accept booth'
- link = "Accept #{t'booth'}"
%li= link_to link,
accept_admin_conference_booth_path(@conference.short_title, booth),
method: :patch ,id: "accept_booth_#{booth.id}",
@ -24,7 +24,7 @@
data: (@conference.email_settings.send_on_booths_rejection ? { confirm: 'By rejecting this booth, an email will be sent informing the submitter about the rejection. You may change the state to \'To reject\' until you are completely sure.'} : nil)
- if booth.transition_possible? :to_reject
%li= link_to 'To reject booth',
%li= link_to "To reject #{t'booth'}",
to_reject_admin_conference_booth_path(@conference.short_title, booth),
method: :patch, id: "to_reject_booth_#{booth.id}"
@ -34,16 +34,16 @@
method: :patch, id: "restart_booth_#{booth.id}"
- if booth.transition_possible? :to_accept
%li= link_to 'To accept booth',
%li= link_to "To accept #{t'booth'}",
to_accept_admin_conference_booth_path(@conference.short_title, booth),
method: :patch, id: "to_accept_booth_#{booth.id}"
- if booth.transition_possible? :cancel
%li= link_to 'Cancel booth',
%li= link_to "Cancel #{t'booth'}",
cancel_admin_conference_booth_path(@conference.short_title, booth),
method: :patch, id: "cancel_booth_#{booth.id}"
- if booth.transition_possible? :confirm
%li= link_to 'Confirm booth',
%li= link_to "Confirm #{t'booth'}",
confirm_admin_conference_booth_path(@conference.short_title, booth),
method: :patch, id: "confirm_booth_#{booth.id}"

View file

@ -1,4 +1,4 @@
- headers = ['Booth ID',
- headers = ["#{(t'booth').capitalize } ID",
'Title',
'Description',
'Reasoning',
@ -6,7 +6,7 @@
'Submitter Relationship',
'Website Url',
'State']
= CSV.generate_line ['All booths']
= CSV.generate_line ["All #{(t'booth').pluralize}"]
= CSV.generate_line headers
- @booths.confirmed.each do |booth|
= CSV.generate_line([booth.id,

View file

@ -1,6 +1,6 @@
prawn_document(force_download: true, filename: "#{@file_name}.pdf", page_layout: :landscape) do |pdf|
booths_array = []
header_array = ['Booth ID',
header_array = ["#{(t'booth').capitalize } ID",
'Title',
'Description',
'Reasoning',

View file

@ -1,9 +1,9 @@
# frozen_string_literal: true
wb.add_worksheet(name: 'all booths') do |sheet|
wb.add_worksheet(name: "all #{(t 'booth').pluralize}") do |sheet|
bold_style = wb.styles.add_style(b: true)
wrap_text = wb.styles.add_style alignment: {wrap_text: true}
row = ['Booth ID',
row = ["#{(t 'booth').capitalize} ID",
'Title',
'Description',
'Reasoning',

View file

@ -2,7 +2,7 @@
.col-md-12
.page-header
%h1
Booths
#{(t'booth').pluralize.capitalize }
.pull-right
- if can? :read, Booth
.btn-group
@ -11,8 +11,8 @@
Export PDF
%span.caret
%ul.dropdown-menu{ role: 'menu' }
%li= link_to 'All Booths', admin_conference_booths_path(@conference.short_title, format: :pdf, booth_export_option: 'all')
%li= link_to 'Confirmed Booths', admin_conference_booths_path(@conference.short_title, format: :pdf, booth_export_option: 'confirmed')
%li= link_to "All #{(t'booth').pluralize.capitalize }", admin_conference_booths_path(@conference.short_title, format: :pdf, booth_export_option: 'all')
%li= link_to "Confirmed #{(t'booth').pluralize.capitalize }", admin_conference_booths_path(@conference.short_title, format: :pdf, booth_export_option: 'confirmed')
.btn-group
%button.btn.btn-default.dropdown-toggle{ 'data-toggle' => 'dropdown', type: 'button', class: 'btn btn-success' }
Export CSV
@ -29,7 +29,7 @@
%li= link_to 'Confirmed', admin_conference_booths_path(@conference.short_title, format: :xlsx, booth_export_option: 'confirmed')
= "(#{@booths.length})" if @booths.any?
%p.text-muted
All the booth requests
All the #{t'booth'} requests
.row
.col-md-12
@ -37,21 +37,21 @@
- if @conference.booth_limit == 0
%p
Set the
= link_to 'Booth limit', edit_admin_conference_path(@conference.short_title)
to make sure you are not accepting more booths than you can accommodate.
= link_to "#{(t'booth').capitalize } limit", edit_admin_conference_path(@conference.short_title)
to make sure you are not accepting more #{(t'booth').pluralize} than you can accommodate.
- elsif !@conference.maximum_accepted_booths?
%p
You cannot accept more than
%b
= pluralize(@conference.booth_limit, 'booth')
= pluralize(@conference.booth_limit, "#{t'booth'}")
(
= pluralize(@conference.booths.accepted.count + @conference.booths.confirmed.count, 'accepted booth')
= pluralize(@conference.booths.accepted.count + @conference.booths.confirmed.count, "accepted #{t'booth'}")
so far)
- else
%p
You have reached the maximum number of accepted booths.
You have reached the maximum number of accepted #{(t'booth').pluralize}.
(
= link_to "#{@conference.booth_limit} booths", edit_admin_conference_path(@conference.short_title)
= link_to "#{@conference.booth_limit} #{(t'booth').pluralize}", edit_admin_conference_path(@conference.short_title)
)
- if @booths.any?
%table.datatable

View file

@ -1,3 +1,3 @@
%h1 New booth
%h1 New #{t'booth'}
= render 'booths/form'

View file

@ -28,5 +28,5 @@
= f.input :registration_limit, as: :number, in: 0..9999, hint: 'Limit the number of registrations to the conference (0 no limit). Please note that the registration limit doesn\'t apply to speakers of confirmed events (they will still be able to register even if it has been reached). You currently have ' + pluralize(@conference.registrations.count, 'registration')
= f.inputs name: 'Booths' do
= f.input :booth_limit, as: :number, in: 0..9999,
hint: 'Booth limit is the maximum number of booths that you can accept for this conference. By setting this number (0 no limit) you can be sure that you are not going to accept more booths than the conference can accommodate. You currently have ' + pluralize(@conference.booths.accepted.count, 'accepted booth') +'.'
hint: "#{(t'booth').capitalize } limit is the maximum number of #{(t'booth').pluralize} that you can accept for this conference. By setting this number (0 no limit) you can be sure that you are not going to accept more #{(t'booth').pluralize} than the conference can accommodate. You currently have " + pluralize(@conference.booths.accepted.count, "accepted #{t'booth'}") +'.'
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary', data: { confirm: 'Are you sure you want to proceed?' } }

View file

@ -114,18 +114,18 @@
= f.input :booths_acceptance_subject
= f.input :booths_acceptance_body, input_html: { rows:10, cols: 20 }
%a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_booths_acceptance_subject',
'data-subject-text' => 'Your booth has been accepted!',
'data-subject-text' => "Your #{t'booth'} has been accepted!",
'data-body-input-id' => 'email_settings_booths_acceptance_body',
'data-body-text' => "Dear {name},\n\nWe are pleased to inform you that your booth request {booth_title} has been accepted for the conference {conference}.\nPlease click the confirm button to let us know you can make it as soon as possible!\n\nFeel free to contact us with any questions or concerns.\n\nWe are looking forward to seeing you there.\n\nBest wishes\n\n{conference} Team"} Load Template
'data-body-text' => "Dear {name},\n\nWe are pleased to inform you that your #{t'booth'} request {booth_title} has been accepted for the conference {conference}.\nPlease click the confirm button to let us know you can make it as soon as possible!\n\nFeel free to contact us with any questions or concerns.\n\nWe are looking forward to seeing you there.\n\nBest wishes\n\n{conference} Team"} Load Template
%a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'booth_acceptance_help' } Show help
= render partial: 'help', locals: {id: 'booth_acceptance_help', show_event_variables: false}
= f.input :send_on_booths_rejection
= f.input :booths_rejection_subject
= f.input :booths_rejection_body, input_html: { rows:10, cols:20 }
%a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_booths_rejection_subject',
'data-subject-text' => 'Your booth request has been rejected',
'data-subject-text' => "Your #{t'booth'} request has been rejected",
'data-body-input-id' => 'email_settings_booths_rejection_body',
'data-body-text' => "Dear {name},\n\nThank you for your booth request {booth_title} for the conference {conference}.\n\nUnfortunately, we are sorry to inform you that your request has been rejected.\n\n\nBest wishes\n\n{conference} Team" } Load Template
'data-body-text' => "Dear {name},\n\nThank you for your #{t'booth'} request {booth_title} for the conference {conference}.\n\nUnfortunately, we are sorry to inform you that your request has been rejected.\n\n\nBest wishes\n\n{conference} Team" } Load Template
%a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'booth_rejection_help' } Show help
= render partial: 'help', locals: {id: 'booth_rejection_help', show_event_variables: false}

View file

@ -24,7 +24,7 @@
%li
= f.input :include_tracks, label: 'Include confirmed tracks', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_tracks) }
%li
= f.input :include_booths, label: 'Include confirmed booths', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_booths) }
= f.input :include_booths, label: "Include confirmed #{(t'booth').pluralize}", input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_booths) }
%li
= f.input :include_registrations, label: 'Display the registration period', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_registrations) }

View file

@ -26,7 +26,7 @@
Include confirmed tracks
%li
%i{ class: "fa-li #{icon_for_todo @splashpage.include_booths?}" }
Include confirmed booths
Include confirmed #{(t'booth').pluralize}
%li
%i{ class: "fa-li #{icon_for_todo @splashpage.include_registrations?}" }
Display the registration period

View file

@ -102,7 +102,7 @@
conference
- when 'Booth'
= 'booth'
= t 'booth'
= link_if_alive version, object.title,
admin_conference_booth_path(conference_id: Conference.find(version.conference_id).short_title, id: version.item_id ),
conference