Bugzilla – Attachment 164453 Details for
Bug 36516
translation script could output useless warning
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36516: Fix useless warning from translation script
Bug-36516-Fix-useless-warning-from-translation-scr.patch (text/plain), 1.82 KB, created by
Marcel de Rooy
on 2024-04-05 07:11:59 UTC
(
hide
)
Description:
Bug 36516: Fix useless warning from translation script
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-04-05 07:11:59 UTC
Size:
1.82 KB
patch
obsolete
>From 7a2887976acdd3eb7a59fc7810d1b5c79b6c9abf Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 4 Apr 2024 11:13:04 +0200 >Subject: [PATCH] Bug 36516: Fix useless warning from translation script >Content-Type: text/plain; charset=utf-8 > >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> >--- > misc/translator/tmpl_process3.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/translator/tmpl_process3.pl b/misc/translator/tmpl_process3.pl >index 6417226d9b..5e4865d6a9 100755 >--- a/misc/translator/tmpl_process3.pl >+++ b/misc/translator/tmpl_process3.pl >@@ -381,7 +381,7 @@ if ($action eq 'install') { > } else { > # just copying the file > mkdir_recursive($targetdir) unless -d $targetdir; >- system("cp -f $input $target"); >+ system("cp -f '$input' '$target'") == 0 or warn "Cannot copy $input to $target"; > print STDERR "Copying $input...\n" unless $quiet; > } > } >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36516
:
164410
|
164436
| 164453