diff options
author | Frans Pop <elendil@planet.nl> | 2006-01-06 15:16:18 +0000 |
---|---|---|
committer | Frans Pop <elendil@planet.nl> | 2006-01-06 15:16:18 +0000 |
commit | 5a18eb8b1e04e179f6a7a686c3ebf58d1328a89c (patch) | |
tree | 9934de4f3946fff1fdfb4d754d5d1588bfdea476 /scripts | |
parent | 1fa9f115129df1f8fa77d993505fa4d46c1195d5 (diff) | |
download | installation-guide-5a18eb8b1e04e179f6a7a686c3ebf58d1328a89c.zip |
Add check for obsoleted translations
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/doc-check | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/doc-check b/scripts/doc-check index 83bea7ad9..01501e2ce 100755 --- a/scripts/doc-check +++ b/scripts/doc-check @@ -112,8 +112,25 @@ sub process $plfname =~ s,^en/,$lang/,; checkdiff($plfname, $enfname); } + +sub process_obsolete +{ + my $plfname = $File::Find::name; + return unless $plfname =~ m/\.xml$/; + my $enfname = $plfname; + $enfname =~ s,^$lang/,en/,; + open FILE, $enfname or warn "$plfname: Probably obsoleted\n" and return; + close FILE; +} + +warn "\nChecking for outdated or missing translations...\n" if $opt_v; File::Find::find({ wanted => \&process, no_chdir => 1 }, 'en'); +warn "\nChecking for obsoleted translations...\n" if $opt_v; +File::Find::find({ wanted => \&process_obsolete, no_chdir => 1 }, $lang); + #checkdiff("build/install.$lang.xml", "build/install.en.xml"); #checkdiff("release-notes.$lang.sgml","release-notes.sgml"); #checkdiff("index.$lang.html.m4","index.en.html.m4"); #checkdiff("dselect-beginner.$lang.sgml","dselect-beginner.sgml"); + +warn "All done.\n" if $opt_v; |