Bug 25626: Fix untranslatable strings on the 'OPAC problem reports' admin
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 1 Jun 2020 08:19:05 +0000 (10:19 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 20 Aug 2020 10:25:19 +0000 (12:25 +0200)
The 'Sent to' and 'Status' column values were not translatable.

Test plan:
Translate the interface
Report some problems at the OPAC
Go to the admin page and notice that all the columns are now translated

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt

index ce6c906..4b59c66 100644 (file)
                                         [% report.content | html %]
                                     </td>
                                     <td><a href="[% OPACBaseURL | url %][% report.problempage | url %]">[% OPACBaseURL | url %][% report.problempage | html %]</a></td>
-                                    <td>[% report.recipient | html %]</td>
+                                    <td>
+                                        [% SWITCH report.recipient %]
+                                        [% CASE 'admin' %]Koha administrator
+                                        [% CASE 'library' %]A librarian
+                                        [% END %]
+                                    </td>
                                     <td><span title="[% report.created_on | html %]">[% report.created_on | $KohaDates with_hours => 1 %]</span></td>
                                     <td>[% INCLUDE 'patron-title.inc' patron => report.patron hide_patron_infos_if_needed=1 %]</td>
-                                    <td class="status[% report.status | html %]" name="status"><span id="status_[% report.reportid | html %]">[% report.status | html %]</span></td>
+                                    <td class="status[% report.status | html %]" name="status">
+                                        <span id="status_[% report.reportid | html %]">
+                                            [% SWITCH report.status %]
+                                            [% CASE 'New' %]New
+                                            [% CASE 'Closed' %]Closed
+                                            [% CASE 'Viewed' %]Viewed
+                                            [% CASE %]Unknown status ([% report.status | html %])
+                                            [% END %]
+                                        </span>
+                                    </td>
                                     <td class="actions">
                                         [% IF ( report.status == 'New' ) %]
                                             <button name="viewed" data-report_id="[% report.reportid | html %]" class="viewed btn btn-default btn-xs"><i class="fa fa-eye"></i> Mark viewed</button> <button name="closed" data-report_id="[% report.reportid | html %]" class="closed btn btn-default btn-xs"><i class="fa fa-times-circle"></i> Mark closed</button> <button name="new" disabled="disabled" data-report_id="[% report.reportid | html %]" class="new btn btn-default btn-xs"><i class="fa fa-star"></i> Mark new</button>