From 3965694af186256ec6859d8e7d5153773372bd16 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Tue, 11 Apr 2017 14:47:44 +0200 Subject: [PATCH] Bug 15395: Search .js files in more directories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Specifically, koha-tmpl/intranet-tmpl/prog/js and koha-tmpl/opac-tmpl/bootstrap/js Signed-off-by: Marc VĂ©ron --- misc/translator/LangInstaller.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/misc/translator/LangInstaller.pm b/misc/translator/LangInstaller.pm index 8f38c7d..370f459 100644 --- a/misc/translator/LangInstaller.pm +++ b/misc/translator/LangInstaller.pm @@ -621,14 +621,20 @@ sub extract_messages { die "system call failed: $xgettext_cmd"; } + my @js_dirs = ( + "$intranetdir/koha-tmpl/intranet-tmpl/prog/js", + "$intranetdir/koha-tmpl/intranet-tmpl/prog/en/js", + "$intranetdir/koha-tmpl/opac-tmpl/bootstrap/js", + ); + my @js_files; find(sub { - if ($File::Find::dir =~ m|/en/| && $_ =~ m/\.js$/) { + if ($_ =~ m/\.js$/) { my $filename = $File::Find::name; $filename =~ s|^$intranetdir/||; push @js_files, $filename; } - }, "$intranetdir/koha-tmpl"); + }, @js_dirs); $xgettext_cmd = "$self->{xgettext} -L JavaScript $xgettext_common_args " . "-o $Bin/$self->{domain}-js.pot -D $intranetdir"; -- 2.1.4