Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show "postal code check" label based on store country #9952

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/fix-9896-postal-code-label
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Localize postal code check label based on country.
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ exports[`Order details page should match the snapshot - Charge without payment i
<h4
class="payment-method-detail__label"
>
Zip check
Postal code check
</h4>
<p
class="payment-method-detail__value"
Expand Down
5 changes: 4 additions & 1 deletion client/payment-details/payment-method/card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ const CardDetails = ( { charge = {}, isLoading } ) => {

<Detail
isLoading={ isLoading }
label={ __( 'Zip check', 'woocommerce-payments' ) }
label={
/* translators: Label for results of a postal code (ZIP code, in US) check performed by a credit card issuer. */
__( 'Postal code check', 'woocommerce-payments' )
}
>
<Check checked={ postalCodeCheck } />
</Detail>
Expand Down
4 changes: 2 additions & 2 deletions client/payment-details/test/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ exports[`Payment details page should match the snapshot - Charge query param 1`]
aria-busy="true"
class="is-loadable-placeholder is-block"
>
Zip check
Postal code check
</span>
</h4>
<p
Expand Down Expand Up @@ -1048,7 +1048,7 @@ exports[`Payment details page should match the snapshot - Payment Intent query p
<h4
class="payment-method-detail__label"
>
Zip check
Postal code check
</h4>
<p
class="payment-method-detail__value"
Expand Down
4 changes: 4 additions & 0 deletions client/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
font-weight: normal;
line-height: 20px;
padding: 4px 0;

@media screen and ( max-width: 470px ) {
flex: 0 0 40%;
}
Comment on lines +108 to +110
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I included this change here because "Postal code check" does not look good in some mobile devices. You can test this change in a "iPhone 14 Pro Max" dimension.

}

&__value {
Expand Down
Loading