Bug 15676 - Actions in pending offline circulation actions are not translatable
authorOwen Leonard <oleonard@myacpl.org>
Thu, 26 May 2016 16:29:38 +0000 (12:29 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 10 Jun 2016 17:36:59 +0000 (17:36 +0000)
This patch modifies the offline circulation transaction processing page
so that English strings describing actions are processed in the template
rather than being output directly from the script.

To test, apply the patch and create an offline circulation file
containing at least one checkout, one check-in, and one payment.

- Upload the file and choose 'Add to offline circulation queue.'
- View pending offline circulation actions
- In the list of pending actions, the actions column should show "Check
  out" instead of "issue," "Check in" instead of "return," and "Payment"
  instead of "payment."

Strings appear as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt

index 033c61b..2500456 100644 (file)
                                <tr class="oc-[% operation.action %]">
                                    <td><input type="checkbox" name="operationid" value="[% operation.operationid %]" /></td>
                                        <td>[% operation.timestamp %]</td>
-                                       <td>[% operation.action %]</td>
+                            <td>
+                                [% SWITCH ( operation.action ) -%]
+                                    [%   CASE "issue" -%]
+                                        Check out
+                                    [%   CASE "return" -%]
+                                        Check in
+                                    [%   CASE "payment" -%]
+                                        Payment
+                                    [%   CASE # default case -%]
+                                        [% operation.action %]
+                                [% END -%]
+                            </td>
                                        <td>
                                            [% IF ( biblionumber ) %]
                                                <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% operation.biblionumber %]" title="[% operation.bibliotitle %]">[% operation.barcode %]</a>