Bug 36516: Fix useless warning from translation script
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 4 Apr 2024 09:13:04 +0000 (11:13 +0200)
committerLucas Gass <lucas@bywatersolutions.com>
Tue, 28 May 2024 17:23:28 +0000 (17:23 +0000)
commitbcff2b75d25cf6e67a1ea581164caef506dbc100
tree6a229d6589748b4507510297254b25bdf40a529d
parenta23aae3c98aa8af6e99bd97af3bde8421fb426f0
Bug 36516: Fix useless warning from translation script

I lost too much time trying to know what the translation script outputs
  sh: 1: Syntax error: end of file unexpected

To recreate:
touch 'koha-tmpl/intranet-tmpl/prog/en/modules/<' (yes, don't ask!)
koha-translate -i de-DE --dev kohadev
or
koha-translate -u de-DE --dev kohadev

And you get the shell error without any ideas what's happening!

With this patch applied you will not get any errors because the quote
will actually copy the file (what is expected).

But without the quote the cp command will fail and the explanation will be
displayed
sh: 1: Syntax error: end of file unexpected
Cannot copy /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/< to /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/de-DE/modules/< at /kohadevbox/koha/misc/translator/tmpl_process3.pl line 385.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0026ee3e971b6556f2fdd97f6173d12337bb7c0f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2001b853f4028c807bf986cdd42c687961f9c67a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
misc/translator/tmpl_process3.pl