Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Handle translations on Cart/Checkout and Order Confirmation templates #9865

Closed
Tracked by #9288
wavvves opened this issue Jun 16, 2023 · 2 comments
Closed
Tracked by #9288

Handle translations on Cart/Checkout and Order Confirmation templates #9865

wavvves opened this issue Jun 16, 2023 · 2 comments
Assignees
Labels
focus: FSE Work related to prepare WooCommerce for FSE. focus: i18n The issue/PR is related to internationalization. focus: template Related to API powering block template functionality in the Site Editor

Comments

@wavvves
Copy link
Contributor

wavvves commented Jun 16, 2023

Part of Epic: Cart/Checkout/Order Received Templates #9288

Originating comment from code review

Template boilerplate code contains strings that need localization eg "You may be interested in…" on Cart template

There is a solution outlined for this:

Typically this is handled by putting this into a block pattern (which can be either dynamically loaded via PHP file - which is automatically handled by our loader system), or dynamically registered via PHP to include localized strings. Then you just put the pattern syntax in the .html template file. You'll just want to make sure the pattern is configured to not show up in the inserter.
This is how the default block themes (eg Twenty Twenty Three) handle default content that needs localized.

@wavvves wavvves added the focus: template Related to API powering block template functionality in the Site Editor label Jun 16, 2023
@nielslange
Copy link
Member

As for the outlined solution, on https://github.com/woocommerce/woocommerce-blocks/pull/6248/files an example implementation of @dinhtungdu can be found.

@nielslange nielslange added focus: i18n The issue/PR is related to internationalization. focus: FSE Work related to prepare WooCommerce for FSE. labels Jun 19, 2023
@mikejolley mikejolley self-assigned this Jun 19, 2023
@wavvves
Copy link
Contributor Author

wavvves commented Jun 26, 2023

Closing this as there is nothing to be addressed on Checkout and Order Confirmation templates after #9883

@wavvves wavvves closed this as completed Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: FSE Work related to prepare WooCommerce for FSE. focus: i18n The issue/PR is related to internationalization. focus: template Related to API powering block template functionality in the Site Editor
Projects
None yet
Development

No branches or pull requests

3 participants