From adba120d55e52ce959adb033a2935b8385c424be Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Mon, 25 Jun 2018 08:23:01 +0200 Subject: [PATCH] Bug 20988: Allow to create po for all languages at once This is required for the script that comes with koha-i18n, which creates the new PO files and fill them with existing translations. --- misc/translator/LangInstaller.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/misc/translator/LangInstaller.pm b/misc/translator/LangInstaller.pm index 59754a748c..36235168a5 100644 --- a/misc/translator/LangInstaller.pm +++ b/misc/translator/LangInstaller.pm @@ -766,10 +766,13 @@ sub update { sub create { my ($self, $files) = @_; - return unless $self->{lang}; - $self->create_tmpl($files) unless $self->{pref_only}; - $self->create_prefs(); - $self->create_messages(); + my @langs = $self->{lang} ? ($self->{lang}) : $self->get_all_langs(); + for my $lang ( @langs ) { + $self->set_lang( $lang ); + $self->create_tmpl($files) unless $self->{pref_only}; + $self->create_prefs(); + $self->create_messages(); + } $self->remove_pot(); } -- 2.17.1