From 3735514c483f7d15da58ce29451efaefb8dd9ae1 Mon Sep 17 00:00:00 2001 From: Olli-Antti Kivilahti Date: Thu, 29 Oct 2015 15:40:50 +0200 Subject: [PATCH] Bug 15080 - ./translate-tool should tell if xgettext-executable is missing Just upgraded our Koha container to 14.04 and noticing the misc/translator/translate doesn't work. This is because of a missing package gettext. This patch makes ./translate die with a helpful suggestion to install gettext if xgettext-program is missing. --- misc/translator/LangInstaller.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/translator/LangInstaller.pm b/misc/translator/LangInstaller.pm index b89aaa8..84cb876 100644 --- a/misc/translator/LangInstaller.pm +++ b/misc/translator/LangInstaller.pm @@ -76,6 +76,10 @@ sub new { chomp $self->{xgettext}; chomp $self->{sed}; + unless ($self->{xgettext}) { + die "\nMissing 'xgettext'-executable. Have you installed the gettext-package?\n"; + } + # Get all .pref file names opendir my $fh, $self->{path_pref_en}; my @pref_files = grep { /.pref/ } readdir($fh); -- 1.9.1