diff --git a/modules/rooms_booking/rooms_booking.admin.inc b/modules/rooms_booking/rooms_booking.admin.inc index bd1f3a6..1623b06 100644 --- a/modules/rooms_booking/rooms_booking.admin.inc +++ b/modules/rooms_booking/rooms_booking.admin.inc @@ -296,7 +296,7 @@ function rooms_booking_edit_form($form, &$form_state, $booking) { $form['data']['group_size_children'] = array( '#type' => 'select', - '#title' => t('Children'), + '#title' => variable_get_value('rooms_booking_manager_children'), '#options' => rooms_range(0, $persons), '#default_value' => isset($booking->data['group_size_children']) ? $booking->data['group_size_children'] : '0', '#description' => t('The number of children staying in this unit.'), @@ -322,7 +322,7 @@ function rooms_booking_edit_form($form, &$form_state, $booking) { for ($t = 1; $t <= $form_state['values']['data']['group_size_children']; $t++) { $form['data']['childrens_age'][$t] = array( '#type' => 'textfield', - '#title' => t('Age of child @num', array('@num' => $t)), + '#title' => variable_get_value('rooms_booking_age_of_child') . ' ' . $t, '#size' => 5, '#maxlength' => 5, '#ajax' => array( @@ -337,7 +337,7 @@ function rooms_booking_edit_form($form, &$form_state, $booking) { foreach ($booking->data['childrens_age'] as $key => $age) { $form['data']['childrens_age'][$key] = array( '#type' => 'textfield', - '#title' => t('Age of child @num', array('@num' => $key)), + '#title' => variable_get_value('rooms_booking_age_of_child') . ' ' . $key, '#size' => 5, '#maxlength' => 5, '#default_value' => $age, @@ -448,7 +448,7 @@ function rooms_booking_edit_form($form, &$form_state, $booking) { $unit_selected .= t('(Options: !options)', array('!options' => substr($options_list, 0, strlen($options_list) - 2))); } if (isset($booking->price)) { - $unit_selected .= '
' . t('Price') . ': ' . + $unit_selected .= '
' . variable_get_value('rooms_booking_price') . ': ' . t('@currency_symbol @amount', array( // TODO: replace with a proper currency formatter '@currency_symbol' => $currency_symbol, '@amount' => number_format($booking->price / 100, 2, '.', ''), @@ -689,7 +689,7 @@ function rooms_booking_edit_form($form, &$form_state, $booking) { $form['availability_fieldset']['unit_fieldset']['options_fieldset']['price'] = array( '#type' => 'textfield', - '#title' => t('Price'), + '#title' => variable_get_value('rooms_booking_price'), '#default_value' => '', '#size' => '10', '#required' => TRUE, diff --git a/modules/rooms_booking/rooms_booking.variable.inc b/modules/rooms_booking/rooms_booking.variable.inc new file mode 100644 index 0000000..e5de206 --- /dev/null +++ b/modules/rooms_booking/rooms_booking.variable.inc @@ -0,0 +1,50 @@ + 'string', + 'title' => t('Price'), + 'default' => t('Price'), + 'description' => t('Change text : Price'), + 'localize' => TRUE, + 'group' => 'rooms_booking', + ); + $variables['rooms_booking_subtotal'] = array( + 'type' => 'string', + 'title' => t('Subtotal'), + 'default' => t('Subtotal'), + 'description' => t('Change text : Subtotal'), + 'localize' => TRUE, + 'group' => 'rooms_booking', + ); + $variables['rooms_booking_age_of_child'] = array( + 'type' => 'string', + 'title' => t('Age of Child'), + 'default' => t('Age of Child'), + 'description' => t('Change text : Age of Child'), + 'localize' => TRUE, + 'group' => 'rooms_booking', + ); + + return $variables; +} + +/** + * Implements hook_variable_group_info(). + */ + +function rooms_booking_variable_group_info() { + $groups['rooms_booking'] = array( + 'title' => t('Rooms Booking'), + 'description' => t('Rooms Booking variables.'), + 'access' => 'administer site configuration', + ); + return $groups; +} diff --git a/modules/rooms_booking_manager/rooms_booking_manager.availability_search.inc b/modules/rooms_booking_manager/rooms_booking_manager.availability_search.inc index 7b66b78..f7fc1ea 100644 --- a/modules/rooms_booking_manager/rooms_booking_manager.availability_search.inc +++ b/modules/rooms_booking_manager/rooms_booking_manager.availability_search.inc @@ -123,7 +123,7 @@ function rooms_booking_availability_search_form_builder($form, &$form_state) { if (variable_get('rooms_display_children', ROOMS_DISPLAY_CHILDREN_NO) == ROOMS_DISPLAY_CHILDREN) { $form['rooms_fieldset']['group_size_children:1'] = array( '#type' => 'select', - '#title' => t('Children'), + '#title' => variable_get_value('rooms_booking_manager_children'), '#options' => rooms_assoc_range(0, 3), '#default_value' => isset($booking_parameters[1]['children']) ? $booking_parameters[1]['children'] : 0, ); diff --git a/modules/rooms_booking_manager/rooms_booking_manager.module b/modules/rooms_booking_manager/rooms_booking_manager.module index ce33094..1403de1 100644 --- a/modules/rooms_booking_manager/rooms_booking_manager.module +++ b/modules/rooms_booking_manager/rooms_booking_manager.module @@ -854,7 +854,7 @@ function book_unit_form_builder($form_id, $form_state, $unit, $start_date, $end_ if (empty($deposit_amount)) { $form['price'] = array( '#prefix' => '
', - '#markup' => rooms_string(' ' . + '#markup' => rooms_string(' ' . t('@currency_symbol @amount', array( // TODO: replace with a proper currency formatter '@currency_symbol' => $currency_symbol, '@amount' => $price, @@ -877,11 +877,11 @@ function book_unit_form_builder($form_id, $form_state, $unit, $start_date, $end_ else { $form['price'] = array( '#prefix' => '
', - '#markup' => rooms_string(' ' . + '#markup' => rooms_string(' ' . t('@currency_symbol @amount', array( // TODO: replace with a proper currency formatter '@currency_symbol' => $currency_symbol, '@amount' => $price, - )) . '' . ' ' . + )) . '' . ' ' . t('@currency_symbol @deposit', array( '@currency_symbol' => $currency_symbol, '@deposit' => $deposit_amount, @@ -909,7 +909,7 @@ function book_unit_form_builder($form_id, $form_state, $unit, $start_date, $end_ // Calculate the price per person per night, too. $base_price = $price_per_person / $nights; - $form['price']['#markup'] = rooms_string(format_plural($nights, 'Book this unit for 1 night at @price per person (@base_price per person per night)', 'Book this unit for @count nights at @price per person (@base_price per person per night)', array( + $form['price']['#markup'] = rooms_string(format_plural($nights, variable_get_value('rooms_booking_manager_book_this_unit_for') . ' 1 night at @price ' . variable_get_value('rooms_booking_manager_per_person') . ' (@base_price ' . variable_get_value('rooms_booking_manager_per_person_per_night') . ')', variable_get_value('rooms_booking_manager_book_this_unit_for') . ' @count nights at @price ' . variable_get_value('rooms_booking_manager_per_person') . ' (@base_price ' . variable_get_value('rooms_booking_manager_per_person_per_night') . ')', array( '@price' => t('@currency_symbol @amount', array( // TODO: replace with a proper currency formatter '@currency_symbol' => $currency_symbol, '@amount' => $price_per_person)), @@ -956,7 +956,7 @@ function book_unit_form_builder($form_id, $form_state, $unit, $start_date, $end_ $form['options'][$option_name . ':quantity'] = array( '#type' => 'select', - '#title' => t('Quantity'), + '#title' => variable_get_value('rooms_booking_manager_quantity'), '#options' => range(1, $option['quantity']), '#ajax' => array( 'callback' => 'rooms_booking_manager_options_change_callback', @@ -995,14 +995,14 @@ function book_unit_form_builder($form_id, $form_state, $unit, $start_date, $end_ if (variable_get('rooms_price_calculation', ROOMS_PER_NIGHT) == ROOMS_PER_PERSON) { $form['persons'] = array( '#type' => 'select', - '#field_suffix' => t('Guests'), + '#field_suffix' => variable_get_value('rooms_booking_manager_guests'), '#options' => range($unit->min_sleeps, $unit->max_sleeps), '#default_value' => $unit->max_sleeps - $unit->min_sleeps, '#ajax' => array( 'callback' => 'rooms_booking_manager_quantity_change_callback', 'wrapper' => 'unit_' . $unit->unit_id . '_price', ), - '#title' => t('How many people in this unit (including adults and children)?'), + '#title' => variable_get_value('rooms_booking_manager_how_many_people'), '#prefix' => '
', '#suffix' => '
', ); @@ -1019,8 +1019,8 @@ function book_unit_form_builder($form_id, $form_state, $unit, $start_date, $end_ if ($max_children > $unit->min_children) { $form['children'] = array( '#type' => 'select', - '#title' => t('How many of the guests are children?'), - '#field_suffix' => t('Children'), + '#title' => variable_get_value('rooms_booking_manager_how_many_guests_children'), + '#field_suffix' => variable_get_value('rooms_booking_manager_children'), '#options' => range($unit->min_children, $max_children), '#default_value' => 0, '#ajax' => array( @@ -1043,7 +1043,7 @@ function book_unit_form_builder($form_id, $form_state, $unit, $start_date, $end_ for ($t = 1; $t <= $form_state['values']['children']; $t++) { $form['childrens_age'][$t] = array( '#type' => 'select', - '#field_prefix' => t('Age of child @num', array('@num' => $t)), + '#field_prefix' => variable_get_value('rooms_booking_age_of_child') . ' ' . $t, '#options' => range(0, 18), '#ajax' => array( 'callback' => 'rooms_booking_manager_options_change_callback', @@ -1111,7 +1111,7 @@ function book_unit_form_builder($form_id, $form_state, $unit, $start_date, $end_ if (empty($deposit_amount)) { $form['new_price'] = array( '#prefix' => '
', - '#markup' => ' ' . + '#markup' => ' ' . t('@currency_symbol @amount', array( // TODO: replace with a proper currency formatter '@currency_symbol' => $currency_symbol, '@amount' => $new_price['full_price'], @@ -1123,11 +1123,11 @@ function book_unit_form_builder($form_id, $form_state, $unit, $start_date, $end_ else { $form['new_price'] = array( '#prefix' => '
', - '#markup' => ' ' . + '#markup' => ' ' . t('@currency_symbol @amount', array( // TODO: replace with a proper currency formatter '@currency_symbol' => $currency_symbol, '@amount' => $new_price['full_price'], - )) . '' . ' ' . t('@currency_symbol @deposit_amount', array ( + )) . '' . ' ' . t('@currency_symbol @deposit_amount', array ( '@currency_symbol' => $currency_symbol, '@deposit_amount' => $deposit_amount, )) . '', @@ -1151,7 +1151,7 @@ function book_unit_form_builder($form_id, $form_state, $unit, $start_date, $end_ ); $form['actions']['submit'] = array( '#type' => 'submit', - '#value' => t('Book This'), + '#value' => variable_get_value('rooms_booking_manager_book_this'), '#submit' => $submit + array('book_unit_form_submit'), ); @@ -1450,7 +1450,7 @@ function book_units_per_type_form($form, $form_state, $units_per_type, $start_da // for all people in the room. $unit_type_label = rooms_unit_get_types($units[$units_keys[$c - 1]]['unit']->type)->label; if (variable_get('rooms_price_calculation', ROOMS_PER_NIGHT) == ROOMS_PER_PERSON) { - $label = rooms_string('Subtotal', + $label = rooms_string(variable_get_value('rooms_booking_subtotal'), $context = array( '#component' => 'units_per_type_form_subtotal_label', '#purpose' => 'display_base_subtotal_label', @@ -1463,7 +1463,7 @@ function book_units_per_type_form($form, $form_state, $units_per_type, $start_da ); } else { - $label = rooms_string('Price', + $label = rooms_string(variable_get_value('rooms_booking_price'), $context = array( '#component' => 'units_per_type_form_price_label', '#purpose' => 'display_base_price_label', @@ -1494,7 +1494,7 @@ function book_units_per_type_form($form, $form_state, $units_per_type, $start_da $form[$type][$price]['fieldset'][$c]['price'] = array( '#prefix' => '
', // TODO: replace with a proper currency formatter. - '#markup' => t('@currency_symbol @amount - Payable now: @currency_symbol @deposit', array( + '#markup' => t('@currency_symbol @amount - ' . variable_get_value('rooms_booking_manager_payable_now') . ': @currency_symbol @deposit', array( '@currency_symbol' => $currency_symbol, '@amount' => $price, '@deposit' => $deposit_amount, @@ -1620,7 +1620,7 @@ function book_units_per_type_form($form, $form_state, $units_per_type, $start_da // Replace old price with the new calculated value. $form[$type][$price]['fieldset'][$c]['price']['#markup'] = rooms_string( - t('@currency_symbol @amount - Payable now: @currency_symbol @deposit', array( + t('@currency_symbol @amount - ' . variable_get_value('rooms_booking_manager_payable_now') . ': @currency_symbol @deposit', array( '@currency_symbol' => $currency_symbol, '@amount' => $new_price, '@deposit' => $deposit_amount, @@ -2149,7 +2149,6 @@ function rooms_booking_manager_commerce_checkout_form_cancel_submit($form, &$for * Implements hook_form_alter(). */ function rooms_booking_manager_form_alter(&$form, &$form_state, $form_id) { - // Commerce checkout form alters. if ($form_id == 'commerce_checkout_form_checkout') { rooms_booking_manager_alter_commerce_checkout_form_checkout($form, $form_state, $form_id); diff --git a/modules/rooms_booking_manager/rooms_booking_manager.units_per_type_form.inc b/modules/rooms_booking_manager/rooms_booking_manager.units_per_type_form.inc index 49b3698..9c98f99 100644 --- a/modules/rooms_booking_manager/rooms_booking_manager.units_per_type_form.inc +++ b/modules/rooms_booking_manager/rooms_booking_manager.units_per_type_form.inc @@ -141,8 +141,7 @@ function _rooms_booking_manager_load_price_info($form, $type_obj, $type, $price, // Calculate the price per person for the booking period. $base_price = $units[$units_keys[0]]['price'] / $units[$units_keys[0]]['unit']->max_sleeps; $form[$type][$price]['price']['#markup'] = format_plural(count - ($units), '1 @unit_type unit available starting at @price per - person', '@count @unit_type units available starting at @price per person', array( + ($units), '1 @unit_type ' . variable_get_value('rooms_booking_manager_unit_available_starting_at') . ' @price '. variable_get_value('rooms_booking_manager_per_person'), '@count @unit_type ' . variable_get_value('rooms_booking_manager_units_available_starting_at') . ' @price '. variable_get_value('rooms_booking_manager_per_person'), array( '@unit_type' => $type_obj->label, '@price' => t('@currency_symbol @amount', array( // TODO: replace with a proper currency formatter '@currency_symbol' => $currency_symbol, @@ -150,7 +149,6 @@ function _rooms_booking_manager_load_price_info($form, $type_obj, $type, $price, ) ); } - // Add form element to hold the price. $form[$type][$price]['price_value'] = array( '#type' => 'hidden', @@ -283,7 +281,7 @@ function _rooms_booking_manager_handle_per_person_pricing($form, &$form_state, $ 'callback' => 'rooms_booking_manager_quantity_change_callback', 'wrapper' => $type . '_' . $price . '_container', ), - '#title' => t('How many people in this unit (including adults and children)?'), + '#title' => variable_get_value('rooms_booking_manager_how_many_people'), '#prefix' => '
', '#suffix' => '
', ); @@ -301,8 +299,8 @@ function _rooms_booking_manager_handle_per_person_pricing($form, &$form_state, $ if ($tmp_unit->max_children > 0) { $form[$type][$price]['fieldset'][$c]['children'] = array( '#type' => 'select', - '#title' => t('How many of the guests are children?'), - '#field_suffix' => t('Children'), + '#title' => variable_get_value('rooms_booking_manager_how_many_guests_children'), + '#field_suffix' => variable_get_value('rooms_booking_manager_children'), '#options' => array_combine( range($tmp_unit->min_children, $max_children), range($tmp_unit->min_children, $max_children)), @@ -334,7 +332,7 @@ function _rooms_booking_manager_handle_per_person_pricing($form, &$form_state, $ for ($t = 1; $t <= $children_number; $t++) { $form[$type][$price]['fieldset'][$c]['childrens_age'][$t] = array( '#type' => 'select', - '#field_prefix' => t('Age of child @num', array('@num' => $t)), + '#field_prefix' => variable_get_value('rooms_booking_age_of_child') . ' ' . $t, '#options' => range(0, 18), '#ajax' => array( 'callback' => 'rooms_booking_manager_options_change_callback', diff --git a/modules/rooms_booking_manager/rooms_booking_manager.variable.inc b/modules/rooms_booking_manager/rooms_booking_manager.variable.inc index 3a3b3c3..7731d31 100644 --- a/modules/rooms_booking_manager/rooms_booking_manager.variable.inc +++ b/modules/rooms_booking_manager/rooms_booking_manager.variable.inc @@ -11,7 +11,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_arrival_date'] = array( 'type' => 'string', 'title' => t('Arrival Date (text in "Current search legend")'), - 'default' => 'Arrival Date', + 'default' => t('Arrival Date'), 'description' => t('Change text : Arrival Date (text in "Current search legend")'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -20,7 +20,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_departure_date'] = array( 'type' => 'string', 'title' => t('Departure Date (text in "Current search legend")'), - 'default' => 'Departure Date', + 'default' => t('Departure Date'), 'description' => t('Change text : Departure Date (text in "Current search legend")'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -29,7 +29,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_review_your_reservation'] = array( 'type' => 'string', 'title' => t('Review your reservation'), - 'default' => 'Review your reservation', + 'default' => t('Review your reservation'), 'description' => t('Change text : Review your reservation'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -38,7 +38,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_create_your_booking'] = array( 'type' => 'string', 'title' => t('Create your booking'), - 'default' => 'Create your booking', + 'default' => t('Create your booking'), 'description' => t('Change text : Create your booking'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -47,7 +47,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_units'] = array( 'type' => 'string', 'title' => t('Units'), - 'default' => 'Units', + 'default' => t('Units'), 'description' => t('Change text : Units'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -56,7 +56,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_unit_type'] = array( 'type' => 'string', 'title' => t('Unit type'), - 'default' => 'Unit type', + 'default' => t('Unit type'), 'description' => t('Change text : Unit type'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -65,7 +65,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_group_size'] = array( 'type' => 'string', 'title' => t('Group size'), - 'default' => 'Group size', + 'default' => t('Group size'), 'description' => t('Change text : Group size'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -74,7 +74,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_children'] = array( 'type' => 'string', 'title' => t('Children'), - 'default' => 'Children', + 'default' => t('Children'), 'description' => t('Change text : Children'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -83,7 +83,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_select_type'] = array( 'type' => 'string', 'title' => t('Select Type'), - 'default' => 'Select Type', + 'default' => t('Select Type'), 'description' => t('Change text : Select Type'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -92,7 +92,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_unit_available_from'] = array( 'type' => 'string', 'title' => t('Unit available from'), - 'default' => 'unit available from', + 'default' => t('unit available from'), 'description' => t('Change text : unit available from'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -101,7 +101,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_units_chosen'] = array( 'type' => 'string', 'title' => t('Units chosen'), - 'default' => 'Units Chosen', + 'default' => t('Units Chosen'), 'description' => t('Change text : Units chosen'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -110,7 +110,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_warning_no_units_available'] = array( 'type' => 'text', 'title' => t('Warning Message : No units Available'), - 'default' => 'Unfortunately no units are available - try different dates if possible.', + 'default' => t('Unfortunately no units are available - try different dates if possible.'), 'description' => t('Change text : Unfortunately no units are available - try different dates if possible.'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -119,7 +119,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_select_your_stay'] = array( 'type' => 'string', 'title' => t('Select your stay'), - 'default' => 'Select your stay', + 'default' => t('Select your stay'), 'description' => t('Change text : Select your stay'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -128,7 +128,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_your_current_search'] = array( 'type' => 'string', 'title' => t('Your current search'), - 'default' => 'Your current search', + 'default' => t('Your current search'), 'description' => t('Change text : Your current search'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -137,16 +137,24 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_nights'] = array( 'type' => 'string', 'title' => t('Nights'), - 'default' => 'Nights', + 'default' => t('Nights'), 'description' => t('Change text : Nights'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', ); + $variables['rooms_booking_manager_night'] = array( + 'type' => 'string', + 'title' => t('Night'), + 'default' => t('Night'), + 'description' => t('Change text : Night'), + 'localize' => TRUE, + 'group' => 'rooms_booking_manager', + ); $variables['rooms_booking_manager_error_select_unit'] = array( 'type' => 'text', 'title' => t('Error Message : Select a Unit'), - 'default' => 'Please select a unit in order to continue with booking.', + 'default' => t('Please select a unit in order to continue with booking.'), 'description' => t('Change text : Please select a unit in order to continue with booking.'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -155,7 +163,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_button_search_for_availability'] = array( 'type' => 'string', 'title' => t('Button : Search for Availability'), - 'default' => 'Search for Availability', + 'default' => t('Search for Availability'), 'description' => t('Change button : Search for Availability'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -164,7 +172,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_button_change_search'] = array( 'type' => 'string', 'title' => t('Button : Change search'), - 'default' => 'Change search', + 'default' => t('Change search'), 'description' => t('Change button : Change search'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -173,7 +181,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_button_place_booking'] = array( 'type' => 'string', 'title' => t('Button : Place Booking'), - 'default' => 'Place Booking', + 'default' => t('Place Booking'), 'description' => t('Change button : Place Booking'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -182,7 +190,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_button_checkout'] = array( 'type' => 'string', 'title' => t('Button : Checkout'), - 'default' => 'Checkout', + 'default' => t('Checkout'), 'description' => t('Change button : Checkout'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -191,7 +199,7 @@ function rooms_booking_manager_variable_info($options) { $variables['rooms_booking_manager_button_remove'] = array( 'type' => 'string', 'title' => t('Button : Remove'), - 'default' => 'Remove', + 'default' => t('Remove'), 'description' => t('Change button : Remove'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', @@ -201,12 +209,116 @@ function rooms_booking_manager_variable_info($options) { 'type' => 'text', 'title' => t('Enquiry form confirmation', array(), $options), 'description' => t('Enquiry form confirmation message', array(), $options), - 'default' => 'Thank you - a reservation has been created in our system for this unit and your enquiry has been sent successfully.', + 'default' => t('Thank you - a reservation has been created in our system for this unit and your enquiry has been sent successfully.'), 'localize' => TRUE, 'group' => 'rooms_booking_manager', 'required' => TRUE, ); - + $variables['rooms_booking_manager_unit_available_starting_at'] = array( + 'type' => 'string', + 'title' => t('Unit available starting at'), + 'description' => t('Unit available starting at'), + 'default' => t('unit available starting at'), + 'localize' => TRUE, + 'group' => 'rooms_booking_manager', + ); + $variables['rooms_booking_manager_units_available_starting_at'] = array( + 'type' => 'string', + 'title' => t('Units available starting at'), + 'description' => t('Units available starting at'), + 'default' => t('units available starting at'), + 'localize' => TRUE, + 'group' => 'rooms_booking_manager', + ); + $variables['rooms_booking_manager_per_person'] = array( + 'type' => 'string', + 'title' => t('Per person'), + 'description' => t('Change text: per person'), + 'default' => t('per person'), + 'localize' => TRUE, + 'group' => 'rooms_booking_manager', + ); + $variables['rooms_booking_manager_per_person_per_night'] = array( + 'type' => 'string', + 'title' => t('Per person per night'), + 'description' => t('Change text: per person per night'), + 'default' => t('per person per night'), + 'localize' => TRUE, + 'group' => 'rooms_booking_manager', + ); + $variables['rooms_booking_manager_payable_now'] = array( + 'type' => 'string', + 'title' => t('Payable now'), + 'description' => t('Change text: Payable now'), + 'default' => t('Payable now'), + 'localize' => TRUE, + 'group' => 'rooms_booking_manager', + ); + $variables['rooms_booking_manager_how_many_people'] = array( + 'type' => 'text', + 'title' => t('How many people in this unit (including adults and children)?'), + 'default' => t('How many people in this unit (including adults and children)?'), + 'description' => t('Change text : How many people in this unit (including adults and children)?'), + 'localize' => TRUE, + 'group' => 'rooms_booking_manager', + ); + $variables['rooms_booking_manager_how_many_guests_children'] = array( + 'type' => 'text', + 'title' => t('How many of the guests are children?'), + 'default' => t('How many of the guests are children?'), + 'description' => t('Change text : How many of the guests are children?'), + 'localize' => TRUE, + 'group' => 'rooms_booking_manager', + ); + $variables['rooms_booking_manager_book_this'] = array( + 'type' => 'string', + 'title' => t('Book this'), + 'default' => t('Book this'), + 'description' => t('Change button text : Book this'), + 'localize' => TRUE, + 'group' => 'rooms_booking_manager', + ); + $variables['rooms_booking_manager_base_price'] = array( + 'type' => 'string', + 'title' => t('Base Price'), + 'default' => t('Base Price'), + 'description' => t('Change text: Base Price'), + 'localize' => TRUE, + 'group' => 'rooms_booking_manager', + ); + $variables['rooms_booking_manager_cost'] = array( + 'type' => 'string', + 'title' => t('Cost'), + 'default' => t('Cost'), + 'description' => t('Change text: Cost'), + 'localize' => TRUE, + 'group' => 'rooms_booking_manager', + ); + $variables['rooms_booking_manager_quantity'] = array( + 'type' => 'string', + 'title' => t('Quantity'), + 'default' => t('Quantity'), + 'description' => t('Change text: Quantity'), + 'localize' => TRUE, + 'group' => 'rooms_booking_manager', + ); + $variables['rooms_booking_manager_book_this_unit_for'] = array( + 'type' => 'string', + 'title' => t('Book this unit for'), + 'default' => t('Book this unit for'), + 'description' => t('Change text: Book this unit for'), + 'localize' => TRUE, + 'group' => 'rooms_booking_manager', + ); + $variables['rooms_booking_manager_guests'] = array( + 'type' => 'string', + 'title' => t('Guests'), + 'default' => t('Guests'), + 'description' => t('Change text: Guests'), + 'localize' => TRUE, + 'group' => 'rooms_booking_manager', + ); + return $variables; } diff --git a/rooms.variable.inc b/rooms.variable.inc index d8d9b34..a529c28 100644 --- a/rooms.variable.inc +++ b/rooms.variable.inc @@ -11,7 +11,7 @@ function rooms_variable_info($options) { $variables['rooms_arrival_date'] = array( 'type' => 'string', 'title' => t('Arrival Date'), - 'default' => 'Arrival Date', + 'default' => t('Arrival Date'), 'description' => t('Change text : Arrival Date'), 'localize' => TRUE, 'group' => 'rooms', @@ -20,7 +20,7 @@ function rooms_variable_info($options) { $variables['rooms_departure_date'] = array( 'type' => 'string', 'title' => t('Departure Date'), - 'default' => 'Departure Date', + 'default' => t('Departure Date'), 'description' => t('Change text : Departure Date'), 'localize' => TRUE, 'group' => 'rooms',