• Hello,

    we have translated “Print delivery note” with Loco translate plugin, but in bulk actions, it’s still shown in English. Before latest update it was showing the translation.

    Also, how can I remove Print invoice and receipt from bulk actions, as we do not need those. In settings I only have delivery notes enabled.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Ewout

    (@pomegranate)

    Chiming in here and tagging @kenil802 for visibility.

    The bulk actions are not translatable via regular translations right now as the strings are hardcoded:

    
    $print_invoice_label                      = apply_filters( 'wcdn_change_text_of_print_invoice_in_bulk_option', 'Print Invoice' );
    $print_delivery_note_label                = apply_filters( 'wcdn_change_text_of_print_delivery_note_in_bulk_option', 'Print Delivery Note' );
    $print_receipt_label                      = apply_filters( 'wcdn_change_text_of_print_receipt_in_bulk_option', 'Print Receipt' );
    

    I understand that I can use these filters to add my own translations but it makes more sense to make these translatable in the plugin itself:

    
    $print_invoice_label                      = apply_filters( 'wcdn_change_text_of_print_invoice_in_bulk_option', __('Print Invoice','woocommerce-delivery-notes' );
    $print_delivery_note_label                = apply_filters( 'wcdn_change_text_of_print_delivery_note_in_bulk_option', __('Print Delivery Note','woocommerce-delivery-notes' );
    $print_receipt_label                      = apply_filters( 'wcdn_change_text_of_print_receipt_in_bulk_option', __('Print Receipt','woocommerce-delivery-notes' );
    

    @kajahal a quick fix would be to add this to the themes functions.php:

    
    add_filter('wcdn_change_text_of_print_invoice_in_bulk_option', 'wcdn_translate_bulk_actions');
    add_filter('wcdn_change_text_of_print_delivery_note_in_bulk_option', 'wcdn_translate_bulk_actions');
    add_filter('wcdn_change_text_of_print_receipt_in_bulk_option', 'wcdn_translate_bulk_actions');
    function wcdn_translate_bulk_actions($bulk_action_text) {
    	return __($bulk_action_text,'woocommerce-delivery-notes');
    }
    

    I also agree that the bulk actions should only be added if they have been enabled in the plugin settings.

    Thread Starter kajahal

    (@kajahal)

    Thank you!

    That solved translation problem. ?? Now we need update to also fix bulk actions problem.

    Plugin Support kenil802

    (@kenil802)

    Hi @kajahal,

    Apologies for the delay in response.

    We will check the translation thing and will fix that in the next update and currently, it is not possible to hide the other two options in the dropdown on the Order details page.

    Regards,
    Kenil Shah

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Translation Issue’ is closed to new replies.