Bug 4503

Summary: Javascript files in js directory are not translated
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: I18N/L10NAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Bugs List <koha-bugs>
Severity: enhancement    
Priority: P5 - low CC: chris, jonathan.druart, jweaver, veron
Version: Main   
Hardware: PC   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 4048, 6073    

Description Chris Cormack 2010-05-21 01:27:57 UTC


---- Reported by katrin.fischer@bsz-bw.de 2010-05-14 08:20:52 ----

The files under .../koha-tmpl/intranet-tmpl/prog/[de-DE]/js and /koha-tmpl/opac-tmpl/prog/de-DE/j get not translated during translation process.

An example for intranet with error messages is member.js

I tried to make the error message for mandatory fields when adding a new borrower translatable. When it didn't work I looked at the other files and messages and noticed that they were not translated although formatted correctly for translation.

Perhaps error messages should be handled in the template, as basket.js in opac does.



---- Additional Comments From frederic@tamil.fr 2010-05-14 08:47:02 ----

> Perhaps error messages should be handled in the template, as basket.js in opac
> does.

Indeed. As far as I know, there is a plan to put .js files outside template directories in order to spare disk space. But this is not the only reason. If Koha separates code from templates for Perl script, it should also do it for JavaScript. Now JS mixes program en UI.




--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:27 UTC  ---

This bug was previously known as _bug_ 4503 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4503

Unknown operating system Windows 2000. Setting to default OS "All".
Actual time not defined. Setting to 0.0
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.

Comment 1 Katrin Fischer 2013-07-22 17:16:18 UTC
Lots of Javascript has moved out of the templates by now and we don't want to start copying them to the language specific directories again.

Galen pointed out that something like 
https://code.google.com/p/jquery-i18n-properties/ could be a possible solution.
Comment 2 Jesse Weaver 2015-07-09 02:34:55 UTC
Starting work on this, patch to follow.
Comment 3 Jonathan Druart 2019-12-11 09:37:27 UTC

*** This bug has been marked as a duplicate of bug 21156 ***