In the bottom section some general parameters for sourceforge are requested. These parameters change rarely.
Both sets of settings are used to create information pages and download urls.'); } } /** * Implementation of hook_settings(). */ function tortoisesvn_settings() { $form['tsvn'] = array( '#type' => 'fieldset', '#title' => t('TortoiseSVN release information'), '#collapsible' => TRUE, '#collapsed' => FALSE ); $form['tsvn']['version'] = array( '#type' => 'textfield', '#title' => t('Version'), '#default_value' => variable_get('tsvn_version',0), '#size' => 20, '#maxlength' => 10, '#description' => t('The version number of the latest official TortoiseSVN release (e.g. 1.3.0).'), ); $form['tsvn']['date'] = array( '#type' => 'textfield', '#title' => t('Release date'), '#default_value' => variable_get('tsvn_date','01-01-1970'), '#size' => 20, '#maxlength' => 10, '#description' => t('The date on which the above version of TortoiseSVN was released.'), ); $form['tsvn']['tsvn_build'] = array( '#type' => 'textfield', '#title' => t('Build number (w32)'), '#default_value' => variable_get('tsvn_build',0), '#size' => 20, '#maxlength' => 5, '#description' => t('The TortoiseSVN build number for 32 bit processors.'), ); $form['tsvn']['tsvn_build_x64'] = array( '#type' => 'textfield', '#title' => t('Build number (x64)'), '#default_value' => variable_get('tsvn_build_x64',0), '#size' => 20, '#maxlength' => 5, '#description' => t('The TortoiseSVN build number for 64 bit processors.'), ); $form['tsvn']['svnlib'] = array( '#type' => 'textfield', '#title' => t('Subversion library version'), '#default_value' => variable_get('tsvn_svnlib',0), '#size' => 20, '#maxlength' => 5, '#description' => t('The version number of the Subversion libraries against which TortoiseSVN is linked.'), ); $form['tsvn']['sf_release_binary'] = array( '#type' => 'textfield', '#title' => t('Sourceforge binaries release ID'), '#default_value' => variable_get('tsvn_sf_release_binary',0), '#size' => 20, '#maxlength' => 6, '#description' => t('The Sourceforge release id for the binaries.'), ); $form['tsvn']['sf_release_language'] = array( '#type' => 'textfield', '#title' => t('Sourceforge language pack release ID'), '#default_value' => variable_get('tsvn_sf_release_language',0), '#size' => 20, '#maxlength' => 6, '#description' => t('The Sourceforge release id for the language packs.'), ); $form['repos'] = array( '#type' => 'fieldset', '#title' => t('TortoiseSVN repository URLs'), '#collapsible' => TRUE, '#collapsed' => FALSE ); $form['repos']['trunk'] = array( '#type' => 'textfield', '#title' => t('Trunk'), '#default_value' => variable_get('tsvn_repos_trunk',''), '#size' => 100, '#maxlength' => 100, '#description' => t('The TortoiseSVN trunk URL).'), ); $form['repos']['branch'] = array( '#type' => 'textfield', '#title' => t('Branch'), '#default_value' => variable_get('tsvn_repos_branch',''), '#size' => 100, '#maxlength' => 100, '#description' => t('The URL of the latest TortoiseSVN release branch (e.g. 1.3.x).'), ); $form['sf'] = array( '#type' => 'fieldset', '#title' => t('Sourceforge download settings information'), '#collapsible' => TRUE, '#collapsed' => FALSE ); $form['sf']['project'] = array( '#type' => 'textfield', '#title' => t('Sourceforge project ID'), '#default_value' => variable_get('tsvn_sf_project',0), '#size' => 20, '#maxlength' => 6, '#description' => t('The Sourceforge project ID of TortoiseSVN.'), ); $form['sf']['prefix'] = array( '#type' => 'textfield', '#title' => t('Prefix of download URL'), '#default_value' => variable_get('tsvn_sf_prefix',0), '#size' => 100, '#maxlength' => 100, '#description' => t('The part of the Sourceforge download URL that is placed before the filename.'), ); $form['sf']['append'] = array( '#type' => 'textfield', '#title' => t('Appendix of download URL'), '#default_value' => variable_get('tsvn_sf_append',0), '#size' => 100, '#maxlength' => 100, '#description' => t('The part of the Sourceforge download URL that is placed after the filename.'), ); return $form; } /** * functions which are used to print the Doc & GUI translation statistics */ function print_footer($vars) { ?>

