Changeset 2908
- Timestamp:
- 11/02/06 04:54:46 (7 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/amp_conf/htdocs/admin/page.modules.php
r2907 r2908 37 37 38 38 ?> 39 40 <!-- <div class="rnav">41 <li><a id="<?php echo ($extdisplay=='' ? 'current':'') ?>" href="config.php?display=modules&type=tool&extdisplay="><?php echo _("Local Modules") ?></a></li>42 <li><a id="<?php echo ($extdisplay=='online' ? 'current':'') ?>" href="config.php?display=modules&type=tool&extdisplay=online"><?php echo _("Online Modules") ?></a></li>43 </div>44 -->45 46 39 <script type="text/javascript" src="common/tabber-minimized.js"></script> 47 40 <script type="text/javascript"> … … 218 211 case 'downloadinstall': 219 212 if (!EXTERNAL_PACKAGE_MANAGEMENT) { 220 echo 'Downloading '.$modulename.' <span id="downloadprogress_'.$modulename.'"></span>';213 echo sprintf(_('Downloading %s'), $modulename).' <span id="downloadprogress_'.$modulename.'"></span>'; 221 214 if (is_array($errors = module_download($modulename, false, 'download_progress'))) { 222 echo '<span class="error"> Error(s) downloading '.$modulename.': ';215 echo '<span class="error">'.sprintf(_("Error(s) downloading %s"),$modulename).': '; 223 216 echo '<ul><li>'.implode('</li><li>',$errors).'</li></ul>'; 224 217 echo '</span>'; … … 226 219 227 220 if (is_array($errors = module_install($modulename))) { 228 echo '<span class="error"> Error(s) installing '.$modulename.': ';221 echo '<span class="error">'.sprintf(_("Error(s) installing %s"),$modulename).': '; 229 222 echo '<ul><li>'.implode('</li><li>',$errors).'</li></ul>'; 230 223 echo '</span>'; 231 224 } else { 232 echo '<span class="success">'. $modulename.' installed successfully</span>';225 echo '<span class="success">'.sprintf(_("%s installed successfully"),$modulename).'</span>'; 233 226 } 234 227 } … … 238 231 if (!EXTERNAL_PACKAGE_MANAGEMENT) { 239 232 if (is_array($errors = module_install($modulename))) { 240 echo '<span class="error"> Error(s) installing '.$modulename.': ';233 echo '<span class="error">'.sprintf(_("Error(s) installing %s"),$modulename).': '; 241 234 echo '<ul><li>'.implode('</li><li>',$errors).'</li></ul>'; 242 235 echo '</span>'; 243 236 } else { 244 echo '<span class="success">'. $modulename.' installed successfully</span>';237 echo '<span class="success">'.sprintf(_("%s installed successfully"),$modulename).'</span>'; 245 238 } 246 239 } … … 248 241 case 'enable': 249 242 if (is_array($errors = module_enable($modulename))) { 250 echo '<span class="error"> Error(s) enabling '.$modulename.': ';243 echo '<span class="error">'.sprintf(_("Error(s) enabling %s"),$modulename).': '; 251 244 echo '<ul><li>'.implode('</li><li>',$errors).'</li></ul>'; 252 245 echo '</span>'; 253 246 } else { 254 echo '<span class="success">'. $modulename.' enabled successfully</span>';247 echo '<span class="success">'.sprintf(_("%s enabled successfully"),$modulename).'</span>'; 255 248 } 256 249 break; 257 250 case 'disable': 258 251 if (is_array($errors = module_disable($modulename))) { 259 echo '<span class="error"> Error(s) disabling '.$modulename.': ';252 echo '<span class="error">'.sprintf(_("Error(s) disabling %s"),$modulename).': '; 260 253 echo '<ul><li>'.implode('</li><li>',$errors).'</li></ul>'; 261 254 echo '</span>'; 262 255 } else { 263 echo '<span class="success">'. $modulename.' disabled successfully</span>';256 echo '<span class="success">'.sprintf(_("%s disabled successfully"),$modulename).'</span>'; 264 257 } 265 258 break; … … 267 260 if (!EXTERNAL_PACKAGE_MANAGEMENT) { 268 261 if (is_array($errors = module_uninstall($modulename))) { 269 echo '<span class="error"> Error(s) uninstalling '.$modulename.': ';262 echo '<span class="error">'.sprintf(_("Error(s) uninstalling %s"),$modulename).': '; 270 263 echo '<ul><li>'.implode('</li><li>',$errors).'</li></ul>'; 271 264 echo '</span>'; 272 265 } else { 273 echo '<span class="success">'. $modulename.' uninstalled successfully</span>';266 echo '<span class="success">'.sprintf(_("%s uninstalled successfully"),$modulename).'</span>'; 274 267 } 275 268 } … … 347 340 echo "<p>"._("Please select at least one action to perform by clicking on the module, and selecting an action on the \"Action\" tab.")."</p>"; 348 341 } 349 echo "\t<input type=\"button\" value=\" Cancel\" onclick=\"location.href = 'config.php?display=modules&type=tool&online=1';\" />";342 echo "\t<input type=\"button\" value=\""._("Cancel")."\" onclick=\"location.href = 'config.php?display=modules&type=tool&online=1';\" />"; 350 343 351 344 echo "</form>"; … … 372 365 if (!EXTERNAL_PACKAGE_MANAGEMENT) { 373 366 echo "<a href='config.php?display=modules&type=tool&online=0'>"._("Manage local modules")."</a>\n"; 374 echo "<input type=\"checkbox\" id=\"show_upgradable_only\" onclick=\"showhide_upgrades();\" /> Show only upgradable";367 echo "<input type=\"checkbox\" id=\"show_upgradable_only\" onclick=\"showhide_upgrades();\" /><label for=\"show_upgradable_only\">"._("Show only upgradable")."</label>"; 375 368 } 376 369 } else { … … 389 382 if ($online) { 390 383 //echo "\t<input type=\"button\" value=\"Upgrade all\" onClick=\"check_upgrade_all();\" />"; 391 echo "\t<a href=\"javascript:void(null);\" onclick=\"check_upgrade_all();\"> Upgrade all</a>";392 } 393 echo "\t<input type=\"reset\" value=\" Reset\" />";394 echo "\t<input type=\"submit\" value=\" Process\" name=\"process\" />";384 echo "\t<a href=\"javascript:void(null);\" onclick=\"check_upgrade_all();\">"._("Upgrade all")."</a>"; 385 } 386 echo "\t<input type=\"reset\" value=\""._("Reset")."\" />"; 387 echo "\t<input type=\"submit\" value=\""._("Process")."\" name=\"process\" />"; 395 388 echo "</div>"; 396 389 … … 398 391 399 392 echo "\t<div id=\"modulelist-header\">"; 400 echo "\t\t<span class=\"modulename\"> Module</span>\n";401 echo "\t\t<span class=\"moduletype\"> Type</span>\n";402 echo "\t\t<span class=\"moduleversion\"> Version</span>\n";393 echo "\t\t<span class=\"modulename\">"._("Module")."</span>\n"; 394 echo "\t\t<span class=\"moduletype\">"._("Type")."</span>\n"; 395 echo "\t\t<span class=\"moduleversion\">"._("Version")."</span>\n"; 403 396 echo "\t\t<span class=\"clear\"> </span>\n"; 404 397 echo "\t</div>"; … … 420 413 // start a new category header, and associated html blocks 421 414 $category = $modules[$name]['category']; 422 echo "\t<div class=\"category\" id=\"category_".prep_id($category)."\"><h3>". $category."</h3>\n";415 echo "\t<div class=\"category\" id=\"category_".prep_id($category)."\"><h3>"._($category)."</h3>\n"; 423 416 echo "\t<ul>"; 424 417 } … … 436 429 case MODULE_STATUS_NOTINSTALLED: 437 430 if (isset($modules_local[$name])) { 438 echo '<span class="alert"> Not Installed (Locally available)</span>';431 echo '<span class="alert">'._('Not Installed (Locally available)').'</span>'; 439 432 } else { 440 echo 'Not Installed (Available online: '.$modules_online[$name]['version'].')';433 echo sprintf(_('Not Installed (Available online: %s)'), $modules_online[$name]['version']); 441 434 } 442 435 break; … … 445 438 $vercomp = version_compare($modules_local[$name]['version'], $modules_online[$name]['version']); 446 439 if ($vercomp < 0) { 447 echo '<span class="alert"> Disabled; Online upgrade available ('.$modules_online[$name]['version'].')</span>';440 echo '<span class="alert">'.sprintf(_('Disabled; Online upgrade available (%s)'),$modules_online[$name]['version']).'</span>'; 448 441 } else if ($vercomp > 0) { 449 echo 'Disabled; Newer than online version ('.$modules_online[$name]['version'].')';442 echo sprintf(_('Disabled; Newer than online version (%s)'), $modules_online[$name]['version']); 450 443 } else { 451 echo 'Disabled; up to date';444 echo _('Disabled; up to date'); 452 445 } 453 446 } else { … … 456 449 break; 457 450 case MODULE_STATUS_NEEDUPGRADE: 458 echo '<span class="alert"> Disabled; Pending upgrade to '.$modules[$name]['version'].'</span>';451 echo '<span class="alert">'.sprintf(_('Disabled; Pending upgrade to %s'),$modules[$name]['version']).'</span>'; 459 452 break; 460 453 case MODULE_STATUS_BROKEN: 461 echo '<span class="alert"> Broken</span>';454 echo '<span class="alert">'._('Broken').'</span>'; 462 455 break; 463 456 default: … … 466 459 $vercomp = version_compare($modules_local[$name]['version'], $modules_online[$name]['version']); 467 460 if ($vercomp < 0) { 468 echo '<span class="alert"> Online upgrade available ('.$modules_online[$name]['version'].')</span>';461 echo '<span class="alert">'.sprintf(_('Online upgrade available (%s)'), $modules_online[$name]['version']).'</span>'; 469 462 } else if ($vercomp > 0) { 470 echo 'Newer than online version ('.$modules_online[$name]['version'].')';463 echo sprintf(_('Newer than online version (%s)'),$modules_online[$name]['version']); 471 464 } else { 472 echo 'Enabled and up to date';465 echo _('Enabled and up to date'); 473 466 } 474 467 } else if (isset($modules_online)) { 475 468 // we're connected to online, but didn't find this module 476 echo 'Enabled; Not available online';469 echo _('Enabled; Not available online'); 477 470 } else { 478 echo 'Enabled';471 echo _('Enabled'); 479 472 } 480 473 break; … … 495 488 496 489 if (isset($modules_online[$name]['attention']) && !empty($modules_online[$name]['attention'])) { 497 echo "\t\t\t\t<div class=\"tabbertab\" title=\" Attention\">\n";490 echo "\t\t\t\t<div class=\"tabbertab\" title=\""._("Attention")."\">\n"; 498 491 echo nl2br($modules_online[$name]['attention']); 499 492 echo "\t\t\t\t</div>\n"; 500 493 } 501 494 502 echo "\t\t\t\t<div class=\"tabbertab actiontab\" title=\" Action\">\n";495 echo "\t\t\t\t<div class=\"tabbertab actiontab\" title=\""._("Action")."\">\n"; 503 496 504 497 echo '<input type="radio" checked="CHECKED" id="noaction_'.prep_id($name).'" name="moduleaction['.prep_id($name).']" value="0" /> '. 505 '<label for="noaction_'.prep_id($name).'"> No Action</label> <br />';498 '<label for="noaction_'.prep_id($name).'">'._('No Action').'</label> <br />'; 506 499 switch ($modules[$name]['status']) { 507 500 … … 510 503 if (isset($modules_local[$name])) { 511 504 echo '<input type="radio" id="install_'.prep_id($name).'" name="moduleaction['.prep_id($name).']" value="install" /> '. 512 '<label for="install_'.prep_id($name).'"> Install</label> <br />';505 '<label for="install_'.prep_id($name).'">'._('Install').'</label> <br />'; 513 506 } else { 514 507 echo '<input type="radio" id="upgrade_'.prep_id($name).'" name="moduleaction['.prep_id($name).']" value="downloadinstall" /> '. 515 '<label for="upgrade_'.prep_id($name).'"> Download and Install</label> <br />';508 '<label for="upgrade_'.prep_id($name).'">'._('Download and Install').'</label> <br />'; 516 509 } 517 510 } … … 519 512 case MODULE_STATUS_DISABLED: 520 513 echo '<input type="radio" id="enable_'.prep_id($name).'" name="moduleaction['.prep_id($name).']" value="enable" /> '. 521 '<label for="enable_'.prep_id($name).'"> Enable</label> <br />';514 '<label for="enable_'.prep_id($name).'">'._('Enable').'</label> <br />'; 522 515 if (!EXTERNAL_PACKAGE_MANAGEMENT) { 523 516 echo '<input type="radio" id="uninstall_'.prep_id($name).'" name="moduleaction['.prep_id($name).']" value="uninstall" /> '. 524 '<label for="uninstall_'.prep_id($name).'"> Uninstall</label> <br />';517 '<label for="uninstall_'.prep_id($name).'">'._('Uninstall').'</label> <br />'; 525 518 if (isset($modules_online[$name]['version'])) { 526 519 $vercomp = version_compare($modules_local[$name]['version'], $modules_online[$name]['version']); 527 520 if ($vercomp < 0) { 528 521 echo '<input type="radio" id="upgrade_'.prep_id($name).'" name="moduleaction['.prep_id($name).']" value="upgrade" /> '. 529 '<label for="upgrade_'.prep_id($name).'"> Download and Upgrade to '.$modules_online[$name]['version'].', and Enable</label> <br />';522 '<label for="upgrade_'.prep_id($name).'">'.sprintf(_('Download and Upgrade to %s, and Enable'),$modules_online[$name]['version']).'</label> <br />'; 530 523 } 531 524 } … … 535 528 if (!EXTERNAL_PACKAGE_MANAGEMENT) { 536 529 echo '<input type="radio" id="install_'.prep_id($name).'" name="moduleaction['.prep_id($name).']" value="install" /> '. 537 '<label for="install_'.prep_id($name).'"> Upgrade to '.$modules_local[$name]['version'].' and Enable</label> <br />';530 '<label for="install_'.prep_id($name).'">'.sprintf(_('Upgrade to %s and Enable'),$modules_local[$name]['version']).'</label> <br />'; 538 531 echo '<input type="radio" id="uninstall_'.prep_id($name).'" name="moduleaction['.prep_id($name).']" value="uninstall" /> '. 539 '<label for="uninstall_'.prep_id($name).'"> Uninstall</label> <br />';532 '<label for="uninstall_'.prep_id($name).'">'._('Uninstall').'</label> <br />'; 540 533 } 541 534 break; … … 543 536 if (!EXTERNAL_PACKAGE_MANAGEMENT) { 544 537 echo '<input type="radio" id="install_'.prep_id($name).'" name="moduleaction['.prep_id($name).']" value="install" /> '. 545 '<label for="install_'.prep_id($name).'"> Install</label> <br />';538 '<label for="install_'.prep_id($name).'">'._('Install').'</label> <br />'; 546 539 echo '<input type="radio" id="uninstall_'.prep_id($name).'" name="moduleaction['.prep_id($name).']" value="uninstall" /> '. 547 '<label for="uninstall_'.prep_id($name).'"> Uninstall</label> <br />';540 '<label for="uninstall_'.prep_id($name).'">'._('Uninstall').'</label> <br />'; 548 541 } 549 542 break; … … 555 548 if (!EXTERNAL_PACKAGE_MANAGEMENT) { 556 549 echo '<input type="radio" id="upgrade_'.prep_id($name).'" name="moduleaction['.prep_id($name).']" value="upgrade" /> '. 557 '<label for="upgrade_'.prep_id($name).'"> Download and Upgrade to '.$modules_online[$name]['version'].'</label> <br />';550 '<label for="upgrade_'.prep_id($name).'">'.sprintf(_('Download and Upgrade to %s'), $modules_online[$name]['version']).'</label> <br />'; 558 551 } 559 552 } 560 553 } 561 554 echo '<input type="radio" id="disable_'.prep_id($name).'" name="moduleaction['.prep_id($name).']" value="disable" /> '. 562 '<label for="disable_'.prep_id($name).'"> Disable</label> <br />';555 '<label for="disable_'.prep_id($name).'">'._('Disable').'</label> <br />'; 563 556 if (!EXTERNAL_PACKAGE_MANAGEMENT) { 564 557 echo '<input type="radio" id="uninstall_'.prep_id($name).'" name="moduleaction['.prep_id($name).']" value="uninstall" /> '. 565 '<label for="uninstall_'.prep_id($name).'"> Uninstall</label> <br />';558 '<label for="uninstall_'.prep_id($name).'">'._('Uninstall').'</label> <br />'; 566 559 } 567 560 break; … … 569 562 echo "\t\t\t\t</div>\n"; 570 563 571 echo "\t\t\t\t<div class=\"tabbertab\" title=\" Description\">\n";564 echo "\t\t\t\t<div class=\"tabbertab\" title=\""._("Description")."\">\n"; 572 565 if (isset($modules[$name]['description']) && !empty($modules[$name]['description'])) { 573 echo "<h5> Description for version ".$modules[$name]['version']."</h5>";566 echo "<h5>".sprintf(_("Description for version %s"),$modules[$name]['version'])."</h5>"; 574 567 echo nl2br($modules[$name]['description']); 575 568 } else { 576 echo "No description is available.";569 echo _("No description is available."); 577 570 } 578 571 if (isset($modules[$name]['info']) && !empty($modules[$name]['info'])) { 579 echo '<p> More info: <a href="'.$modules[$name]['info'].'" target="_new">'.$modules[$name]['info'].'</a></p>';572 echo '<p>'._('More info').': <a href="'.$modules[$name]['info'].'" target="_new">'.$modules[$name]['info'].'</a></p>'; 580 573 } 581 574 echo "\t\t\t\t</div>\n"; 582 575 583 576 if (isset($modules[$name]['changelog']) && !empty($modules[$name]['changelog'])) { 584 echo "\t\t\t\t<div class=\"tabbertab\" title=\" Changelog\">\n";585 echo "<h5> Change Log for version ".$modules[$name]['version']."</h5>";577 echo "\t\t\t\t<div class=\"tabbertab\" title=\""._("Changelog")."\">\n"; 578 echo "<h5>".sprintf(_("Change Log for version %s"), $modules[$name]['version'])."</h5>"; 586 579 // convert "1.x.x:" and "*1.x.x*" into bold, and do nl2br 587 580 $changelog = nl2br($modules[$name]['changelog']); … … 593 586 594 587 if (isset($amp_conf['AMPDEVEL']) && $amp_conf['AMPDEVEL'] == 'true') { 595 echo "\t\t\t\t<div class=\"tabbertab\" title=\" Debug\">\n";588 echo "\t\t\t\t<div class=\"tabbertab\" title=\""._("Debug")."\">\n"; 596 589 echo "\t\t\t\t<h5>".$name."</h5><pre>\n"; 597 590 print_r($modules_local[$name]); … … 618 611 if ($numdisplayed == 0) { 619 612 if (isset($modules_online) && count($modules_online) > 0) { 620 echo "All available modules are up-to-date and installed.";613 echo _("All available modules are up-to-date and installed."); 621 614 } else { 622 echo "No modules to display.";615 echo _("No modules to display."); 623 616 } 624 617 } … … 630 623 if ($online) { 631 624 //echo "\t<input type=\"button\" value=\"Upgrade all\" onClick=\"check_upgrade_all();\" />"; 632 echo "\t<a href=\"javascript:void(null);\" onclick=\"check_upgrade_all();\"> Upgrade all</a>";633 } 634 echo "\t<input type=\"reset\" value=\" Reset\" />";635 echo "\t<input type=\"submit\" value=\" Process\" name=\"process\" />";625 echo "\t<a href=\"javascript:void(null);\" onclick=\"check_upgrade_all();\">"._("Upgrade all")."</a>"; 626 } 627 echo "\t<input type=\"reset\" value=\""._("Reset")."\" />"; 628 echo "\t<input type=\"submit\" value=\""._("Process")."\" name=\"process\" />"; 636 629 echo "</div>"; 637 630
