From a7b9f23d3b8467ad8a715ee01688f8e9c3d0f030 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 Specifically, koha-tmpl/intranet-tmpl/prog/js and koha-tmpl/opac-tmpl/bootstrap/js --- 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 8f38c7de72..370f459d8c 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.11.0