translated Translated missing accelerator keys Missing accelerator keys fuzzy Fuzzy untranslated Untranslated

Translations were made by many people, you find them on the translator credits page.

Nr. Language ISO code Total= Graph Last update
 
"; $flagtag="$flagtag $postat[3]"; if ($postat[5] > 0) { // Error while running msgfmt on existing .po file $graphtag="Error in po file"; } else { // .pot File $graphtag="\"blank\""; } echo "$i"; echo "$flagtag"; echo " "; echo " "; echo "$graphtag"; echo "$fdate"; echo " "; } function print_content_stat($i, $postat, $vars) { $release=$vars['release']; $build=$vars['build']; $wc=120; // Fixed width for graph $lang_cc=$postat[2]; $lang_name=$postat[3]; $total=$postat[6]; $tra=$postat[7]; $fuz=$postat[8]; $unt=$postat[9]; $acc=$postat[10]; $reposfile=$postat[11].'.po'; $reposurl=$vars['reposurl'].$reposfile; $fdate=$postat[12]; $age=(strtotime("now") - strtotime($fdate)) / 86400; $dlfile=$vars['downloadurl1']."LanguagePack-".$release.".".$build."-win32-".$lang_cc.".exe".$vars['downloadurl2']; $flagimg=$vars['flagpath'].$lang_cc.".png"; $flagtag="\"$lang_name"; $flagtag="$flagtag $lang_name"; // Calculate width of bars $wt=round($wc*$tra/$total); $wa=round($wc*$acc/$total); $wf=round($wc*$fuz/$total); $wu=round($wc*$unt/$total); // Adjustments // make sure that each bar is at least 2px wide if its value is > 0 if (($wt<2) && ($tra>0)) $wt=2; if (($wa<2) && ($acc>0)) $wa=2; if (($wf<2) && ($fuz>0)) $wf=2; if (($wu<2) && ($unt>0)) $wu=2; // Make sure total width stays constant by determining the widest bar // and subtracting the width of the shorter bars from it. if ($wt+$wa+$wf+$wu!=$wc){ if ($wt>=wa && $wt>=$wf && $wt>=$wu){ $wt = $wc-$wa-$wf-$wu; } else if ($wa>=$wt && $wa>=$wf && $wa>=$wu){ $wa = $wc-$wt-$wf-$wu; } else if ($wf>=$wt && $wf>=$wa && $wf>=$wu){ $wf = $wc-$wt-$wa-$wu; } else{ $wu = $wc-$wt-$wa-$wf; } } // Calculate percentage done. $pt=number_format(100*$tra/$total, 1)."%"; // If completeness was rounded up to 100% and // anything is missing, set completeness down to 99.9% if ( ($pt=="100.0%") && (($total>$tra) || ($acc>0)) ) $pt="99.9%"; if ($pt=="100.0%") { $title="Perfect :-)"; } else { $title="tr:$tra fu:$fuz ut:$unt; $acc missing hotkeys"; } // Put Debug info into title // $title="$wc tr:$wt fu:$wf ut:$wu; $wa missing hotkeys"; // count fuzzies as translated, only for the display $tra=$tra+$fuz; echo "$i"; echo "$flagtag"; echo "$lang_cc"; echo "$pt"; echo ""; if ($wt > 0) echo "\"tr\""; if ($wa > 0) echo "\"mh\""; if ($wf > 0) echo "\"fu\""; if ($wu > 0) echo "\"un\""; echo ""; echo "$fdate"; if ( ($pt<>"100.0%") && ($age>90) && ($vars['showold']==TRUE) ) { $title = "Old translation. Last update on: ".$fdate." We need a maintainer!!"; echo "\"!!OLD!!\""; } else { echo " "; } } function print_single_stat($i, $postat, $vars) { /* Debugging code: echo "\n"; echo "$i
";
	print_r($postat);
	echo"
"; */ if ($postat[0] == 0) { // $postat[0] == 0 // -> It's the .pot file echo "\n"; print_blank_stat($i, $postat, $vars); } elseif ($postat[5] > 0) { // $postat[5] > 0 // -> Error while running msgfmt on existing .po file echo "\n"; print_blank_stat($i, $postat, $vars); } else { echo "\n"; print_content_stat($i, $postat, $vars); } echo "\n"; } function print_all_stats($data, $vars) { $i=0; foreach ($data as $key => $postat) // $postat[5] == '' // -> Non existant .po file. Only country information, no stats if (isset($postat[5])) { $i++; print_single_stat($i, $postat, $vars); } } ?>