[Koha-bugs] [Bug 33000] Use template wrapper for breadcrumbs: Acquisitions part 1

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Feb 23 16:43:09 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33000

Jonathan Druart <jonathan.druart+koha at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jonathan.druart+koha at gmail.
                   |                            |com

--- Comment #3 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
I think I am too late to the party, but I would like to raise a couple of
things:

1. We should surround the strings with span, or the translation script will add
awful strings with lot of %s.
Example:
. %1$s:  END.
#. %2$s:  WRAPPER breadcrumb_item bc_active=1.
#. %3$s:  END.
#. %4$s:  END.
#. %5$s:  IF ( else ).
#. %6$s:  WRAPPER breadcrumb_item bc_active=1.
#. %7$s:  END.
#. %8$s:  END.
#. %9$s:  END #/ WRAPPER breadcrumbs.
#. %10$s:  END #/ WRAPPER sub-header.inc.
#: koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt:69
msgid "%s %s Contract deleted %s %s %s %s Contracts %s %s %s %s "

2. In the same template (aqcontract), I see:

        [% IF ( add_validate ) %]
            [% WRAPPER breadcrumb_item %]
                <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[%
booksellerid | uri %]">Contracts</a>
            [% END %]
            [% WRAPPER breadcrumb_item bc_active=1 %]
                Data recorded
            [% END %]
        [% END %]

        [% IF ( delete_confirm ) %]
            [% WRAPPER breadcrumb_item %]
                <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[%
booksellerid | uri %]">Contracts</a>
            [% END %]
            [% WRAPPER breadcrumb_item bc_active=1 %]
                Confirm deletion of contract [% contractnumber | html %]
            [% END %]
        [% END %]

        [% IF ( delete_confirmed ) %]
            [% WRAPPER breadcrumb_item %]
                <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[%
booksellerid | uri %]">Contracts</a>
            [% END %]
            [% WRAPPER breadcrumb_item bc_active=1 %]
                Contract deleted
            [% END %]
        [% END %]

        [% IF ( else ) %]
            [% WRAPPER breadcrumb_item bc_active=1 %]
                Contracts
            [% END %]
        [% END %]

I can we should improve that we avoid repetition.
We should only need something like:

        [% WRAPPER breadcrumb_item remove_link=else%]
            <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[%
booksellerid | uri %]">Contracts</a>
        [% END %]
        [% IF ( add_validate ) %]
            [% WRAPPER breadcrumb_item bc_active=1 %]
                Data recorded
            [% END %]
        [% END %]

        [% IF ( delete_confirm ) %]
            [% WRAPPER breadcrumb_item bc_active=1 %]
                Confirm deletion of contract [% contractnumber | html %]
            [% END %]
        [% END %]

        [% IF ( delete_confirmed ) %]
            [% WRAPPER breadcrumb_item bc_active=1 %]
                Contract deleted
            [% END %]
        [% END %]


I don't know how hard it would be to implement 2, but 1 looks blocker to me.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list