Bug 19500: Make module names on letters overview page translatable
authorKatrin Fischer <katrin.fischer.83@web.de>
Fri, 10 Aug 2018 22:54:11 +0000 (22:54 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 24 Aug 2018 10:08:08 +0000 (11:08 +0100)
While the module pull down on adding and editing a letter is
written out and fully translatable, the overview page showed
the internal 'module code'.

Patch also renames the "Members" module into the "Patrons" module
to match Koha's terminology.

To test:
- Before applying the patch:
  - Add or edit a notice, look at the pull down for module
  - Go back to the overview page
  - Verify the module names don't match
- Apply the patch:
  - Check again, pull downs should now match
  - Verify that Members is now Patrons everywhere

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5e9480937ae0a4bb901330138e1760d690d5f548)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt

index 0e12c41..7310dde 100644 (file)
@@ -47,7 +47,7 @@
 [% IF ( no_op_set ) %]
     <h1>Notices &amp; slips</h1>
     <form method="get" action="/cgi-bin/koha/tools/letter.pl" id="selectlibrary">
-      <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
+      <input type="hidden" name="searchfield" value="[% searchfield %]" />
     [% UNLESS independant_branch %]
       <p>
         Select a library :
@@ -64,7 +64,7 @@
     </form>
 
                [% IF ( search ) %]
-        <p>You searched for <b>[% searchfield | html %]</b></p>
+        <p>You searched for <b>[% searchfield %]</b></p>
                [% END %]
                [% IF ( letter && !independant_branch) %]
             [% select_for_copy = BLOCK %]
                 [% can_edit = lette.branchcode || !independant_branch %]
                 <tr>
                   <td>[% IF lette.branchname %][% lette.branchname %][% ELSE %](All libraries)[% END %]</td>
-                  <td>[% lette.module %]</td>
+                  <td>
+                      [% SWITCH lette.module %]
+                          [% CASE 'acquisition' %]Acquisition
+                          [% CASE 'catalogue' %]Catalog
+                          [% CASE 'circulation' %]Circulation
+                          [% CASE 'orderacquisition' %]Order acquisition
+                          [% CASE 'claimacquisition' %]Claim acquisition
+                          [% CASE 'claimissues' %]Claim serial issue
+                          [% CASE 'reserves' %]Holds
+                          [% CASE 'members' %]Patrons
+                          [% CASE 'serial' %]Serials (new issue)
+                          [% CASE 'suggestions' %]Suggestions
+                          [% CASE %][% lette.module %]
+                      [% END %]
+                  </td>
                   <td>[% lette.code %]</td>
                   <td>[% lette.name %]</td>
                   <td class="actions">
                                       <option value="reserves">Holds</option>
                                     [% END %]
                                     [% IF ( module == "members" ) %]
-                                      <option value="members" selected="selected">Members</option>
+                                      <option value="members" selected="selected">Patrons</option>
                                     [% ELSE %]
-                                      <option value="members">Members</option>
+                                      <option value="members">Patrons</option>
                                     [% END %]
                                     [% IF ( module == "serial" ) %]
                                       <option value="serial" selected="selected">Serials (new issue)</option>
                         <td class="actions">
                             <button type="button" data-containerid="[% letter.message_transport_type %]_[% lang %]" class="btn btn-default btn-sm insert">Insert <i class="fa fa-long-arrow-right"></i></button>
                         </td>
-                      <td><textarea name="content" data-lang="[% lang %]" class="content_[% letter.message_transport_type %]" id="content_[% letter.message_transport_type %]_[% lang %]" cols="80" rows="15">[% letter.content | html %]</textarea></td>
+                      <td><textarea name="content" data-lang="[% lang %]" class="content_[% letter.message_transport_type %]" id="content_[% letter.message_transport_type %]_[% lang %]" cols="80" rows="15">[% letter.content %]</textarea></td>
                     </tr>
                   </table>
                 </li>