From 0a4c578a2cbadefae7a9a79efe39176a8baef56b Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Wed, 22 Apr 2020 09:30:58 +0200 Subject: [PATCH] Bug 25067: Add translate create|update commands that call gulp Signed-off-by: Bernardo Gonzalez Kriegel --- misc/translator/translate | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/misc/translator/translate b/misc/translator/translate index 08764f0b42..4469743f77 100755 --- a/misc/translator/translate +++ b/misc/translator/translate @@ -70,9 +70,17 @@ if ( $cmd =~ /^(install|compress|uncompress)$/ ) { $installer->$cmd(\@files); } - Koha::Caches->get_instance()->flush_all if $cmd ne 'update'; -} -else { + Koha::Caches->get_instance()->flush_all; +} elsif ($cmd eq 'create' or $cmd eq 'update') { + my $command = "gulp po:$cmd"; + $command .= " --silent" if (!$verbose); + $command .= " --lang $lang" if ($lang); + + print STDERR "Deprecation notice: PO creation and update are now gulp tasks. See docs/development/internationalization.md\n"; + print STDERR "Running `$command`\n"; + + system($command); +} else { usage(); } -- 2.20.1