summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorRich Bowen <rbowen@apache.org>2010-11-26 19:42:02 +0100
committerRich Bowen <rbowen@apache.org>2010-11-26 19:42:02 +0100
commit0516ab23c8555fe2e9e1b7bb1b3e1ef6f835a2f5 (patch)
treeb7de43a92c2c44c6f6fcde9d8418b2e029b77ff2 /docs
parentAdds some languages, and the -l flag to only look at a particular (diff)
downloadapache2-0516ab23c8555fe2e9e1b7bb1b3e1ef6f835a2f5.tar.xz
apache2-0516ab23c8555fe2e9e1b7bb1b3e1ef6f835a2f5.zip
Adds -x option to generate skeleton doc to paste into XML. Possibly
alert someone that a translation is needed, and get more folks involved in the translation effort. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039505 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs')
-rwxr-xr-xdocs/review_translations.pl27
1 files changed, 24 insertions, 3 deletions
diff --git a/docs/review_translations.pl b/docs/review_translations.pl
index c758ae8980..e1b9528b4c 100755
--- a/docs/review_translations.pl
+++ b/docs/review_translations.pl
@@ -13,7 +13,7 @@ our %LANGS = (
'de' => 'German',
);
-getopt("xlm:");
+getopts("xl:m:");
HELP_MESSAGE() unless $opt_m;
$opt_m =~ s/\.xml$//;
@@ -27,7 +27,7 @@ my $eng_xml = $xs->XMLin( $eng );
print "This document defines the following directives:\n";
my @directives;
-foreach my $directive ( keys %{ $eng_xml->{directivesynopsis} } ) {
+foreach my $directive ( sort( keys %{ $eng_xml->{directivesynopsis} } ) ) {
push @directives, $directive;
print $directive . "\n";
}
@@ -47,12 +47,33 @@ foreach my $file (@files) {
my $lang_xml = $xs->XMLin( $file );
foreach my $d ( @directives ) {
- print "Translation does not define $d\n" unless defined( $lang_xml->{directivesynopsis}->{$d} );
+ unless ( defined( $lang_xml->{directivesynopsis}->{$d} ) ) {
+ print "Translation does not define $d\n";
+ directive_doc( $d, $eng_xml ) if $opt_x;
+ }
}
print "\n\n";
}
+sub directive_doc {
+ my ($d, $eng_xml) = @_;
+# print Dumper( $eng_xml->{directivesynopsis}->{$d} );
+
+ print "\nPaste the following into the XML:\n\n";
+ print "<directivesynopsis>\n";
+ print "<name>" . $d . "</name>\n";
+ print "<description>" .
+ $eng_xml->{directivesynopsis}->{$d}->{description} .
+ "</description>\n";
+ print "<contextlist>";
+ foreach my $c ( @{ $eng_xml->{directivesynopsis}->{$d}->{contextlist}->{context} } ) {
+ print "<context>".$c."</context>";
+ }
+ print "</contextlist>\n";
+ print "<usage>Documentation not yet translated. Please see English version of document.</usage>\n";
+ print "</directivesynopsis>\n\n";
+}
sub HELP_MESSAGE {
print STDERR qq~