-
Notifications
You must be signed in to change notification settings - Fork 2k
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
VAT Info: Use string interpolation for tax names #75044
VAT Info: Use string interpolation for tax names #75044
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~388 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7892983 Thank you @sirbrillig for including a screenshot in the description! This is really helpful for our translators. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, excellent implementation of useQuery TIL!
Translation for this Pull Request has now been finished. |
11f5717
to
bf5c406
Compare
Proposed Changes
This is a follow-up to #74538 which localized the "VAT" term in checkout. Because the name of VAT changes based on country, it would be better to use a localized term. In #73686 we modified the labels for the VAT form use use the more generic term "Business Tax", but this is still a little unclear.
In this PR we switch each of these labels to replace "Business Tax" with the selected country's term for VAT (eg: "GST", "CT", etc.) on the user-level VAT form.
NOTE: This can only localize once a country is selected... which means that the button to reach the form will always read "Add VAT details" before the user reaches the form. To resolve that case, we use the useGeoLocationQuery() hook to provide a fallback country.
This is part of https://github.com/Automattic/payments-shilling/issues/1475 and https://github.com/Automattic/payments-shilling/issues/1474
Screenshots
Testing Instructions
/me/purchases/vat-details
./me/purchases/billing
and set your geolocation (eg: using a VPN) to somewhere that is in a country that does not use "VAT" (eg: Australia).