Bug 20330: Allow translating more of quote upload
authorPasi Kallinen <pasi.kallinen@joensuu.fi>
Mon, 5 Mar 2018 07:09:28 +0000 (09:09 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 28 Mar 2018 18:57:33 +0000 (15:57 -0300)
Translate the error messages, and the table headers.

Test plan:

1) Go to Home -> Tools -> Quote editor -> Import quotes
2) Upload quotes from a file. Try to trigger the error messages
3) On successful import, check the table header texts
4) Apply patch, update & install a language
5) The error messages and the table header texts should
   show up in the xx-YY-staff-prog.po
6) Repeat 1,2,3

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

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

koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt

index 3eb0ee5..9840e86 100644 (file)
         function fnErrorHandler(evt) {
             switch(evt.target.error.code) {
                 case evt.target.error.NOT_FOUND_ERR:
-                    alert('File Not Found!');
+                    alert(_("File Not Found!"));
                     break;
                 case evt.target.error.NOT_READABLE_ERR:
-                    alert('File is not readable');
+                    alert(_("File is not readable"));
                     break;
                 case evt.target.error.ABORT_ERR:
                     break; // noop
                 default:
-                    alert('An error occurred reading this file.');
+                    alert(_("An error occurred reading this file."));
             };
         }
 
                 "aaData"            : aaData,
                 "aoColumns"         : [
                     {
-                        "sTitle"  : "Number",
+                        "sTitle"  : _("Number"),
                         "sWidth"  : "2%",
                     },
                     {
-                        "sTitle"  : "Source",
+                        "sTitle"  : _("Source"),
                         "sWidth"  : "15%",
                     },
                     {
-                        "sTitle"  : "Quote",
+                        "sTitle"  : _("Quote"),
                         "sWidth"  : "83%",
                     },
                 ],
             reader.onerror = fnErrorHandler;
             reader.onprogress = fnUpdateProgress;
             reader.onabort = function(e) {
-                alert('File read cancelled');
+                alert(_("File read cancelled"));
                 parent.location='quotes-upload.pl';
             };
             reader.onloadstart = function(e) {