Optimised gettexts in admin settings

Added gettexts to strings where it was missing and optimised gettext
calls to remove all HTML code from the translation string (using
sprintf).
This commit is contained in:
Matty 2011-09-19 10:42:28 +02:00
parent 64e1fa8084
commit 51b55c74a9
1 changed files with 155 additions and 155 deletions

View File

@ -17,11 +17,11 @@ global $woocommerce_settings;
$woocommerce_settings['general'] = apply_filters('woocommerce_general_settings', array(
array( 'name' => 'General Options', 'type' => 'title', 'desc' => '', 'id' => 'general_options' ),
array( 'name' => __( 'General Options', 'woothemes' ), 'type' => 'title', 'desc' => '', 'id' => 'general_options' ),
array(
'name' => __('Base Country/Region', 'woothemes'),
'desc' => __('This is the base country for your business. Tax rates will be based on this country.', 'woothemes'),
'name' => __( 'Base Country/Region', 'woothemes' ),
'desc' => __( 'This is the base country for your business. Tax rates will be based on this country.', 'woothemes' ),
'id' => 'woocommerce_default_country',
'css' => 'min-width:175px;',
'std' => 'GB',
@ -29,20 +29,20 @@ $woocommerce_settings['general'] = apply_filters('woocommerce_general_settings',
),
array(
'name' => __('Allowed Countries', 'woothemes'),
'desc' => __('These are countries that you are willing to ship to.', 'woothemes'),
'name' => __( 'Allowed Countries', 'woothemes' ),
'desc' => __( 'These are countries that you are willing to ship to.', 'woothemes' ),
'id' => 'woocommerce_allowed_countries',
'css' => 'min-width:175px;',
'std' => 'all',
'type' => 'select',
'options' => array(
'all' => __('All Countries', 'woothemes'),
'specific' => __('Specific Countries', 'woothemes')
'all' => __( 'All Countries', 'woothemes' ),
'specific' => __( 'Specific Countries', 'woothemes' )
)
),
array(
'name' => __('Specific Countries', 'woothemes'),
'name' => __( 'Specific Countries', 'woothemes' ),
'desc' => '',
'id' => 'woocommerce_specific_allowed_countries',
'css' => '',
@ -51,24 +51,24 @@ $woocommerce_settings['general'] = apply_filters('woocommerce_general_settings',
),
array(
'name' => __('Guest checkout', 'woothemes'),
'desc' => __('Allow guest users to checkout without an account', 'woothemes'),
'name' => __( 'Guest checkout', 'woothemes' ),
'desc' => __( 'Allow guest users to checkout without an account', 'woothemes' ),
'id' => 'woocommerce_enable_guest_checkout',
'std' => 'yes',
'type' => 'checkbox'
),
array(
'name' => __('Force SSL', 'woothemes'),
'desc' => __('Force SSL on the checkout for added security (SSL Certificate required).', 'woothemes'),
'name' => __( 'Force SSL', 'woothemes' ),
'desc' => __( 'Force SSL on the checkout for added security (SSL Certificate required).', 'woothemes' ),
'id' => 'woocommerce_force_ssl_checkout',
'std' => 'no',
'type' => 'checkbox'
),
array(
'name' => __('ShareThis Publisher ID', 'woothemes'),
'desc' => __("Enter your <a href='http://sharethis.com/account/'>ShareThis publisher ID</a> to show ShareThis on product pages.", 'woothemes'),
'name' => __( 'ShareThis Publisher ID', 'woothemes' ),
'desc' => sprintf( __( 'Enter your %1$sShareThis publisher ID%2$s to show ShareThis on product pages.', 'woothemes' ), '<a href="http://sharethis.com/account/">', '</a>' ),
'id' => 'woocommerce_sharethis',
'css' => 'width:300px;',
'type' => 'text',
@ -76,24 +76,24 @@ $woocommerce_settings['general'] = apply_filters('woocommerce_general_settings',
),
array(
'name' => __('WooCommerce CSS', 'woothemes'),
'desc' => __('Enable WooCommerce frontend CSS styles', 'woothemes'),
'name' => __( 'WooCommerce CSS', 'woothemes' ),
'desc' => __( 'Enable WooCommerce frontend CSS styles', 'woothemes' ),
'id' => 'woocommerce_frontend_css',
'std' => 'yes',
'type' => 'checkbox'
),
array(
'name' => __('Lightbox', 'woothemes'),
'desc' => __('Enable WooCommerce lightbox?', 'woothemes'),
'name' => __( 'Lightbox', 'woothemes' ),
'desc' => __( 'Enable WooCommerce lightbox?', 'woothemes' ),
'id' => 'woocommerce_enable_lightbox',
'std' => 'yes',
'type' => 'checkbox'
),
array(
'name' => __('Demo store', 'woothemes'),
'desc' => __('Enable the "Demo Store" notice on your site', 'woothemes'),
'name' => __( 'Demo store', 'woothemes' ),
'desc' => __( 'Enable the "Demo Store" notice on your site', 'woothemes' ),
'id' => 'woocommerce_demo_store',
'std' => 'no',
'type' => 'checkbox'
@ -106,11 +106,11 @@ $woocommerce_settings['general'] = apply_filters('woocommerce_general_settings',
$woocommerce_settings['pages'] = apply_filters('woocommerce_page_settings', array(
array( 'name' => 'Page setup', 'type' => 'title', 'desc' => '', 'id' => 'page_options' ),
array( 'name' => __( 'Page Setup', 'woothemes' ), 'type' => 'title', 'desc' => '', 'id' => 'page_options' ),
array(
'name' => __('Shop Base Page', 'woothemes'),
'desc' => sprintf( __("This sets the base page of your shop. IMPORTANT: You must <a target='_blank' href='%s'>re-save your permalinks</a> for this change to take effect.", 'woothemes'), 'options-permalink.php' ),
'name' => __( 'Shop Base Page', 'woothemes' ),
'desc' => sprintf( __( 'This sets the base page of your shop. IMPORTANT: You must %1$sre-save your permalinks%2$s for this change to take effect.', 'woothemes' ), '<a target="_blank" href="options-permalink.php">', '</a>' ),
'id' => 'woocommerce_shop_page_id',
'css' => 'min-width:175px;',
'type' => 'single_select_page',
@ -118,16 +118,16 @@ $woocommerce_settings['pages'] = apply_filters('woocommerce_page_settings', arra
),
array(
'name' => __('Prepend base page', 'woothemes'),
'desc' => __('Prepend shop categories/tags with shop base page', 'woothemes'),
'name' => __( 'Prepend base page', 'woothemes' ),
'desc' => __( 'Prepend shop categories/tags with shop base page', 'woothemes' ),
'id' => 'woocommerce_prepend_shop_page_to_urls',
'std' => 'no',
'type' => 'checkbox',
),
array(
'name' => __('Terms page ID', 'woothemes'),
'desc' => __('If you define a "Terms" page the customer will be asked if they accept them when checking out.', 'woothemes'),
'name' => __( 'Terms page ID', 'woothemes' ),
'desc' => __( 'If you define a "Terms" page the customer will be asked if they accept them when checking out.', 'woothemes' ),
'tip' => '',
'id' => 'woocommerce_terms_page_id',
'css' => 'min-width:50px;',
@ -136,13 +136,13 @@ $woocommerce_settings['pages'] = apply_filters('woocommerce_page_settings', arra
'args' => 'show_option_none=' . __('None', 'woothemes'),
),
array( 'type' => 'sectionend'),
array( 'type' => 'sectionend' ),
array( 'name' => 'Shop pages', 'type' => 'title', 'desc' => 'The following pages need selecting so that WooCommerce knows which are which. These pages should have been created upon installation of the plugin.' ),
array( 'name' => __( 'Shop Pages', 'woothemes' ), 'type' => 'title', 'desc' => __( 'The following pages need selecting so that WooCommerce knows which are which. These pages should have been created upon installation of the plugin.', 'woothemes' ) ),
array(
'name' => __('Cart Page', 'woothemes'),
'desc' => __('Page contents: [woocommerce_cart]', 'woothemes'),
'name' => __( 'Cart Page', 'woothemes' ),
'desc' => __( 'Page contents: [woocommerce_cart]', 'woothemes' ),
'id' => 'woocommerce_cart_page_id',
'css' => 'min-width:50px;',
'type' => 'single_select_page',
@ -150,8 +150,8 @@ $woocommerce_settings['pages'] = apply_filters('woocommerce_page_settings', arra
),
array(
'name' => __('Checkout Page', 'woothemes'),
'desc' => __('Page contents: [woocommerce_checkout]', 'woothemes'),
'name' => __( 'Checkout Page', 'woothemes' ),
'desc' => __( 'Page contents: [woocommerce_checkout]', 'woothemes' ),
'id' => 'woocommerce_checkout_page_id',
'css' => 'min-width:50px;',
'type' => 'single_select_page',
@ -159,8 +159,8 @@ $woocommerce_settings['pages'] = apply_filters('woocommerce_page_settings', arra
),
array(
'name' => __('Pay Page', 'woothemes'),
'desc' => __('Page contents: [woocommerce_pay] Parent: "Checkout"', 'woothemes'),
'name' => __( 'Pay Page', 'woothemes' ),
'desc' => __( 'Page contents: [woocommerce_pay] Parent: "Checkout"', 'woothemes' ),
'id' => 'woocommerce_pay_page_id',
'css' => 'min-width:50px;',
'type' => 'single_select_page',
@ -169,7 +169,7 @@ $woocommerce_settings['pages'] = apply_filters('woocommerce_page_settings', arra
array(
'name' => __('Thanks Page', 'woothemes'),
'desc' => __('Page contents: [woocommerce_thankyou] Parent: "Checkout"', 'woothemes'),
'desc' => __( 'Page contents: [woocommerce_thankyou] Parent: "Checkout"', 'woothemes' ),
'id' => 'woocommerce_thanks_page_id',
'css' => 'min-width:50px;',
'type' => 'single_select_page',
@ -177,8 +177,8 @@ $woocommerce_settings['pages'] = apply_filters('woocommerce_page_settings', arra
),
array(
'name' => __('My Account Page', 'woothemes'),
'desc' => __('Page contents: [woocommerce_my_account]', 'woothemes'),
'name' => __( 'My Account Page', 'woothemes' ),
'desc' => __( 'Page contents: [woocommerce_my_account]', 'woothemes' ),
'id' => 'woocommerce_myaccount_page_id',
'css' => 'min-width:50px;',
'type' => 'single_select_page',
@ -186,8 +186,8 @@ $woocommerce_settings['pages'] = apply_filters('woocommerce_page_settings', arra
),
array(
'name' => __('Edit Address Page', 'woothemes'),
'desc' => __('Page contents: [woocommerce_edit_address] Parent: "My Account"', 'woothemes'),
'name' => __( 'Edit Address Page', 'woothemes' ),
'desc' => __( 'Page contents: [woocommerce_edit_address] Parent: "My Account"', 'woothemes' ),
'id' => 'woocommerce_edit_address_page_id',
'css' => 'min-width:50px;',
'type' => 'single_select_page',
@ -195,8 +195,8 @@ $woocommerce_settings['pages'] = apply_filters('woocommerce_page_settings', arra
),
array(
'name' => __('View Order Page', 'woothemes'),
'desc' => __('Page contents: [woocommerce_view_order] Parent: "My Account"', 'woothemes'),
'name' => __( 'View Order Page', 'woothemes' ),
'desc' => __( 'Page contents: [woocommerce_view_order] Parent: "My Account"', 'woothemes' ),
'id' => 'woocommerce_view_order_page_id',
'css' => 'min-width:50px;',
'type' => 'single_select_page',
@ -204,8 +204,8 @@ $woocommerce_settings['pages'] = apply_filters('woocommerce_page_settings', arra
),
array(
'name' => __('Change Password Page', 'woothemes'),
'desc' => __('Page contents: [woocommerce_change_password] Parent: "My Account"', 'woothemes'),
'name' => __( 'Change Password Page', 'woothemes' ),
'desc' => __( 'Page contents: [woocommerce_change_password] Parent: "My Account"', 'woothemes' ),
'id' => 'woocommerce_change_password_page_id',
'css' => 'min-width:50px;',
'type' => 'single_select_page',
@ -219,11 +219,11 @@ $woocommerce_settings['pages'] = apply_filters('woocommerce_page_settings', arra
$woocommerce_settings['catalog'] = apply_filters('woocommerce_catalog_settings', array(
array( 'name' => __('Catalog Options', 'woothemes'), 'type' => 'title','desc' => '', 'id' => 'catalog_options' ),
array( 'name' => __( 'Catalog Options', 'woothemes' ), 'type' => 'title','desc' => '', 'id' => 'catalog_options' ),
array(
'name' => __('Product fields', 'woothemes'),
'desc' => __('Enable the SKU field for products', 'woothemes'),
'name' => __( 'Product fields', 'woothemes' ),
'desc' => __( 'Enable the SKU field for products', 'woothemes' ),
'id' => 'woocommerce_enable_sku',
'std' => 'yes',
'type' => 'checkbox',
@ -231,7 +231,7 @@ $woocommerce_settings['catalog'] = apply_filters('woocommerce_catalog_settings',
),
array(
'desc' => __('Enable the weight field for products', 'woothemes'),
'desc' => __( 'Enable the weight field for products', 'woothemes' ),
'id' => 'woocommerce_enable_weight',
'std' => 'yes',
'type' => 'checkbox',
@ -239,32 +239,32 @@ $woocommerce_settings['catalog'] = apply_filters('woocommerce_catalog_settings',
),
array(
'name' => __('Weight Unit', 'woothemes'),
'desc' => __("This controls what unit you will define weights in.", 'woothemes'),
'name' => __( 'Weight Unit', 'woothemes' ),
'desc' => __( 'This controls what unit you will define weights in.', 'woothemes' ),
'id' => 'woocommerce_weight_unit',
'css' => 'min-width:175px;',
'std' => 'GBP',
'type' => 'select',
'options' => array(
'kg' => __('kg', 'woothemes'),
'lbs' => __('lbs', 'woothemes')
'kg' => __( 'kg', 'woothemes' ),
'lbs' => __( 'lbs', 'woothemes' )
)
),
array(
'name' => __('Cart redirect', 'woothemes'),
'desc' => __('Redirect to cart after adding a product to the cart (on single product pages)', 'woothemes'),
'name' => __( 'Cart redirect', 'woothemes' ),
'desc' => __( 'Redirect to cart after adding a product to the cart (on single product pages)', 'woothemes' ),
'id' => 'woocommerce_cart_redirect_after_add',
'std' => 'no',
'type' => 'checkbox'
),
array( 'type' => 'sectionend', 'id' => 'catalog_options'),
array( 'type' => 'sectionend', 'id' => 'catalog_options' ),
array( 'name' => __('Image Options', 'woothemes'), 'type' => 'title','desc' => '', 'id' => 'image_options' ),
array( 'name' => __( 'Image Options', 'woothemes' ), 'type' => 'title','desc' => '', 'id' => 'image_options' ),
array(
'name' => __('Catalog images', 'woothemes'),
'name' => __( 'Catalog images', 'woothemes' ),
'desc' => '',
'id' => 'woocommerce_catalog_image',
'css' => '',
@ -273,7 +273,7 @@ $woocommerce_settings['catalog'] = apply_filters('woocommerce_catalog_settings',
),
array(
'name' => __('Single product images', 'woothemes'),
'name' => __( 'Single product images', 'woothemes' ),
'desc' => '',
'id' => 'woocommerce_single_image',
'css' => '',
@ -282,7 +282,7 @@ $woocommerce_settings['catalog'] = apply_filters('woocommerce_catalog_settings',
),
array(
'name' => __('Thumbnail images', 'woothemes'),
'name' => __( 'Thumbnail images', 'woothemes' ),
'desc' => '',
'id' => 'woocommerce_thumbnail_image',
'css' => '',
@ -290,12 +290,12 @@ $woocommerce_settings['catalog'] = apply_filters('woocommerce_catalog_settings',
'std' => '90'
),
array( 'type' => 'sectionend', 'id' => 'image_options'),
array( 'type' => 'sectionend', 'id' => 'image_options' ),
array( 'name' => __('Pricing Options', 'woothemes'), 'type' => 'title','desc' => '', 'id' => 'pricing_options' ),
array( 'name' => __( 'Pricing Options', 'woothemes' ), 'type' => 'title','desc' => '', 'id' => 'pricing_options' ),
array(
'name' => __('Currency', 'woothemes'),
'name' => __( 'Currency', 'woothemes' ),
'desc' => sprintf( __("This controls what currency prices are listed at in the catalog, and which currency PayPal, and other gateways, will take payments in. See the list of supported <a target='_new' href='%s'>PayPal currencies</a>.", 'woothemes'), 'https://www.paypal.com/cgi-bin/webscr?cmd=p/sell/mc/mc_intro-outside' ),
'tip' => '',
'id' => 'woocommerce_currency',
@ -303,52 +303,52 @@ $woocommerce_settings['catalog'] = apply_filters('woocommerce_catalog_settings',
'std' => 'GBP',
'type' => 'select',
'options' => apply_filters('woocommerce_currencies', array(
'USD' => __('US Dollars (&#36;)', 'woothemes'),
'EUR' => __('Euros (&euro;)', 'woothemes'),
'GBP' => __('Pounds Sterling (&pound;)', 'woothemes'),
'AUD' => __('Australian Dollars (&#36;)', 'woothemes'),
'BRL' => __('Brazilian Real (&#36;)', 'woothemes'),
'CAD' => __('Canadian Dollars (&#36;)', 'woothemes'),
'CZK' => __('Czech Koruna', 'woothemes'),
'DKK' => __('Danish Krone', 'woothemes'),
'HKD' => __('Hong Kong Dollar (&#36;)', 'woothemes'),
'HUF' => __('Hungarian Forint', 'woothemes'),
'ILS' => __('Israeli Shekel', 'woothemes'),
'JPY' => __('Japanese Yen (&yen;)', 'woothemes'),
'MYR' => __('Malaysian Ringgits', 'woothemes'),
'MXN' => __('Mexican Peso (&#36;)', 'woothemes'),
'NZD' => __('New Zealand Dollar (&#36;)', 'woothemes'),
'NOK' => __('Norwegian Krone', 'woothemes'),
'PHP' => __('Philippine Pesos', 'woothemes'),
'PLN' => __('Polish Zloty', 'woothemes'),
'SGD' => __('Singapore Dollar (&#36;)', 'woothemes'),
'SEK' => __('Swedish Krona', 'woothemes'),
'CHF' => __('Swiss Franc', 'woothemes'),
'TWD' => __('Taiwan New Dollars', 'woothemes'),
'THB' => __('Thai Baht', 'woothemes')
'USD' => __( 'US Dollars (&#36;)', 'woothemes' ),
'EUR' => __( 'Euros (&euro;)', 'woothemes' ),
'GBP' => __( 'Pounds Sterling (&pound;)', 'woothemes' ),
'AUD' => __( 'Australian Dollars (&#36;)', 'woothemes' ),
'BRL' => __( 'Brazilian Real (&#36;)', 'woothemes' ),
'CAD' => __( 'Canadian Dollars (&#36;)', 'woothemes' ),
'CZK' => __( 'Czech Koruna', 'woothemes' ),
'DKK' => __( 'Danish Krone', 'woothemes' ),
'HKD' => __( 'Hong Kong Dollar (&#36;)', 'woothemes' ),
'HUF' => __( 'Hungarian Forint', 'woothemes' ),
'ILS' => __( 'Israeli Shekel', 'woothemes' ),
'JPY' => __( 'Japanese Yen (&yen;)', 'woothemes' ),
'MYR' => __( 'Malaysian Ringgits', 'woothemes' ),
'MXN' => __( 'Mexican Peso (&#36;)', 'woothemes' ),
'NZD' => __( 'New Zealand Dollar (&#36;)', 'woothemes' ),
'NOK' => __( 'Norwegian Krone', 'woothemes' ),
'PHP' => __( 'Philippine Pesos', 'woothemes' ),
'PLN' => __( 'Polish Zloty', 'woothemes' ),
'SGD' => __( 'Singapore Dollar (&#36;)', 'woothemes' ),
'SEK' => __( 'Swedish Krona', 'woothemes' ),
'CHF' => __( 'Swiss Franc', 'woothemes' ),
'TWD' => __( 'Taiwan New Dollars', 'woothemes' ),
'THB' => __( 'Thai Baht', 'woothemes' )
)
)
),
array(
'name' => __('Currency Position', 'woothemes'),
'desc' => __("This controls the position of the currency symbol.", 'woothemes'),
'name' => __( 'Currency Position', 'woothemes' ),
'desc' => __( 'This controls the position of the currency symbol.', 'woothemes' ),
'tip' => '',
'id' => 'woocommerce_currency_pos',
'css' => 'min-width:175px;',
'std' => 'left',
'type' => 'select',
'options' => array(
'left' => __('Left', 'woothemes'),
'right' => __('Right', 'woothemes'),
'left_space' => __('Left (with space)', 'woothemes'),
'right_space' => __('Right (with space)', 'woothemes')
'left' => __( 'Left', 'woothemes' ),
'right' => __( 'Right', 'woothemes' ),
'left_space' => __( 'Left (with space)', 'woothemes' ),
'right_space' => __( 'Right (with space)', 'woothemes' )
)
),
array(
'name' => __('Thousand separator', 'woothemes'),
'desc' => __('This sets the thousand separator of displayed prices.', 'woothemes'),
'name' => __( 'Thousand separator', 'woothemes' ),
'desc' => __( 'This sets the thousand separator of displayed prices.', 'woothemes' ),
'tip' => '',
'id' => 'woocommerce_price_thousand_sep',
'css' => 'width:30px;',
@ -357,8 +357,8 @@ $woocommerce_settings['catalog'] = apply_filters('woocommerce_catalog_settings',
),
array(
'name' => __('Decimal separator', 'woothemes'),
'desc' => __('This sets the decimal separator of displayed prices.', 'woothemes'),
'name' => __( 'Decimal separator', 'woothemes' ),
'desc' => __( 'This sets the decimal separator of displayed prices.', 'woothemes' ),
'tip' => '',
'id' => 'woocommerce_price_decimal_sep',
'css' => 'width:30px;',
@ -367,8 +367,8 @@ $woocommerce_settings['catalog'] = apply_filters('woocommerce_catalog_settings',
),
array(
'name' => __('Number of decimals', 'woothemes'),
'desc' => __('This sets the number of decimal points shown in displayed prices.', 'woothemes'),
'name' => __( 'Number of decimals', 'woothemes' ),
'desc' => __( 'This sets the number of decimal points shown in displayed prices.', 'woothemes' ),
'tip' => '',
'id' => 'woocommerce_price_num_decimals',
'css' => 'width:30px;',
@ -383,19 +383,19 @@ $woocommerce_settings['catalog'] = apply_filters('woocommerce_catalog_settings',
$woocommerce_settings['inventory'] = apply_filters('woocommerce_inventory_settings', array(
array( 'name' => __('Inventory Options', 'woothemes'), 'type' => 'title','desc' => '', 'id' => 'inventory_options' ),
array( 'name' => __( 'Inventory Options', 'woothemes' ), 'type' => 'title','desc' => '', 'id' => 'inventory_options' ),
array(
'name' => __('Manage stock', 'woothemes'),
'desc' => __('Enable stock management', 'woothemes'),
'name' => __( 'Manage stock', 'woothemes' ),
'desc' => __( 'Enable stock management', 'woothemes' ),
'id' => 'woocommerce_manage_stock',
'std' => 'yes',
'type' => 'checkbox'
),
array(
'name' => __('Notifications', 'woothemes'),
'desc' => __('Enable low stock notifications', 'woothemes'),
'name' => __( 'Notifications', 'woothemes' ),
'desc' => __( 'Enable low stock notifications', 'woothemes' ),
'id' => 'woocommerce_notify_low_stock',
'std' => 'yes',
'type' => 'checkbox',
@ -403,7 +403,7 @@ $woocommerce_settings['inventory'] = apply_filters('woocommerce_inventory_settin
),
array(
'desc' => __('Enable out of stock notifications', 'woothemes'),
'desc' => __( 'Enable out of stock notifications', 'woothemes' ),
'id' => 'woocommerce_notify_no_stock',
'std' => 'yes',
'type' => 'checkbox',
@ -411,7 +411,7 @@ $woocommerce_settings['inventory'] = apply_filters('woocommerce_inventory_settin
),
array(
'name' => __('Low stock threshold', 'woothemes'),
'name' => __( 'Low stock threshold', 'woothemes' ),
'desc' => '',
'tip' => '',
'id' => 'woocommerce_notify_low_stock_amount',
@ -421,7 +421,7 @@ $woocommerce_settings['inventory'] = apply_filters('woocommerce_inventory_settin
),
array(
'name' => __('Out of stock threshold', 'woothemes'),
'name' => __( 'Out of stock threshold', 'woothemes' ),
'desc' => '',
'tip' => '',
'id' => 'woocommerce_notify_no_stock_amount',
@ -431,7 +431,7 @@ $woocommerce_settings['inventory'] = apply_filters('woocommerce_inventory_settin
),
array(
'name' => __('Out of stock visibility', 'woothemes'),
'name' => __( 'Out of stock visibility', 'woothemes' ),
'desc' => __('Hide out of stock items from the catalog', 'woothemes'),
'id' => 'woocommerce_hide_out_of_stock_items',
'std' => 'no',
@ -445,75 +445,75 @@ $woocommerce_settings['inventory'] = apply_filters('woocommerce_inventory_settin
$woocommerce_settings['shipping'] = apply_filters('woocommerce_shipping_settings', array(
array( 'name' => __('Shipping Options', 'woothemes'), 'type' => 'title','desc' => '', 'id' => 'shipping_options' ),
array( 'name' => __( 'Shipping Options', 'woothemes' ), 'type' => 'title','desc' => '', 'id' => 'shipping_options' ),
array(
'name' => __('Calculate shipping', 'woothemes'),
'desc' => __('Enable shipping/shipping calculations', 'woothemes'),
'name' => __( 'Calculate shipping', 'woothemes' ),
'desc' => __( 'Enable shipping/shipping calculations', 'woothemes' ),
'id' => 'woocommerce_calc_shipping',
'std' => 'yes',
'type' => 'checkbox'
),
array(
'name' => __('Shipping calculator', 'woothemes'),
'desc' => __('Enable the shipping calculator on the cart page', 'woothemes'),
'name' => __( 'Shipping calculator', 'woothemes' ),
'desc' => __( 'Enable the shipping calculator on the cart page', 'woothemes' ),
'id' => 'woocommerce_enable_shipping_calc',
'std' => 'yes',
'type' => 'checkbox'
),
array(
'name' => __('Ship to billing', 'woothemes'),
'desc' => __('Only ship to the users billing address', 'woothemes'),
'name' => __( 'Ship to billing', 'woothemes' ),
'desc' => __( 'Only ship to the users billing address', 'woothemes' ),
'id' => 'woocommerce_ship_to_billing_address_only',
'std' => 'no',
'type' => 'checkbox'
),
array( 'type' => 'sectionend', 'id' => 'shipping_options'),
array( 'type' => 'sectionend', 'id' => 'shipping_options' ),
)); // End shipping settings
$woocommerce_settings['tax'] = apply_filters('woocommerce_tax_settings', array(
array( 'name' => __('Tax Options', 'woothemes'), 'type' => 'title','desc' => '', 'id' => 'tax_options' ),
array( 'name' => __( 'Tax Options', 'woothemes' ), 'type' => 'title','desc' => '', 'id' => 'tax_options' ),
array(
'name' => __('Calculate Taxes', 'woothemes'),
'desc' => __('Enable taxes and tax calculations', 'woothemes'),
'name' => __( 'Calculate Taxes', 'woothemes' ),
'desc' => __( 'Enable taxes and tax calculations', 'woothemes' ),
'id' => 'woocommerce_calc_taxes',
'std' => 'yes',
'type' => 'checkbox'
),
array(
'name' => __('Prices inclusive of tax', 'woothemes'),
'desc' => __('Catalog Prices include tax', 'woothemes'),
'name' => __( 'Prices inclusive of tax', 'woothemes' ),
'desc' => __( 'Catalog Prices include tax', 'woothemes' ),
'id' => 'woocommerce_prices_include_tax',
'std' => 'yes',
'type' => 'checkbox'
),
array(
'name' => __('Cart totals display...', 'woothemes'),
'name' => __( 'Cart totals display...', 'woothemes' ),
'desc' => '',
'tip' => __('Should the subtotal be shown including or excluding tax on the frontend?', 'woothemes'),
'tip' => __( 'Should the subtotal be shown including or excluding tax on the frontend?', 'woothemes' ),
'id' => 'woocommerce_display_totals_tax',
'css' => 'min-width:100px;',
'std' => 'excluding',
'type' => 'select',
'options' => array(
'including' => __('price including tax', 'woothemes'),
'excluding' => __('price excluding tax', 'woothemes')
'including' => __( 'price including tax', 'woothemes' ),
'excluding' => __( 'price excluding tax', 'woothemes' )
)
),
array(
'name' => __('Additional Tax classes', 'woothemes'),
'desc' => __('List 1 per line. This is in addition to the default <em>Standard Rate</em>.', 'woothemes'),
'tip' => __('List product and shipping tax classes here, e.g. Zero Tax, Reduced Rate.', 'woothemes'),
'name' => __( 'Additional Tax classes', 'woothemes' ),
'desc' => __( 'List 1 per line. This is in addition to the default <em>Standard Rate</em>.', 'woothemes' ),
'tip' => __( 'List product and shipping tax classes here, e.g. Zero Tax, Reduced Rate.', 'woothemes' ),
'id' => 'woocommerce_tax_classes',
'css' => 'width:100%; height: 75px;',
'type' => 'textarea',
@ -521,16 +521,16 @@ $woocommerce_settings['tax'] = apply_filters('woocommerce_tax_settings', array(
),
array(
'name' => __('Tax rates', 'woothemes'),
'desc' => 'All fields are required.',
'tip' => 'To avoid rounding errors, insert tax rates with 4 decimal places.',
'name' => __( 'Tax rates', 'woothemes' ),
'desc' => __( 'All fields are required.', 'woothemes' ),
'tip' => __( 'To avoid rounding errors, insert tax rates with 4 decimal places.', 'woothemes' ),
'id' => 'woocommerce_tax_rates',
'css' => 'min-width:50px;',
'type' => 'tax_rates',
'std' => ''
),
array( 'type' => 'sectionend', 'id' => 'tax_options'),
array( 'type' => 'sectionend', 'id' => 'tax_options' ),
)); // End tax settings
@ -544,28 +544,28 @@ function woocommerce_settings() {
$current_tab = (isset($_GET['tab'])) ? $_GET['tab'] : 'general';
if(isset($_POST) && $_POST) :
if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'woocommerce-settings') ) die( __('Action failed. Please refresh the page and retry.', 'woothemes') );
if( isset( $_POST ) && $_POST ) :
if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'woocommerce-settings' ) ) die( __( 'Action failed. Please refresh the page and retry.', 'woothemes' ) );
switch ($current_tab) :
switch ( $current_tab ) :
case "general" :
case "pages" :
case "catalog" :
case "inventory" :
case "shipping" :
case "tax" :
woocommerce_update_options($woocommerce_settings[$current_tab]);
woocommerce_update_options( $woocommerce_settings[$current_tab] );
break;
endswitch;
do_action( 'woocommerce_update_options' );
do_action( 'woocommerce_update_options_' . $current_tab );
flush_rewrite_rules( false );
wp_redirect( add_query_arg('saved', 'true', admin_url('admin.php?page=woocommerce&tab=' . $current_tab ) ));
wp_redirect( add_query_arg( 'saved', 'true', admin_url( 'admin.php?page=woocommerce&tab=' . $current_tab ) ) );
endif;
if (isset($_GET['saved']) && $_GET['saved']) :
echo '<div id="message" class="updated fade"><p><strong>'.__('Your settings have been saved.', 'woothemes').'</strong></p></div>';
echo '<div id="message" class="updated fade"><p><strong>' . __( 'Your settings have been saved.', 'woothemes' ) . '</strong></p></div>';
flush_rewrite_rules( false );
endif;
?>
@ -574,24 +574,24 @@ function woocommerce_settings() {
<div class="icon32 icon32-woocommerce-settings" id="icon-woocommerce"><br></div><h2 class="nav-tab-wrapper woo-nav-tab-wrapper">
<?php
$tabs = array(
'general' => __('General', 'woothemes'),
'pages' => __('Pages', 'woothemes'),
'catalog' => __('Catalog', 'woothemes'),
'inventory' => __('Inventory', 'woothemes'),
'shipping' => __('Shipping', 'woothemes'),
'tax' => __('Tax', 'woothemes'),
'shipping_methods' => __('Shipping Methods', 'woothemes'),
'payment_gateways' => __('Payment Gateways', 'woothemes')
'general' => __( 'General', 'woothemes' ),
'pages' => __( 'Pages', 'woothemes' ),
'catalog' => __( 'Catalog', 'woothemes' ),
'inventory' => __( 'Inventory', 'woothemes' ),
'shipping' => __( 'Shipping', 'woothemes' ),
'tax' => __( 'Tax', 'woothemes'),
'shipping_methods' => __( 'Shipping Methods', 'woothemes' ),
'payment_gateways' => __( 'Payment Gateways', 'woothemes' )
);
foreach ($tabs as $name => $label) :
echo '<a href="'.admin_url('admin.php?page=woocommerce&tab='.$name).'" class="nav-tab ';
if($current_tab==$name) echo 'nav-tab-active';
echo '">'.$label.'</a>';
echo '<a href="' . admin_url( 'admin.php?page=woocommerce&tab=' . $name ) . '" class="nav-tab ';
if( $current_tab==$name ) echo 'nav-tab-active';
echo '">' . $label . '</a>';
endforeach;
?>
<?php do_action('woocommerce_settings_tabs'); ?>
<?php do_action( 'woocommerce_settings_tabs' ); ?>
</h2>
<?php wp_nonce_field('woocommerce-settings', '_wpnonce', true, true); ?>
<?php wp_nonce_field( 'woocommerce-settings', '_wpnonce', true, true ); ?>
<?php
switch ($current_tab) :
case "general" :
@ -600,13 +600,13 @@ function woocommerce_settings() {
case "inventory" :
case "shipping" :
case "tax" :
woocommerce_admin_fields($woocommerce_settings[$current_tab]);
woocommerce_admin_fields( $woocommerce_settings[$current_tab] );
break;
case "shipping_methods" :
$links = array();
foreach ($woocommerce->shipping->shipping_methods as $method) :
foreach ( $woocommerce->shipping->shipping_methods as $method ) :
$title = ($method->method_title) ? ucwords($method->method_title) : ucwords($method->id);
$links[] = '<a href="#shipping-'.$method->id.'">'.$title.'</a>';
endforeach;
@ -633,7 +633,7 @@ function woocommerce_settings() {
echo '<div class="subsubsub_section"><ul class="subsubsub"><li>' . implode(' | </li><li>', $links) . '</li></ul><br class="clear" />';
foreach ($woocommerce->payment_gateways->payment_gateways() as $gateway) :
foreach ( $woocommerce->payment_gateways->payment_gateways() as $gateway ) :
echo '<div class="section" id="gateway-'.$gateway->id.'">';
$gateway->admin_options();
echo '</div>';
@ -647,7 +647,7 @@ function woocommerce_settings() {
break;
endswitch;
?>
<p class="submit"><input name="save" class="button-primary" type="submit" value="<?php _e('Save changes', 'woothemes') ?>" /></p>
<p class="submit"><input name="save" class="button-primary" type="submit" value="<?php _e( 'Save changes', 'woothemes' ); ?>" /></p>
</form>
<script type="text/javascript">
@ -675,7 +675,7 @@ function woocommerce_settings() {
// Country Multiselect boxes
jQuery(".country_multiselect").multiselect({
noneSelectedText: '<?php _e('Select countries/states', 'woothemes'); ?>',
noneSelectedText: '<?php _e( 'Select countries/states', 'woothemes' ); ?>',
selectedList: 4
});
@ -690,7 +690,7 @@ function woocommerce_settings() {
jQuery('.woo-nav-tab-wrapper a').click(function(){
if (changed) {
window.onbeforeunload = function() {
return '<?php echo __('The changes you made will be lost if you navigate away from this page.', 'woothemes'); ?>';
return '<?php echo __( 'The changes you made will be lost if you navigate away from this page.', 'woothemes' ); ?>';
}
} else {
window.onbeforeunload = '';