From 95aaf4269601592baf660ecdd3b90ec12590250c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 24 Mar 2023 12:52:28 +0000 Subject: [PATCH] Bug 33332: Fix formatting of TT comments to improve translations This patch reformats some Template::Toolkit multi-line comments in html_helpers.inc so that each line is commented separately. This seems to prevent the translation tool from putting the comments into the po file. To test, apply the patch and confirm that pages which use the breadcrumbs and tabs WRAPPER directives still work correctly: - Breadcrumbs: staff client home page, about page, error page. - Tabs: Administration -> Library transfer limits or circulation alerts. - To test translatability, run the translation tool for any language, e.g. perl misc/translator/translate update fr-FR Search the regenerated po file (in this example misc/translator/po/fr-FR-staff-prog.po) to confirm that there is no instance of something like "[%%# BOOTSTRAP BREADCRUMBS WRAPPER USAGE" Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/includes/html_helpers.inc | 92 +++++++++---------- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc index 75fe254db4..c77ea57a29 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc @@ -357,20 +357,19 @@ [% END %] -[%# BOOTSTRAP TAB WRAPPER USAGE - [ WRAPPER tabs id= "tabs_container_id" ] - [ WRAPPER tabs_nav ] - [ WRAPPER tab_item tabname= "tab_name_1" bt_active= 1 ] Tab text 1 [ END ] - [ WRAPPER tab_item tabname= "tab_name_2" ] Tab text 2 [ END ] - ... - [ END ] - [ WRAPPER tab_panels ] - [ WRAPPER tab_panel tabname="tab_name_1" bt_active= 1 ] Panel contents 1 [ END ] - [ WRAPPER tab_panel tabname="tab_name_2" ] Panel contents 2 [ END ] - ... - [ END ] - [ END ] - %] +[% # BOOTSTRAP TAB WRAPPER USAGE %] +[% # [ WRAPPER tabs id= "tabs_container_id" ] %] +[% # [ WRAPPER tabs_nav ] %] +[% # [ WRAPPER tab_item tabname= "tab_name_1" bt_active= 1 ] Tab text 1 [ END ] %] +[% # [ WRAPPER tab_item tabname= "tab_name_2" ] Tab text 2 [ END ] %] +[% # ... %] +[% # [ END ] %] +[% # [ WRAPPER tab_panels ] %] +[% # [ WRAPPER tab_panel tabname="tab_name_1" bt_active= 1 ] Panel contents 1 [ END ] %] +[% # [ WRAPPER tab_panel tabname="tab_name_2" ] Panel contents 2 [ END ] %] +[% # ... %] +[% # [ END ] %] +[% # [ END ] %] [% BLOCK tabs %] [% IF ( id ) %] @@ -416,39 +415,38 @@ [% END %] -[%# BOOTSTRAP BREADCRUMBS WRAPPER USAGE - [ WRAPPER breadcrumbs ] - [ Home breadcrumb automatically included ] - [ WRAPPER breadcrumb_item ] - Module - [ END ] - - [ IF op == 'add_form' ] - [ WRAPPER breadcrumb_item ] - Module page - [ END ] - [ WRAPPER breadcrumb_item bc_active = 1 ] - Add form - [ END ] - - [ ELSIF op == 'delete_confirm' ] - [ WRAPPER breadcrumb_item ] - Module page - [ END ] - [ WRAPPER breadcrumb_item bc_active = 1 ] - Confirm deletion - [ END ] - - [ ELSE ] - [ WRAPPER breadcrumb_item bc_active = 1 ] - Module page - [ END ] - [ END #/IF op = add_form ] - - [ END #/ WRAPPER breadcrumbs ] - %] - -[%# Used to build breadcrumb navigation nav %] +[% # BOOTSTRAP BREADCRUMBS WRAPPER USAGE %] +[% # [ WRAPPER breadcrumbs ] %] +[% # [ Home breadcrumb automatically included ] %] +[% # [ WRAPPER breadcrumb_item ] %] +[% # Module %] +[% # [ END ] %] + +[% # [ IF op == 'add_form' ] %] +[% # [ WRAPPER breadcrumb_item ] %] +[% # Module page %] +[% # [ END ] %] +[% # [ WRAPPER breadcrumb_item bc_active = 1 ] %] +[% # Add form %] +[% # [ END ] %] + +[% # [ ELSIF op == 'delete_confirm' ] %] +[% # [ WRAPPER breadcrumb_item ] %] +[% # Module page %] +[% # [ END ] %] +[% # [ WRAPPER breadcrumb_item bc_active = 1 ] %] +[% # Confirm deletion %] +[% # [ END ] %] + +[% # [ ELSE ] %] +[% # [ WRAPPER breadcrumb_item bc_active = 1 ] %] +[% # Module page %] +[% # [ END ] %] +[% # [ END #/IF op = add_form ] %] + +[% # [ END #/ WRAPPER breadcrumbs ] %] + +[% # Used to build breadcrumb navigation nav %] [% BLOCK breadcrumbs %]