Bug 4503 - Javascript files in js directory are not translated
Summary: Javascript files in js directory are not translated
Status: RESOLVED DUPLICATE of bug 21156
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: PC All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks: 4048 6073
  Show dependency treegraph
 
Reported: 2010-05-14 08:20 UTC by Katrin Fischer
Modified: 2019-12-11 09:37 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***