Use Woo Blocks instead Woo core translation within the Checkout order Summary block (https://github.com/woocommerce/woocommerce-blocks/pull/7995)

* Use Woo Blocks instead Woo core translation

* Activale previously skipped e2e tests

* Adjust loading order of $shared_chunks, $vendor_chunks and $chunks

* Revert chunk order of MiniCart.php
This commit is contained in:
Niels Lange 2022-12-23 19:54:04 +07:00 committed by GitHub
parent aae39f5266
commit 46f0330a0a
3 changed files with 3 additions and 5 deletions

View File

@ -250,8 +250,7 @@ class Cart extends AbstractBlock {
parent::register_block_type_assets();
$chunks = $this->get_chunks_paths( $this->chunks_folder );
$vendor_chunks = $this->get_chunks_paths( 'vendors--cart-blocks' );
$this->register_chunk_translations( array_merge( $chunks, $vendor_chunks ) );
$this->register_chunk_translations( array_merge( $vendor_chunks, $chunks ) );
}
/**

View File

@ -415,8 +415,7 @@ class Checkout extends AbstractBlock {
parent::register_block_type_assets();
$chunks = $this->get_chunks_paths( $this->chunks_folder );
$vendor_chunks = $this->get_chunks_paths( 'vendors--cart-blocks' );
$shared_chunks = [ 'cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping-frontend' ];
$this->register_chunk_translations( array_merge( $chunks, $vendor_chunks, $shared_chunks ) );
$this->register_chunk_translations( array_merge( $vendor_chunks, $chunks ) );
}
/**

View File

@ -53,7 +53,7 @@ describe( 'Shopper → Cart & Checkout → Translations', () => {
} );
// The translation of WooCommerce Core is taking over translations of WC Blocks. We have to fix this issue https://github.com/woocommerce/woocommerce-blocks/issues/7775 before we can enable this test.
it.skip( 'User can view translated Checkout block', async () => {
it( 'User can view translated Checkout block', async () => {
await shopper.block.goToCheckout();
const contactHeading = await page.$(