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.