Bugzilla – Attachment 148662 Details for
Bug 33332
Fix formatting of TT comments to improve translations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33332: Fix formatting of TT comments to improve translations
Bug-33332-Fix-formatting-of-TT-comments-to-improve.patch (text/plain), 6.72 KB, created by
Owen Leonard
on 2023-03-24 13:07:07 UTC
(
hide
)
Description:
Bug 33332: Fix formatting of TT comments to improve translations
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-03-24 13:07:07 UTC
Size:
6.72 KB
patch
obsolete
>From ccd8dda458f07e8bf2e47b5faa8e00e05af3e8fe Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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" >--- > .../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 e2230dd631..ac7c6b1a69 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 @@ > </div> > [% 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 @@ > </div> > [% END %] > >-[%# BOOTSTRAP BREADCRUMBS WRAPPER USAGE >- [ WRAPPER breadcrumbs ] >- [ Home breadcrumb automatically included ] >- [ WRAPPER breadcrumb_item ] >- <a href="/cgi-bin/koha/module/module-home.pl"> Module </a> >- [ END ] >- >- [ IF op == 'add_form' ] >- [ WRAPPER breadcrumb_item ] >- <a href="/cgi-bin/koha/module/page.pl"> Module page </a> >- [ END ] >- [ WRAPPER breadcrumb_item bc_active = 1 ] >- Add form >- [ END ] >- >- [ ELSIF op == 'delete_confirm' ] >- [ WRAPPER breadcrumb_item ] >- <a href="/cgi-bin/koha/module/page.pl"> Module page </a> >- [ 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 ] %] >+[% # <a href="/cgi-bin/koha/module/module-home.pl"> Module </a> %] >+[% # [ END ] %] >+ >+[% # [ IF op == 'add_form' ] %] >+[% # [ WRAPPER breadcrumb_item ] %] >+[% # <a href="/cgi-bin/koha/module/page.pl"> Module page </a> %] >+[% # [ END ] %] >+[% # [ WRAPPER breadcrumb_item bc_active = 1 ] %] >+[% # Add form %] >+[% # [ END ] %] >+ >+[% # [ ELSIF op == 'delete_confirm' ] %] >+[% # [ WRAPPER breadcrumb_item ] %] >+[% # <a href="/cgi-bin/koha/module/page.pl"> Module page </a> %] >+[% # [ 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 %] > <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb"> > <ol> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33332
:
148662
|
149285
|
149315