[PerlWikiBot] SF.net SVN: perlwikibot:[55] trunk/no-interwiki
Status: Pre-Alpha
Brought to you by:
rotemliss
From: <am...@us...> - 2008-07-31 10:57:39
|
Revision: 55 http://perlwikibot.svn.sourceforge.net/perlwikibot/?rev=55&view=rev Author: amire80 Date: 2008-07-31 10:57:47 +0000 (Thu, 31 Jul 2008) Log Message: ----------- Simple support for portals. Modified Paths: -------------- trunk/no-interwiki/eo.strings.txt trunk/no-interwiki/he.strings.txt trunk/no-interwiki/prepare_noiw_list.pl Modified: trunk/no-interwiki/eo.strings.txt =================================================================== --- trunk/no-interwiki/eo.strings.txt 2008-07-31 10:35:08 UTC (rev 54) +++ trunk/no-interwiki/eo.strings.txt 2008-07-31 10:57:47 UTC (rev 55) @@ -15,7 +15,6 @@ in no_iw no estas interviki -category kategorio disambig apartigilo template Sxablono @@ -29,6 +28,8 @@ User Vikipediisto User talk Vikipediista diskuto Image Dosiero +Portal Portalo +Category kategorio article space (nomspace de artikoloj) # Other Modified: trunk/no-interwiki/he.strings.txt =================================================================== --- trunk/no-interwiki/he.strings.txt 2008-07-31 10:35:08 UTC (rev 54) +++ trunk/no-interwiki/he.strings.txt 2008-07-31 10:57:47 UTC (rev 55) @@ -15,7 +15,6 @@ in ב no_iw אין בינוויקי -category קטגוריה disambig פירושונים template תבנית @@ -29,6 +28,8 @@ User משתמש User talk שיחת משתמש Image תמונה +Portal פורטל +Category קטגוריה article space (מרחב ערכים) # Other Modified: trunk/no-interwiki/prepare_noiw_list.pl =================================================================== --- trunk/no-interwiki/prepare_noiw_list.pl 2008-07-31 10:35:08 UTC (rev 54) +++ trunk/no-interwiki/prepare_noiw_list.pl 2008-07-31 10:57:47 UTC (rev 55) @@ -100,6 +100,7 @@ croak('Invalid command line options.'); } +# XXX Too coupled to Wikipedia, won't work for other projects. $PATTERN{dump_fn} = qr{ \A # Begin string (?<wiki_lang>\w+) # Lang code @@ -146,7 +147,7 @@ # This monstrosity basically says: | and optional spaces $PATTERN{param_sep} = qr{\s*\Q$MW_SYNTAX{param_sep}\E\s*}xms; -Readonly my @INCLUDE_NAMESPACES => ('article space', 'category',); +Readonly my @INCLUDE_NAMESPACES => ('article space', 'Category', 'Portal'); # # Constants for date processing @@ -498,10 +499,16 @@ my $page_title = $page->title(); if (is_category($page)) { INFO("$page_title is a category"); - push @all_types, get_string('category'); + push @all_types, get_string('Category'); $statistics{'categories'}++; } + if (is_in_namespace($page, 'Portal')) { + INFO("$page_title is a portal"); + push @all_types, get_string('Portal'); + $statistics{'portal'}++; + } + if (is_disambig($page)) { INFO("$page_title is a disambiguation"); push @all_types, get_string('disambig'); @@ -1037,7 +1044,7 @@ sub is_category { my ($page) = @_; - return is_in_namespace($page, 'category'); + return is_in_namespace($page, 'Category'); } sub is_disambig { @@ -1115,8 +1122,8 @@ return; } -# It appears simple, but non-alphabetic languages such as Chinese it must be -# different, so it will sit here ready for better i18n. +# It appears simple, but in non-alphabetic languages such as Chinese +# it may be different, so it will sit here ready for better i18n. sub get_sort_letter { my ($string) = @_; return substr $string, 0, 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |