• You register the translations with the domain woocommerce:

    /wordpress/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Loader.php:383
    
    wp_register_script(
      WC_ADMIN_APP,
      self::get_url( 'app/index.js' ),
      array( 'wc-components', 'wc-navigation', 'wp-date', 'wp-html-entities', 'wp-keycodes', 'wp-i18n', 'moment' ),
      self::get_file_version( 'app/index.js' ),
      true
    );
    
    wp_set_script_translations( WC_ADMIN_APP, 'woocommerce' );

    But you use other domain (woocommerce-admin) in JS-file:

    /wordpress/wp-content/plugins/woocommerce/packages/woocommerce-admin/dist/app/index.js
    Object(_e.__)("No data for the current search","woocommerce-admin")

    woocommerce and woocommerce-admin are the different domains. Therefore the translations do not work ??

    Could you please fix it?

    P.S. The problem is in all JS-files. Thanks.

    • This topic was modified 4 years, 5 months ago by krut1.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Peter Fabian

    (@peterfabian1000)

    Hi @krut1

    Thanks for reporting the problem. We’re using a script to translate the text domain from woocommerce-admin to woocommerce during our build process, so you should not see any “woocommerce-admin” strings unless we have a bug somewhere. Can you please share what version of WooCommerce you are running, as I can’t see this string in WC 4.2 in the file you mentioned (packages/woocommerce-admin/dist/app/index.js)

    • This reply was modified 4 years, 5 months ago by Peter Fabian.
    Thread Starter krut1

    (@krut1)

    We are using WooCommerce Version: 4.0.1.

    See screen: https://ibb.co/CnTtFBG

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wrong JS Translations loading’ is closed to new replies.