diff options
author | Frans Pop <elendil@planet.nl> | 2007-01-13 20:50:15 +0000 |
---|---|---|
committer | Frans Pop <elendil@planet.nl> | 2007-01-13 20:50:15 +0000 |
commit | a7471e30ba80c1cdc5253272d538a2e362f514f5 (patch) | |
tree | e1baf156e1af48295c50e709f07c5539937b9ea3 /scripts | |
parent | e52a7f8242f628ae0b052e17a1a924cb0ed5f490 (diff) | |
download | installation-guide-a7471e30ba80c1cdc5253272d538a2e362f514f5.zip |
Also support the case where a document revision is used together with a translation comment, as is the case for the Czech translation; we only check the first 10 lines of any document
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/doc-check | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/scripts/doc-check b/scripts/doc-check index aac4e0470..b8d0816ea 100755 --- a/scripts/doc-check +++ b/scripts/doc-check @@ -62,24 +62,31 @@ sub getrev { my ($plfname, $enfname) = (@_); my ($plrev, $enrev, $untrans, $notconverted) = (0, 0, 0, 0); + my $line = 0; warn "checking $plfname:\n" if $opt_v; open FILE, $plfname or warn "$plfname: $!\n" and return; while (<FILE>) { - if (/<!--\s*original version\D*([\d\.]+)\s*-->/) { + $line++; + + # Also check for revision comments of original documents + # These may be used in combination with a translation comment in + # which case the translation comment overrules what's found here + if (($plrev == 0) && (/<!--\s*\$Id: \S+ (\d+) /)) { $plrev = $1; - last; + $notconverted = 1; + $untrans = 1; } - if (/<!--\s*original version\D*(\d+)\s*untranslated\s*-->/) { + if (/<!--\s*original version\D*([\d\.]+)\s*-->/) { $plrev = $1; - $untrans = 1; + $untrans = 0; + $notconverted = 0; last; } - # Also check for revision comments of original documents - if (/<!--\s*\$Id: \S+ (\d+) /) { + if (/<!--\s*original version\D*(\d+)\s*untranslated\s*-->/) { $plrev = $1; - $notconverted = 1; $untrans = 1; + $notconverted = 0; last; } # Also support CVS style revision comments (depreciated) @@ -87,6 +94,9 @@ sub getrev $plrev = $1; last; } + if ($line++ > 10) { + last; + } } warn "checking $enfname:\n" if $opt_v; open FILE, $enfname or warn "$enfname: $!\n" and return; |