Direction characters (i18n, RLT, a11y) (#12177)

* RTL+i18n: product title stricture as translation string to allow RTL languages to change `→` TO `←`

* i18n: move the `→` into the translation string to allow RTL languages to translate to `←`

* RTL: product filter indent using `→` and `←` chars

* a11y: remove `←` char, it's a bad accessibility practice to use visual indicators to point to menus

* a11y: remove `←` char, it's a bad accessibility practice to use visual indicators to point to menus
This commit is contained in:
Rami Yushuvaev 2016-10-26 02:34:50 +03:00 committed by Claudio Sanches
parent ad349ad89c
commit 59dc477a20
5 changed files with 11 additions and 10 deletions

View File

@ -1653,7 +1653,7 @@ class WC_Admin_Post_Types {
$output .= selected( 'downloadable', $wp_query->query['product_type'], false );
}
$output .= '> &rarr; ' . __( 'Downloadable', 'woocommerce' ) . '</option>';
$output .= '> ' . ( is_rtl() ? '&larr;' : '&rarr;' ) . ' ' . __( 'Downloadable', 'woocommerce' ) . '</option>';
$output .= '<option value="virtual" ';
@ -1661,7 +1661,7 @@ class WC_Admin_Post_Types {
$output .= selected( 'virtual', $wp_query->query['product_type'], false );
}
$output .= '> &rarr; ' . __( 'Virtual', 'woocommerce' ) . '</option>';
$output .= '> ' . ( is_rtl() ? '&larr;' : '&rarr;' ) . ' ' . __( 'Virtual', 'woocommerce' ) . '</option>';
}
}

View File

@ -210,9 +210,9 @@ class WC_Meta_Box_Order_Data {
<p class="form-field form-field-wide wc-order-status"><label for="order_status"><?php _e( 'Order status:', 'woocommerce' ) ?> <?php
if ( $order->needs_payment() ) {
printf( '<a href="%s">%s &rarr;</a>',
printf( '<a href="%s">%s</a>',
esc_url( $order->get_checkout_payment_url() ),
__( 'Customer payment page', 'woocommerce' )
__( 'Customer payment page &rarr;', 'woocommerce' )
);
}
?></label>
@ -233,9 +233,9 @@ class WC_Meta_Box_Order_Data {
'post_type' => 'shop_order',
'_customer_user' => absint( $order->get_user_id() ),
);
printf( '<a href="%s">%s &rarr;</a>',
printf( '<a href="%s">%s</a>',
esc_url( add_query_arg( $args, admin_url( 'edit.php' ) ) ),
__( 'View other orders', 'woocommerce' )
__( 'View other orders &rarr;', 'woocommerce' )
);
}
?></label>

View File

@ -279,7 +279,7 @@ class WC_Report_Sales_By_Category extends WC_Admin_Report {
if ( empty( $this->show_categories ) ) {
?>
<div class="chart-container">
<p class="chart-prompt"><?php _e( '&larr; Choose a category to view stats', 'woocommerce' ); ?></p>
<p class="chart-prompt"><?php _e( 'Choose a category to view stats', 'woocommerce' ); ?></p>
</div>
<?php
} else {

View File

@ -391,7 +391,7 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
if ( empty( $this->product_ids ) ) {
?>
<div class="chart-container">
<p class="chart-prompt"><?php _e( '&larr; Choose a product to view stats', 'woocommerce' ); ?></p>
<p class="chart-prompt"><?php _e( 'Choose a product to view stats', 'woocommerce' ); ?></p>
</div>
<?php
} else {

View File

@ -51,7 +51,7 @@ class WC_Product_Simple extends WC_Product {
}
/**
* Get the title of the post.
* Get the title of the product.
*
* @return string
*/
@ -60,7 +60,8 @@ class WC_Product_Simple extends WC_Product {
$title = $this->post->post_title;
if ( $this->get_parent() > 0 ) {
$title = get_the_title( $this->get_parent() ) . ' &rarr; ' . $title;
/* translators: 1: parent product title 2: product title */
$title = sprintf( __( '%1$s &rarr; %2$s' , 'woocommerce' ), get_the_title( $this->get_parent() ), $title );
}
return apply_filters( 'woocommerce_product_title', $title, $this );