From 4146a32436143b19e47499237cd84d7cb89ba729 Mon Sep 17 00:00:00 2001 From: Rich Bowen Date: Fri, 26 Nov 2010 14:46:58 +0000 Subject: [PATCH] Adds some languages, and the -l flag to only look at a particular language. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039393 13f79535-47bb-0310-9956-ffa450edef68 --- docs/review_translations.pl | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/review_translations.pl b/docs/review_translations.pl index bd9a289d2a..c758ae8980 100755 --- a/docs/review_translations.pl +++ b/docs/review_translations.pl @@ -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->{directivesynopsis} } ) { 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 translation. -x - Generate XML for missing directives, to be pasted into the translation XML. +-l xx - Only look at document in language xx + ~; + + exit(); } -- 2.40.0