From 68491176daa68c6f089f6ff7a5a79094465449b2 Mon Sep 17 00:00:00 2001 From: Mohamad Nateqi Rostami Date: Tue, 9 Jul 2024 19:27:35 +0330 Subject: [PATCH] Fix translation of labels --- includes/class-wcpdf-admin.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/includes/class-wcpdf-admin.php b/includes/class-wcpdf-admin.php index 0f033de76..2a274ccd6 100644 --- a/includes/class-wcpdf-admin.php +++ b/includes/class-wcpdf-admin.php @@ -798,9 +798,21 @@ public function output_number_date_edit_fields( object $document, array $data = if ( 'invoice' === $document->get_type() ) { $data = array_merge( $data, array( - 'display_date' => array( 'label' => $document_title . ' ' . __( 'Display date', 'woocommerce-pdf-invoices-packing-slips' ) . ':' ), - 'creation_trigger' => array( 'label' => $document_title . ' ' . __( 'Created via', 'woocommerce-pdf-invoices-packing-slips' ) . ':' ), - 'notes' => array( 'label' => $document_title . ' ' . __( 'Notes (printed in the invoice)', 'woocommerce-pdf-invoices-packing-slips' ) . ':' ), + 'display_date' => array( 'label' => sprintf( + /* translators: %s: Document type */ + __( '%s Display date', 'woocommerce-pdf-invoices-packing-slips' ), + $document_title + ) . ':' ), + 'creation_trigger' => array( 'label' => sprintf( + /* translators: %s: Document type */ + __( '%s Created via', 'woocommerce-pdf-invoices-packing-slips' ), + $document_title + ) . ':' ), + 'notes' => array( 'label' => sprintf( + /* translators: %s: Document type */ + __( '%s Notes (printed in the invoice)', 'woocommerce-pdf-invoices-packing-slips' ), + $document_title + ) . ':' ), ) ); } }