Moved # character in translatable order strings. Closes #1161
This commit is contained in:
parent
d83f5f7c61
commit
f6c83fe6aa
|
@ -77,7 +77,7 @@ function woocommerce_custom_order_columns($column) {
|
|||
$user = __('Guest', 'woocommerce');
|
||||
endif;
|
||||
|
||||
echo '<a href="'.admin_url('post.php?post='.$post->ID.'&action=edit').'"><strong>'.sprintf( __('Order %s', 'woocommerce'), $order->get_order_number() ).'</strong></a> ' . __('made by', 'woocommerce') . ' ' . $user;
|
||||
echo '<a href="'.admin_url('post.php?post='.$post->ID.'&action=edit').'"><strong>'.sprintf( __( 'Order #%s', 'woocommerce' ), $order->get_order_number() ) . '</strong></a> ' . __('made by', 'woocommerce') . ' ' . $user;
|
||||
|
||||
if ($order->billing_email) :
|
||||
echo '<small class="meta">'.__('Email:', 'woocommerce') . ' ' . '<a href="' . esc_url( 'mailto:'.$order->billing_email ).'">'.esc_html( $order->billing_email ).'</a></small>';
|
||||
|
|
|
@ -52,7 +52,7 @@ function woocommerce_order_data_meta_box($post) {
|
|||
|
||||
<div class="order_data_left">
|
||||
|
||||
<h2><?php _e('Order Details', 'woocommerce'); ?> — <?php echo $order->get_order_number(); ?></h2>
|
||||
<h2><?php _e('Order Details', 'woocommerce'); ?> — <?php echo sprintf( __( '#%s', 'woocommerce'), $order->get_order_number() ); ?></h2>
|
||||
|
||||
<p class="form-field"><label for="order_status"><?php _e('Order status:', 'woocommerce') ?></label>
|
||||
<select id="order_status" name="order_status" class="chosen_select">
|
||||
|
|
|
@ -121,7 +121,7 @@ class WC_Email {
|
|||
|
||||
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
|
||||
|
||||
$subject = apply_filters( 'woocommerce_email_subject_new_order', sprintf( __( '[%s] New Customer Order (%s)', 'woocommerce' ), $blogname, $order->get_order_number() ), $order );
|
||||
$subject = apply_filters( 'woocommerce_email_subject_new_order', sprintf( __( '[%s] New Customer Order (#%s)', 'woocommerce' ), $blogname, $order->get_order_number() ), $order );
|
||||
|
||||
// Buffer
|
||||
ob_start();
|
||||
|
@ -236,7 +236,7 @@ class WC_Email {
|
|||
$email_heading = sprintf( __('Your order on %s', 'woocommerce'), $blogname );
|
||||
$subject = apply_filters( 'woocommerce_email_subject_customer_invoice_paid', sprintf( __( '[%s] Your order', 'woocommerce' ), $blogname ), $order );
|
||||
} else {
|
||||
$email_heading = sprintf( __('Invoice for Order %s', 'woocommerce'), $order->get_order_number() );
|
||||
$email_heading = sprintf( __( 'Invoice for Order #%s', 'woocommerce' ), $order->get_order_number() );
|
||||
$subject = apply_filters( 'woocommerce_email_subject_customer_invoice', sprintf( __( '[%s] Pay for Order', 'woocommerce' ), $blogname ), $order );
|
||||
}
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ class WC_Order {
|
|||
* @return string
|
||||
*/
|
||||
function get_order_number() {
|
||||
return apply_filters( 'woocommerce_order_number', '#' . $this->id, $this );
|
||||
return apply_filters( 'woocommerce_order_number', $this->id, $this );
|
||||
}
|
||||
|
||||
function get_formatted_billing_address() {
|
||||
|
|
|
@ -272,7 +272,7 @@ class WC_Paypal extends WC_Payment_Gateway {
|
|||
if ($item['qty']) $item_names[] = $item['name'] . ' x ' . $item['qty'];
|
||||
endforeach; endif;
|
||||
|
||||
$paypal_args['item_name_1'] = sprintf( __('Order %s' , 'woocommerce'), $order->get_order_number() ) . " - " . implode(', ', $item_names);
|
||||
$paypal_args['item_name_1'] = sprintf( __( 'Order #%s' , 'woocommerce' ), $order->get_order_number() ) . " - " . implode( ', ', $item_names );
|
||||
$paypal_args['quantity_1'] = 1;
|
||||
$paypal_args['amount_1'] = number_format($order->get_total() - $order->get_shipping() - $order->get_shipping_tax() + $order->get_order_discount(), 2, '.', '');
|
||||
|
||||
|
@ -578,11 +578,11 @@ class WC_Paypal extends WC_Payment_Gateway {
|
|||
|
||||
$message = woocommerce_mail_template(
|
||||
__('Order refunded/reversed', 'woocommerce'),
|
||||
sprintf(__('Order %s has been marked as refunded - PayPal reason code: %s', 'woocommerce'), $order->get_order_number(), $posted['reason_code'] )
|
||||
sprintf( __( 'Order #%s has been marked as refunded - PayPal reason code: %s', 'woocommerce' ), $order->get_order_number(), $posted['reason_code'] )
|
||||
);
|
||||
|
||||
// Send the mail
|
||||
woocommerce_mail( get_option('woocommerce_new_order_email_recipient'), sprintf( __('Payment for order %s refunded/reversed', 'woocommerce'), $order->get_order_number() ), $message );
|
||||
woocommerce_mail( get_option( 'woocommerce_new_order_email_recipient' ), sprintf( __( 'Payment for order #%s refunded/reversed', 'woocommerce' ), $order->get_order_number() ), $message );
|
||||
|
||||
}
|
||||
|
||||
|
@ -594,12 +594,12 @@ class WC_Paypal extends WC_Payment_Gateway {
|
|||
$order->update_status('refunded', sprintf( __('Payment %s via IPN.', 'woocommerce'), strtolower( $posted['payment_status'] ) ) );
|
||||
|
||||
$message = woocommerce_mail_template(
|
||||
__('Order refunded/reversed', 'woocommerce'),
|
||||
sprintf(__('Order %s has been marked as refunded - PayPal reason code: %s', 'woocommerce'), $order->get_order_number(), $posted['reason_code'] )
|
||||
__( 'Order refunded/reversed', 'woocommerce' ),
|
||||
sprintf(__( 'Order #%s has been marked as refunded - PayPal reason code: %s', 'woocommerce' ), $order->get_order_number(), $posted['reason_code'] )
|
||||
);
|
||||
|
||||
// Send the mail
|
||||
woocommerce_mail( get_option('woocommerce_new_order_email_recipient'), sprintf( __('Payment for order %s refunded/reversed', 'woocommerce'), $order->get_order_number() ), $message );
|
||||
woocommerce_mail( get_option( 'woocommerce_new_order_email_recipient') , sprintf( __( 'Payment for order #%s refunded/reversed', 'woocommerce' ), $order->get_order_number() ), $message );
|
||||
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -170,6 +170,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
* Fix - strpos warning in shipping class
|
||||
* Fix - $query instead of $q in query class
|
||||
* Fix - Visibility setting for products in widgets
|
||||
* Fix - Moved # character in translatable order strings
|
||||
|
||||
= 1.5.7.1 - 14/06/2012 =
|
||||
* Fix - Saving Mijireh settings bug
|
||||
|
|
|
@ -265,8 +265,8 @@ function woocommerce_view_order() {
|
|||
$status = get_term_by('slug', $order->status, 'shop_order_status');
|
||||
|
||||
echo '<p>'
|
||||
. sprintf( __('Order <mark>%s</mark> made on <mark>%s</mark>', 'woocommerce'), $order->get_order_number(), date_i18n(get_option('date_format'), strtotime($order->order_date)) )
|
||||
. sprintf( __('. Order status: <mark>%s</mark>', 'woocommerce'), __($status->name, 'woocommerce') )
|
||||
. sprintf( __( 'Order <mark>#%s</mark> made on <mark>%s</mark>', 'woocommerce' ), $order->get_order_number(), date_i18n( get_option( 'date_format' ), strtotime( $order->order_date ) ) )
|
||||
. sprintf( __( '. Order status: <mark>%s</mark>', 'woocommerce' ), __( $status->name, 'woocommerce' ) )
|
||||
. '.</p>';
|
||||
|
||||
$notes = $order->get_customer_order_notes();
|
||||
|
|
|
@ -71,7 +71,7 @@ function woocommerce_pay() {
|
|||
<ul class="order_details">
|
||||
<li class="order">
|
||||
<?php _e('Order:', 'woocommerce'); ?>
|
||||
<strong><?php echo $order->get_order_number(); ?></strong>
|
||||
<strong><?php echo sprintf( __( '#%s', 'woocommerce' ), $order->get_order_number() ); ?></strong>
|
||||
</li>
|
||||
<li class="date">
|
||||
<?php _e('Date:', 'woocommerce'); ?>
|
||||
|
|
|
@ -34,7 +34,7 @@ global $woocommerce;
|
|||
<ul class="order_details">
|
||||
<li class="order">
|
||||
<?php _e('Order:', 'woocommerce'); ?>
|
||||
<strong><?php echo $order->get_order_number(); ?></strong>
|
||||
<strong><?php echo sprintf( __( '#%s', 'woocommerce' ), $order->get_order_number() ); ?></strong>
|
||||
</li>
|
||||
<li class="date">
|
||||
<?php _e('Date:', 'woocommerce'); ?>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<?php do_action('woocommerce_email_before_order_table', $order, true); ?>
|
||||
|
||||
<h2><?php echo __('Order:', 'woocommerce') . ' ' . $order->get_order_number(); ?></h2>
|
||||
<h2><?php echo __( 'Order: #', 'woocommerce' ) . $order->get_order_number(); ?></h2>
|
||||
|
||||
<table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee">
|
||||
<thead>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<?php do_action('woocommerce_email_before_order_table', $order, false); ?>
|
||||
|
||||
<h2><?php echo __('Order:', 'woocommerce') . ' ' . $order->get_order_number(); ?></h2>
|
||||
<h2><?php echo __( 'Order: #', 'woocommerce' ) . $order->get_order_number(); ?></h2>
|
||||
|
||||
<table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee">
|
||||
<thead>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<?php do_action('woocommerce_email_before_order_table', $order, false); ?>
|
||||
|
||||
<h2><?php echo __('Order:', 'woocommerce') . ' ' . $order->get_order_number(); ?></h2>
|
||||
<h2><?php echo __( 'Order: #', 'woocommerce' ) . $order->get_order_number(); ?></h2>
|
||||
|
||||
<table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee">
|
||||
<thead>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<?php do_action('woocommerce_email_before_order_table', $order, false); ?>
|
||||
|
||||
<h2><?php echo __('Order:', 'woocommerce') . ' ' . $order->get_order_number(); ?></h2>
|
||||
<h2><?php echo __( 'Order: #', 'woocommerce' ) . $order->get_order_number(); ?></h2>
|
||||
|
||||
<table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee">
|
||||
<thead>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<?php do_action('woocommerce_email_before_order_table', $order, false); ?>
|
||||
|
||||
<h2><?php echo __('Order:', 'woocommerce') . ' ' . $order->get_order_number(); ?></h2>
|
||||
<h2><?php echo __( 'Order: #', 'woocommerce' ) . $order->get_order_number(); ?></h2>
|
||||
|
||||
<table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee">
|
||||
<thead>
|
||||
|
|
|
@ -41,7 +41,7 @@ if ($customer_orders) :
|
|||
|
||||
?><tr class="order">
|
||||
<td class="order-number" width="1%">
|
||||
<a href="<?php echo esc_url( add_query_arg('order', $order->id, get_permalink(woocommerce_get_page_id('view_order'))) ); ?>"><?php echo $order->get_order_number(); ?></a> – <time title="<?php echo esc_attr( strtotime($order->order_date) ); ?>"><?php echo date_i18n(get_option('date_format'), strtotime($order->order_date)); ?></time>
|
||||
<a href="<?php echo esc_url( add_query_arg('order', $order->id, get_permalink(woocommerce_get_page_id('view_order'))) ); ?>"><?php echo sprintf( __( '#%s', 'woocommerce' ), $order->get_order_number() ); ?></a> – <time title="<?php echo esc_attr( strtotime($order->order_date) ); ?>"><?php echo date_i18n(get_option('date_format'), strtotime($order->order_date)); ?></time>
|
||||
</td>
|
||||
<td class="order-shipto"><address><?php if ($order->get_formatted_shipping_address()) echo $order->get_formatted_shipping_address(); else echo '–'; ?></address></td>
|
||||
<td class="order-total" width="1%"><?php echo $order->get_formatted_order_total(); ?></td>
|
||||
|
|
|
@ -9,7 +9,7 @@ global $woocommerce;
|
|||
<?php
|
||||
$status = get_term_by('slug', $order->status, 'shop_order_status');
|
||||
|
||||
$order_status_text = sprintf( __('Order %s which was made %s has the status “%s”', 'woocommerce'), $order->get_order_number(), human_time_diff(strtotime($order->order_date), current_time('timestamp')) . ' ' . __('ago', 'woocommerce'), __($status->name, 'woocommerce') );
|
||||
$order_status_text = sprintf( __( 'Order #%s which was made %s has the status “%s”', 'woocommerce' ), $order->get_order_number(), human_time_diff( strtotime( $order->order_date ), current_time( 'timestamp' ) ) . ' ' . __( 'ago', 'woocommerce' ), __( $status->name, 'woocommerce' ) );
|
||||
|
||||
if ($order->status == 'completed') $order_status_text .= ' ' . __('and was completed', 'woocommerce') . ' ' . human_time_diff(strtotime($order->completed_date), current_time('timestamp')).__(' ago', 'woocommerce');
|
||||
|
||||
|
|
Loading…
Reference in New Issue