Skip to content

Commit

Permalink
change to use sentence cases for "Sales Channel" and "Online Store"
Browse files Browse the repository at this point in the history
+ update snapshots
  • Loading branch information
htdat committed Feb 27, 2025
1 parent 2fb5c45 commit f807473
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ exports[`Order details page should match the snapshot - Charge without payment i
class="woocommerce-list__item-content"
>
<span>
Online Store
Online store
</span>
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ exports[`PaymentDetailsSummary capture notification and fraud buttons renders ca
class="woocommerce-list__item-content"
>
<span>
Online Store
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -514,7 +514,7 @@ exports[`PaymentDetailsSummary capture notification and fraud buttons renders th
class="woocommerce-list__item-content"
>
<span>
Online Store
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -874,7 +874,7 @@ exports[`PaymentDetailsSummary correctly renders a charge 1`] = `
class="woocommerce-list__item-content"
>
<span>
Online Store
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -1185,7 +1185,7 @@ exports[`PaymentDetailsSummary correctly renders when payment intent is missing
class="woocommerce-list__item-content"
>
<span>
Online Store
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -1510,7 +1510,7 @@ exports[`PaymentDetailsSummary order missing notice does not render notice if or
class="woocommerce-list__item-content"
>
<span>
Online Store
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -1835,7 +1835,7 @@ exports[`PaymentDetailsSummary order missing notice renders notice if order miss
class="woocommerce-list__item-content"
>
<span>
Online Store
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -2183,7 +2183,7 @@ exports[`PaymentDetailsSummary renders a charge with subscriptions 1`] = `
class="woocommerce-list__item-content"
>
<span>
Online Store
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -2512,7 +2512,7 @@ exports[`PaymentDetailsSummary renders fully refunded information for a charge 1
class="woocommerce-list__item-content"
>
<span>
Online Store
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -2780,7 +2780,7 @@ exports[`PaymentDetailsSummary renders loading state 1`] = `
class="woocommerce-list__item-content"
>
<span>
Online Store
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -3084,7 +3084,7 @@ exports[`PaymentDetailsSummary renders partially refunded information for a char
class="woocommerce-list__item-content"
>
<span>
Online Store
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -3734,7 +3734,7 @@ exports[`PaymentDetailsSummary renders the information of a dispute-reversal cha
class="woocommerce-list__item-content"
>
<span>
Online Store
Online store
</span>
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ exports[`Payment details page should match the snapshot - Payment Intent query p
class="woocommerce-list__item-content"
>
<span>
Online Store
Online store
</span>
</span>
</div>
Expand Down
11 changes: 5 additions & 6 deletions client/transactions/filters/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ export const getAdvancedFilters = (
},
channel: {
labels: {
add: __( 'Sales Channel', 'woocommerce-payments' ),
add: __( 'Sales channel', 'woocommerce-payments' ),
remove: __(
'Remove transaction sales channel filter',
'woocommerce-payments'
Expand All @@ -451,15 +451,14 @@ export const getAdvancedFilters = (
'Select a transaction sales channel filter match',
'woocommerce-payments'
),
/* translators: A sentence describing a Transaction Sales Channel filter. */
title:
wooCommerceVersion < 7.8
? __(
'{{title}}Sales Channel{{/title}} {{rule /}} {{filter /}}',
'{{title}}Sales channel{{/title}} {{rule /}} {{filter /}}',
'woocommerce-payments'
)
: __(
'<title>Sales Channel</title> <rule /> <filter />',
'<title>Sales channel</title> <rule /> <filter />',
'woocommerce-payments'
),
filter: __(
Expand All @@ -473,7 +472,7 @@ export const getAdvancedFilters = (
/* translators: Sentence fragment, logical, "Is" refers to searching for transactions matching a chosen transaction sales channel type. */
label: _x(
'Is',
'Sales Channel',
'Sales channel',
'woocommerce-payments'
),
},
Expand All @@ -482,7 +481,7 @@ export const getAdvancedFilters = (
/* translators: Sentence fragment, logical, "Is not" refers to searching for transactions that don\'t match a chosen transaction sales channel type. */
label: _x(
'Is not',
'Sales Channel',
'Sales channel',
'woocommerce-payments'
),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ HTMLOptionsCollection [
<option
value="online"
>
Online Store
Online store
</option>,
<option
value="in_person"
Expand Down
2 changes: 1 addition & 1 deletion client/transactions/filters/test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ describe( 'Transactions filters', () => {
let ruleSelector: HTMLElement;

beforeEach( () => {
addAdvancedFilter( 'Sales Channel' );
addAdvancedFilter( 'Sales channel' );
ruleSelector = screen.getByRole( 'combobox', {
name: /transaction sales channel filter/i,
} );
Expand Down
4 changes: 2 additions & 2 deletions client/transactions/list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ const getColumns = (
},
{
key: 'channel',
label: __( 'Sales Channel', 'woocommerce-payments' ),
screenReaderLabel: __( 'Sales Channel', 'woocommerce-payments' ),
label: __( 'Sales channel', 'woocommerce-payments' ),
screenReaderLabel: __( 'Sales channel', 'woocommerce-payments' ),
required: true,
isLeftAligned: true,
},
Expand Down
46 changes: 23 additions & 23 deletions client/transactions/list/test/__snapshots__/index.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,12 @@ exports[`Transactions list renders correctly when can filter by several currenci
<span
aria-hidden="true"
>
Sales Channel
Sales channel
</span>
<span
class="screen-reader-text"
>
Sales Channel
Sales channel
</span>
</th>
<th
Expand Down Expand Up @@ -522,7 +522,7 @@ exports[`Transactions list renders correctly when can filter by several currenci
href="admin.php?page=wc-admin&path=%2Fpayments%2Ftransactions%2Fdetails&id=pi_mock&transaction_id=txn_j23jda9JJa&transaction_type=refund"
tabindex="-1"
>
Online Store
Online store
</a>
</td>
<td
Expand Down Expand Up @@ -680,7 +680,7 @@ exports[`Transactions list renders correctly when can filter by several currenci
href="admin.php?page=wc-admin&path=%2Fpayments%2Ftransactions%2Fdetails&id=pi_mock&transaction_id=txn_oa9kaKaa8&transaction_type=charge"
tabindex="-1"
>
Online Store
Online store
</a>
</td>
<td
Expand Down Expand Up @@ -1284,12 +1284,12 @@ exports[`Transactions list renders correctly when filtered by currency 1`] = `
<span
aria-hidden="true"
>
Sales Channel
Sales channel
</span>
<span
class="screen-reader-text"
>
Sales Channel
Sales channel
</span>
</th>
<th
Expand Down Expand Up @@ -1515,7 +1515,7 @@ exports[`Transactions list renders correctly when filtered by currency 1`] = `
href="admin.php?page=wc-admin&path=%2Fpayments%2Ftransactions%2Fdetails&id=pi_mock&transaction_id=txn_j23jda9JJa&transaction_type=refund"
tabindex="-1"
>
Online Store
Online store
</a>
</td>
<td
Expand Down Expand Up @@ -1673,7 +1673,7 @@ exports[`Transactions list renders correctly when filtered by currency 1`] = `
href="admin.php?page=wc-admin&path=%2Fpayments%2Ftransactions%2Fdetails&id=pi_mock&transaction_id=txn_oa9kaKaa8&transaction_type=charge"
tabindex="-1"
>
Online Store
Online store
</a>
</td>
<td
Expand Down Expand Up @@ -2274,12 +2274,12 @@ exports[`Transactions list renders correctly when filtered by payout 1`] = `
<span
aria-hidden="true"
>
Sales Channel
Sales channel
</span>
<span
class="screen-reader-text"
>
Sales Channel
Sales channel
</span>
</th>
<th
Expand Down Expand Up @@ -2489,7 +2489,7 @@ exports[`Transactions list renders correctly when filtered by payout 1`] = `
href="admin.php?page=wc-admin&path=%2Fpayments%2Ftransactions%2Fdetails&id=pi_mock&transaction_id=txn_oa9kaKaa8&transaction_type=charge"
tabindex="-1"
>
Online Store
Online store
</a>
</td>
<td
Expand Down Expand Up @@ -2955,12 +2955,12 @@ exports[`Transactions list subscription column renders correctly 1`] = `
<span
aria-hidden="true"
>
Sales Channel
Sales channel
</span>
<span
class="screen-reader-text"
>
Sales Channel
Sales channel
</span>
</th>
<th
Expand Down Expand Up @@ -3202,7 +3202,7 @@ exports[`Transactions list subscription column renders correctly 1`] = `
href="admin.php?page=wc-admin&path=%2Fpayments%2Ftransactions%2Fdetails&id=pi_mock&transaction_id=txn_j23jda9JJa&transaction_type=refund"
tabindex="-1"
>
Online Store
Online store
</a>
</td>
<td
Expand Down Expand Up @@ -3370,7 +3370,7 @@ exports[`Transactions list subscription column renders correctly 1`] = `
href="admin.php?page=wc-admin&path=%2Fpayments%2Ftransactions%2Fdetails&id=pi_mock&transaction_id=txn_oa9kaKaa8&transaction_type=charge"
tabindex="-1"
>
Online Store
Online store
</a>
</td>
<td
Expand Down Expand Up @@ -4022,12 +4022,12 @@ exports[`Transactions list when not filtered by payout renders correctly 1`] = `
<span
aria-hidden="true"
>
Sales Channel
Sales channel
</span>
<span
class="screen-reader-text"
>
Sales Channel
Sales channel
</span>
</th>
<th
Expand Down Expand Up @@ -4253,7 +4253,7 @@ exports[`Transactions list when not filtered by payout renders correctly 1`] = `
href="admin.php?page=wc-admin&path=%2Fpayments%2Ftransactions%2Fdetails&id=pi_mock&transaction_id=txn_j23jda9JJa&transaction_type=refund"
tabindex="-1"
>
Online Store
Online store
</a>
</td>
<td
Expand Down Expand Up @@ -4411,7 +4411,7 @@ exports[`Transactions list when not filtered by payout renders correctly 1`] = `
href="admin.php?page=wc-admin&path=%2Fpayments%2Ftransactions%2Fdetails&id=pi_mock&transaction_id=txn_oa9kaKaa8&transaction_type=charge"
tabindex="-1"
>
Online Store
Online store
</a>
</td>
<td
Expand Down Expand Up @@ -5057,12 +5057,12 @@ exports[`Transactions list when not filtered by payout renders table summary onl
<span
aria-hidden="true"
>
Sales Channel
Sales channel
</span>
<span
class="screen-reader-text"
>
Sales Channel
Sales channel
</span>
</th>
<th
Expand Down Expand Up @@ -5288,7 +5288,7 @@ exports[`Transactions list when not filtered by payout renders table summary onl
href="admin.php?page=wc-admin&path=%2Fpayments%2Ftransactions%2Fdetails&id=pi_mock&transaction_id=txn_j23jda9JJa&transaction_type=refund"
tabindex="-1"
>
Online Store
Online store
</a>
</td>
<td
Expand Down Expand Up @@ -5446,7 +5446,7 @@ exports[`Transactions list when not filtered by payout renders table summary onl
href="admin.php?page=wc-admin&path=%2Fpayments%2Ftransactions%2Fdetails&id=pi_mock&transaction_id=txn_oa9kaKaa8&transaction_type=charge"
tabindex="-1"
>
Online Store
Online store
</a>
</td>
<td
Expand Down
2 changes: 1 addition & 1 deletion client/transactions/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const sourceDevice = {

// Mapping of transaction channel type string.
export const channel = {
online: __( 'Online Store', 'woocommerce-payments' ),
online: __( 'Online store', 'woocommerce-payments' ),
in_person: __( 'In-Person', 'woocommerce-payments' ),
in_person_pos: __( 'In-Person (POS)', 'woocommerce-payments' ),
};
Expand Down
Loading

0 comments on commit f807473

Please sign in to comment.