]> git.koha-community.org Git - koha.git/commit
Bug 24725: Remove ES template literals in checkouts.js
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 25 Feb 2020 13:40:06 +0000 (14:40 +0100)
committerJoy Nelson <joy@bywatersolutions.com>
Thu, 12 Mar 2020 23:44:08 +0000 (23:44 +0000)
commit414a1fbb7ddeec3af27ebdd76b765838b301e958
treece3dd3381a7d0e87f2805addd2e67413bf729772
parent78cba3f3397d51355bb40f81c69a1b2404e85d5f
Bug 24725: Remove ES template literals in checkouts.js

From Julian on bug 24661 comment 6:
"""
It looks like xgettext does not like ES6 template literals.

https://savannah.gnu.org/bugs/?50920

From what I understand, support for template literals was added in gettext 0.20 (still not packaged in debian) but is still buggy in latest released version 0.20.1 and a fix is present in master.
"""

We should not use backticks ` in .js file, it breaks xgettext.

To replicate:
kohadev-koha@e1f3025cca60:/kohadevbox/koha/misc/translator$ perl translate update es-ES
koha-tmpl/intranet-tmpl/prog/js/checkouts.js:569: warning: unterminated string
koha-tmpl/intranet-tmpl/prog/js/checkouts.js:858: warning: unterminated string
koha-tmpl/intranet-tmpl/prog/js/checkouts.js:904: warning: unterminated string
koha-tmpl/intranet-tmpl/prog/js/checkouts.js:911: warning: unterminated string
koha-tmpl/intranet-tmpl/prog/js/checkouts.js:1095: warning: RegExp literal terminated too early
/usr/bin/msgmerge: error while opening "/kohadevbox/koha/misc/translator/po/es-ES-messages-js.po" for reading: No such file or directory

(last error 'No such file or directory' is not related to this).

Test plan:
Make sure nothing is broken on the claims table
Confirm that the errors do not longer appear on `perl translate update LANG`

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/js/checkouts.js