• Resolved pumka

    (@pumka)


    We found that “Available on backorder” product status text was not translated on out site. As I traced code execution, I found that WooCommerce actually provides a correct translation in \WC_Product::get_availability_text:

    $availability = $this->backorders_require_notification() ? __( 'Available on backorder', 'woocommerce' ) : '';

    But then it passes it through ‘woocommerce_get_availability_text’ text, which is handled by your plugin, specifically pvt_push_in_stock_text in inc/compatibility.php and the function replaces it with the same text but translated for another language domain:

    $availability = esc_html__( 'Available on backorder', 'product-variant-table-for-woocommerce' );

    There is no translation for our language (Swedish) actually and the text goes out in English.

    I’m not sure what is the reason for this filtering but could it at least use “woocommerce” language domain that already contains the phrase translations?

    • This topic was modified 1 year, 3 months ago by pumka.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,
    Tobi from the swedish volunteer translation team here.
    I’m on mobile, so cannot fix this directly, but you can suggest the correct tradition at https://translate.wordpress.org/projects/wp-plugins/product-variant-table-for-woocommerce/stable/sv/default/
    And I or @elbogen will approve it for you.

    Plugin Author WPXtension

    (@wpxteam)

    Hi,

    I hope you are doing well today.

    I’m not sure what is the reason for this filtering but could it at least use “woocommerce” language domain that already contains the phrase translations?

    In the default WooCommerce dropdown, the Availability text comes after selecting all the variation dropdowns. As we display variation in a tabular format, we had to push it manually inside the table.

    According to WPCS (WordPress Coding Standard) you can’t use another text-domain for your plugin string. Therefore, we had to use our text-domain.

    Please add the translation for the text and the Moderator has already confirmed that they will approve it for you.

    Please let me know if you have more questions. Hope to hear from you soon.

    Best Regards

    Plugin Author WPXtension

    (@wpxteam)

    Hi,

    We have also released a new update to refrain from modifying the default backorder text (by WooCommerce).

    Please update to the 1.6.4.1 and let us know your feedback.

    Hope to hear from you soon.

    Best Regards

    Thread Starter pumka

    (@pumka)

    Hi!
    Swedish translation is “Kan restnoteras”, at least that’s how WooCommerce translates it. But if you could not filter it, that’s the best option. I will test the new version tomorrow.

    Thread Starter pumka

    (@pumka)

    It worked just fine! Thank you for the fast update.

    Plugin Author WPXtension

    (@wpxteam)

    Hi,

    Glad to know it helped.

    If you found our support helpful, please share your valuable feedback here.

    Your valuable feedback will inspire us a lot.

    Best Regards

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘“Available on backorder” text not translated’ is closed to new replies.