=== modified file 'uc_vat.module' --- uc_vat.module 2010-02-11 21:46:15 +0000 +++ uc_vat.module 2010-02-11 21:58:08 +0000 @@ -15,7 +15,7 @@ $items = array(); $items['admin/store/settings/taxes/vat'] = array( - 'title' => 'VAT settings', + 'title' => variable_get('uc_vat_name', 'VAT') . ' settings', 'page callback' => 'drupal_get_form', 'page arguments' => array('uc_vat_settings_form'), 'access arguments' => array('configure taxes'), @@ -43,7 +43,7 @@ function uc_vat_uc_price_handler() { return array( 'alter' => array( - 'title' => t('VAT price alterer'), + 'title' => t(variable_get('uc_vat_name', 'VAT') . ' price alterer'), 'description' => t('Modifies prices to include tax before checkout.'), 'callback' => 'uc_vat_price_handler_alter', ), @@ -309,14 +309,14 @@ if ($form['id']['#value'] && _uc_vat_product_fields()) { if (variable_get('uc_vat_recalculate_prices', FALSE)) { $form['recalculation_note'] = array( - '#value' => '
'. t('If the rate is changed, product and attribute prices will be recalculated, so !tax exclusive prices will change but !tax inclusive prices will stay the same. Visit the VAT settings page to change this behaviour.', array('!tax' => variable_get('uc_vat_name', 'VAT'), '!url' => url('admin/store/settings/taxes/vat'))) .'
', + '#value' => ''. t('If the rate is changed, product and attribute prices will be recalculated, so !tax exclusive prices will change but !tax inclusive prices will stay the same. Visit the !tax settings page to change this behaviour.', array('!tax' => variable_get('uc_vat_name', 'VAT'), '!url' => url('admin/store/settings/taxes/vat'))) .'
', '#weight' => -10, ); $form['#submit'][] = 'uc_vat_recalculate_prices'; } else { $form['recalculation_note'] = array( - '#value' => ''. t('If the rate is changed, product and attribute prices will not be recalculated, so !tax inclusive prices will change. Visit the VAT settings page to change this behaviour.', array('!tax' => variable_get('uc_vat_name', 'VAT'), '!url' => url('admin/store/settings/taxes/vat'))) .'
', + '#value' => ''. t('If the rate is changed, product and attribute prices will not be recalculated, so !tax inclusive prices will change. Visit the !tax settings page to change this behaviour.', array('!tax' => variable_get('uc_vat_name', 'VAT'), '!url' => url('admin/store/settings/taxes/vat'))) .'
', '#weight' => -10, ); } @@ -329,6 +329,7 @@ function uc_vat_recalculate_prices($form, &$form_state) { $old_rate = $form['rate']['#default_value']; $new_rate = $form_state['values']['rate']; + $tax = variable_get('uc_vat_name', 'VAT'); if ($old_rate == $new_rate) { // Don't do anything if the rate didn't change. @@ -373,7 +374,7 @@ } if ($count > 0) { - drupal_set_message(format_plural($count, 'Recalculated the VAT exclusive price of 1 product.', 'Recalculated the VAT exclusive price of @count products.')); + drupal_set_message(format_plural($count, 'Recalculated the !tax exclusive price of 1 product.', 'Recalculated the !tax exclusive price of @count products.', array('!tax' => $tax))); } // Find product class attribute options to be recalculated. @@ -398,7 +399,7 @@ } if ($count > 0) { - drupal_set_message(format_plural($count, 'Recalculated the VAT exclusive price of 1 product class attribute option.', 'Recalculated the VAT exclusive price of @count product class attribute options.')); + drupal_set_message(format_plural($count, 'Recalculated the !tax exclusive price of 1 product class attribute option.', 'Recalculated the !tax exclusive price of @count product class attribute options.', array('!tax' => $tax))); } // Find product attribute options to be recalculated. @@ -423,7 +424,7 @@ } if ($count > 0) { - drupal_set_message(format_plural($count, 'Recalculated the VAT exclusive price of 1 attribute option.', 'Recalculated the VAT exclusive price of @count attribute options.')); + drupal_set_message(format_plural($count, 'Recalculated the !tax exclusive price of 1 attribute option.', 'Recalculated the !tax exclusive price of @count attribute options.', array('!tax' => $tax))); } }