]>
Commit | Line | Data |
---|---|---|
cb4114f5 | 1 | #!/usr/bin/perl |
a151895d | 2 | # |
4ac4a490 | 3 | ## Copyright (C) 1996-2017 The Squid Software Foundation and contributors |
a151895d AJ |
4 | ## |
5 | ## Squid software is distributed under GPLv2+ license and includes | |
6 | ## contributions from numerous individuals and organizations. | |
7 | ## Please see the COPYING and CONTRIBUTORS files for details. | |
8 | ## | |
cb4114f5 | 9 | |
10 | open(LIST,"<list") || die; | |
11 | while (<LIST>) { | |
12 | chomp; | |
13 | push (@pages, $_); | |
14 | } | |
15 | close LIST; | |
16 | ||
17 | foreach $page (@pages) { | |
18 | open(IN, "<English/$page") || die; | |
19 | $file = join("", <IN>); | |
20 | close(IN); | |
21 | $file =~ s/%(.)/$english{$page}{$1}++, "%$1"/ge; | |
22 | } | |
23 | ||
24 | foreach $lang (@ARGV) { | |
25 | foreach $page (@pages) { | |
26 | undef %codes; | |
27 | open(IN, "<$lang/$page") || die; | |
28 | $file = join("", <IN>); | |
29 | close(IN); | |
30 | $file =~ s/%(.)/$codes{$1}++/ge; | |
31 | foreach $code (keys %codes, keys %{$english{$page}}) { | |
32 | if ($codes{$code} ne $english{$page}{$code}) { | |
33 | print("$lang/$page %$code mismatch (found $codes{$code}, expected $english{$page}{$code})\n"); | |
34 | } | |
35 | } | |
36 | } | |
37 | } |