Skip to content

Commit dd6d97a

Browse files
committed
Localization Improvements
Added some context strings where appropriate
1 parent 1280ba6 commit dd6d97a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ protected function render_currency_admin_notices() {
355355
'%s accepts payment in %s only. <a href="%s">Configure</a> WooCommerce to accept %s to enable this gateway for checkout.',
356356
'%s accepts payment in one of %s only. <a href="%s">Configure</a> WooCommerce to accept one of %s to enable this gateway for checkout.',
357357
count( $this->get_accepted_currencies() ),
358+
'(Plugin) accepts payments in (currency/currencies) only.',
358359
$this->text_domain
359360
),
360361
$this->get_plugin_name(),

woocommerce/payment-gateway/class-sv-wc-payment-gateway.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -556,10 +556,10 @@ public function init_form_fields() {
556556
'desc_tip' => __( 'Show Detailed Error Messages and API requests/responses on the checkout page and/or save them to the log for debugging purposes.', $this->text_domain ),
557557
'default' => self::DEBUG_MODE_OFF,
558558
'options' => array(
559-
self::DEBUG_MODE_OFF => __( 'Off', $this->text_domain ),
559+
self::DEBUG_MODE_OFF => _x( 'Off', 'Debug mode off', $this->text_domain ),
560560
self::DEBUG_MODE_CHECKOUT => __( 'Show on Checkout Page', $this->text_domain ),
561561
self::DEBUG_MODE_LOG => __( 'Save to Log', $this->text_domain ),
562-
self::DEBUG_MODE_BOTH => __( 'Both', $this->text_domain )
562+
self::DEBUG_MODE_BOTH => _x( 'Both', 'Debug mode both show on checkout and log', $this->text_domain )
563563
),
564564
);
565565

@@ -950,7 +950,7 @@ protected function get_order( $order_id ) {
950950
$order->payment->type = 'check';
951951
}
952952

953-
$order->description = sprintf( __( '%s - Order %s', $this->text_domain ), esc_html( get_bloginfo( 'name' ) ), $order->get_order_number() );
953+
$order->description = sprintf( _x( '%s - Order %s', 'Order description', $this->text_domain ), esc_html( get_bloginfo( 'name' ) ), $order->get_order_number() );
954954

955955
return $order;
956956
}
@@ -992,7 +992,7 @@ protected function mark_order_as_held( $order, $message ) {
992992
*/
993993
protected function mark_order_as_failed( $order, $error_message ) {
994994

995-
$order_note = sprintf( __( '%s Payment Failed (%s)', $this->text_domain ), $this->get_method_title(), $error_message );
995+
$order_note = sprintf( _x( '%s Payment Failed (%s)', 'Order Note: (Payment method) Payment failed (error)', $this->text_domain ), $this->get_method_title(), $error_message );
996996

997997
// Mark order as failed if not already set, otherwise, make sure we add the order note so we can detect when someone fails to check out multiple times
998998
if ( 'failed' != $order->status )

0 commit comments

Comments
 (0)