mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-29 17:58:14 +00:00
try to deactivate the wescamp stats...
...until they are fixed to work with the "new" serverside automatic system
This commit is contained in:
parent
0109f56a8c
commit
ee1af9181b
@ -14,24 +14,29 @@ $branch="1.4";
|
||||
|
||||
$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);
|
||||
|
||||
$extra_packages = "";
|
||||
while (false !== ($file = readdir($dir))) {
|
||||
if($file[0] != '.'){
|
||||
$packarray[] = $file;
|
||||
}
|
||||
}
|
||||
sort($packarray);
|
||||
$extrapackages = implode(" ", $packarray);
|
||||
//get unofficial packages
|
||||
// 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);
|
||||
|
||||
|
||||
//$languages = file_get_contents($basedir . "/po/LINGUAS");
|
||||
//$languages = substr($languages, 0, strlen($languages)-1);
|
||||
|
@ -79,25 +79,28 @@ foreach($packs as $package){
|
||||
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);
|
||||
//}
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user