From 7957500e7e5c5d3ecd39414954db73eb167d0b59 Mon Sep 17 00:00:00 2001
From: Owen Leonard <oleonard@myacpl.org>
Date: Mon, 31 Dec 2012 11:41:19 -0500
Subject: [PATCH] Bug 9215 - non translatable string in manage-marc-import
Status information about staged MARC record batches was being pulled
directly from the import_batches table where they are stored as English
strings. This patch puts a check on the status value into the template
so that translatable strings can be embedded.
To test, apply the patch and view both the table of staged MARC record
batches and details about individual batches. In the default 'en'
translation you should see import statuses displayed with a capital
letter ("Staged"). This indicates that the status is now being pulled
from the template.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
---
.../prog/en/modules/tools/manage-marc-import.tt | 38 ++++++++++++++++++--
1 file changed, 35 insertions(+), 3 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
index 8265b50..0e350fc 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
@@ -129,8 +129,24 @@ $(document).ready(function(){
<li><span class="label">Comments:</span> [% IF ( comments ) %][% comments %][% ELSE %](none)[% END %]</li>
<li><span class="label">Type:</span> [% IF ( record_type == 'auth' ) %]Authority records[% ELSE %]Bibliographic records[% END %]</li>
<li><span class="label">Staged:</span> [% upload_timestamp %]</li>
- <li><span class="label">Status:</span> [% import_status %]</li>
- <li>
+ <li><span class="label">Status:</span>
+ [% IF ( import_status == 'cleaned' ) %]
+ Cleaned
+ [% ELSIF ( import_status == 'imported' ) %]
+ Imported
+ [% ELSIF ( import_status == 'importing' ) %]
+ Importing
+ [% ELSIF ( import_status == 'reverted' ) %]
+ Reverted
+ [% ELSIF ( import_status == 'reverting' ) %]
+ Reverting
+ [% ELSIF ( import_status == 'staged' ) %]
+ Staged
+ [% ELSE %]
+ [% import_status %]
+ [% END %]
+ </li>
+ <li>
[% IF ( can_commit ) %]<label for="new_matcher_id">Matching rule applied:</label><select name="new_matcher_id" id="new_matcher_id">
<option value="">Do not look for matching records</option>
[% FOREACH available_matcher IN available_matchers %]
@@ -251,7 +267,23 @@ Page
<td><a href="[% batch_lis.script_name %]?import_batch_id=[% batch_lis.import_batch_id %]">[% batch_lis.file_name %]</a></td>
<td>[% batch_lis.comments %]</td>
<td>[% IF ( batch_lis.record_type == 'auth' ) %]Authority[% ELSE %]Bibliographic[% END %]</td>
- <td>[% batch_lis.import_status %]</td>
+ <td>
+ [% IF ( batch_lis.import_status == 'cleaned' ) %]
+ Cleaned
+ [% ELSIF ( batch_lis.import_status == 'imported' ) %]
+ Imported
+ [% ELSIF ( batch_lis.import_status == 'importing' ) %]
+ Importing
+ [% ELSIF ( batch_lis.import_status == 'reverted' ) %]
+ Reverted
+ [% ELSIF ( batch_lis.import_status == 'reverting' ) %]
+ Reverting
+ [% ELSIF ( batch_lis.import_status == 'staged' ) %]
+ Staged
+ [% ELSE %]
+ [% batch_lis.import_status %]
+ [% END %]
+ </td>
<td>[% batch_lis.upload_timestamp %]</td>
<td>[% batch_lis.num_records %]</td>
<td>[% batch_lis.num_items %][% IF ( batch_lis.num_items ) %] <a href="[% batch_lis.script_name %]?import_batch_id=[% batch_lis.import_batch_id %]&op=create_labels">(Create label batch)</a>[% END %]</td>
--
1.7.10.4