httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbo...@apache.org
Subject svn commit: r1039393 - /httpd/httpd/trunk/docs/review_translations.pl
Date Fri, 26 Nov 2010 14:46:58 GMT
Author: rbowen
Date: Fri Nov 26 14:46:58 2010
New Revision: 1039393

URL: http://svn.apache.org/viewvc?rev=1039393&view=rev
Log:
Adds some languages, and the -l flag to only look at a particular
language.

Modified:
    httpd/httpd/trunk/docs/review_translations.pl

Modified: httpd/httpd/trunk/docs/review_translations.pl
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/review_translations.pl?rev=1039393&r1=1039392&r2=1039393&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/review_translations.pl (original)
+++ httpd/httpd/trunk/docs/review_translations.pl Fri Nov 26 14:46:58 2010
@@ -5,15 +5,20 @@ use File::Glob;
 use Data::Dumper;
 use strict;
 
-our ( $opt_m, $opt_x );
+our ( $opt_m, $opt_x, $opt_l );
 our $VERSION = '0.01';
 our %LANGS = (
         'fr' => 'French',
+        'ja' => 'Japanese',
+        'de' => 'German',
         );
 
-getopt("m:");
+getopt("xlm:");
 HELP_MESSAGE() unless $opt_m;
 
+$opt_m =~ s/\.xml$//;
+HELP_MESSAGE() unless -f $opt_m . '.xml';
+
 my $eng = $opt_m . '.xml';
 my @files = glob $opt_m . '.xml.*';
 
@@ -29,9 +34,15 @@ foreach my $directive ( keys %{ $eng_xml
 print "\n";
 
 foreach my $file (@files) {
+
     next if $file =~ m/\.meta$/;
     my $lang = $file;
     $lang =~ s/.*\.([^.]+)$/$1/;
+
+    if ( $opt_l ) {
+        next unless $lang eq $opt_l;
+    }
+
     print "Translation available in ". ($LANGS{$lang}?$LANGS{$lang}:$lang) ."\n";
     my $lang_xml = $xs->XMLin( $file );
 
@@ -59,7 +70,11 @@ directives are missing from each transla
 -x - Generate XML for missing directives, to be pasted into the
 translation XML.
 
+-l xx - Only look at document in language xx
+
 ~;
+
+    exit();
 }
 
 



Mime
View raw message