Closed asafm7 closed 1 year ago
We can reproduce this bug as well. In the backend it works, but in the frontend the translations for "Select %s" as well as "Reset" are not being picked up.
The WPML (the plugin used by us for translations) support appears to believe the cause is within WooCommerce (see here ).
Thanks, @KMaen. What should we do next? Is it possible to move the ticket to the WooCommerce repository?
Thanks for reporting this issue @asafm7 and @KMaen! I was able to reproduce, it seems to be a regression between WC 7.7 and 7.8. We will investigate it further.
Ok, I could track down the issue was introduced in https://github.com/woocommerce/woocommerce-blocks/pull/9251, so it surfaced in WC Blocks 10.2.2, which was merged into WC core 7.8. @mikejolley do you have any idea how this issue might be connected to #9251?
@Aljullu Could it be https://github.com/woocommerce/woocommerce-blocks/pull/9251/files#diff-5b749f2e4cfcc785201c38c22ea248c572d62fb45baab56305029839ebd7b532R34-R36
There is some i18n handling that relies on get_block_type_script
, but these components have no frontend script file built which results in a 404 for the script unless the above function returns null. Maybe these filters need custom handling to load the localisation files?
@KMaen @asafm7 heads up that this has been fixed in trunk
(see https://github.com/woocommerce/woocommerce-blocks/pull/9954) and we will deploy a fixed release soon.
~If getting the fix is really urgent, I would suggest installing the WC Blocks plugin, as the fix will be available there faster than in WC core.~ Update: it might be released in WC core first.
And thanks again for reporting this issue, reports like this are super valuable in order to improve WooCommerce.
Wonderful. Thanks for fixing it so fast.
Great. Thanks @Aljullu
Describe the bug
The Filter by Attribute block has a
Select %s
translatable string for the placeholder (For example "Select Color").I used Loco to translate it to just
%s
, so the placeholder would read simply "Color".That used to work until the recent WooCommerce update.
After the update, the placeholder reads "Select Color" again.
I've verified the string is still translated on Loco, synced the translation, and saved it - it didn't help.
If relevant, the block is placed on the front page.
Tested with Twenty Twenty Three and all other plugins deactivated.
To reproduce
Steps to reproduce the behavior:
Try to translate the
Select %s
WooCommerce string using Loco.Expected behavior
The translation should have been seen on the front end.
Screenshots
Environment
WordPress Environment
WordPress address (URL): https://staging.hobbies4.life Site address (URL): https://staging.hobbies4.life WC Version: 7.8.0 REST API Version: ✔ 7.8.0 WC Blocks Version: ✔ 10.2.3 Action Scheduler Version: ✔ 3.5.4 Log Directory Writable: ✔ WP Version: 6.2.2 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: ✔ WP Cron: – Language: en_US External object cache: –
Server Environment
Server Info: LiteSpeed PHP Version: 8.0.28 PHP Post Max Size: 64 MB PHP Time Limit: 300 PHP Max Input Vars: 1800 cURL Version: 8.1.2 OpenSSL/1.1.1u
SUHOSIN Installed: – MySQL Version: 10.3.38-MariaDB-cll-lve Max Upload Size: 64 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔
Database
WC Database Version: 7.8.0 WC Database Prefix: whHhGW_ Total Database Size: 35.97MB Database Data Size: 25.37MB Database Index Size: 10.60MB whHhGW_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB whHhGW_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB whHhGW_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB whHhGW_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB whHhGW_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB whHhGW_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB whHhGW_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB whHhGW_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_actionscheduler_actions: Data: 0.06MB + Index: 0.11MB + Engine InnoDB whHhGW_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_actionscheduler_logs: Data: 0.05MB + Index: 0.03MB + Engine InnoDB whHhGW_cky_banners: Data: 0.05MB + Index: 0.00MB + Engine InnoDB whHhGW_cky_cookies: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_cky_cookie_categories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_cmplz_cookiebanners: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_cmplz_cookies: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_cmplz_services: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB whHhGW_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB whHhGW_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_litespeed_avatar: Data: 0.02MB + Index: 0.03MB + Engine InnoDB whHhGW_litespeed_img_optming: Data: 0.02MB + Index: 0.05MB + Engine InnoDB whHhGW_litespeed_url: Data: 0.08MB + Index: 0.08MB + Engine InnoDB whHhGW_litespeed_url_file: Data: 0.06MB + Index: 0.08MB + Engine InnoDB whHhGW_options: Data: 4.05MB + Index: 0.14MB + Engine InnoDB whHhGW_postmeta: Data: 2.52MB + Index: 3.03MB + Engine InnoDB whHhGW_posts: Data: 7.52MB + Index: 0.25MB + Engine InnoDB whHhGW_relevanssi: Data: 2.52MB + Index: 4.55MB + Engine InnoDB whHhGW_relevanssi_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_relevanssi_stopwords: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_termmeta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB whHhGW_terms: Data: 0.05MB + Index: 0.03MB + Engine InnoDB whHhGW_term_relationships: Data: 0.09MB + Index: 0.06MB + Engine InnoDB whHhGW_term_taxonomy: Data: 0.28MB + Index: 0.03MB + Engine InnoDB whHhGW_tinvwl_analytics: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_tinvwl_items: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_tinvwl_lists: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_usermeta: Data: 0.09MB + Index: 0.03MB + Engine InnoDB whHhGW_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB whHhGW_vrts_alerts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_vrts_tests: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB whHhGW_wc_admin_note_actions: Data: 0.28MB + Index: 0.05MB + Engine InnoDB whHhGW_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB whHhGW_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB whHhGW_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB whHhGW_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB whHhGW_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB whHhGW_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB whHhGW_wc_product_attributes_lookup: Data: 0.11MB + Index: 0.09MB + Engine InnoDB whHhGW_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB whHhGW_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_wfblockediplog: Data: 0.06MB + Index: 0.00MB + Engine InnoDB whHhGW_wfblocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB whHhGW_wfconfig: Data: 0.47MB + Index: 0.00MB + Engine InnoDB whHhGW_wfcrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_wffilechanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_wffilemods: Data: 0.16MB + Index: 0.00MB + Engine InnoDB whHhGW_wfhits: Data: 0.41MB + Index: 0.17MB + Engine InnoDB whHhGW_wfhoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_wfissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB whHhGW_wfknownfilelist: Data: 4.52MB + Index: 0.00MB + Engine InnoDB whHhGW_wflivetraffichuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_wflocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_wflogins: Data: 0.16MB + Index: 0.06MB + Engine InnoDB whHhGW_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_wfls_role_counts: Data: 0.00MB + Index: 0.00MB + Engine MEMORY whHhGW_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_wfnotifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_wfpendingissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB whHhGW_wfreversecache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_wfsnipcache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB whHhGW_wfstatus: Data: 0.13MB + Index: 0.09MB + Engine InnoDB whHhGW_wftrafficrates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_wfwaffailures: Data: 0.02MB + Index: 0.00MB + Engine InnoDB whHhGW_yoast_indexable: Data: 0.16MB + Index: 0.09MB + Engine InnoDB whHhGW_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB whHhGW_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB whHhGW_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB whHhGW_yoast_prominent_words: Data: 0.02MB + Index: 0.05MB + Engine InnoDB whHhGW_yoast_seo_links: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
Post Type Counts
acf-field: 80 acf-field-group: 4 acf-taxonomy: 1 attachment: 162 customize_changeset: 8 hobby: 4 oembed_cache: 51 page: 15 post: 7 product: 56 revision: 610 wp_block: 2 wp_global_styles: 6 wp_navigation: 2 wp_template: 8 wp_template_part: 3 wpcode: 6
Security
Secure connection (HTTPS): ✔ Hide errors from visitors: ❌Error messages should not be shown to visitors.
Active Plugins (2)
Loco Translate: by Tim Whitlock – 2.6.4 WooCommerce: by Automattic – 7.8.0
Inactive Plugins (20)
ACF Content Analysis for Yoast SEO: by Thomas Kräftner ViktorFroberg marol87 pekz0r angrycreative Team Yoast – 3.1
Advanced Custom Fields PRO: by WP Engine – 6.1.6 Akismet Anti-Spam: by Automattic – 5.1 Bing Webmaster Url Submission: by Bing Webmaster – 1.0.13 Cloudflare: by Cloudflare Inc. – 4.12.0
Complianz | GDPR/CCPA Cookie Consent: by Really Simple Plugins – 6.4.7 CookieYes | GDPR Cookie Consent: by CookieYes – 3.0.9 IndexNow: by Microsoft Bing – 1.0.1 Jetpack: by Automattic – 12.2.1 LiteSpeed Cache: by LiteSpeed Technologies – 5.4 Mailgun: by Mailgun – 1.9.4 Performance Lab: by WordPress Performance Team – 2.3.0 Relevanssi: by Mikko Saari – 4.20.0 Site Kit by Google: by Google – 1.102.0 TI WooCommerce Wishlist: by TemplateInvaders – 2.6.0 UpdraftPlus - Backup/Restore: by UpdraftPlus.Com DavidAnderson – 1.23.4
VRTs – Visual Regression Tests: by Bleech – 1.4.0 Wordfence Security: by Wordfence – 7.9.3 Yoast SEO: by Team Yoast – 20.9 Yoast SEO Premium: by Team Yoast – 20.7
Settings
API Enabled: – Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable)
Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5)
Connected to WooCommerce.com: – Enforce Approved Product Download Directories: ✔ HPOS feature screen enabled: – HPOS feature enabled: – Order datastore: WC_Order_Data_Store_CPT HPOS data sync enabled: –
WC Pages
Shop base: ❌ Page visibility should be public Cart: ❌ Page visibility should be public Checkout: ❌ Page visibility should be public My account: ❌ Page visibility should be public Terms and conditions: ❌ Page not set
Theme
Name: Twenty Twenty-Three Version: 1.1 Author URL: https://wordpress.org Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔
Templates
Overrides: –
Admin
Enabled Features: activity-panels analytics product-block-editor coupons customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page
Disabled Features: core-profiler minified-js new-product-management-experience product-variation-management settings async-product-editor-category-field
Daily Cron: ✔ Next scheduled: 2023-06-17 14:56:39 +01:00 Options: ✔ Notes: 82 Onboarding: skipped
Action Scheduler
Canceled: 1 Oldest: 2023-06-01 16:57:13 +0100 Newest: 2023-06-01 16:57:13 +0100
Complete: 67 Oldest: 2023-05-17 16:44:20 +0100 Newest: 2023-06-17 11:26:54 +0100
Failed: 9 Oldest: 2023-04-12 15:59:56 +0100 Newest: 2023-06-01 14:52:29 +0100
Pending: 1 Oldest: 2023-06-17 17:39:02 +0100 Newest: 2023-06-17 17:39:02 +0100
Status report information
Generated at: 2023-06-17 11:34:22 +01:00 `
Desktop:
Smartphone:
Additional context
If relevant, the block is placed on the front page.
Tested with Twenty Twenty Three and all other plugins deactivated.