Modified: vcl/trunk/web/.ht-inc/blockallocations.php URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/blockallocations.php?rev=1692548&r1=1692547&r2=1692548&view=diff ============================================================================== --- vcl/trunk/web/.ht-inc/blockallocations.php (original) +++ vcl/trunk/web/.ht-inc/blockallocations.php Fri Jul 24 16:28:20 2015 @@ -33,12 +33,12 @@ function blockAllocations() { global $user; if(! checkUserHasPerm('Manage Block Allocations (global)') && ! checkUserHasPerm('Manage Block Allocations (affiliation only)')) { - print "<H2>" . _("Block Allocations") . "</H2>\n"; - print _("Block Allocations are a way to have a set of machines preloaded with a particular environment at specified times and made available to a specific group of users. This is very useful for classroom use and for workshops. They can be made available on a repeating schedule such as when a course meets each week. Block Allocations only allocate machines for the group of users - they do not create the actual, end user reservations for the machines. All users still must log in to the VCL web site and make their own reservations DURING the period a block allocation is active. The forms here provide a way for you to submit a request for a Block Allocation for review by a sysadmin. If you just need to use a machine through VCL, use the New Reservation page for that."); + print "<H2>" . i("Block Allocations") . "</H2>\n"; + print i("Block Allocations are a way to have a set of machines preloaded with a particular environment at specified times and made available to a specific group of users. This is very useful for classroom use and for workshops. They can be made available on a repeating schedule such as when a course meets each week. Block Allocations only allocate machines for the group of users - they do not create the actual, end user reservations for the machines. All users still must log in to the VCL web site and make their own reservations DURING the period a block allocation is active. The forms here provide a way for you to submit a request for a Block Allocation for review by a sysadmin. If you just need to use a machine through VCL, use the New Reservation page for that."); print "<br><br>"; - print _("Please submit Block Allocation requests at least one full business day in advance to allow time for them to be approved.") . "<br><br>\n"; + print i("Please submit Block Allocation requests at least one full business day in advance to allow time for them to be approved.") . "<br><br>\n"; print "<button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - print _( "Request New Block Allocation") . "\n"; + print i( "Request New Block Allocation") . "\n"; print " <script type=\"dojo/method\" event=\"onClick\">\n"; print " location.href = '" . BASEURL . SCRIPT . "?mode=requestBlockAllocation';\n"; print " </script>\n"; @@ -46,21 +46,21 @@ function blockAllocations() { print getUserCurrentBlockHTML(); } else { - print "<h2>" . _("Manage Block Allocations") . "</h2>\n"; + print "<h2>" . i("Manage Block Allocations") . "</h2>\n"; $cont = addContinuationsEntry('viewBlockAllocatedMachines'); print "<a href=\"" . BASEURL . SCRIPT . "?continuation=$cont\">"; - print _("View Block Allocated Machines") . "</a>\n"; + print i("View Block Allocated Machines") . "</a>\n"; print "<div id=\"blocklist\">\n"; print getCurrentBlockHTML(); print "</div>\n"; print "<button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - print " " . _("Create New Block Allocation") . "\n"; + print " " . i("Create New Block Allocation") . "\n"; print " <script type=\"dojo/method\" event=\"onClick\">\n"; $cont = addContinuationsEntry('newBlockAllocation'); print " location.href = '" . BASEURL . SCRIPT . "?continuation=$cont';\n"; print " </script>\n"; print "</button>\n"; - print "<h2>" . _("Block Allocation Requests") . "</h2>\n"; + print "<h2>" . i("Block Allocation Requests") . "</h2>\n"; print "<div id=\"pendinglist\">\n"; print getPendingBlockHTML(); print "</div>\n"; @@ -78,9 +78,9 @@ function blockAllocations() { while($row = mysql_fetch_assoc($qh)) $blocks[$row['id']] = $row['name']; print "<hr>\n"; - print "<h2>" . _("Your Active Block Allocations") . "</h2>\n"; - print _("You are currently a member of the following Block Allocations.") . "<br>\n"; - print _("Click an item to view its current status.") . "<br>\n"; + print "<h2>" . i("Your Active Block Allocations") . "</h2>\n"; + print i("You are currently a member of the following Block Allocations.") . "<br>\n"; + print i("Click an item to view its current status.") . "<br>\n"; foreach($blocks as $id => $name) { $cont = addContinuationsEntry('viewBlockStatus', array('id' => $id)); print "<a href=\"" . BASEURL . SCRIPT . "?continuation=$cont\">"; @@ -103,14 +103,14 @@ function blockAllocationForm() { if($mode == 'newBlockAllocation') { $brname = ''; $imageid = ''; - print "<h2>" . _("New Block Allocation") . "</h2>\n"; + print "<h2>" . i("New Block Allocation") . "</h2>\n"; } elseif($mode == 'editBlockAllocation') { - print "<h2>" . _("Edit Block Allocation") . "</h2>\n"; + print "<h2>" . i("Edit Block Allocation") . "</h2>\n"; } elseif($mode == 'requestBlockAllocation') { - print "<h2>" . _("Request New Block Allocation") . "</h2>\n"; - print _("Complete the following form to request a new block allocation. Your request will need to be approved by a VCL admin before it is created."); + print "<h2>" . i("Request New Block Allocation") . "</h2>\n"; + print i("Complete the following form to request a new block allocation. Your request will need to be approved by a VCL admin before it is created."); print "<br><br>\n"; } $resources = getUserResources(array("imageAdmin", "imageCheckOut")); @@ -118,29 +118,29 @@ function blockAllocationForm() { print "<table summary=\"\">\n"; if($mode != 'requestBlockAllocation') { print " <tr>\n"; - print " <th align=right>" . _("Name:") . "</th>\n"; + print " <th align=right>" . i("Name:") . "</th>\n"; print " <td>\n"; print " <input type=\"text\" value=\"{$data['name']}\" dojoType=\"dijit.form.ValidationTextBox\" "; print "id=\"brname\" required=\"true\" invalidMessage=\""; - print _("Name can only contain letters, numbers, spaces, dashes(-), parenthesis, and periods(.) and can be from 3 to 80 characters long"); + print i("Name can only contain letters, numbers, spaces, dashes(-), parenthesis, and periods(.) and can be from 3 to 80 characters long"); print "\" regExp=\"^([-a-zA-Z0-9\. \(\)]){3,80}$\" style=\"width: 300px\" "; print "postCreate=\"dijit.byId('brname').focus();\">\n"; print " </td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th align=right>" . _("Owner:") . "</th>\n"; + print " <th align=right>" . i("Owner:") . "</th>\n"; print " <td>\n"; $initval = $data['owner']; if(empty($initval)) $initval = "{$user['unityid']}@{$user['affiliation']}"; print " <input type=\"text\" value=\"$initval\" dojoType=\"dijit.form.ValidationTextBox\" "; - print "id=\"browner\" required=\"true\" invalidMessage=\"" . _("Unknown user") . "\" style=\"width: 300px\" "; + print "id=\"browner\" required=\"true\" invalidMessage=\"" . i("Unknown user") . "\" style=\"width: 300px\" "; print "validator=\"checkOwner\" onFocus=\"ownerFocus\">\n"; print " </td>\n"; print " </tr>\n"; } print " <tr>\n"; - print " <th align=right>" . _("Environment") . ":</th>\n"; + print " <th align=right>" . i("Environment") . ":</th>\n"; print " <td>\n"; if(USEFILTERINGSELECT && count($resources['image']) < FILTERINGSELECTTHRESHOLD) { print " <select dojoType=\"dijit.form.FilteringSelect\" id=imagesel style=\"width: 300px\" "; @@ -159,7 +159,7 @@ function blockAllocationForm() { print " </td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th align=right>" . _("User group") . ":</th>\n"; + print " <th align=right>" . i("User group") . ":</th>\n"; print " <td>\n"; $groups = getUserGroups(0, $user['affiliationid']); if(USEFILTERINGSELECT && count($groups) < FILTERINGSELECTTHRESHOLD) { @@ -171,7 +171,7 @@ function blockAllocationForm() { print " <select id=groupsel onChange=\"clearCont2();\">"; $extragroups = array(); if($mode == 'requestBlockAllocation') - print " <option value=\"0\">(" . _("group not listed") . ")</option>\n"; + print " <option value=\"0\">(" . i("group not listed") . ")</option>\n"; if(! empty($data['usergroupid']) && ! array_key_exists($data['usergroupid'], $groups)) { $groups[$data['usergroupid']] = array('name' => getUserGroupName($data['usergroupid'], 1)); $extragroups[$data['usergroupid']] = array('name' => getUserGroupName($data['usergroupid'], 1)); @@ -190,7 +190,7 @@ function blockAllocationForm() { print " </td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th align=right>" . _("Number of seats") . ":</th>\n"; + print " <th align=right>" . i("Number of seats") . ":</th>\n"; print " <td>\n"; print " <input dojoType=\"dijit.form.NumberSpinner\" value=\"{$data['seats']}\" "; print "smallDelta=1 largeDelta=5 constraints=\"{min:" . MIN_BLOCK_MACHINES . ", max:"; @@ -200,14 +200,14 @@ function blockAllocationForm() { print " </tr>\n"; print "</table>\n"; - print _("Specify dates/times by:\n"); + print i("Specify dates/times by:\n"); print "<img src=\"images/helpicon.png\" id=\"repeattypehelp\" /><br>\n"; print "<input type=\"radio\" name=\"datetime\" id=\"weeklyradio\" onClick=\"blockFormChangeTab('weekly');\" {$data['type']['weekly']} />\n"; - print "<label for=\"weeklyradio\">" . _("Repeating Weekly") . "</label><br>\n"; + print "<label for=\"weeklyradio\">" . i("Repeating Weekly") . "</label><br>\n"; print "<input type=\"radio\" name=\"datetime\" id=\"monthlyradio\" onClick=\"blockFormChangeTab('monthly');\" {$data['type']['monthly']} />\n"; - print "<label for=\"monthlyradio\">" . _("Repeating Monthly") . "</label><br>\n"; + print "<label for=\"monthlyradio\">" . i("Repeating Monthly") . "</label><br>\n"; print "<input type=\"radio\" name=\"datetime\" id=\"listradio\" onClick=\"blockFormChangeTab('list');\" {$data['type']['list']} />\n"; - print "<label for=\"listradio\">" . _("List of Dates/Times") . "</label><br><br>\n"; + print "<label for=\"listradio\">" . i("List of Dates/Times") . "</label><br><br>\n"; print "<div style=\"border: 1px solid; margin-right: 8px;\">\n"; print "<div id=\"timeTypeContainer\" dojoType=\"dijit.layout.StackContainer\"\n"; @@ -215,10 +215,10 @@ function blockAllocationForm() { # repeating weekly print "<div id=\"weeklytab\" dojoType=\"dijit.layout.ContentPane\" "; - print "title=\"" . _("Repeating Weekly") . "\" {$data['type2']['weekly']}>\n"; + print "title=\"" . i("Repeating Weekly") . "\" {$data['type2']['weekly']}>\n"; print "<table summary=\"\">\n"; print " <tr>\n"; - print " <th align=right>" . _("First Date of Usage") . ":</th>\n"; + print " <th align=right>" . i("First Date of Usage") . ":</th>\n"; print " <td>\n"; print " <input type=\"text\" dojoType=\"dijit.form.DateTextBox\" "; print "required=\"true\" id=\"wkfirstdate\" value=\"{$data['swdate']}\" />\n"; @@ -226,7 +226,7 @@ function blockAllocationForm() { print " </td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th align=right>" . _("Last Date of Usage") . ":</th>\n"; + print " <th align=right>" . i("Last Date of Usage") . ":</th>\n"; print " <td>\n"; print " <input type=\"text\" dojoType=\"dijit.form.DateTextBox\" "; print "required=\"true\" id=\"wklastdate\" value=\"{$data['ewdate']}\" />\n"; @@ -236,26 +236,26 @@ function blockAllocationForm() { print "</table>\n"; print "<table summary=\"\">\n"; print "<tr>\n"; - print "<th>" . _("Days") . " <img src=\"images/helpicon.png\" id=\"wkdayshelp\" /></th>\n"; - print "<th>" . _("Times") . " <img src=\"images/helpicon.png\" id=\"wktimeshelp\" /></th>\n"; + print "<th>" . i("Days") . " <img src=\"images/helpicon.png\" id=\"wkdayshelp\" /></th>\n"; + print "<th>" . i("Times") . " <img src=\"images/helpicon.png\" id=\"wktimeshelp\" /></th>\n"; print "</tr>\n"; print "<tr>\n"; print "<td valign=top>\n"; foreach($days as $id => $day) { print " <INPUT type=checkbox id=\"wdays$id\" value=\"$day\" {$data['wdayschecked'][$day]}>\n"; - print " <label for=\"wdays$day\">" . _($day) . "</label><br>\n"; + print " <label for=\"wdays$day\">" . i($day) . "</label><br>\n"; } print "</td>\n"; print "<td>\n"; - print _("Start") . ":<div type=\"text\" id=\"weeklyaddstart\" dojoType=\"dijit.form.TimeTextBox\" "; + print i("Start") . ":<div type=\"text\" id=\"weeklyaddstart\" dojoType=\"dijit.form.TimeTextBox\" "; print "required=\"true\" onChange=\"blockFormWeeklyAddBtnCheck(1);\" style=\"width: 78px\"></div>\n"; - print _("End") . ":<div type=\"text\" id=\"weeklyaddend\" dojoType=\"vcldojo.TimeTextBoxEnd\" "; + print i("End") . ":<div type=\"text\" id=\"weeklyaddend\" dojoType=\"vcldojo.TimeTextBoxEnd\" "; print "required=\"true\" onChange=\"blockFormWeeklyAddBtnCheck(0);\" startid=\"weeklyaddstart\" "; print "style=\"width: 78px\"></div>\n"; print "<button dojoType=\"dijit.form.Button\" type=\"button\" disabled=\"true\" "; print "id=\"requestBlockWeeklyAddBtn\">\n"; - print _("Add") . "\n"; + print i("Add") . "\n"; print " <script type=\"dojo/method\" event=\"onClick\">\n"; print " blockFormAddWeeklyTime();\n"; print " </script>\n"; @@ -267,10 +267,10 @@ function blockAllocationForm() { print "<thead>\n"; print "<tr>\n"; print "<th field=\"start\" width=\"102px\" formatter=\"gridTimePrimary\">"; - print _("Start") . "</th>\n"; + print i("Start") . "</th>\n"; print "<th field=\"end\" width=\"102px\" formatter=\"timeFromTextBox\">"; - print _("End") . "</th>\n"; - print "<th field=\"remove\" width=\"80px\">" . _("Remove") . "</th>\n"; + print i("End") . "</th>\n"; + print "<th field=\"remove\" width=\"80px\">" . i("Remove") . "</th>\n"; print "</tr>\n"; print "</thead>\n"; print "</table>\n"; @@ -282,10 +282,10 @@ function blockAllocationForm() { # repeating monthly print "<div id=\"monthlytab\" dojoType=\"dijit.layout.ContentPane\" "; - print "title=\"" . _("Repeating Monthly") . "\" {$data['type2']['monthly']}>\n"; + print "title=\"" . i("Repeating Monthly") . "\" {$data['type2']['monthly']}>\n"; print "<table summary=\"\">\n"; print " <tr>\n"; - print " <th align=right>" . _("First Date of Usage") . ":</th>\n"; + print " <th align=right>" . i("First Date of Usage") . ":</th>\n"; print " <td>\n"; print " <input type=\"text\" id=\"mnfirstdate\" dojoType=\"dijit.form.DateTextBox\" "; print "required=\"true\" value=\"{$data['smdate']}\"/>\n"; @@ -293,7 +293,7 @@ function blockAllocationForm() { print " </td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th align=right>" . _("Last Date of Usage") . ":</th>\n"; + print " <th align=right>" . i("Last Date of Usage") . ":</th>\n"; print " <td>\n"; print " <input type=\"text\" id=\"mnlastdate\" dojoType=\"dijit.form.DateTextBox\" "; print "required=\"true\" value=\"{$data['emdate']}\" />\n"; @@ -301,30 +301,30 @@ function blockAllocationForm() { print " </td>\n"; print " </tr>\n"; print "</table>\n"; - $weeknumArr = array(1 => _("1st"), - 2 => _("2nd"), - 3 => _("3rd"), - 4 => _("4th"), - 5 => _("5th")); - $dayArr = array(1 => _("Sunday"), - 2 => _("Monday"), - 3 => _("Tuesday"), - 4 => _("Wednesday"), - 5 => _("Thursday"), - 6 => _("Friday"), - 7 => _("Saturday")); - print _("Repeat on the") . " "; + $weeknumArr = array(1 => i("1st"), + 2 => i("2nd"), + 3 => i("3rd"), + 4 => i("4th"), + 5 => i("5th")); + $dayArr = array(1 => i("Sunday"), + 2 => i("Monday"), + 3 => i("Tuesday"), + 4 => i("Wednesday"), + 5 => i("Thursday"), + 6 => i("Friday"), + 7 => i("Saturday")); + print i("Repeat on the") . " "; printSelectInput('weeknum', $weeknumArr, $data['mnweeknumid'], 0, 0, 'mnweeknum'); printSelectInput('day', $dayArr, $data['mndayid'], 0, 0, 'mnday'); - print " " . _("of every month") . "<br><br>\n"; - print _("Start") . ":<div type=\"text\" id=\"monthlyaddstart\" dojoType=\"dijit.form.TimeTextBox\" "; + print " " . i("of every month") . "<br><br>\n"; + print i("Start") . ":<div type=\"text\" id=\"monthlyaddstart\" dojoType=\"dijit.form.TimeTextBox\" "; print "required=\"true\" onChange=\"blockFormMonthlyAddBtnCheck(1)\" style=\"width: 78px\"></div>\n"; - print _("End") . ":<div type=\"text\" id=\"monthlyaddend\" dojoType=\"vcldojo.TimeTextBoxEnd\" "; + print i("End") . ":<div type=\"text\" id=\"monthlyaddend\" dojoType=\"vcldojo.TimeTextBoxEnd\" "; print "required=\"true\" onChange=\"blockFormMonthlyAddBtnCheck(0)\" startid=\"monthlyaddstart\" "; print "style=\"width: 78px\"></div>\n"; print "<button dojoType=\"dijit.form.Button\" type=\"button\" disabled=\"true\" "; print "id=\"requestBlockMonthlyAddBtn\">\n"; - print _("Add") . "\n"; + print i("Add") . "\n"; print " <script type=\"dojo/method\" event=\"onClick\">\n"; print " blockFormAddMonthlyTime();\n"; print " </script>\n"; @@ -337,10 +337,10 @@ function blockAllocationForm() { print "<thead>\n"; print "<tr>\n"; print "<th field=\"start\" width=\"102px\" formatter=\"gridTimePrimary\">"; - print _("Start") . "</th>\n"; + print i("Start") . "</th>\n"; print "<th field=\"end\" width=\"102px\" formatter=\"timeFromTextBox\">"; - print _("End") . "</th>\n"; - print "<th field=\"remove\" width=\"80px\">" . _("Remove") . "</th>\n"; + print i("End") . "</th>\n"; + print "<th field=\"remove\" width=\"80px\">" . i("Remove") . "</th>\n"; print "</tr>\n"; print "</thead>\n"; print "</table>\n"; @@ -348,16 +348,16 @@ function blockAllocationForm() { # list of times print "<div id=\"listtab\" dojoType=\"dijit.layout.ContentPane\" "; - print "title=\"" . _("List of Times") . "\" {$data['type2']['list']}>\n"; - print _("Date") . ":<div type=\"text\" id=\"listadddate\" dojoType=\"dijit.form.DateTextBox\" "; + print "title=\"" . i("List of Times") . "\" {$data['type2']['list']}>\n"; + print i("Date") . ":<div type=\"text\" id=\"listadddate\" dojoType=\"dijit.form.DateTextBox\" "; print "required=\"true\" onChange=\"blockFormListAddBtnCheck\" style=\"width: 95px\"></div>\n"; - print _("Start") . ":<input type=\"text\" id=\"listaddstart\" dojoType=\"dijit.form.TimeTextBox\" "; + print i("Start") . ":<input type=\"text\" id=\"listaddstart\" dojoType=\"dijit.form.TimeTextBox\" "; print "required=\"true\" onChange=\"blockFormListAddBtnCheck\" />\n"; - print _("End") . ":<input type=\"text\" id=\"listaddend\" dojoType=\"vcldojo.TimeTextBoxEnd\" "; + print i("End") . ":<input type=\"text\" id=\"listaddend\" dojoType=\"vcldojo.TimeTextBoxEnd\" "; print "required=\"true\" onChange=\"blockFormListAddBtnCheck\" startid=\"listaddstart\" />\n"; print "<button dojoType=\"dijit.form.Button\" type=\"button\" disabled=\"true\" "; print "id=\"requestBlockListAddBtn\">\n"; - print _("Add") . "\n"; + print i("Add") . "\n"; print " <script type=\"dojo/method\" event=\"onClick\">\n"; print " blockFormAddListSlot();\n"; print " </script>\n"; @@ -371,12 +371,12 @@ function blockAllocationForm() { print "<thead>\n"; print "<tr>\n"; print "<th field=\"date1\" width=\"115px\" formatter=\"gridDateTimePrimary\">"; - print _("Date") . "</th>\n"; + print i("Date") . "</th>\n"; print "<th field=\"start\" width=\"115px\" formatter=\"timeFromTextBox\">"; - print _("Start") . "</th>\n"; + print i("Start") . "</th>\n"; print "<th field=\"end\" width=\"108px\" formatter=\"timeFromTextBox\">"; - print _("End") . "</th>\n"; - print "<th field=\"remove\" width=\"80px\">" . _("Remove") . "</th>\n"; + print i("End") . "</th>\n"; + print "<th field=\"remove\" width=\"80px\">" . i("Remove") . "</th>\n"; print "</tr>\n"; print "</thead>\n"; print "</table>\n"; @@ -387,7 +387,7 @@ function blockAllocationForm() { print "</div><br>\n"; if($mode == 'requestBlockAllocation') { - print "<strong><big>" . _("Additional comments") . ":</big></strong>\n"; + print "<strong><big>" . i("Additional comments") . ":</big></strong>\n"; print "<img src=\"images/helpicon.png\" id=\"commenthelp\" /><br>\n"; print "<textarea id=\"comments\" dojoType=\"dijit.form.Textarea\" style=\"width: 400px;\">\n"; print "</textarea><br><br>\n"; @@ -396,15 +396,15 @@ function blockAllocationForm() { print "<button dojoType=\"dijit.form.Button\" type=\"button\" "; print "id=\"requestBlockSubmitBtn\">\n"; if($mode == 'requestBlockAllocation') { - $btntxt = _("Submit Block Allocation Request") . "\n"; + $btntxt = i("Submit Block Allocation Request") . "\n"; $arg = 'request'; } elseif($mode == 'newBlockAllocation') { - $btntxt = _("Submit New Block Allocation") . "\n"; + $btntxt = i("Submit New Block Allocation") . "\n"; $arg = 'new'; } elseif($mode == 'editBlockAllocation') { - $btntxt = _("Submit Block Allocation Changes") . "\n"; + $btntxt = i("Submit Block Allocation Changes") . "\n"; $arg = 'edit'; } print " $btntxt\n"; @@ -416,12 +416,12 @@ function blockAllocationForm() { print "<input type=\"hidden\" id=\"valuseridcont\" value=\"$cont\">\n"; print "<div id=\"confirmDialog\" dojoType=\"dijit.Dialog\" title=\""; - print _("Confirm Block Allocation") . "\">\n"; - print "<h2>" . _("Confirm Block Allocation") . "</h2>\n"; + print i("Confirm Block Allocation") . "\">\n"; + print "<h2>" . i("Confirm Block Allocation") . "</h2>\n"; if($mode == 'requestBlockAllocation') - print _("Please confirm the following values and then click <strong>Submit Block Allocation Request</strong>"); + print i("Please confirm the following values and then click <strong>Submit Block Allocation Request</strong>"); else { - printf(_("Please confirm the following values and then click <strong>%s</strong>"), $btntxt); + printf(i("Please confirm the following values and then click <strong>%s</strong>"), $btntxt); } print "<br><br>\n<table summary=\"\">\n"; print " <tr>\n"; @@ -433,19 +433,19 @@ function blockAllocationForm() { print " <td><span id=\"confowner\"></span></td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th align=\"right\">" . _("Environment") . ":</th>\n"; + print " <th align=\"right\">" . i("Environment") . ":</th>\n"; print " <td><span id=\"confimage\"></span></td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th align=\"right\">" . _("User group") . ":</th>\n"; + print " <th align=\"right\">" . i("User group") . ":</th>\n"; print " <td><span id=\"confgroup\"></span></td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th align=\"right\">" . _("Seats") . ":</th>\n"; + print " <th align=\"right\">" . i("Seats") . ":</th>\n"; print " <td><span id=\"confseats\"></span></td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th align=\"right\">" . _("Repeating") . ":</th>\n"; + print " <th align=\"right\">" . i("Repeating") . ":</th>\n"; print " <td><span id=\"confrepeat\"></span></td>\n"; print " </tr>\n"; print " <tr valign=\"top\">\n"; @@ -465,7 +465,7 @@ function blockAllocationForm() { print " <td><span id=\"confvalue4\"></span></td>\n"; print " </tr>\n"; print "</table>\n"; - print "<span id=\"commentsnote\" class=\"hidden\">" . _("Your additional comments will be submitted.") . "<br><br></span>\n"; + print "<span id=\"commentsnote\" class=\"hidden\">" . i("Your additional comments will be submitted.") . "<br><br></span>\n"; $data = array('extragroups' => $extragroups); if($mode == 'newBlockAllocation') $data['method'] = 'new'; @@ -485,7 +485,7 @@ function blockAllocationForm() { print " </script>\n"; print "</button>\n"; print "<button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - print _("Cancel") . "\n"; + print i("Cancel") . "\n"; print " <script type=\"dojo/method\" event=\"onClick\">\n"; print " clearHideConfirmForm();\n"; print " </script>\n"; @@ -495,65 +495,65 @@ function blockAllocationForm() { # tooltips print "<div dojoType=\"dijit.Tooltip\" connectId=\"seathelp\">\n"; print "<div style=\"width: 440px;\">\n"; - print _("This is the number of environments that will be loaded for the Block Allocation."); + print i("This is the number of environments that will be loaded for the Block Allocation."); print "</div></div>\n"; print "<div dojoType=\"dijit.Tooltip\" connectId=\"grouphelp\">\n"; print "<div style=\"width: 440px;\">\n"; - print _("User in this user group will be able to make reservations for the computers set aside for this block allocation. If you do not see an applicable user group listed, please select \"<font color=\"blue\">(group not listed)</font>\" and describe the group you need in the <strong>Additional Comments</strong> section at the bottom of the page. If this is for a class, make sure to list the course and section number."); + print i("User in this user group will be able to make reservations for the computers set aside for this block allocation. If you do not see an applicable user group listed, please select \"<font color=\"blue\">(group not listed)</font>\" and describe the group you need in the <strong>Additional Comments</strong> section at the bottom of the page. If this is for a class, make sure to list the course and section number."); print "</div></div>\n"; print "<div dojoType=\"dijit.Tooltip\" connectId=\"repeattypehelp\">\n"; print "<div style=\"width: 440px;\">\n"; - print _("For repeating block allocations, there are three ways you can enter the dates and times:") . "<br>\n"; + print i("For repeating block allocations, there are three ways you can enter the dates and times:") . "<br>\n"; print "<ul>\n"; - print "<li>" . _("Repeating Weekly - Use this if the block allocation needs to occur every week.") . " "; - print _("You can make it repeat on a single day each week or on multiple days. The time(s) that it occurs will be the same on all days. You can list as many times as needed.") . "</li>\n"; - print "<li>" . _("Repeating Monthly - Use this if the block allocation needs to occur on a certain day of the month (i.e. 2nd Tuesday each month). You can list as many times as needed for that day of the month.") . "</li>\n"; - print "<li>" . _("List of Dates/Times - Use this to specify any other cases, including single events.") . " "; - print _("You can specify as many date/time combinations as needed.") . "</li>\n"; + print "<li>" . i("Repeating Weekly - Use this if the block allocation needs to occur every week.") . " "; + print i("You can make it repeat on a single day each week or on multiple days. The time(s) that it occurs will be the same on all days. You can list as many times as needed.") . "</li>\n"; + print "<li>" . i("Repeating Monthly - Use this if the block allocation needs to occur on a certain day of the month (i.e. 2nd Tuesday each month). You can list as many times as needed for that day of the month.") . "</li>\n"; + print "<li>" . i("List of Dates/Times - Use this to specify any other cases, including single events.") . " "; + print i("You can specify as many date/time combinations as needed.") . "</li>\n"; print "</ul>\n"; print "</div></div>\n"; print "<div dojoType=\"dijit.Tooltip\" connectId=\"wkfdhelp\">\n"; - print _("This is the first date the block allocation will be used.\n"); + print i("This is the first date the block allocation will be used.\n"); print "</div>\n"; print "<div dojoType=\"dijit.Tooltip\" connectId=\"wkldhelp\">\n"; - print _("This is the last date the block allocation will be used.\n"); + print i("This is the last date the block allocation will be used.\n"); print "</div>\n"; print "<div dojoType=\"dijit.Tooltip\" connectId=\"wkdayshelp\">\n"; print "<div style=\"width: 340px;\">\n"; - print _("Select the checkbox for each of the days you would like the block allocation to occur. For example, check Monday, Wednesday, and Friday for a class that meets on those days."); + print i("Select the checkbox for each of the days you would like the block allocation to occur. For example, check Monday, Wednesday, and Friday for a class that meets on those days."); print "</div></div>\n"; print "<div dojoType=\"dijit.Tooltip\" connectId=\"wktimeshelp\">\n"; print "<div style=\"width: 340px;\">\n"; - print _("Here you specify the start and end times of the block allocation. The times will occur on each of the selected days. You might specify more than one start/end combination if you had multiple sections that met on the same day."); + print i("Here you specify the start and end times of the block allocation. The times will occur on each of the selected days. You might specify more than one start/end combination if you had multiple sections that met on the same day."); print "</div></div>\n"; print "<div dojoType=\"dijit.Tooltip\" connectId=\"mnfdhelp\">\n"; - print _("This is the first date the block allocation will be used.\n"); + print i("This is the first date the block allocation will be used.\n"); print "</div>\n"; print "<div dojoType=\"dijit.Tooltip\" connectId=\"mnldhelp\">\n"; - print _("This is the last date the block allocation will be used.\n"); + print i("This is the last date the block allocation will be used.\n"); print "</div>\n"; print "<div dojoType=\"dijit.Tooltip\" connectId=\"mntimeshelp\">\n"; print "<div style=\"width: 340px;\">\n"; - print _("Here you specify the start and end times of the block allocation. You might specify more than one start/end combination if you had multiple sections that met on the same day."); + print i("Here you specify the start and end times of the block allocation. You might specify more than one start/end combination if you had multiple sections that met on the same day."); print "</div></div>\n"; print "<div dojoType=\"dijit.Tooltip\" connectId=\"listhelp\">\n"; print "<div style=\"width: 300px;\">\n"; - print _("Specify individual dates and times during which the block allocation will occur."); + print i("Specify individual dates and times during which the block allocation will occur."); print "</div></div>\n"; print "<div dojoType=\"dijit.Tooltip\" connectId=\"commenthelp\">\n"; print "<div style=\"width: 340px;\">\n"; - print _("Enter any additional information about this block allocation. < and > are not allowed. If you selected \"<font color=\"blue\">(group not listed)</font>\" as the User group, make sure to clearly describe the requirements of a new user group that will be created for this block allocation."); + print i("Enter any additional information about this block allocation. < and > are not allowed. If you selected \"<font color=\"blue\">(group not listed)</font>\" as the User group, make sure to clearly describe the requirements of a new user group that will be created for this block allocation."); print "</div></div>\n"; } @@ -574,8 +574,8 @@ function AJblockAllocationSubmit() { if($method == 'new') { $managementnodes = getManagementNodes('future'); if(empty($managementnodes)) { - print "alert('" . _("Error encountered while trying to create block allocation:") . "\\n"; - print _("No active management nodes were found. Please try creating the block allocation at a later time.") . "');"; + print "alert('" . i("Error encountered while trying to create block allocation:") . "\\n"; + print i("No active management nodes were found. Please try creating the block allocation at a later time.") . "');"; $data = array('extragroups' => getContinuationVar('extragroups'), 'method' => $method); if($method == 'edit') @@ -664,7 +664,7 @@ function AJblockAllocationSubmit() { . "status, " . "comments) " . "VALUES " - . "('(" . _("awaiting approval") . ")', " + . "('(" . i("awaiting approval") . ")', " . "{$data['imageid']}, " . "{$data['seats']}, " . "{$data['groupid']}, " @@ -809,14 +809,14 @@ function AJblockAllocationSubmit() { } if($method == 'request') { print "clearHideConfirmForm();"; - $txt = "<h2>" . _("Request New Block Allocation") . "</h2>"; - $txt .= _("Your request for a Block Allocation has been submitted for approval.") . " "; + $txt = "<h2>" . i("Request New Block Allocation") . "</h2>"; + $txt .= i("Your request for a Block Allocation has been submitted for approval.") . " "; if(! empty($user['email'])) { - $txt .= _("You should be notified within a few business days of its acceptance or rejection."); + $txt .= i("You should be notified within a few business days of its acceptance or rejection."); } else { - $txt .= "<br><br><font color=\"red\"><strong>" . _("Note:") . "</strong> "; - $h = " " . _("You do not have an email address registered with VCL. Therefore, you will not receive automatic notification when this block allocation is accepted or rejected."); + $txt .= "<br><br><font color=\"red\"><strong>" . i("Note:") . "</strong> "; + $h = " " . i("You do not have an email address registered with VCL. Therefore, you will not receive automatic notification when this block allocation is accepted or rejected."); $txt .= preg_replace("/(.{1,50}([ \n]|$))/", '\1<br>', $h) . "</font>"; } print "dojo.byId('content').innerHTML = '$txt';"; @@ -1188,7 +1188,7 @@ function getCurrentBlockHTML($listonly=0 $blocks[$row['id']]['nextstartactive'] = 0; } else { - $blocks[$row['id']]['nextstart'] = _("none found"); + $blocks[$row['id']]['nextstart'] = i("none found"); $blocks[$row['id']]['nextstartactive'] = 0; } } @@ -1301,18 +1301,18 @@ function getCurrentBlockHTML($listonly=0 $rt .= "<table summary=\"lists current block allocations\">\n"; $rt .= " <TR align=center>\n"; $rt .= " <TD colspan=3></TD>\n"; - $rt .= " <TH>" . _("Name") . "</TH>\n"; - $rt .= " <TH>" . _("Environment") . "</TH>\n"; - $rt .= " <TH>" . _("Reserved<br>Machines") . "</TH>\n"; - $rt .= " <TH>" . _("Reserved<br>For") . "</TH>\n"; - $rt .= " <TH>" . _("Repeating") . "</TH>\n"; - $rt .= " <TH>" . _("Next Start Time") . "</TH>\n"; + $rt .= " <TH>" . i("Name") . "</TH>\n"; + $rt .= " <TH>" . i("Environment") . "</TH>\n"; + $rt .= " <TH>" . i("Reserved<br>Machines") . "</TH>\n"; + $rt .= " <TH>" . i("Reserved<br>For") . "</TH>\n"; + $rt .= " <TH>" . i("Repeating") . "</TH>\n"; + $rt .= " <TH>" . i("Next Start Time") . "</TH>\n"; $rt .= " </TR>\n"; foreach($blocks as $block) { $rt .= " <TR align=center>\n"; $rt .= " <TD>\n"; $rt .= " <button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $rt .= _( "Edit") . "\n"; + $rt .= i( "Edit") . "\n"; $rt .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $cont = addContinuationsEntry('editBlockAllocation', array('blockid' => $block['id'])); $rt .= " location.href = '" . BASEURL . SCRIPT . "?continuation=$cont';\n"; @@ -1321,7 +1321,7 @@ function getCurrentBlockHTML($listonly=0 $rt .= " </TD>\n"; $rt .= " <TD>\n"; $rt .= " <button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $rt .= _( "Delete") . "\n"; + $rt .= i( "Delete") . "\n"; $rt .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $cont = addContinuationsEntry('AJdeleteBlockAllocationConfirm', $block, SECINDAY); $rt .= " deleteBlockConfirm('$cont');\n"; @@ -1330,7 +1330,7 @@ function getCurrentBlockHTML($listonly=0 $rt .= " </TD>\n"; $rt .= " <TD>\n"; $rt .= " <button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $rt .= _( "View Times") . "\n"; + $rt .= i( "View Times") . "\n"; $rt .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $cont = addContinuationsEntry('AJviewBlockAllocationTimes', array('blockid' => $block['id']), SECINDAY); $rt .= " viewBlockTimes('$cont');\n"; @@ -1341,7 +1341,7 @@ function getCurrentBlockHTML($listonly=0 $rt .= " <TD>{$block['image']}</TD>\n"; $rt .= " <TD><a href=\"javascript:void(0)\" onclick=\"viewBlockUsage({$block['id']});\">{$block['machinecnt']}</a></TD>\n"; $rt .= " <TD>{$block['group']}</TD>\n"; - $rt .= " <TD>" . _($block['available']) . "</TD>\n"; + $rt .= " <TD>" . i($block['available']) . "</TD>\n"; if($block['nextstartactive']) { $cont = addContinuationsEntry('viewBlockStatus', array('id' => $block['id'])); $rt .= " <TD><a href=\"" . BASEURL . SCRIPT . "?continuation=$cont\">"; @@ -1356,33 +1356,33 @@ function getCurrentBlockHTML($listonly=0 return $rt; $rt .= "<div id=\"confirmDialog\" dojoType=\"dijit.Dialog\" "; - $rt .= "title=\"" . _("Confirm Delete Block Allocation") . "\">\n"; - $rt .= "<h2>" . _("Confirm Delete Block Allocation") . "</h2>\n"; - $h = _("Please confirm the following values and then click <strong>Delete Block Allocation</strong>"); + $rt .= "title=\"" . i("Confirm Delete Block Allocation") . "\">\n"; + $rt .= "<h2>" . i("Confirm Delete Block Allocation") . "</h2>\n"; + $h = i("Please confirm the following values and then click <strong>Delete Block Allocation</strong>"); $rt .= preg_replace("/(.{1,50}([ \n]|$))/", '\1<br>', $h) . "<br>\n"; $rt .= "<table summary=\"\">\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Name:") . "</th>\n"; + $rt .= " <th align=\"right\">" . i("Name:") . "</th>\n"; $rt .= " <td><span id=\"confname\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Owner:") . "</th>\n"; + $rt .= " <th align=\"right\">" . i("Owner:") . "</th>\n"; $rt .= " <td><span id=\"confowner\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Environment:") . "</th>\n"; + $rt .= " <th align=\"right\">" . i("Environment:") . "</th>\n"; $rt .= " <td><span id=\"confimage\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("User Group:") . "</th>\n"; + $rt .= " <th align=\"right\">" . i("User Group:") . "</th>\n"; $rt .= " <td><span id=\"confgroup\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Seats:") . "</th>\n"; + $rt .= " <th align=\"right\">" . i("Seats:") . "</th>\n"; $rt .= " <td><span id=\"confseats\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Repeating:") . "</th>\n"; + $rt .= " <th align=\"right\">" . i("Repeating:") . "</th>\n"; $rt .= " <td><span id=\"confrepeat\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr valign=\"top\">\n"; @@ -1403,13 +1403,13 @@ function getCurrentBlockHTML($listonly=0 $rt .= " </tr>\n"; $rt .= "</table>\n"; $rt .= "<button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $rt .= _("Delete Block Allocation") . "\n"; + $rt .= i("Delete Block Allocation") . "\n"; $rt .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $rt .= " deleteBlockSubmit();\n"; $rt .= " </script>\n"; $rt .= "</button>\n"; $rt .= "<button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $rt .= _("Cancel") . "\n"; + $rt .= i("Cancel") . "\n"; $rt .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $rt .= " clearHideConfirmDelete();\n"; $rt .= " </script>\n"; @@ -1418,8 +1418,8 @@ function getCurrentBlockHTML($listonly=0 $rt .= "</div>\n"; # confirm dialog $rt .= "<div id=\"viewtimesDialog\" dojoType=\"dijit.Dialog\" "; - $rt .= "title=\"" . _("Block Allocation Times") . "\">\n"; - $rt .= "<h2>" . _("Block Allocation Times") . "</h2>\n"; + $rt .= "title=\"" . i("Block Allocation Times") . "\">\n"; + $rt .= "<h2>" . i("Block Allocation Times") . "</h2>\n"; $rt .= "<table dojoType=\"dojox.grid.DataGrid\" jsId=\"blockTimesGrid\" sortInfo=1 "; $rt .= "style=\"width: 278px; height: 200px;\">\n"; $rt .= "<script type=\"dojo/method\" event=\"onStyleRow\" args=\"row\">\n"; @@ -1427,16 +1427,16 @@ function getCurrentBlockHTML($listonly=0 $rt .= "</script>\n"; $rt .= "<thead>\n"; $rt .= "<tr>\n"; - $rt .= "<th field=\"start\" width=\"60px\" formatter=\"blockTimesGridDate\">" . _("Date") . "</th>\n"; - $rt .= "<th field=\"start\" width=\"54px\" formatter=\"blockTimesGridStart\">" . _("Start") . "</th>\n"; - $rt .= "<th field=\"end\" width=\"54px\" formatter=\"blockTimesGridEnd\">" . _("End") . "</th>\n"; - $rt .= "<th field=\"delbtn\" width=\"60px\">" . _("Skip") . "</th>\n"; + $rt .= "<th field=\"start\" width=\"60px\" formatter=\"blockTimesGridDate\">" . i("Date") . "</th>\n"; + $rt .= "<th field=\"start\" width=\"54px\" formatter=\"blockTimesGridStart\">" . i("Start") . "</th>\n"; + $rt .= "<th field=\"end\" width=\"54px\" formatter=\"blockTimesGridEnd\">" . i("End") . "</th>\n"; + $rt .= "<th field=\"delbtn\" width=\"60px\">" . i("Skip") . "</th>\n"; $rt .= "</tr>\n"; $rt .= "</thead>\n"; $rt .= "</table>\n"; $rt .= "<div align=\"center\">\n"; $rt .= "<button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $rt .= _("Close") . "\n"; + $rt .= i("Close") . "\n"; $rt .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $rt .= " dijit.byId('viewtimesDialog').hide();\n"; $rt .= " </script>\n"; @@ -1446,13 +1446,13 @@ function getCurrentBlockHTML($listonly=0 $rt .= "</div>\n"; # times dialog $rt .= "<div id=\"viewUsageDialog\" dojoType=\"dijit.Dialog\" "; - $rt .= "title=\"" . _("Block Allocation Usage") . "\">\n"; + $rt .= "title=\"" . i("Block Allocation Usage") . "\">\n"; $rt .= "<div id=\"blockusagechartdiv\" class=\"hidden\"></div>\n"; $rt .= "<div id=\"blockusageemptydiv\" class=\"hidden\">"; - $rt .= _("This block allocation has never been used.") . "</div>\n"; + $rt .= i("This block allocation has never been used.") . "</div>\n"; $rt .= "<div align=\"center\">\n"; $rt .= "<button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $rt .= _("Close") . "\n"; + $rt .= i("Close") . "\n"; $rt .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $rt .= " dijit.byId('viewUsageDialog').hide();\n"; $rt .= " </script>\n"; @@ -1508,7 +1508,7 @@ function getUserCurrentBlockHTML($liston foreach($blocks as $id => $request) { if($blocks[$id]['group'] == '') - $blocks[$id]['group'] = _('(unspecified)'); + $blocks[$id]['group'] = i('(unspecified)'); if($request['available'] == 'weekly') { $query = "SELECT DATE_FORMAT(start, '%m/%d/%y') AS swdate, " . "DATE_FORMAT(end, '%m/%d/%y')AS ewdate, " @@ -1611,22 +1611,22 @@ function getUserCurrentBlockHTML($liston } } $rt = ''; - $rt .= "<h2>" . _("Manage Block Allocations") . "</h2>\n"; + $rt .= "<h2>" . i("Manage Block Allocations") . "</h2>\n"; $rt .= "<div id=\"blocklist\">\n"; $rt .= "<table summary=\"lists current block allocations\">\n"; $rt .= " <TR align=center>\n"; $rt .= " <TD colspan=2></TD>\n"; - $rt .= " <TH>" . _("Name") . "</TH>\n"; - $rt .= " <TH>" . _("Environment") . "</TH>\n"; - $rt .= " <TH>" . _("Reserved<br>Machines") . "</TH>\n"; - $rt .= " <TH>" . _("Reserved<br>For") . "</TH>\n"; - $rt .= " <TH>" . _("Repeating") . "</TH>\n"; + $rt .= " <TH>" . i("Name") . "</TH>\n"; + $rt .= " <TH>" . i("Environment") . "</TH>\n"; + $rt .= " <TH>" . i("Reserved<br>Machines") . "</TH>\n"; + $rt .= " <TH>" . i("Reserved<br>For") . "</TH>\n"; + $rt .= " <TH>" . i("Repeating") . "</TH>\n"; $rt .= " </TR>\n"; foreach($blocks as $block) { $rt .= " <TR align=center>\n"; $rt .= " <TD>\n"; $rt .= " <button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $rt .= _( "View") . "\n"; + $rt .= i( "View") . "\n"; $rt .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $cont = addContinuationsEntry('AJviewBlockAllocation', $block, SECINDAY); $rt .= " viewBlockAllocation('$cont');\n"; @@ -1636,7 +1636,7 @@ function getUserCurrentBlockHTML($liston $rt .= " <TD>\n"; if($block['status'] == 'accepted') { $rt .= " <button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $rt .= _( "View Times") . "\n"; + $rt .= i( "View Times") . "\n"; $rt .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $cont = addContinuationsEntry('AJviewBlockAllocationTimes', array('blockid' => $block['id']), SECINDAY); $rt .= " viewBlockTimes('$cont');\n"; @@ -1648,7 +1648,7 @@ function getUserCurrentBlockHTML($liston $rt .= " <TD>{$block['image']}</TD>\n"; $rt .= " <TD>{$block['machinecnt']}</TD>\n"; $rt .= " <TD>{$block['group']}</TD>\n"; - $rt .= " <TD>" . _($block['available']) . "</TD>\n"; + $rt .= " <TD>" . i($block['available']) . "</TD>\n"; $rt .= " </TR>\n"; } $rt .= "</table>\n"; @@ -1657,30 +1657,30 @@ function getUserCurrentBlockHTML($liston return $rt; $rt .= "<div id=\"viewDialog\" dojoType=\"dijit.Dialog\" title=\""; - $rt .= _("Block Allocation") . "\">\n"; + $rt .= i("Block Allocation") . "\">\n"; $rt .= "<table summary=\"\">\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Name") . ":</th>\n"; + $rt .= " <th align=\"right\">" . i("Name") . ":</th>\n"; $rt .= " <td><span id=\"confname\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Owner") . ":</th>\n"; + $rt .= " <th align=\"right\">" . i("Owner") . ":</th>\n"; $rt .= " <td><span id=\"confowner\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Environment") . ":</th>\n"; + $rt .= " <th align=\"right\">" . i("Environment") . ":</th>\n"; $rt .= " <td><span id=\"confimage\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("User group") . ":</th>\n"; + $rt .= " <th align=\"right\">" . i("User group") . ":</th>\n"; $rt .= " <td><span id=\"confgroup\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Seats") . ":</th>\n"; + $rt .= " <th align=\"right\">" . i("Seats") . ":</th>\n"; $rt .= " <td><span id=\"confseats\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Repeating") . ":</th>\n"; + $rt .= " <th align=\"right\">" . i("Repeating") . ":</th>\n"; $rt .= " <td><span id=\"confrepeat\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr valign=\"top\">\n"; @@ -1702,7 +1702,7 @@ function getUserCurrentBlockHTML($liston $rt .= "</table>\n"; $rt .= "<div align=\"center\">\n"; $rt .= "<button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $rt .= _( "Close") . "\n"; + $rt .= i( "Close") . "\n"; $rt .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $rt .= " clearHideView();\n"; $rt .= " </script>\n"; @@ -1711,8 +1711,8 @@ function getUserCurrentBlockHTML($liston $rt .= "</div>\n"; # confirm dialog $rt .= "<div id=\"viewtimesDialog\" dojoType=\"dijit.Dialog\" title=\""; - $rt .= _("Block Allocation Times") . "\">\n"; - $rt .= "<h2>" . _("Block Allocation Times") . "</h2>\n"; + $rt .= i("Block Allocation Times") . "\">\n"; + $rt .= "<h2>" . i("Block Allocation Times") . "</h2>\n"; $rt .= "<table dojoType=\"dojox.grid.DataGrid\" jsId=\"blockTimesGrid\" sortInfo=1 "; $rt .= "style=\"width: 278px; height: 200px;\">\n"; $rt .= "<script type=\"dojo/method\" event=\"onStyleRow\" args=\"row\">\n"; @@ -1721,18 +1721,18 @@ function getUserCurrentBlockHTML($liston $rt .= "<thead>\n"; $rt .= "<tr>\n"; $rt .= "<th field=\"start\" width=\"60px\" formatter=\"blockTimesGridDate\">"; - $rt .= _("Date") . "</th>\n"; + $rt .= i("Date") . "</th>\n"; $rt .= "<th field=\"start\" width=\"54px\" formatter=\"blockTimesGridStart\">"; - $rt .= _("Start") . "</th>\n"; + $rt .= i("Start") . "</th>\n"; $rt .= "<th field=\"end\" width=\"54px\" formatter=\"blockTimesGridEnd\">"; - $rt .= _("End") . "</th>\n"; - $rt .= "<th field=\"delbtn\" width=\"60px\">" . _("Skip") . "</th>\n"; + $rt .= i("End") . "</th>\n"; + $rt .= "<th field=\"delbtn\" width=\"60px\">" . i("Skip") . "</th>\n"; $rt .= "</tr>\n"; $rt .= "</thead>\n"; $rt .= "</table>\n"; $rt .= "<div align=\"center\">\n"; $rt .= "<button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $rt .= _( "Close") . "\n"; + $rt .= i( "Close") . "\n"; $rt .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $rt .= " dijit.byId('viewtimesDialog').hide();\n"; $rt .= " </script>\n"; @@ -1787,12 +1787,12 @@ function getPendingBlockHTML($listonly=0 $h .= " <tr align=center>\n"; $h .= " <td></td>\n"; $h .= " <td></td>\n"; - $h .= " <th>" . _("Environment") . "</th>\n"; - $h .= " <th>" . _("Requested by") . "</th>\n"; - $h .= " <th>" . _("Reserved Machines") . "</th>\n"; - $h .= " <th>" . _("Repeating") . "</th>\n"; - $h .= " <th>" . _("Start Date") . "</th>\n"; - $h .= " <th>" . _("End Date") . "</th>\n"; + $h .= " <th>" . i("Environment") . "</th>\n"; + $h .= " <th>" . i("Requested by") . "</th>\n"; + $h .= " <th>" . i("Reserved Machines") . "</th>\n"; + $h .= " <th>" . i("Repeating") . "</th>\n"; + $h .= " <th>" . i("Start Date") . "</th>\n"; + $h .= " <th>" . i("End Date") . "</th>\n"; $h .= " </tr>\n"; $d = ''; $groups = getUserGroups(0, $user['affiliationid']); @@ -1925,7 +1925,7 @@ function getPendingBlockHTML($listonly=0 $d .= " <tr align=center>\n"; $d .= " <td>\n"; $d .= " <button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $d .= _( "Accept...") . "\n"; + $d .= i( "Accept...") . "\n"; $d .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $cont = addContinuationsEntry('AJacceptBlockAllocationConfirm', $row); $d .= " acceptBlockConfirm('$cont');\n"; @@ -1934,7 +1934,7 @@ function getPendingBlockHTML($listonly=0 $d .= " </td>\n"; $d .= " <td>\n"; $d .= " <button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $d .= _( "Reject...") . "\n"; + $d .= i( "Reject...") . "\n"; $d .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $cont = addContinuationsEntry('AJrejectBlockAllocationConfirm', $row); $d .= " rejectBlockConfirm('$cont');\n"; @@ -1947,34 +1947,34 @@ function getPendingBlockHTML($listonly=0 else $d .= "<td>{$row['unityid']}</td>\n"; $d .= "<td>{$row['numMachines']}</td>\n"; - $d .= "<td>" . _($row['repeating']) . "</td>\n"; + $d .= "<td>" . i($row['repeating']) . "</td>\n"; $d .= "<td>{$row2['start']}</td>\n"; $d .= "<td>{$row['lastdate']}</td>\n"; $d .= " </tr>\n"; } if(empty($d)) - return _("There are currently no pending block allocation requests."); + return i("There are currently no pending block allocation requests."); $rt = $h . $d . "</table>\n"; if($listonly) return $rt; $rt .= "<div id=\"acceptDialog\" dojoType=\"dijit.Dialog\" "; - $rt .= "title=\"" . _("Accept Block Allocation") . "\">\n"; - $rt .= "<h2>" . _("Accept Block Allocation") . "</h2>\n"; - $h = _("Please review the following information, fill in the additional fields, and click <strong>Accept Block Allocation</strong>."); + $rt .= "title=\"" . i("Accept Block Allocation") . "\">\n"; + $rt .= "<h2>" . i("Accept Block Allocation") . "</h2>\n"; + $h = i("Please review the following information, fill in the additional fields, and click <strong>Accept Block Allocation</strong>."); $rt .= preg_replace("/(.{1,100}([ \n]|$))/", '\1<br>', $h) . "<br>"; $rt .= "<table summary=\"\">\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Environment:") . "</th>\n"; + $rt .= " <th align=\"right\">" . i("Environment:") . "</th>\n"; $rt .= " <td><span id=\"acceptimage\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Seats:") . "</th>\n"; + $rt .= " <th align=\"right\">" . i("Seats:") . "</th>\n"; $rt .= " <td><span id=\"acceptseats\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Repeating:") . "</th>\n"; + $rt .= " <th align=\"right\">" . i("Repeating:") . "</th>\n"; $rt .= " <td><span id=\"acceptrepeat\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr valign=\"top\">\n"; @@ -1998,7 +1998,7 @@ function getPendingBlockHTML($listonly=0 $rt .= " <td><span id=\"acceptvalue5\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr id=\"staticusergroup\">\n"; - $rt .= " <th align=\"right\">" . _("User Group:") . "</th>\n"; + $rt .= " <th align=\"right\">" . i("User Group:") . "</th>\n"; $rt .= " <td><span id=\"acceptgroup\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr id=\"warnmsgtr\" class=\"hidden\">\n"; @@ -2008,7 +2008,7 @@ function getPendingBlockHTML($listonly=0 $rt .= " <td colspan=2><hr></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr id=\"editusergroup\" class=\"hidden\">\n"; - $rt .= " <th align=right>" . _("User Group:") . "</th>\n"; + $rt .= " <th align=right>" . i("User Group:") . "</th>\n"; $rt .= " <td>\n"; if(USEFILTERINGSELECT && count($groups) < FILTERINGSELECTTHRESHOLD) { $rt .= " <select dojoType=\"dijit.form.FilteringSelect\" id=groupsel "; @@ -2026,35 +2026,35 @@ function getPendingBlockHTML($listonly=0 $rt .= " </td>\n"; $rt .= " </tr>\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Name:") . "</th>\n"; + $rt .= " <th align=\"right\">" . i("Name:") . "</th>\n"; $rt .= " <td>\n"; $rt .= " <input type=\"text\" dojoType=\"dijit.form.ValidationTextBox\" "; $rt .= "id=\"brname\" required=\"true\" invalidMessage=\""; - $h = _("Name can only contain letters, numbers, spaces, dashes(-), and periods(.) and can be from 3 to 80 characters long"); + $h = i("Name can only contain letters, numbers, spaces, dashes(-), and periods(.) and can be from 3 to 80 characters long"); $rt .= preg_replace("/(.{1,50}([ \n]|$))/", '\1<br>', $h) . "<br>"; $rt .= "\" regExp=\"^([-a-zA-Z0-9\. ]){3,80}$\">\n"; $rt .= " </td>\n"; $rt .= " </tr>\n"; $rt .= "</table><br>\n"; $rt .= "<div id=\"acceptemailblock\">\n"; - $rt .= sprintf(_("The following text will be emailed to %s:"), "<span id=\"acceptemailuser\"></span>"); + $rt .= sprintf(i("The following text will be emailed to %s:"), "<span id=\"acceptemailuser\"></span>"); $rt .= "<br><textarea id=\"acceptemailtext\" dojoType=\"dijit.form.Textarea\" style=\"width: 400px;\">\n"; $rt .= "</textarea>\n"; $rt .= "</div>\n"; $rt .= "<div id=\"acceptemailwarning\" class=\"hidden\">\n"; - $rt .= "<strong>" . _("Note:") . "</strong> "; - $h = _("The requesting user does not have an email address registered with VCL. Therefore, the user cannot be notified automatically."); + $rt .= "<strong>" . i("Note:") . "</strong> "; + $h = i("The requesting user does not have an email address registered with VCL. Therefore, the user cannot be notified automatically."); $rt .= preg_replace("/(.{1,50}([ \n]|$))/", '\1<br>', $h) . "\n"; $rt .= "</div>\n"; $rt .= "<br>\n"; $rt .= "<button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $rt .= _("Accept Block Allocation") . "\n"; + $rt .= i("Accept Block Allocation") . "\n"; $rt .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $rt .= " acceptBlockSubmit();\n"; $rt .= " </script>\n"; $rt .= "</button>\n"; $rt .= "<button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $rt .= _("Cancel") . "\n"; + $rt .= i("Cancel") . "\n"; $rt .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $rt .= " clearHideConfirmAccept();\n"; $rt .= " </script>\n"; @@ -2064,25 +2064,25 @@ function getPendingBlockHTML($listonly=0 $rt .= "</div>\n"; # accept dialog $rt .= "<div id=\"rejectDialog\" dojoType=\"dijit.Dialog\" "; - $rt .= "title=\"" . _("Reject Block Allocation") . "\">\n"; - $rt .= "<h2>" . _("Reject Block Allocation") . "</h2>\n"; - $h = _("Please review the following information, add a reason for rejecting the block allocation, and click <strong>Reject Block Allocation</strong>."); + $rt .= "title=\"" . i("Reject Block Allocation") . "\">\n"; + $rt .= "<h2>" . i("Reject Block Allocation") . "</h2>\n"; + $h = i("Please review the following information, add a reason for rejecting the block allocation, and click <strong>Reject Block Allocation</strong>."); $rt .= preg_replace("/(.{1,100}([ \n]|$))/", '\1<br>', $h) . "<br>\n"; $rt .= "<table summary=\"\">\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Environment:") . "</th>\n"; + $rt .= " <th align=\"right\">" . i("Environment:") . "</th>\n"; $rt .= " <td><span id=\"rejectimage\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr id=\"editusergroup\" class=\"hidden\">\n"; - $rt .= " <th align=\"right\">" . _("User Group:") . "</th>\n"; + $rt .= " <th align=\"right\">" . i("User Group:") . "</th>\n"; $rt .= " <td><span id=\"rejectgroup\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Seats:") . "</th>\n"; + $rt .= " <th align=\"right\">" . i("Seats:") . "</th>\n"; $rt .= " <td><span id=\"rejectseats\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr>\n"; - $rt .= " <th align=\"right\">" . _("Repeating:") . "</th>\n"; + $rt .= " <th align=\"right\">" . i("Repeating:") . "</th>\n"; $rt .= " <td><span id=\"rejectrepeat\"></span></td>\n"; $rt .= " </tr>\n"; $rt .= " <tr valign=\"top\">\n"; @@ -2107,23 +2107,23 @@ function getPendingBlockHTML($listonly=0 $rt .= " </tr>\n"; $rt .= "</table>\n"; $rt .= "<div id=\"rejectemailblock\">\n"; - $rt .= sprintf(_("The following text will be emailed to %s:"), "<span id=\"rejectemailuser\"></span>"); + $rt .= sprintf(i("The following text will be emailed to %s:"), "<span id=\"rejectemailuser\"></span>"); $rt .= "<br></div>\n"; $rt .= "<div id=\"rejectemailwarning\" class=\"hidden\">\n"; - $h = _("The requesting user does not have an email address registered with VCL. Therefore, the user cannot be notified automatically. However, for archival purposes, fill in a reason for rejecting the request:"); + $h = i("The requesting user does not have an email address registered with VCL. Therefore, the user cannot be notified automatically. However, for archival purposes, fill in a reason for rejecting the request:"); $rt .= preg_replace("/(.{1,60}([ \n]|$))/", '\1<br>', $h); $rt .= "\n</div><br>\n"; $rt .= "<textarea id=\"rejectemailtext\" dojoType=\"dijit.form.Textarea\" style=\"width: 400px;\">\n"; $rt .= "</textarea>\n"; $rt .= "<br>\n"; $rt .= "<button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $rt .= _("Reject Block Allocation") . "\n"; + $rt .= i("Reject Block Allocation") . "\n"; $rt .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $rt .= " rejectBlockSubmit();\n"; $rt .= " </script>\n"; $rt .= "</button>\n"; $rt .= "<button dojoType=\"dijit.form.Button\" type=\"button\">\n"; - $rt .= _("Cancel") . "\n"; + $rt .= i("Cancel") . "\n"; $rt .= " <script type=\"dojo/method\" event=\"onClick\">\n"; $rt .= " clearHideConfirmReject();\n"; $rt .= " </script>\n"; @@ -2173,11 +2173,11 @@ function AJdeleteBlockAllocationConfirm( 'repeating' => $data['available'], 'startdate' => $data['smdate'], 'lastdate' => $data['emdate']); - $weeknumArr = array(1 => _("1st"), - 2 => _("2nd"), - 3 => _("3rd"), - 4 => _("4th"), - 5 => _("5th")); + $weeknumArr = array(1 => i("1st"), + 2 => i("2nd"), + 3 => i("3rd"), + 4 => i("4th"), + 5 => i("5th")); $rt['date1'] = "{$weeknumArr[$data['weeknum']]} {$days[($data['day'] - 1)]}"; $rt['times'] = array(); foreach(array_keys($data['smhour']) as $key) { @@ -2284,11 +2284,11 @@ function AJviewBlockAllocation() { 'repeating' => $data['available'], 'startdate' => $data['smdate'], 'lastdate' => $data['emdate']); - $weeknumArr = array(1 => _("1st"), - 2 => _("2nd"), - 3 => _("3rd"), - 4 => _("4th"), - 5 => _("5th")); + $weeknumArr = array(1 => i("1st"), + 2 => i("2nd"), + 3 => i("3rd"), + 4 => i("4th"), + 5 => i("5th")); $rt['date1'] = "{$weeknumArr[$data['weeknum']]} {$days[($data['day'] - 1)]}"; $rt['times'] = array(); foreach(array_keys($data['smhour']) as $key) { @@ -2344,7 +2344,7 @@ function AJacceptBlockAllocationConfirm( $data['ewhour'][$key], $data['ewminute'][$key], $data['ewmeridian'][$key]); } - $rt['email'] = sprintf(_("The VCL Block Allocation you requested for %d seats of %s repeating on a weekly schedule has been accepted."), $data['numMachines'], $data['image']); + $rt['email'] = sprintf(i("The VCL Block Allocation you requested for %d seats of %s repeating on a weekly schedule has been accepted."), $data['numMachines'], $data['image']); } elseif($data['repeating'] == 'monthly') { $rt = array('image' => $data['image'], @@ -2353,11 +2353,11 @@ function AJacceptBlockAllocationConfirm( 'repeating' => $data['repeating'], 'startdate' => $data['smdate'], 'lastdate' => $data['emdate']); - $weeknumArr = array(1 => _("1st"), - 2 => _("2nd"), - 3 => _("3rd"), - 4 => _("4th"), - 5 => _("5th")); + $weeknumArr = array(1 => i("1st"), + 2 => i("2nd"), + 3 => i("3rd"), + 4 => i("4th"), + 5 => i("5th")); $rt['date1'] = "{$weeknumArr[$data['weeknum']]} {$days[($data['day'] - 1)]}"; $rt['times'] = array(); foreach(array_keys($data['smhour']) as $key) { @@ -2366,7 +2366,7 @@ function AJacceptBlockAllocationConfirm( $data['emhour'][$key], $data['emminute'][$key], $data['emmeridian'][$key]); } - $rt['email'] = sprintf(_("The VCL Block Allocation you requested for %d seats of %s repeating on a monthly schedule has been accepted."), $data['numMachines'], $data['image']); + $rt['email'] = sprintf(i("The VCL Block Allocation you requested for %d seats of %s repeating on a monthly schedule has been accepted."), $data['numMachines'], $data['image']); } elseif($data['repeating'] == 'list') { $rt = array('image' => $data['image'], @@ -2381,7 +2381,7 @@ function AJacceptBlockAllocationConfirm( $data['elmeridian'][$key]); } $rt['slots'] = $slots; - $rt['email'] = sprintf(_("The VCL Block Allocation you requested for %d seats of %s during the following time periods has been accepted:") . "\n" . implode("\n", $slots) . "\n", $data['numMachines'], $data['image']); + $rt['email'] = sprintf(i("The VCL Block Allocation you requested for %d seats of %s during the following time periods has been accepted:") . "\n" . implode("\n", $slots) . "\n", $data['numMachines'], $data['image']); } $rt['comments'] = preg_replace("/\n/", "<br>", $data['comments']); if($rt['comments'] == '') @@ -2398,7 +2398,7 @@ function AJacceptBlockAllocationConfirm( array("available"), 0, 0, 0, $data['usergroupid']); if(! array_key_exists($data['imageid'], $groupresources['image'])) - $rt['warnmsg'] = _("Warning: The requested user group does not currently have access to the requested image."); + $rt['warnmsg'] = i("Warning: The requested user group does not currently have access to the requested image."); } $cdata = array('blockid' => $data['id'], 'imageid' => $data['imageid']); @@ -2455,30 +2455,30 @@ function AJacceptBlockAllocationSubmit() $err = 0; if(! preg_match('/^([-a-zA-Z0-9\. ]){3,80}$/', $name)) { - $errmsg = _("The name can only contain letters, numbers, spaces, dashes(-), and periods(.) and can be from 3 to 80 characters long"); + $errmsg = i("The name can only contain letters, numbers, spaces, dashes(-), and periods(.) and can be from 3 to 80 characters long"); $err = 1; } if($validemail) { if(get_magic_quotes_gpc()) $emailtext = stripslashes($emailtext); if(! $err && preg_match('/[<>|]/', $emailtext)) { - $errmsg = _("<>\'s and pipes (|) are not allowed in the email text."); + $errmsg = i("<>\'s and pipes (|) are not allowed in the email text."); $err = 1; } if(! $err && ! preg_match('/[A-Za-z]{2,}/', $emailtext)) { - $errmsg = _("Something must be filled in for the email text."); + $errmsg = i("Something must be filled in for the email text."); $err = 1; } } $groups = getUserGroups(0, $user['affiliationid']); if(! $err && $setusergroup && ! array_key_exists($usergroupid, $groups)) { - $errmsg = _("Invalid user group submitted."); + $errmsg = i("Invalid user group submitted."); $err = 1; } $managementnodes = getManagementNodes('future'); if(! $err && empty($managementnodes)) { - $errmsg = _("Error encountered while trying to create block allocation:") . "\\n\\n"; - $errmsg .= _("No active management nodes were found. Please try accepting the block allocation at a later time."); + $errmsg = i("Error encountered while trying to create block allocation:") . "\\n\\n"; + $errmsg .= i("No active management nodes were found. Please try accepting the block allocation at a later time."); $err = 1; } $dooverride = 0; @@ -2487,7 +2487,7 @@ function AJacceptBlockAllocationSubmit() array("available"), 0, 0, 0, $usergroupid); if(! array_key_exists($imageid, $groupresources['image'])) { - $errmsg = _("Warning: The selected user group does not currently have access to the requested image. You can accept the Block Allocation again to ignore this warning."); + $errmsg = i("Warning: The selected user group does not currently have access to the requested image. You can accept the Block Allocation again to ignore this warning."); $err = 1; $dooverride = 1; } @@ -2509,7 +2509,7 @@ function AJacceptBlockAllocationSubmit() . "WHERE id = $blockid"; doQuery($query, 101); if(! mysql_affected_rows($mysql_link_vcl)) { - $errmsg = _("Error encountered while updating status of block allocation."); + $errmsg = i("Error encountered while updating status of block allocation."); $err = 1; } else { @@ -2554,7 +2554,7 @@ function AJacceptBlockAllocationSubmit() # send accept email to requestor $message = $emailtext . "\n\nVCL Admins"; $mailParams = "-f" . ENVELOPESENDER; - mail($emailuser, _("VCL Block Allocation Accepted"), $message, '', $mailParams); + mail($emailuser, i("VCL Block Allocation Accepted"), $message, '', $mailParams); print "clearHideConfirmAccept();"; @@ -2599,7 +2599,7 @@ function AJrejectBlockAllocationConfirm( $data['ewhour'][$key], $data['ewminute'][$key], $data['ewmeridian'][$key]); } - $rt['email'] = sprintf(_("The VCL Block Allocation you requested for %d seats of %s repeating on a weekly schedule has been rejected.") . " ", $data['numMachines'], $data['image']); + $rt['email'] = sprintf(i("The VCL Block Allocation you requested for %d seats of %s repeating on a weekly schedule has been rejected.") . " ", $data['numMachines'], $data['image']); } elseif($data['repeating'] == 'monthly') { $rt = array('image' => $data['image'], @@ -2608,11 +2608,11 @@ function AJrejectBlockAllocationConfirm( 'repeating' => $data['repeating'], 'startdate' => $data['smdate'], 'lastdate' => $data['emdate']); - $weeknumArr = array(1 => _("1st"), - 2 => _("2nd"), - 3 => _("3rd"), - 4 => _("4th"), - 5 => _("5th")); + $weeknumArr = array(1 => i("1st"), + 2 => i("2nd"), + 3 => i("3rd"), + 4 => i("4th"), + 5 => i("5th")); $rt['date1'] = "{$weeknumArr[$data['weeknum']]} {$days[($data['day'] - 1)]}"; $rt['times'] = array(); foreach(array_keys($data['smhour']) as $key) { @@ -2621,7 +2621,7 @@ function AJrejectBlockAllocationConfirm( $data['emhour'][$key], $data['emminute'][$key], $data['emmeridian'][$key]); } - $rt['email'] = sprintf(_("The VCL Block Allocation you requested for %d seats of %s repeating on a monthly schedule has been rejected.") . " ", $data['numMachines'], $data['image']); + $rt['email'] = sprintf(i("The VCL Block Allocation you requested for %d seats of %s repeating on a monthly schedule has been rejected.") . " ", $data['numMachines'], $data['image']); } elseif($data['repeating'] == 'list') { $rt = array('image' => $data['image'], @@ -2636,7 +2636,7 @@ function AJrejectBlockAllocationConfirm( $data['elmeridian'][$key]); } $rt['slots'] = $slots; - $rt['email'] = sprintf(_("The VCL Block Allocation you requested for %d seats of %s during the following time periods has been rejected.") . "\n" . implode("\n", $slots) . "\n\n", $data['numMachines'], $data['image']); + $rt['email'] = sprintf(i("The VCL Block Allocation you requested for %d seats of %s during the following time periods has been rejected.") . "\n" . implode("\n", $slots) . "\n\n", $data['numMachines'], $data['image']); } $rt['comments'] = preg_replace("/\n/", "<br>", $data['comments']); if($rt['comments'] == '') @@ -2677,23 +2677,23 @@ function AJrejectBlockAllocationSubmit() $err = 0; if($email == $emailtext) { - $errmsg = _("Please include a reason for rejecting the block allocation in the email."); + $errmsg = i("Please include a reason for rejecting the block allocation in the email."); $err = 1; } if(get_magic_quotes_gpc()) $emailtext = stripslashes($emailtext); if(! $err && preg_match('/[<>|]/', $emailtext)) { if($validemail) - $errmsg = _("<>\'s and pipes (|) are not allowed in the email text."); + $errmsg = i("<>\'s and pipes (|) are not allowed in the email text."); else - $errmsg = _("<>\'s and pipes (|) are not allowed in the reject reason."); + $errmsg = i("<>\'s and pipes (|) are not allowed in the reject reason."); $err = 1; } if(! $err && ! preg_match('/[A-Za-z]{2,}/', $emailtext)) { if($validemail) - $errmsg = _("Something must be filled in for the email text."); + $errmsg = i("Something must be filled in for the email text."); else - $errmsg = _("Something must be filled in for the reject reason."); + $errmsg = i("Something must be filled in for the reject reason."); $err = 1; } @@ -2710,7 +2710,7 @@ function AJrejectBlockAllocationSubmit() . "WHERE id = $blockid"; doQuery($query, 101); if(! mysql_affected_rows($mysql_link_vcl)) { - $errmsg = _("Error encountered while updating status of block allocation."); + $errmsg = i("Error encountered while updating status of block allocation."); $err = 1; } } @@ -2726,7 +2726,7 @@ function AJrejectBlockAllocationSubmit() # send reject email to requestor $message = $emailtext . "\n\nVCL Admins"; $mailParams = "-f" . ENVELOPESENDER; - mail($emailuser, _("VCL Block Allocation Rejected"), $message, '', $mailParams); + mail($emailuser, i("VCL Block Allocation Rejected"), $message, '', $mailParams); print "clearHideConfirmReject();"; @@ -2783,12 +2783,12 @@ function AJtoggleBlockTime() { . "WHERE id = $timeid"; $qh = doQuery($query, 101); if(! ($row = mysql_fetch_assoc($qh)) || $row['blockRequestid'] != $blockid) { - $data['error'] = _("Invalid block time submitted"); + $data['error'] = i("Invalid block time submitted"); sendJSON($data); return; } if(datetimeToUnix($row['end']) <= time()) { - $data['error'] = _("The end time for the submitted block allocation time has passed. Therefore, it can no longer be modified."); + $data['error'] = i("The end time for the submitted block allocation time has passed. Therefore, it can no longer be modified."); sendJSON($data); return; } @@ -2827,7 +2827,7 @@ function AJtoggleBlockTime() { //////////////////////////////////////////////////////////////////////////////// function viewBlockStatus() { $blockid = getContinuationVar('id'); - print "<H2>" . _("Block Allocation") . "</H2>\n"; + print "<H2>" . i("Block Allocation") . "</H2>\n"; $data = getBlockAllocationStatus($blockid); if(is_null($data)) { print "The selected Block Allocation no longer exists."; @@ -2840,26 +2840,26 @@ function viewBlockStatus() { print "<div id=statusdiv>\n"; print "<table class=blockStatusData summary=\"lists attributes of block allocation\">\n"; print " <tr>\n"; - print " <th>" . _("Name") . ":</th>\n"; + print " <th>" . i("Name") . ":</th>\n"; print " <td>{$data['name']}</td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th>" . _("Environment") . ":</th>\n"; + print " <th>" . i("Environment") . ":</th>\n"; print " <td>{$data['image']}</td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th>" . _("Resources") . ":</th>\n"; + print " <th>" . i("Resources") . ":</th>\n"; if($data['subimages']) print " <td>{$data['numMachines']} clusters</td>\n"; else print " <td>{$data['numMachines']} computers</td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th>" . _("Starting") . ":</th>\n"; + print " <th>" . i("Starting") . ":</th>\n"; print " <td>$start</td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th>" . _("Ending") . ":</th>\n"; + print " <th>" . i("Ending") . ":</th>\n"; print " <td>$end</td>\n"; print " </tr>\n"; print "</table><br>\n"; @@ -2877,7 +2877,7 @@ function viewBlockStatus() { $used++; } $failed = $data['numMachines'] - $available - $reloading - $used; - print _("Current status of computers") . ":<br>\n"; + print i("Current status of computers") . ":<br>\n"; } else { $imgdata = getImages(0, $data['imageid']); @@ -2913,23 +2913,23 @@ function viewBlockStatus() { $available = $imgavailable[$id]; } $reloading = $data['numMachines'] - $available - $used - $failed; - print _("Current status of clusters:") . "<br>\n"; + print i("Current status of clusters:") . "<br>\n"; } print "<table class=blockStatusData summary=\"lists status of block allocation\">\n"; print " <tr>\n"; - print " <th><font color=green>" . _("Available") . ":</th>\n"; + print " <th><font color=green>" . i("Available") . ":</th>\n"; print " <td id=available>$available</td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th>" . _("Reloading") . ":</th>\n"; + print " <th>" . i("Reloading") . ":</th>\n"; print " <td id=reloading>$reloading</td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th nowrap><font color=#e58304>" . _("Reserved/In use") . ":</th>\n"; + print " <th nowrap><font color=#e58304>" . i("Reserved/In use") . ":</th>\n"; print " <td id=used>$used</td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <th><font color=red>" . _("Failed") . ":</th>\n"; + print " <th><font color=red>" . i("Failed") . ":</th>\n"; print " <td id=failed>$failed</td>\n"; print " </tr>\n"; print "</table>\n"; @@ -3050,17 +3050,17 @@ function processBlockAllocationInput() { $type = processInputVar('type', ARG_STRING); $err = 0; if($method != 'request' && ! preg_match('/^([-a-zA-Z0-9\. \(\)]){3,80}$/', $return['name'])) { - $errmsg = _("The name can only contain letters, numbers, spaces, dashes(-), and periods(.) and can be from 3 to 80 characters long"); + $errmsg = i("The name can only contain letters, numbers, spaces, dashes(-), and periods(.) and can be from 3 to 80 characters long"); $err = 1; } $resources = getUserResources(array("imageAdmin", "imageCheckOut")); $resources["image"] = removeNoCheckout($resources["image"]); if(! array_key_exists($return['imageid'], $resources['image'])) { - $errmsg = _("The submitted image is invalid."); + $errmsg = i("The submitted image is invalid."); $err = 1; } if(! $err && $method != 'request' && ! validateUserid($return['owner'])) { - $errmsg = _("The submitted owner is invalid."); + $errmsg = i("The submitted owner is invalid."); $err = 1; } else @@ -3070,20 +3070,20 @@ function processBlockAllocationInput() { if(! $err && ! array_key_exists($return['groupid'], $groups) && ! array_key_exists($return['groupid'], $extragroups) && $return['groupid'] != 0) { - $errmsg = _("The submitted user group is invalid."); + $errmsg = i("The submitted user group is invalid."); $err = 1; } if(! $err && $return['groupid'] == 0) $return['groupid'] = 'NULL'; if(! $err && ($return['seats'] < MIN_BLOCK_MACHINES || $return['seats'] > MAX_BLOCK_MACHINES)) { - $errmsg = sprintf(_("The submitted number of seats must be between %d and %d."), MIN_BLOCK_MACHINES, MAX_BLOCK_MACHINES); + $errmsg = sprintf(i("The submitted number of seats must be between %d and %d."), MIN_BLOCK_MACHINES, MAX_BLOCK_MACHINES); $err = 1; } if(! $err) { $imgdata = getImages(0, $return['imageid']); $concur = $imgdata[$return['imageid']]['maxconcurrent']; if(! is_null($concur) && $concur != 0 && $return['seats'] > $concur) { - $errmsg = sprintf(_("The selected image can only have %d concurrent reservations. Please reduce the number of requested seats to %d or less."), $concur, $concur); + $errmsg = sprintf(i("The selected image can only have %d concurrent reservations. Please reduce the number of requested seats to %d or less."), $concur, $concur); $err = 1; } } @@ -3095,12 +3095,12 @@ function processBlockAllocationInput() { $return['groupid']); if(! array_key_exists($return['imageid'], $groupresources['image'])) { $dooverride = 1; - $errmsg = _("WARNING - The selected user group does not currently have access to the selected environment. You can submit the Block Allocation again to ignore this warning."); + $errmsg = i("WARNING - The selected user group does not currently have access to the selected environment. You can submit the Block Allocation again to ignore this warning."); $err = 1; } } if(! $err && $type != 'weekly' && $type != 'monthly' && $type != 'list') { - $errmsg = _("You must select one of \"Repeating Weekly\", \"Repeating Monthly\", or \"List of Dates/Times\"."); + $errmsg = i("You must select one of \"Repeating Weekly\", \"Repeating Monthly\", or \"List of Dates/Times\"."); $err = 1; } if(! $err) { @@ -3112,7 +3112,7 @@ function processBlockAllocationInput() { foreach($return['slots'] as $slot) { $tmp = explode('|', $slot); if(count($tmp) != 3) { - $errmsg = _("Invalid date/time submitted."); + $errmsg = i("Invalid date/time submitted."); $err = 1; break; } @@ -3120,7 +3120,7 @@ function processBlockAllocationInput() { if(! $err) { $datets = strtotime($date); if($method != 'edit' && $datets < (time() - SECINDAY)) { - $errmsg = _("The date must be today or later."); + $errmsg = i("The date must be today or later."); $err = 1; break; } @@ -3144,11 +3144,11 @@ function processBlockAllocationInput() { $return['startts'] = strtotime($return['startdate']); $return['endts'] = strtotime($return['enddate']); if($return['startts'] > $return['endts']) { - $errmsg = _("The Last Date of Usage must be the same or later than the First Date of Usage."); + $errmsg = i("The Last Date of Usage must be the same or later than the First Date of Usage."); $err = 1; } elseif($method != 'edit' && $return['startts'] < (time() - SECINDAY)) { - $errmsg = _("The start date must be today or later."); + $errmsg = i("The start date must be today or later."); $err = 1; } $expirets = strtotime("{$return['enddate']} 23:59:59"); @@ -3158,28 +3158,28 @@ function processBlockAllocationInput() { foreach($return['times'] as $time) { $tmp = explode('|', $time); if(count($tmp) != 2) { - $errmsg = _("Invalid start/end time submitted"); + $errmsg = i("Invalid start/end time submitted"); $err = 1; break; } $start = explode(':', $tmp[0]); if(count($start) != 2 || ! is_numeric($start[0]) || ! is_numeric($start[1]) || $start[0] < 0 || $start[0] > 23 || $start[1] < 0 || $start[1] > 59) { - $errmsg = _("Invalid start time submitted"); + $errmsg = i("Invalid start time submitted"); $err = 1; break; } $end = explode(':', $tmp[1]); if(count($end) != 2 || ! is_numeric($end[0]) || ! is_numeric($end[1]) || $end[0] < 0 || $end[0] > 23 || $end[1] < 0 || $end[1] > 59) { - $errmsg = _("Invalid end time submitted"); + $errmsg = i("Invalid end time submitted"); $err = 1; break; } $start = minuteOfDay($start[0], $start[1]); $end = minuteOfDay($end[0], $end[1]); if($start >= $end) { - $errmsg = _("Each start time must be less than the corresponding end time."); + $errmsg = i("Each start time must be less than the corresponding end time."); $err = 1; break; } @@ -3201,7 +3201,7 @@ function processBlockAllocationInput() { if(! $err) { foreach(explode(',', $days) as $day) { if($day == '' || $day < 0 || $day > 6) { - $errmsg = _("Invalid day submitted."); + $errmsg = i("Invalid day submitted."); $err = 1; break; } @@ -3209,7 +3209,7 @@ function processBlockAllocationInput() { } } if(! $err && ($return['daymask'] & $validdays) == 0) { - $errmsg = _("No valid days submitted for the specified date range."); + $errmsg = i("No valid days submitted for the specified date range."); $err = 1; } } @@ -3217,17 +3217,17 @@ function processBlockAllocationInput() { $return['weeknum'] = processInputVar('weeknum', ARG_NUMERIC); $return['day'] = processInputVar('day', ARG_NUMERIC); if(! $err && ($return['weeknum'] < 1 || $return['weeknum'] > 5)) { - $errmsg = _("Invalid week number submitted."); + $errmsg = i("Invalid week number submitted."); $err = 1; } if(! $err && ($return['day'] < 1 || $return['day'] > 7)) { - $errmsg = _("Invalid day of week submitted."); + $errmsg = i("Invalid day of week submitted."); $err = 1; } $times = getMonthlyBlockTimes('', $return['startts'], $return['endts'], $return['day'], $return['weeknum'], $return['times']); if(! $err && empty($times)) { - $errmsg = _("Specified day of month not found in date range."); + $errmsg = i("Specified day of month not found in date range."); $err = 1; } } @@ -3237,7 +3237,7 @@ function processBlockAllocationInput() { if(get_magic_quotes_gpc()) $return['comments'] = stripslashes($return['comments']); if(! $err && preg_match('/[<>]/', $return['comments'])) { - $errmsg = _("<>\'s are not allowed in the comments."); + $errmsg = i("<>\'s are not allowed in the comments."); $err = 1; } } @@ -3479,7 +3479,7 @@ function AJpopulateBlockStore() { $query = "SELECT repeating FROM blockRequest WHERE id = $blockid"; $qh = doQuery($query, 101); if(! ($row = mysql_fetch_assoc($qh))) { - sendJSON(array('error' => _("Error: Failed to fetch start/end times for block allocation."))); + sendJSON(array('error' => i("Error: Failed to fetch start/end times for block allocation."))); return; } if($row['repeating'] == 'weekly' || $row['repeating'] == 'monthly') { @@ -3572,8 +3572,8 @@ function AJpopulateBlockStore() { /// //////////////////////////////////////////////////////////////////////////////// function viewBlockAllocatedMachines() { - print "<h2>" . _("Block Allocated Machines") . "</h2>\n"; - print _("Start time:") . " \n"; + print "<h2>" . i("Block Allocated Machines") . "</h2>\n"; + print i("Start time:") . " \n"; $start = unixToDatetime(unixFloor15(time() - 3600)); list($sdate, $stime) = explode(' ', $start); print "<div type=\"text\" id=\"chartstartdate\" dojoType=\"dijit.form.DateTextBox\" "; @@ -3582,15 +3582,15 @@ function viewBlockAllocatedMachines() { print "required=\"true\" value=\"T$stime\" style=\"width: 78px\"></div>\n"; print "<button dojoType=\"dijit.form.Button\" type=\"button\" "; print "id=\"updatechart\">\n"; - print _("Update Charts") . "\n"; + print i("Update Charts") . "\n"; print " <script type=\"dojo/method\" event=\"onClick\">\n"; print " updateAllocatedMachines();\n"; print " </script>\n"; print "</button>\n"; - print "<h3>" . _("Bare Machines") . "</h3>\n"; + print "<h3>" . i("Bare Machines") . "</h3>\n"; print "<div id=\"totalbare\"></div>\n"; print getChartHTML('allocatedBareMachines'); - print "<h3>" . _("Virtual Machines") . "</h3>\n"; + print "<h3>" . i("Virtual Machines") . "</h3>\n"; print "<div id=\"totalvirtual\"></div>\n"; print getChartHTML('allocatedVirtualMachines'); $cont = addContinuationsEntry('AJgetBlockAllocatedMachineData', array('val' => 0), SECINDAY, 1, 0);
