From edaad47652f9f930d1ed35ebb4440d45801776dc Mon Sep 17 00:00:00 2001 From: acli Date: Tue, 11 Jan 2005 09:33:19 +0000 Subject: [PATCH] update.pl emulation script --- misc/translator/po/update.pl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 misc/translator/po/update.pl diff --git a/misc/translator/po/update.pl b/misc/translator/po/update.pl new file mode 100755 index 0000000000..627cf99402 --- /dev/null +++ b/misc/translator/po/update.pl @@ -0,0 +1,27 @@ +#!/usr/bin/perl + +# Convenience script to update a po file +# This emulates the GNOME "update.pl" script + +use strict; +use integer; + +my $lang = $ARGV[0]; +die "Usage: $0 LANG\n" unless defined $lang && $lang =~ /\S/; + +my $chdir_needed_p = 1 unless -d('po'); # guess if pwd is translator/ or po/ + +for my $spec (['css', 'opac'], ['default', 'intranet']) { + my($theme, $module) = @$spec; + my $pid = fork; + die "fork: $!\n" unless defined $pid; + if (!$pid) { + if ($chdir_needed_p) { + chdir('..') || die "..: cd: $!\n"; + } + exec('./tmpl_process3.pl', 'update', '-i', "../../koha-tmpl/$module-tmpl/$theme/en/", '-s', "po/${theme}_${module}_$lang.po", '-r'); + die "tmpl_process3.pl: exec: $!\n"; + } + wait; +} +