--=-SjXOSJSZrkK84yNfDyaX Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Em Seg, 2003-02-24 ās 13:17, Stanislav Visnovsky escreveu: > On Sat, 22 Feb 2003, Pablo de Vicente wrote: > > > Hello, > > > > Is there a way to define a user command which makes msmerge for all PO files > > of a directory in KBabel Catalog Manager?. I have done this for individual > > files (it is described in the documentation) but would like to do it for a > > whole directory. > > It's not possible ATM :-( > > Stanislav Well I am doing just that. See attached script which keeps my po base uptodate. -- Michel Loos --=-SjXOSJSZrkK84yNfDyaX Content-Disposition: attachment; filename=merger.pl Content-Type: text/x-perl; name=merger.pl; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit #!/usr/bin/perl use File::Find; use File::Basename; chomp (my $localdir=`pwd`); my @dir=('../../templates'); find(\&wanted,@dir); sub wanted { my $filename = $File::Find::name; $filename =~ s/\.\.\/\.\.\/templates\///; if (m/pot$/) { $filename =~ s/t$//; my $longfilename = $localdir."/".$filename; if (-e $longfilename) { $todo = "msgmerge -o $filename $filename $File::Find::name\n"; } else { ($base,$path) = fileparse($longfilename); if (-d $path) {} else { print " directory does not exist \n"; mkdir $path, 0755 or warn "could not make dir $path"} $todo = "cp $File::Find::name $filename\n"; } print $todo; } } --=-SjXOSJSZrkK84yNfDyaX--