Bug 15232: Advanced Cataloging Editor: Fix translation issues
authorMarc Véron <veron@veron.ch>
Sat, 21 Nov 2015 00:31:00 +0000 (01:31 +0100)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Tue, 29 Dec 2015 22:56:16 +0000 (22:56 +0000)
This patch makes
koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc to comply with
Coding guidlines to avoid translation issues: "JS3: Avoid strings which
mix text and markup Text mustn't contain HTML tags."

To test:
- Apply patch
- Verify that code changes are correct (html markup moved out of
  function _(...) )
- Bonus test: Enable syspref 'EnableAdvancedCatalogingEditor' and verify
  that it works as before

With type fix from: Hector Castro <hector.hecaxmmx@gmail.com>

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc

index 443c022..cc8817d 100644 (file)
@@ -559,7 +559,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
             invalidateSearchResults();
             Search.Reconnect();
         } else {
-            humanMsg.displayMsg( _("<h3>Internal search error</h3>") + '<p>' + error + '</p>' + _("<p>Please <b>refresh</b> the page and try again."), { className: 'humanError' } );
+            humanMsg.displayMsg( '<h3>' + _("Internal search error") + '</h3><p>' + error + '</p><p>' + _("Please refresh the page and try again.") + '</p>', { className: 'humanError' } );
         }
     }
 
@@ -948,7 +948,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
                 errors.push(error);
             } );
 
-            humanMsg.displayMsg( _("<h3>Failed to run macro:</h3>") + '<ul><li>' + errors.join('</li><li>') + '</li></ul>', { className: 'humanError' } );
+            humanMsg.displayMsg( '<h3>' + _("Failed to run macro:") + '</h3><ul><li>' + errors.join('</li><li>') + '</li></ul>', { className: 'humanError' } );
 
             return false;
         } );