add translators comments
This commit is contained in:
parent
cb0b487433
commit
55f08d62ae
|
@ -165,6 +165,7 @@ class WC_Admin_Duplicate_Product {
|
|||
|
||||
// Set title for variations
|
||||
if ( 'product_variation' === $post->post_type ) {
|
||||
/* translators: 1: variation id 2: product name */
|
||||
$post_title = sprintf( __( 'Variation #%1$s of %2$s', 'woocommerce' ), absint( $new_post_id ), esc_html( get_the_title( $post_parent ) ) );
|
||||
$wpdb->update(
|
||||
$wpdb->posts,
|
||||
|
|
|
@ -1185,6 +1185,7 @@ class WC_Meta_Box_Product_Data {
|
|||
$extension = pathinfo( $parsed_url, PATHINFO_EXTENSION );
|
||||
|
||||
if ( ! empty( $extension ) && ! in_array( $file_type['type'], $allowed_file_types ) ) {
|
||||
/* translators: 1: file url 2: allowed file types */
|
||||
WC_Admin_Meta_Boxes::add_error( sprintf( __( 'The downloadable file %1$s cannot be used as it does not have an allowed file type. Allowed types include: %2$s', 'woocommerce' ), '<code>' . basename( $file_url ) . '</code>', '<code>' . implode( ', ', array_keys( $allowed_file_types ) ) . '</code>' ) );
|
||||
continue;
|
||||
}
|
||||
|
@ -1309,6 +1310,7 @@ class WC_Meta_Box_Product_Data {
|
|||
$manage_stock = isset( $variable_manage_stock[ $i ] ) ? 'yes' : 'no';
|
||||
|
||||
// Generate a useful post title
|
||||
/* translators: 1: variation id 2: product name */
|
||||
$variation_post_title = sprintf( __( 'Variation #%1$s of %2$s', 'woocommerce' ), absint( $variation_id ), esc_html( get_the_title( $post_id ) ) );
|
||||
|
||||
// Update or Add post
|
||||
|
@ -1452,6 +1454,7 @@ class WC_Meta_Box_Product_Data {
|
|||
$extension = pathinfo( $parsed_url, PATHINFO_EXTENSION );
|
||||
|
||||
if ( ! empty( $extension ) && ! in_array( $file_type['type'], $allowed_file_types ) ) {
|
||||
/* translators: 1: variation id 2: file url 3: allowed file types */
|
||||
WC_Admin_Meta_Boxes::add_error( sprintf( __( '#%1$s – The downloadable file %2$s cannot be used as it does not have an allowed file type. Allowed types include: %3$s', 'woocommerce' ), $variation_id, '<code>' . basename( $file_url ) . '</code>', '<code>' . implode( ', ', array_keys( $allowed_file_types ) ) . '</code>' ) );
|
||||
continue;
|
||||
}
|
||||
|
@ -1459,6 +1462,7 @@ class WC_Meta_Box_Product_Data {
|
|||
|
||||
// Validate the file exists
|
||||
if ( 'relative' === $file_is && ! apply_filters( 'woocommerce_downloadable_file_exists', file_exists( $file_url ), $file_url ) ) {
|
||||
/* translators: 1: variation id 2: file url */
|
||||
WC_Admin_Meta_Boxes::add_error( sprintf( __( '#%1$s – The downloadable file %2$s cannot be used as it does not exist on the server.', 'woocommerce' ), $variation_id, '<code>' . $file_url . '</code>' ) );
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ $who_refunded = new WP_User( $refund->get_refunded_by() );
|
|||
|
||||
<td class="name">
|
||||
<?php
|
||||
/* translators: 1: refund id 2: date */
|
||||
printf( __( 'Refund #%1$s - %2$s', 'woocommerce' ), $refund->get_id(), date_i18n( get_option( 'date_format' ) . ', ' . get_option( 'time_format' ), $refund->get_date_created() ) );
|
||||
|
||||
if ( $who_refunded->exists() ) {
|
||||
|
|
|
@ -480,8 +480,10 @@ class WC_Admin_Report {
|
|||
}
|
||||
|
||||
if ( 'sales' === $type ) {
|
||||
/* translators: 1: total income 2: days */
|
||||
$tooltip = sprintf( __( 'Sold %1$s worth in the last %2$d days', 'woocommerce' ), strip_tags( wc_price( $total ) ), $days );
|
||||
} else {
|
||||
/* translators: 1: total items sold 2: days */
|
||||
$tooltip = sprintf( _n( 'Sold 1 item in the last %2$d days', 'Sold %1$d items in the last %2$d days', $total, 'woocommerce' ), $total, $days );
|
||||
}
|
||||
|
||||
|
|
|
@ -93,6 +93,7 @@ class WC_Report_Sales_By_Category extends WC_Admin_Report {
|
|||
}
|
||||
|
||||
$legend[] = array(
|
||||
/* translators: 1: total items sold 2: category name */
|
||||
'title' => sprintf( __( '%1$s sales in %2$s', 'woocommerce' ), '<strong>' . wc_price( $total ) . '</strong>', $category->name ),
|
||||
'color' => isset( $this->chart_colours[ $index ] ) ? $this->chart_colours[ $index ] : $this->chart_colours[0],
|
||||
'highlight_series' => $index,
|
||||
|
|
|
@ -1354,6 +1354,7 @@ class WC_REST_Products_Controller extends WC_REST_Posts_Controller {
|
|||
$variation_id = isset( $variation['id'] ) ? absint( $variation['id'] ) : 0;
|
||||
|
||||
// Generate a useful post title.
|
||||
/* translators: 1: variation id 2: product name */
|
||||
$variation_post_title = sprintf( __( 'Variation #%1$s of %2$s', 'woocommerce' ), $variation_id, esc_html( get_the_title( $product->id ) ) );
|
||||
|
||||
// Update or Add post.
|
||||
|
|
|
@ -1258,6 +1258,7 @@ class WC_API_Products extends WC_API_Resource {
|
|||
$variation_id = isset( $variation['id'] ) ? absint( $variation['id'] ) : 0;
|
||||
|
||||
// Generate a useful post title
|
||||
/* translators: 1: variation id 2: product name */
|
||||
$variation_post_title = sprintf( __( 'Variation #%1$s of %2$s', 'woocommerce' ), $variation_id, esc_html( get_the_title( $id ) ) );
|
||||
|
||||
// Update or Add post
|
||||
|
|
|
@ -1753,6 +1753,7 @@ class WC_API_Products extends WC_API_Resource {
|
|||
}
|
||||
|
||||
// Generate a useful post title
|
||||
/* translators: 1: variation id 2: product name */
|
||||
$variation_post_title = sprintf( __( 'Variation #%1$s of %2$s', 'woocommerce' ), $variation_id, esc_html( get_the_title( $id ) ) );
|
||||
|
||||
// Update or Add post
|
||||
|
|
|
@ -1529,6 +1529,7 @@ class WC_CLI_Product extends WC_CLI_Command {
|
|||
$variation_id = isset( $variation['id'] ) ? absint( $variation['id'] ) : 0;
|
||||
|
||||
// Generate a useful post title
|
||||
/* translators: 1: variation id 2: product name */
|
||||
$variation_post_title = sprintf( __( 'Variation #%1$s of %2$s', 'woocommerce' ), $variation_id, esc_html( get_the_title( $id ) ) );
|
||||
|
||||
// Update or Add post
|
||||
|
|
|
@ -108,6 +108,7 @@ class WC_Email_Cancelled_Order extends WC_Email {
|
|||
'recipient' => array(
|
||||
'title' => __( 'Recipient(s)', 'woocommerce' ),
|
||||
'type' => 'text',
|
||||
/* translators: %s: admin email */
|
||||
'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s.', 'woocommerce' ), '<code>' . esc_attr( get_option( 'admin_email' ) ) . '</code>' ),
|
||||
'placeholder' => '',
|
||||
'default' => '',
|
||||
|
@ -116,6 +117,7 @@ class WC_Email_Cancelled_Order extends WC_Email {
|
|||
'subject' => array(
|
||||
'title' => __( 'Subject', 'woocommerce' ),
|
||||
'type' => 'text',
|
||||
/* translators: %s: default subject */
|
||||
'description' => sprintf( __( 'This controls the email subject line. Leave blank to use the default subject: %s.', 'woocommerce' ), '<code>' . $this->subject . '</code>' ),
|
||||
'placeholder' => '',
|
||||
'default' => '',
|
||||
|
@ -124,6 +126,7 @@ class WC_Email_Cancelled_Order extends WC_Email {
|
|||
'heading' => array(
|
||||
'title' => __( 'Email heading', 'woocommerce' ),
|
||||
'type' => 'text',
|
||||
/* translators: %s: default heading */
|
||||
'description' => sprintf( __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: %s.', 'woocommerce' ), '<code>' . $this->heading . '</code>' ),
|
||||
'placeholder' => '',
|
||||
'default' => '',
|
||||
|
|
|
@ -1139,8 +1139,10 @@ function wc_reduce_stock_levels( $order_id ) {
|
|||
$item_name = $product->get_sku() ? $product->get_sku(): $item['product_id'];
|
||||
|
||||
if ( ! empty( $item['variation_id'] ) ) {
|
||||
/* translators: 1: item name 2: variation id 3: old stock quantity 4: new stock quantity */
|
||||
$order->add_order_note( sprintf( __( 'Item %1$s variation #%2$s stock reduced from %3$s to %4$s.', 'woocommerce' ), $item_name, $item['variation_id'], $new_stock + $qty, $new_stock ) );
|
||||
} else {
|
||||
/* translators: 1: item name 2: old stock quantity 3: new stock quantity */
|
||||
$order->add_order_note( sprintf( __( 'Item %1$s stock reduced from %2$s to %3$s.', 'woocommerce' ), $item_name, $new_stock + $qty, $new_stock ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
?>
|
||||
|
||||
<p><?php
|
||||
/* translators: 1: user display name 2: logout url */
|
||||
printf(
|
||||
__( 'Hello %1$s (not %1$s? <a href="%2$s">Sign out</a>)', 'woocommerce' ),
|
||||
'<strong>' . esc_html( $current_user->display_name ) . '</strong>',
|
||||
|
|
|
@ -62,7 +62,10 @@ if ( $customer_orders ) : ?>
|
|||
<?php echo wc_get_order_status_name( $order->get_status() ); ?>
|
||||
|
||||
<?php elseif ( 'order-total' === $column_id ) : ?>
|
||||
<?php echo sprintf( _n( '%1$s for %2$s item', '%1$s for %2$s items', $item_count, 'woocommerce' ), $order->get_formatted_order_total(), $item_count ); ?>
|
||||
<?php
|
||||
/* translators: 1: formatted order total 2: total order items */
|
||||
printf( _n( '%1$s for %2$s item', '%1$s for %2$s items', $item_count, 'woocommerce' ), $order->get_formatted_order_total(), $item_count );
|
||||
?>
|
||||
|
||||
<?php elseif ( 'order-actions' === $column_id ) : ?>
|
||||
<?php
|
||||
|
|
|
@ -58,7 +58,10 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
|
|||
<?php echo wc_get_order_status_name( $order->get_status() ); ?>
|
||||
|
||||
<?php elseif ( 'order-total' === $column_id ) : ?>
|
||||
<?php echo sprintf( _n( '%1$s for %2$s item', '%1$s for %2$s items', $item_count, 'woocommerce' ), $order->get_formatted_order_total(), $item_count ); ?>
|
||||
<?php
|
||||
/* translators: 1: formatted order total 2: total order items */
|
||||
printf( _n( '%1$s for %2$s item', '%1$s for %2$s items', $item_count, 'woocommerce' ), $order->get_formatted_order_total(), $item_count );
|
||||
?>
|
||||
|
||||
<?php elseif ( 'order-actions' === $column_id ) : ?>
|
||||
<?php
|
||||
|
|
|
@ -48,6 +48,7 @@ do_action( 'woocommerce_before_account_payment_methods', $has_methods ); ?>
|
|||
do_action( 'woocommerce_account_payment_methods_column_' . $column_id, $method );
|
||||
} elseif ( 'method' === $column_id ) {
|
||||
if ( ! empty( $method['method']['last4'] ) ) {
|
||||
/* translators: 1: credit card type 2: last 4 digits */
|
||||
echo sprintf( __( '%1$s ending in %2$s', 'woocommerce' ), esc_html( wc_get_credit_card_type_label( $method['method']['brand'] ) ), esc_html( $method['method']['last4'] ) );
|
||||
} else {
|
||||
echo esc_html( wc_get_credit_card_type_label( $method['method']['brand'] ) );
|
||||
|
|
|
@ -24,6 +24,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
?>
|
||||
<p><?php
|
||||
/* translators: 1: order number 2: order date 3: order status */
|
||||
printf(
|
||||
__( 'Order #%1$s was placed on %2$s and is currently %3$s.', 'woocommerce' ),
|
||||
'<mark class="order-number">' . $order->get_order_number() . '</mark>',
|
||||
|
|
|
@ -22,6 +22,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
?>
|
||||
|
||||
<p class="order-info"><?php
|
||||
/* translators: 1: order number 2: order date 3: order status */
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_order_tracking_status', sprintf(
|
||||
__( 'Order #%1$s was placed on %2$s and is currently %3$s.', 'woocommerce' ),
|
||||
'<mark class="order-number">' . $order->get_order_number() . '</mark>',
|
||||
|
|
|
@ -29,10 +29,12 @@ if ( ! comments_open() ) {
|
|||
<div id="reviews" class="woocommerce-Reviews">
|
||||
<div id="comments">
|
||||
<h2 class="woocommerce-Reviews-title"><?php
|
||||
if ( get_option( 'woocommerce_enable_review_rating' ) === 'yes' && ( $count = $product->get_review_count() ) )
|
||||
if ( get_option( 'woocommerce_enable_review_rating' ) === 'yes' && ( $count = $product->get_review_count() ) ) {
|
||||
/* translators: 1: reviews count 2: product name */
|
||||
printf( esc_html( _n( '%1$s review for %2$s', '%1$s reviews for %2$s', $count, 'woocommerce' ) ), $count, '<span>' . get_the_title() . '</span>' );
|
||||
else
|
||||
} else {
|
||||
_e( 'Reviews', 'woocommerce' );
|
||||
}
|
||||
?></h2>
|
||||
|
||||
<?php if ( have_comments() ) : ?>
|
||||
|
|
|
@ -35,12 +35,21 @@ if ( $rating_count > 0 ) : ?>
|
|||
<div class="woocommerce-product-rating">
|
||||
<div class="star-rating" title="<?php printf( __( 'Rated %s out of 5', 'woocommerce' ), $average ); ?>">
|
||||
<span style="width:<?php echo ( ( $average / 5 ) * 100 ); ?>%">
|
||||
<?php printf(
|
||||
<?php
|
||||
/* translators: 1: average rating 2: max rating (i.e. 5) */
|
||||
printf(
|
||||
__( '%1$s out of %2$s', 'woocommerce' ),
|
||||
'<strong class="rating">' . esc_html( $average ) . '</strong>',
|
||||
'<span>5</span>'
|
||||
); ?>
|
||||
<?php printf( _n( 'based on %s customer rating', 'based on %s customer ratings', $rating_count, 'woocommerce' ), '<span class="rating">' . $rating_count . '</span>' ); ?>
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
/* translators: %s: rating count */
|
||||
printf(
|
||||
_n( 'based on %s customer rating', 'based on %s customer ratings', $rating_count, 'woocommerce' ),
|
||||
'<span class="rating">' . $rating_count . '</span>'
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
<?php if ( comments_open() ) : ?><a href="#reviews" class="woocommerce-review-link" rel="nofollow">(<?php printf( _n( '%s customer review', '%s customer reviews', $review_count, 'woocommerce' ), '<span class="count">' . $review_count . '</span>' ); ?>)</a><?php endif ?>
|
||||
|
|
Loading…
Reference in New Issue