Okay
  Public Ticket #1393413
WC: Hardcoded translation string in Product Description tab
Closed

Comments

  • Detleff started the conversation

    On line 16 of wp-content/themes/salient/woocommerce/single-product/tabs:$heading = esc_html( apply_filters( 'woocommerce_product_description_heading', __( 'Product Description', 'woocommerce' ) ) );

    Product Description should have a translation string. I'm not a full blown developer, so perhaps this is by necessity, but I figured I'd point that out.

  • Detleff replied

    Apologies, it seems that it's present in the translation files at

     ../woocommerce/single-product/tabs/description.php:16
    msgid "Product Description"
    msgstr "Productomschrijving"

    But somehow, the translation isn't being picked up. I'm still investigating myself, I'm not sure if this is a common problem at this time.

  • Detleff replied

    - All other translations trigger just fine.

    -I've verified that it is indeed the theme's tabs overriding by temporarily modifying the orgin file's string. I've also tried changing it to a different string and translating that, without effect. The string simple doesn't translate.

    -Other translations, when changed and updated in the same manner, are updated just fine

    -Using LocoTranslate, clicking the string in the source tab points to the correct file and line (Visually, but I've seen an exception for arrays in another translation. Perhaps we're missing something?)

    It should work, as far as I can find, but it doesn't. Also, the ../ part makes no difference.

  • Detleff replied

    Gottem, apparently the second argument 'woocommerce' is the text domain in which the translation is sought. However, WooCommerce doesn't have the same translation on the same line:

    Original:
    $heading = esc_html( apply_filters( 'woocommerce_product_description_heading', __( 'Description', 'woocommerce' ) ) );
    on line 25

    So either the theme needs to be updated to point to the correct WooCommerce-based translation (change 'Product Description' to 'Description'. Line number applies?), or the text-domain has to be put to Salient?

  •  9,016
    Tahir replied

    Hey Again,

    -You have to set the Text Domain to woocommerce  as mentioned below. 

    Try using this Plugin : https://wordpress.org/plugins/say-what/ . 

    In The "Text Domain" field write "salient" without quotes . 

    If you are trying to change woocommerce words  add "woocommerce" in "Text domain" . The fields are case-sensitive .



    Thanks 


    ThemeNectar Support Team