Bug 31718: Others facilitate translation in frameworks administration

Some other IF/ELSE/END can be changed to facilitate translation

Test plan :
Always test with default framework and with another framework and
compare with and without patch
1) View subfields of field
=> Check the h1 in page
2) Perform actions on a field (create, modify, delete)
=> Check breadcrumbs and h1 in page
3) View the framework table
=> Check columns Repeatable, Mandatory, Important

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Fridolin Somers 2022-10-07 15:08:44 -10:00 committed by Tomas Cohen Arazi
parent 5e615b76a9
commit f78716b8e6
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 24 additions and 16 deletions

View file

@ -374,7 +374,11 @@
[% END # /IF ( delete_confirm ) %]
[% IF ( else ) %]
<h1>MARC subfield structure admin for [% tagfield | html %] [% IF ( frameworkcode ) %](framework [% frameworkcode | html %])[% ELSE %](default framework)[% END %]</h1>
[% IF ( frameworkcode ) %]
<h1>MARC subfield structure admin for [% tagfield | html %] (framework [% frameworkcode | html %])</h1>
[% ELSE %]
<h1>MARC subfield structure admin for [% tagfield | html %] (default framework)</h1>
[% END %]
<p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit.</p>
<p>The column 'Koha field' shows that the subfield is linked with a Koha field.</p>

View file

@ -43,7 +43,7 @@ MARC frameworks &rsaquo; Administration &rsaquo; Koha
<li>
<a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | uri %]">
[% IF framework %]
[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])
<span>[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span>
[% ELSE %]
<span>Default MARC framework</span>
[% END%]
@ -52,10 +52,10 @@ MARC frameworks &rsaquo; Administration &rsaquo; Koha
<li>
<a href="#" aria-current="page">
[% IF heading_add_tag_p %]
<span>Add tag</span>
<span>Add tag [% searchfield | html %]</span>
[% ELSE %]
<span>Modify tag</span>
[% END %] [% searchfield | html %]
<span>Modify tag [% searchfield | html %]</span>
[% END %]
</a>
</li>
@ -63,9 +63,9 @@ MARC frameworks &rsaquo; Administration &rsaquo; Koha
<li>
<a href="#" aria-current="page">
[% IF framework %]
[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])
<span>[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span>
[% ELSE %]
Default MARC framework
<span>Default MARC framework</span>
[% END %]
</a>
</li>
@ -74,15 +74,15 @@ MARC frameworks &rsaquo; Administration &rsaquo; Koha
<li>
<a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | uri %]">
[% IF framework %]
[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])
<span>[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span>
[% ELSE %]
Default MARC framework
<span>Default MARC framework</span>
[% END %]
</a>
</li>
<li>
<a href="#" aria-current="page">
Confirm deletion of tag '[% searchfield | html %]'
Confirm deletion of tag [% searchfield | html %]
</a>
</li>
@ -90,9 +90,9 @@ MARC frameworks &rsaquo; Administration &rsaquo; Koha
<li>
<a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | uri %]">
[% IF framework %]
[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])
<span>[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span>
[% ELSE %]
Default MARC framework
<span>Default MARC framework</span>
[% END %]
</a>
</li>
@ -116,7 +116,11 @@ MARC frameworks &rsaquo; Administration &rsaquo; Koha
<a class="btn btn-default" id="addtag" href="/cgi-bin/koha/admin/marctagstructure.pl?op=add_form&amp;frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-plus"></i> New tag</a>
</div>[% END %]
<h1>MARC Framework for [% IF framework %][% framework.frameworktext | html %] ([% framework.frameworkcode | html %])[% ELSE %]default MARC framework[% END %]</h1>
[% IF framework %]
<h1>MARC Framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</h1>
[% ELSE %]
<h1>MARC Framework for default MARC framework</h1>
[% END %]
[% IF ( add_form ) %]
@ -285,9 +289,9 @@ MARC frameworks &rsaquo; Administration &rsaquo; Koha
[% END %]
[% END %]
</td>
<td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
<td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
<td>[% IF ( loo.important ) %]Yes[% ELSE %]No[% END %]</td>
<td>[% IF ( loo.repeatable ) %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]</td>
<td>[% IF ( loo.mandatory ) %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]</td>
<td>[% IF ( loo.important ) %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]</td>
<td>[% loo.authorised_value | html %]</td>
<td>[% loo.ind1_defaultvalue | html %]</td>
<td>[% loo.ind2_defaultvalue | html %]</td>