[PerlWikiBot] SF.net SVN: perlwikibot:[54] trunk/no-interwiki/prepare_noiw_list.pl
Status: Pre-Alpha
Brought to you by:
rotemliss
From: <am...@us...> - 2008-07-31 10:34:59
|
Revision: 54 http://perlwikibot.svn.sourceforge.net/perlwikibot/?rev=54&view=rev Author: amire80 Date: 2008-07-31 10:35:08 +0000 (Thu, 31 Jul 2008) Log Message: ----------- Partial refactoring of $STRING/get_string() 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-31 10:09:44 UTC (rev 53) +++ trunk/no-interwiki/prepare_noiw_list.pl 2008-07-31 10:35:08 UTC (rev 54) @@ -173,6 +173,7 @@ (?<min>\d{2}),\s # minute (?<mday>\d{1,2})\s # day of month $STRING{in}? # This preposition appears sometimes + # It should have been get_string() (?<mon>$ALT_MONTHS)\s # A name of a month (?<year>\d+?)\s # Year \([A-Z]{3}\) # Three letters in brackets - timezone @@ -190,8 +191,9 @@ (?<value>.*) # value }xms; +# XXX It should use get_string() $PATTERN{simple_no_iw_check} = qr{ - \Q$STRING{no_iw}\E # the string may have spaces + \Q$STRING{no_iw}\E # The string may have spaces }xmsi; # XXX HACK Until i get a better regex for matching balancing {{}} ... @@ -216,6 +218,7 @@ \A # Beginning of string (page) \# # a # character $STRING{REDIRECT} # Redirect keyword in local language + # XXX It should use get_string() \s*:?\s*\[\[([^\]]*)\]\] # the link after the redirect }xmsi; @@ -223,6 +226,8 @@ $PATTERN{true_template} = qr{$RE{balanced}{-parens=>'{}'}}xms; # XXX very bad $PATTERN{section_link} = qr{(?<!&)\#}xms; $PATTERN{lowercase_link} = qr{\A[[:lower:]]}xms; + +# XXX get_string() cannot be used here if ($STRING{exclude_lowercase}) { $PATTERN{exclude_lowercase} = qr{\A[$STRING{exclude_lowercase}]}xms; } @@ -341,7 +346,7 @@ sub namespace { my ($page) = @_; - return $page->namespace() || $STRING{'article space'}; + return $page->namespace() || get_string('article space'); } sub find_iwless { @@ -710,6 +715,8 @@ and ($foreign_article =~ $PATTERN{lowercase_link})) { my $include_lowercase_link = 1; + + # XXX get_string() cannot be used here if (defined $STRING{exclude_lowercase} and $foreign_article =~ $PATTERN{exclude_lowercase}) { @@ -873,6 +880,8 @@ if ($option{rtl}) { if ($page_title =~ $PATTERN{ltr_char}) { + + # XXX get_string() cannot be used here $link_to_page = $STRING{rlm} . $link_to_page . $STRING{rlm}; } } @@ -1422,8 +1431,8 @@ Unicode-friendly. This program was also tested on Windows XP and Vista with ActivePerl 5.10 -and Cygwin Perl 5.10. In these Unicode-related issues caused filenames -and clipboard text to become jumbled. You have been warned. +and Cygwin Perl 5.10. In these environments Unicode-related issues caused +filenames and clipboard text to become jumbled. You have been warned. =head1 BUGS AND LIMITATIONS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |