• Resolved Theo Gkitsos

    (@theogk)


    Hello! Thank you for your work on this plugin, it seems to improve speed indeed.

    I have a weird problem thought when I enable this plugin. When I set the WP language to Greek, then all WooCommerce string translations appear correctly, except for one specific string.

    It’s the string “Product” and it fails on all spots it appears, both backend and frontend (see screenshots). Also note that this string has plural version as well.

    Screenshots:
    Cart comparison
    Checkout
    Backend – order edit page

    • I use WP 6.4, WC 8.5.2, Storefront theme and no other plugins, only WooCommerce and Performant Translations (no Loco Translate, or translation plugins)
    • I haven’t notice any other string translation failing, but I haven’t checked everything.
    • I check this on multiple installations, the problem appears everytime. Deleting translations and fetching them again, or any try to reset translations, doesn’t fix the issue.

    The problematic sting location in WC 8.5.2 .pot file:

    #: includes/admin/importers/views/html-csv-import-done.php:77
    #: includes/admin/list-tables/class-wc-admin-list-table-orders.php:259
    #: includes/admin/meta-boxes/views/html-order-items.php:407
    #: includes/admin/reports/class-wc-report-downloads.php:84
    #: includes/admin/reports/class-wc-report-downloads.php:219
    #: includes/admin/reports/class-wc-report-stock.php:173
    #: includes/class-wc-emails.php:447
    #: includes/class-wc-post-types.php:323
    #: includes/class-wc-privacy-exporters.php:355
    #: includes/data-stores/class-wc-product-data-store-cpt.php:122
    #: includes/wc-account-functions.php:221
    #: src/Admin/API/Leaderboards.php:351
    #: src/Blocks/BlockTypes/OrderConfirmation/Totals.php:38
    #: src/Internal/Admin/ProductReviews/ReviewsListTable.php:618
    #: templates/cart/cart.php:30
    #: templates/cart/cart.php:87
    #: templates/checkout/form-pay.php:27
    #: templates/checkout/review-order.php:23
    #: templates/emails/email-order-details.php:42
    #: templates/order/order-details.php:52
    #: assets/client/admin/app/index.js:2
    #: assets/client/admin/chunks/analytics-report-categories.js:1
    #: assets/client/admin/chunks/analytics-report-downloads.js:1
    #: assets/client/admin/chunks/analytics-report-orders.js:1
    #: assets/client/admin/chunks/analytics-report-products.js:1
    #: assets/client/admin/chunks/analytics-report-stock.js:1
    #: assets/client/admin/chunks/dashboard-charts.js:1
    #: assets/client/admin/product-editor/blocks/product-fields/product-list/edit.js:1
    #: assets/client/admin/product-editor/index.js:2
    #: assets/client/blocks/all-reviews.js:3
    #: assets/client/blocks/cart-blocks/cart-line-items-frontend.js:11
    #: assets/client/blocks/cart.js:12
    #: assets/client/blocks/legacy-template.js:7
    #: assets/client/blocks/mini-cart-contents-block/products-table-frontend.js:11
    #: assets/client/blocks/mini-cart-contents.js:13
    #: assets/client/blocks/order-confirmation-downloads.js:1
    #: assets/client/blocks/order-confirmation-totals.js:1
    #: assets/client/blocks/reviews-by-category.js:14
    #: assets/client/blocks/reviews-by-product.js:14
    #: assets/client/blocks/single-product.js:9
    msgid "Product"
    msgid_plural "Products"
    msgstr[0] ""
    msgstr[1] ""

    Thank you

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pascal Birchler

    (@swissspidy)

    Heya, thanks a lot for your report!

    Turns out this is somewhat a bug, but also WooCommerce doing it wrong. They use translation calls such as _n( 'Product', 'Products', products, 'woocommerce' ) without any %d placeholder, and then also use __( 'Product', 'woocommerce' ), expecting both to have the same translation.

    While they are doing this wrong, it’s something that used to work, so better not to break it! I will fix this immediately.

    Thanks again!

    Plugin Author Pascal Birchler

    (@swissspidy)

    I just released 1.1.0 which addresses this issue!

    Thread Starter Theo Gkitsos

    (@theogk)

    Thanks for the quick fix, it’s working fine now! I’m always happy to help, I will keep testing PT.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Specific WooCommerce string translation fails to appear’ is closed to new replies.