• Resolved zvonac99

    (@zvonac99)


    First sorry for my bad english. Icons for newly created menus are not displayed in the side admin menu if non-English language is used.
    Maybe you should consider using ‘slug’ for menu detection, or if you’re going to continue using titles for detection, then you should use the ‘ecs_html__’ function for the original titles.
    I solved the correct display of the icons by using the ‘esc_html__’ function to correctly match the titles and the icon names.

    foreach ( $custom_icons as $custom_icon ) {
    if ( $title && strpos( $title, $custom_icon ) !== false ) {
    $icon = '<img src="' . plugins_url( 'icons/' . strtolower( $custom_icon ) . '.svg', __FILE__ ) . '" width="15" height="18">';
    break;
    }
    foreach ( $custom_icons as $custom_icon ) {
    $translated_custom_icon = esc_html__( $custom_icon, 'woocommerce' );
    if ( $title && strpos( $title, $translated_custom_icon ) !== false ) {
    $icon = '<img src="' . plugins_url( 'icons/' . strtolower( $custom_icon ) . '.svg', __FILE__ ) . '" width="15" height="18">';
    break;
    }
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Dashify

    (@dashify)

    Hi—no problem, your English is great.

    Thank you for this suggestion. Good idea to use the slug instead of the title, as the title can vary with language. We will make this change in the next update of Dashify, and we will test it with different languages to ensure it’s working well.

    Plugin Author Dashify

    (@dashify)

    Good news! We’ve completed the changes. Now the code uses the slug in all places instead of the title, so it should work for any language.

    The fix has been released in Dashify 1.3.1 today. Can you check and see if the language you were using is good now?

    Also, while testing Dashify in a non-English admin language, I noticed there some strings which don’t get translated. We’ll get this fixed in an upcoming version of Dashify so that any WooCommerce strings are localized, and so that anyone can contribute translations to Dashify through Translating WordPress.

    Thread Starter zvonac99

    (@zvonac99)

    First, great job you are doing with the Dashify plugin, I also hope it will provide a user experience like Energy in the future.
    Thanks for the very quick fix for the icon display bug, with this update everything works great, all icons are displayed correctly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Icons are not displayed in the side menu’ is closed to new replies.