mail[Wesnoth-commits] r24486 - in /branches/resources/gettext.wesnoth.org/public_html/wesnoth-gettext/westats: config.php grab-stats.php


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by crazy-ivanovic on March 10, 2008 - 17:29:
Author: ivanovic
Date: Mon Mar 10 17:29:58 2008
New Revision: 24486

URL: http://svn.gna.org/viewcvs/wesnoth?rev=24486&view=rev
Log:
try to deactivate the wescamp stats until they are fixed to work with the 
"new" serverside automatic system

Modified:
    
branches/resources/gettext.wesnoth.org/public_html/wesnoth-gettext/westats/config.php
    
branches/resources/gettext.wesnoth.org/public_html/wesnoth-gettext/westats/grab-stats.php

Modified: 
branches/resources/gettext.wesnoth.org/public_html/wesnoth-gettext/westats/config.php
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/gettext.wesnoth.org/public_html/wesnoth-gettext/westats/config.php?rev=24486&r1=24485&r2=24486&view=diff
==============================================================================
--- 
branches/resources/gettext.wesnoth.org/public_html/wesnoth-gettext/westats/config.php
 (original)
+++ 
branches/resources/gettext.wesnoth.org/public_html/wesnoth-gettext/westats/config.php
 Mon Mar 10 17:29:58 2008
@@ -14,24 +14,29 @@
 
 $trunkbasedir="/public/vhost/w/wesnoth/source/trunk/";
 $branchbasedir="/public/vhost/w/wesnoth/source/" . $branch . "/";
-$extrabasedir="/public/vhost/w/wesnoth/source/wescamp-i18n/";
+//$extrabasedir="/public/vhost/w/wesnoth/source/wescamp-i18n/";
 
 //$packages = file_get_contents($basedir . "/po/DOMAINS");
 //$packages = substr($packages, 0, strlen($packages)-1);
 $corepackages = "wesnoth wesnoth-lib wesnoth-units wesnoth-multiplayer 
wesnoth-httt wesnoth-tutorial";
 //$packages = trim(system("grep ^SUBDIRS " . $basedir . "/po/Makefile.am | 
cut -d= -f2"));
 $packages = "wesnoth wesnoth-lib wesnoth-editor wesnoth-units 
wesnoth-multiplayer wesnoth-tutorial wesnoth-manpages wesnoth-manual 
wesnoth-aoi wesnoth-did wesnoth-ei wesnoth-httt wesnoth-l wesnoth-nr 
wesnoth-sof wesnoth-sotbe wesnoth-tb wesnoth-thot wesnoth-trow wesnoth-tsg 
wesnoth-utbs";
+
 //get unofficial packages
-$dir = opendir($extrabasedir);
+// TODO:
+// reactivate when stuff adjusted for new infrastructure
+// deactivated for not
+//$dir = opendir($extrabasedir);
+//
+//$extra_packages = "";
+//while (false !== ($file = readdir($dir))) { 
+//     if($file[0] != '.'){
+//             $packarray[] = $file;
+//     }
+//}
+//sort($packarray);
+//$extrapackages = implode(" ", $packarray);
 
-$extra_packages = "";
-while (false !== ($file = readdir($dir))) { 
-       if($file[0] != '.'){
-               $packarray[] = $file;
-       }
-}
-sort($packarray);
-$extrapackages = implode(" ", $packarray);
 
 //$languages = file_get_contents($basedir . "/po/LINGUAS");
 //$languages = substr($languages, 0, strlen($languages)-1);

Modified: 
branches/resources/gettext.wesnoth.org/public_html/wesnoth-gettext/westats/grab-stats.php
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/gettext.wesnoth.org/public_html/wesnoth-gettext/westats/grab-stats.php?rev=24486&r1=24485&r2=24486&view=diff
==============================================================================
--- 
branches/resources/gettext.wesnoth.org/public_html/wesnoth-gettext/westats/grab-stats.php
 (original)
+++ 
branches/resources/gettext.wesnoth.org/public_html/wesnoth-gettext/westats/grab-stats.php
 Mon Mar 10 17:29:58 2008
@@ -79,25 +79,28 @@
        fclose($file); 
 }
 
-foreach($extrapacks as $package){
-       $stats = array();
-       $domain = getdomain($package);
-       $languages = file_get_contents($extrabasedir . "/" . $package . 
"/po/LINGUAS");
-       $languages = substr($languages, 0, strlen($languages)-1);
-       $langs = explode(" ", $languages);
-       echo "<h2>Getting stats for package $package</h2>";
-       $stats["_pot"]=getstats($extrabasedir . "/" . $package . "/po/" . 
$domain . ".pot");
-       if(!file_exists("stats/" . $domain)){
-               system("mkdir stats/" . $domain);
-       }
-       foreach($langs as $lang){
-               echo "Getting stats for lang $lang<br/>";
-               $pofile = $extrabasedir . "/" . $package . "/po/" . $lang . 
".po";
-               $stats[$lang]=getstats($pofile);
-       }
-       $serialized = serialize($stats);
-       $file = fopen("stats/" . $domain . "/stats", "wb");
-       fwrite($file, $serialized);
-       fclose($file); 
-}
+// TODO:
+// Adjust wescamp stats to work nicely with the new server interface
+// deactivated for the moment
+//foreach($extrapacks as $package){
+//     $stats = array();
+//     $domain = getdomain($package);
+//     $languages = file_get_contents($extrabasedir . "/" . $package . 
"/po/LINGUAS");
+//     $languages = substr($languages, 0, strlen($languages)-1);
+//     $langs = explode(" ", $languages);
+//     echo "<h2>Getting stats for package $package</h2>";
+//     $stats["_pot"]=getstats($extrabasedir . "/" . $package . "/po/" . 
$domain . ".pot");
+//     if(!file_exists("stats/" . $domain)){
+//             system("mkdir stats/" . $domain);
+//     }
+//     foreach($langs as $lang){
+//             echo "Getting stats for lang $lang<br/>";
+//             $pofile = $extrabasedir . "/" . $package . "/po/" . $lang . 
".po";
+//             $stats[$lang]=getstats($pofile);
+//     }
+//     $serialized = serialize($stats);
+//     $file = fopen("stats/" . $domain . "/stats", "wb");
+//     fwrite($file, $serialized);
+//     fclose($file); 
+//}
 ?>




Related Messages


Powered by MHonArc, Updated Mon Mar 10 18:01:54 2008