[PerlWikiBot] SF.net SVN: perlwikibot:[46] trunk/no-interwiki/prepare_noiw_list.pl
Status: Pre-Alpha
Brought to you by:
rotemliss
|
From: <am...@us...> - 2008-07-29 08:56:07
|
Revision: 46
http://perlwikibot.svn.sourceforge.net/perlwikibot/?rev=46&view=rev
Author: amire80
Date: 2008-07-29 08:56:15 +0000 (Tue, 29 Jul 2008)
Log Message:
-----------
More cosmetics to fix broken syntax highlighting.
Modified Paths:
--------------
trunk/no-interwiki/prepare_noiw_list.pl
Modified: trunk/no-interwiki/prepare_noiw_list.pl
===================================================================
--- trunk/no-interwiki/prepare_noiw_list.pl 2008-07-29 08:43:51 UTC (rev 45)
+++ trunk/no-interwiki/prepare_noiw_list.pl 2008-07-29 08:56:15 UTC (rev 46)
@@ -261,7 +261,7 @@
Readonly my $ALT_LANGS => join $ALT_SEP, keys %LANG_CODE;
# XXX Should use ALT_LANGS, but an efficient way is needed to update
-# lang codes list, so in the meantime it's loose.
+# lang codes list, so in the meantime it is loose.
$PATTERN{interwiki_link} = qr{
\Q$MW_SYNTAX{start_link}\E
(?<lang_code>
@@ -341,10 +341,9 @@
my @links =
map { make_link($_) } @{ $statistics{count_iw}->[$max_iw_index] };
INFO("# $max_iw_index: " . join_links(\@links, 0));
- while (not defined $statistics{count_iw}->[ --$max_iw_index ]) {
- # Do nothing, just count down to the next index with a defined list
- }
+ # Do nothing, just count down to the next index with a defined list
+ while (not defined $statistics{count_iw}->[ --$max_iw_index ]) { }
}
INFO("\nNAMESPACES");
@@ -410,7 +409,7 @@
$statistics{'has both valid interwiki and template'}++;
}
}
- else { # doesn't have iw
+ else { # does not have iw
process_iwless_page($page, $has_tmpl_no_iw, $has_iw);
}
}
@@ -425,7 +424,7 @@
$has_iw # scalar bool
) = @_;
- INFO(q(doesn't have iw link.)); # '
+ INFO(q(does not have iw link.));
$statistics{'has no interwiki link'}++;
# Now we need to search for no_iw templates
@@ -436,8 +435,8 @@
my $page_text_ref = $page->text();
my $page_title = $page->title();
- # Optimized - doesn't start searching,
- # if we already know that it's not there
+ # Optimized - does not start searching,
+ # if we already know that it is not there
if ($has_tmpl_no_iw) {
find_templates($page_text_ref, \@found_templates,
[ get_string('no_iw') ]);
@@ -477,8 +476,8 @@
$statistics{'cooling date passed'}++;
}
else {
- INFO(q(cooling date didn't pass.)); # '
- $statistics{q(cooling date didn't pass)}++; # '
+ INFO(q(cooling date did not pass.));
+ $statistics{q(cooling date did not pass)}++;
}
}
@@ -517,7 +516,7 @@
# Still nothing?
if (not scalar @all_types) {
my $other_type = get_string('other');
- INFO("$page_title doesn't have any type, adding to $other_type");
+ INFO("$page_title does not have any type, adding to $other_type");
@all_types = ($other_type);
$statistics{'automatically added to type other'}++;
}
@@ -542,7 +541,7 @@
MATCH:
foreach my $next_match (@matches) {
if ($next_match !~ $PATTERN{template}) {
- INFO(q(i thought that it's a template, but it was:)); # '
+ INFO(q(i thought that it is a template, but it was:));
if ($next_match =~ $PATTERN{wikitable}) {
INFO('a wikitable');
}
@@ -557,7 +556,7 @@
# XXX Matches anywhere in the template.
# It probably should match the template name.
- # Also - it's case-insensitive which is very wrong
+ # Also - it is case-insensitive which is very wrong
# but kinda useful.
if ($next_match =~ /\Q$next_filter/xmsi) {
@@ -614,7 +613,7 @@
$parsed_params{$name} = $value;
}
else {
- my $error_msg = "Weird - $clause doesn't look a param";
+ my $error_msg = "Weird - $clause does not look a param";
INFO($error_msg);
cluck($error_msg);
$statistics{'weird param'}++;
@@ -708,12 +707,12 @@
}
# A # sign not after an &.
- # After an & it's probably a character number.
+ # After an & it is probably a character number.
if ($foreign_article =~ $PATTERN{section_link}) {
$special_cases{section_links}->{$lang_code} = q{};
}
- # Char codes are common in section links, so there's no
+ # Char codes are common in section links, so there is no
# need to show them again
elsif ($foreign_article =~ $PATTERN{character_code_in_link}) {
$special_cases{charnumber_links}{$lang_code} = q{};
@@ -1004,7 +1003,7 @@
$level # number
) = @_;
- $level //= 2;
+ $level //= 2; # /
my $level_marker = q{=} x $level;
# Line ending is mandatory
@@ -1083,7 +1082,7 @@
my ($english, $target) = split $PATTERN{field_sep}, $next_string_line;
# Fallback to English if no target language string was supplied
- $STRING{$english} = $target // $english;
+ $STRING{$english} = $target // $english; # /
}
return %STRING;
@@ -1091,12 +1090,12 @@
sub get_string {
my ($english) = @_;
- return $STRING{$english} //= $english;
+ return $STRING{$english} //= $english; # /
}
sub make_type_fn {
my ($type, $unsorted) = @_;
- $unsorted //= 0;
+ $unsorted //= 0; # /
#my $transliterated_type = $TRANSLITERATOR->translit($type);
my $transliterated_type = $type;
@@ -1168,7 +1167,7 @@
sub join_links {
my ($links_ref, $line_end) = @_;
- $line_end //= 1;
+ $line_end //= 1; # /
my $link_sep = q{ } . $LINK_SEP . ($line_end ? "\n" : q{ });
return join $link_sep, @{$links_ref};
@@ -1232,7 +1231,7 @@
=head1 DESCRIPTION
-The main goal of this searching is to find pages which don't have
+The main goal of this searching is to find pages which do not have
interwiki (interlanguage) links to certain languages.
This program scans a MediaWiki XML dump file. It searches every page for
@@ -1273,7 +1272,7 @@
=head2 FILENAME is a weird dump file name.
-The dump file doesn't appear to have a standard name that appears
+The dump file does not appear to have a standard name that appears
at L<http://download.wikimedia.org/>.
=head2 error opening FILENAME ...
@@ -1288,21 +1287,21 @@
=head2 A page has no pure title
-Something is particularly weird with the name of a page. The program can't
+Something is particularly weird with the name of a page. The program cannot
separate its name from its namespace. It can also be a bug in this program.
-=head2 Some weirdness happened - STRING doesn't look a param
+=head2 Some weirdness happened - STRING does not look a param
-STRING is supposed to be a parameter in a template, but it doesn't look like
+STRING is supposed to be a parameter in a template, but it does not look like
one. It could be an error in the template, and also a bug in this program
(the parser that this program employs is rather limited).
=head2 Unicode character 0xNUMBER is illegal
This is a standard Perl warning. It may appear if a page or its title have
-funky Unicode characters which shouldn't be there according to the Unicode
+funky Unicode characters which should not be there according to the Unicode
standard (to be more precise, according to the implementation of this
-standard in your version of perl). Most probably these characters aren't
+standard in your version of perl). Most probably these characters are not
supposed to be in the page and should be fixed, but otherwise this issue
is not supposed to affect the functionality of this program significantly.
@@ -1361,7 +1360,7 @@
=head2 Perl 5.10
This program needs Perl 5.10. It has clean, new and useful syntax, which
-makes the programs easier to hack, maintain and debug. It's useless to try
+makes the programs easier to hack, maintain and debug. It is useless to try
and run it on an older version, unless you want to waste your time
backporting. Please upgrade your Perl installation if you still have 5.8 or
something older.
@@ -1378,7 +1377,7 @@
The time invested in making the code P::C-friendly will be returned as time
saved on debugging. Also consider reading the book "Perl Best Practices" by
-Damian Conway if you haven't already.
+Damian Conway if you have not already.
=head1 INCOMPATIBILITIES
@@ -1396,9 +1395,9 @@
Please report all bugs, features requests and other comments to
Amir E. Aharoni (ami...@gm...).
-=head2 There's no equality between languages
+=head2 There is no equality between languages
-Currently this program actually only lists pages which don't have
+Currently this program actually only lists pages which do not have
an interwiki link to the English Wikipedia. This is obviously not useful on
the English Wikipedia and is conceptually problematic on other Wikipedias,
too. This is being fixed, but it is not simple to do it Right.
@@ -1451,7 +1450,7 @@
Goal: v0.8 Moshe
-=head2 There's no test suite
+=head2 There is no test suite
That can be done after proper modularization. Also, a local test MediaWiki
server would be needed.
@@ -1490,7 +1489,7 @@
=back
-=item * It's (roughly) based on another bot by Guy Shaked (Costello).
+=item * It is (roughly) based on another bot by Guy Shaked (Costello).
=over
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|