[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 #! /usr/bin/perl -w 2 3 use strict; 4 5 my $file = 'context-menu.js'; 6 my $outfile = $file.'-i18n'; 7 my $langfile = 'en.js'; 8 9 open FILE, "<$file"; 10 #open OUTFILE, ">$outfile"; 11 #open LANGFILE, ">$langfile"; 12 my %texts = (); 13 while (<FILE>) { 14 if (/"(.*?)"/) { 15 my $inline = $_; 16 chomp $inline; 17 my $key = $1; 18 my $val = $1; 19 print "Key: [$key]: "; 20 my $line = <STDIN>; 21 if (defined $line) { 22 chomp $line; 23 if ($line =~ /(\S+)/) { 24 $key = $1; 25 print "-- using $key\n"; 26 } 27 $texts{$val} = $key; 28 } else { 29 print " -- skipped...\n"; 30 } 31 } 32 } 33 #close LANGFILE; 34 #close OUTFILE; 35 close FILE; 36 37 print "\n\n\n"; 38 print '"', join("\"\n\"", sort keys %texts), '"', "\n";
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |