• Resolved madmax4ever

    (@madmax4ever)


    Hello,

    Working on a french translation of your plugin, I’m facing a weird behaviour: if I translate the following text (your plugin’s admin menu toplevel text), then clicking on any sub-entry I get a blank page…
    Could you correct that or at least remove this translation from your code to avoid such problem: I’ve spent hours searching for strange/special characters in my PO file, removing french charaters just to be sure, removing lines to see if file was too big and so on…
    Finally, thanks to a good old dichotomy method, I found the culprit.

    #: Models/Edit_Coupon.php:211 Models/Admin_App.php:232
    msgid "Coupons"
    msgstr "" 
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Fauzan Azizie

    (@fauzanade)

    Hi @madmax4ever,

    I’m sorry about this issue. We are aware of this and currently, we are working to fix it. It should be ready on the next release of Advanced Coupons for WooCommerce Free plugin.

    Thread Starter madmax4ever

    (@madmax4ever)

    Hello,

    As you’re working on it, I don’t know if you’ve already found a fix.
    But maybe you’ll be interested by this simple fix:
    In advanced-coupons-for-woocommerce-free/Models/Edit_Coupon.php, at line 209 replace:

    add_menu_page(
    	'',
    	__( 'Coupons', 'advanced-coupons-for-woocommerce-free' ),
    	'edit_shop_coupons',
    	$toplevel_slug,
    	'',
    	'dashicons-tickets-alt',
    	'55.51'
    );

    with:

    add_menu_page(
        __( 'Coupons', 'advanced-coupons-for-woocommerce-free' ),
        '<span id=' . $toplevel_slug . '>'. __( 'Coupons', 'advanced-coupons-for-woocommerce-free' ).'</span>',
        'edit_shop_coupons',
        $toplevel_slug,
        '',
        'dashicons-tickets-alt',
        '55.51'
    ); 

    This way, the top menu can be translated without further interference.

    Thread Starter madmax4ever

    (@madmax4ever)

    Of course, the id inside the span is not mandatory… ??

    Thread Starter madmax4ever

    (@madmax4ever)

    Sorry, my bad, I made a mistake when checking… It’s not working either.
    Changing just to:

    add_menu_page(
        __( 'Coupons', 'advanced-coupons-for-woocommerce-free' ),
        'Coupons',
        'edit_shop_coupons',
        $toplevel_slug,
        '',
        'dashicons-tickets-alt',
        '55.51'
    ); 

    would be an improvement, as the top menu would at least be translated when a sub-entry is selected.

    Thread Starter madmax4ever

    (@madmax4ever)

    I tested that on the new version and it’s fixed.
    Great job ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problem translating the toplevel menu text’ is closed to new replies.