Description
Jonathan Druart
2020-02-25 13:14:24 UTC
Created attachment 99584 [details] [review] 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` Created attachment 99585 [details] [review] 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` Created attachment 99646 [details] [review] 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> Nothing obviously broken in the relevant table.. Signing off. Created attachment 99814 [details] [review] 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> Created attachment 99815 [details] [review] Bug 24725: (QA follow-up) Add missing spaces between elements on claims tab There was a missing space between the title and the barcode. Also added a space between title and author. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Should we have a QA script check/coding guidelines for this? Nice work everyone! Pushed to master for 20.05 (In reply to Katrin Fischer from comment #7) > Should we have a QA script check/coding guidelines for this? See https://gitlab.com/koha-community/qa-test-tools/issues/26 for the QA check. missing 19.05.x dependencies, no backport does not apply to 19.11.x branch. please rebase if needed. Hopefully it gets support for template literals in the near future. Template literals are so useful... (In reply to David Cook from comment #12) > Hopefully it gets support for template literals in the near future. Template > literals are so useful... The bug is fixed it's no longer a limitation. We should remove the QA check. (In reply to Jonathan Druart from comment #13) > (In reply to David Cook from comment #12) > > Hopefully it gets support for template literals in the near future. Template > > literals are so useful... > > The bug is fixed it's no longer a limitation. We should remove the QA check. See https://gitlab.com/koha-community/qa-test-tools/-/issues/67 https://gitlab.com/koha-community/qa-test-tools/-/merge_requests/54 Great news! |