You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2015/02/12 16:09:23 UTC

svn commit: r1659286 [4/4] - in /vcl/trunk/web: ./ .ht-inc/ js/ js/resources/

Modified: vcl/trunk/web/.ht-inc/statistics.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/statistics.php?rev=1659286&r1=1659285&r2=1659286&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/statistics.php (original)
+++ vcl/trunk/web/.ht-inc/statistics.php Thu Feb 12 15:09:22 2015
@@ -41,7 +41,7 @@ function selectStatistics() {
 	list($month1, $day1, $year1) = explode(',', date('n,j,Y', time() - 
 	                                    (SECINDAY * 6)));
 	list($month2, $day2, $year2) = explode(',', date('n,j,Y', time()));
-	print _("<H2>Statistic Information</H2>\n");
+	print "<H2>" . _("Statistic Information") . "</H2>\n";
 	if($submitErr) {
 		printSubmitErr(STARTERR);
 		printSubmitErr(ENDERR);
@@ -56,7 +56,7 @@ function selectStatistics() {
 	}
 	else
 		$affilid = $user['affiliationid'];
-	print _("Select a starting date:<br>\n");
+	print _("Select a starting date:") . "<br>\n";
 	$months = array('');
 	for($i = 2 * SECINDAY, $cnt = 1; $cnt < 13; $i += SECINMONTH, $cnt++)
 		$months[$cnt] = strftime('%B', $i);
@@ -80,7 +80,7 @@ function selectStatistics() {
 	printSelectInput("day1", $days, $daykey1);
 	printSelectInput("year1", $years, $yearkey1);
 	print "<br>\n";
-	print _("Select an ending date:<br>\n");
+	print _("Select an ending date:") . "<br>\n";
 	if(! $submitErr) {
 		$monthkey2 = $month2;
 		$daykey2 = array_search($day2, $days);
@@ -93,8 +93,8 @@ function selectStatistics() {
 	$cont = addContinuationsEntry('viewstats');
 	if(checkUserHasPerm('View Statistics by Affiliation')) {
 		print "<input type=radio id=stattype1 name=continuation value=\"$cont\" checked>\n";
-		print "<label for=stattype1>View General Statistics</label> - \n";
-		print _("Select an affiliation:\n");
+		print "<label for=stattype1>" . _("View General Statistics") . "</label> - \n";
+		print _("Select an affiliation:") . "\n";
 		$affils = getAffiliations();
 		if(! array_key_exists($affilid, $affils))
 			$affilid = $user['affiliationid'];
@@ -116,13 +116,14 @@ function selectStatistics() {
 		               'provs' => $provs);
 		$cont2 = addContinuationsEntry('viewstats', $cdata);
 		print "<input type=radio id=stattype3 name=continuation value=\"$cont2\">\n";
-		print "<label for=stattype3>View Statistics by provisioning engine</label>:\n";
+		print "<label for=stattype3>" . _("View Statistics by provisioning engine");
+		print "</label>:\n";
 		printSelectInput("provid", $provs);
 		print "<br>\n";
 	}
 	else
 		print "<INPUT type=hidden name=continuation value=\"$cont\">\n";
-	print _("<INPUT type=submit value=Submit>\n");
+	print "<INPUT type=submit value=" . _("Submit") . ">\n";
 	print "</FORM>\n";
 }
 
@@ -165,7 +166,7 @@ function viewStatistics() {
 		$affilid = $user['affiliationid'];
 
 	if($affilid == 0)
-		$statsfor = "All Affiliations";
+		$statsfor = _("All Affiliations");
 	else
 		$statsfor = $affils[$affilid];
 
@@ -173,19 +174,15 @@ function viewStatistics() {
 	$end = "$year2-$month2-$day2 23:59:59";
 	if(! checkdate($month1, $day1, $year1)) {
 		$submitErr |= STARTERR;
-		$submitErrMsg[STARTERR] = _("The selected start date is not valid. Please ")
-		                        . _("select a valid date.<br>\n");
+		$submitErrMsg[STARTERR] = _("The selected start date is not valid. Please select a valid date.") . "<br>\n";
 	}
 	if(! checkdate($month2, $day2, $year2)) {
 		$submitErr |= ENDERR;
-		$submitErrMsg[ENDERR] = _("The selected end date is not valid. Please ")
-		                      . _("select a valid date.<br>\n");
+		$submitErrMsg[ENDERR] = _("The selected end date is not valid. Please select a valid date.") . "<br>\n";
 	}
 	if(datetimeToUnix($start) > datetimeToUnix($end)) {
 		$submitErr |= ORDERERR;
-		$submitErrMsg[ORDERERR] = _("The selected end date is before the selected ")
-		                        . _("start date.  Please select an end date equal ")
-		                        . _("to or greater than the start date.<br>\n");
+		$submitErrMsg[ORDERERR] = _("The selected end date is before the selected start date. Please select an end date equal to or greater than the start date.") . "<br>\n";
 	}
 	if($submitErr) {
 		selectStatistics();
@@ -197,13 +194,13 @@ function viewStatistics() {
 		print "<H2>" . _("Statistic Information for") . " $statsfor</H2>\n";
 	elseif($mode2 == 'provisioning')
 		print "<H2>" . _("Statistic Information for") . " {$provs[$provid]}</H2>\n";
-	print _("<H3>Reservation information between ");
+	print "<H3>";
 	$tmp = mktime(0, 0, 0, $month1, $day1, $year1);
-	print strftime('%x', $tmp);
-	print _(" and ");
+	$starttime = strftime('%x', $tmp);
 	$tmp = mktime(0, 0, 0, $month2, $day2, $year2);
-	print strftime('%x', $tmp);
-	print ":</H3>\n";
+	$endtime = strftime('%x', $tmp);
+	printf(_("Reservation information between %s and %s:"), $starttime, $endtime);
+	print "</H3>\n";
 	$reloadid = getUserlistID('vclreload@Local');
 	if($mode2 == 'default') {
 		$query = "SELECT l.userid, "
@@ -396,45 +393,47 @@ function viewStatistics() {
 	print "<DIV align=center>\n";
 	print "<TABLE>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>Total Reservations:</TH>\n");
+	print "    <TH align=right>" . _("Total Reservations:") . "</TH>\n";
 	print "    <TD>$totalreservations</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>Total Hours Used:</TH>\n");
+	print "    <TH align=right>" . _("Total Hours Used:") . "</TH>\n";
 	print "    <TD>" . (int)($totalhours / 3600) . "</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>\"Now\" Reservations:</TH>\n");
+	print "    <TH align=right>" . _("\"Now\" Reservations:") . "</TH>\n";
 	print "    <TD>$nows</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>\"Later\" Reservations:</TH>\n");
+	print "    <TH align=right>" . _("\"Later\" Reservations:") . "</TH>\n";
 	print "    <TD>$futures</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>Unavailable:</TH>\n");
+	print "    <TH align=right>" . _("Unavailable:") . "</TH>\n";
 	print "    <TD>$notavailable</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>Load times &lt; 2 minutes:</TH>\n");
+	print "    <TH align=right>" . _("Load times &lt; 2 minutes:") . "</TH>\n";
 	print "    <TD>{$loadtimes['2less']}</TD>\n";
 	print "  </TR>\n";
-	print _("    <TH align=right>Load times 2-6 minutes:</TH>\n");
+	print "    <TH align=right>" . _("Load times 2-6 minutes:") . "</TH>\n";
 	print "    <TD>{$loadtimes['2to6']}</TD>\n";
 	print "  </TR>\n";
-	print _("    <TH align=right>Load times 6-8 minutes:</TH>\n");
+	print "    <TH align=right>" . _("Load times 6-8 minutes:") . "</TH>\n";
 	print "    <TD>{$loadtimes['6to8']}</TD>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>Load times &gt;= 8 minutes:</TH>\n");
+	print "    <TH align=right>" . _("Load times &gt;= 8 minutes:") . "</TH>\n";
 	print "    <TD>{$loadtimes['8more']}</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>Total Unique Users:</TH>\n");
+	print "    <TH align=right>" . _("Total Unique Users:") . "</TH>\n";
 	print "    <TD>" . count($users) . "</TD>\n";
 	print "  </TR>\n";
 	foreach(array_keys($osusers) as $key) {
 		print "  <TR>\n";
-		print _("    <TH align=right>Unique Users of ") . $key . _(":</TH>\n");
+		print "    <TH align=right>";
+		printf(_("Unique Users of %s:"), $key);
+		print "</TH>\n";
 		print "    <TD>" . count($osusers[$key]) . "</TD>\n";
 		print "  </TR>\n";
 	}
@@ -443,14 +442,14 @@ function viewStatistics() {
 	print "<TABLE>\n";
 	print "  <TR>\n";
 	print "    <TD></TD>\n";
-	print _("    <TH>Reservations</TH>\n");
-	print _("    <TH>Unique Users</TH>\n");
-	print _("    <TH>Hours Used</TH>\n");
-	print _("    <TH>&lt; 2 min wait</TH>\n");
-	print _("    <TH>2-6 min wait</TH>\n");
-	print _("    <TH>6-8 min wait</TH>\n");
-	print _("    <TH>&gt;= 8 min wait</TH>\n");
-	print _("    <TH>Failures</TH>\n");
+	print "    <TH>" . _("Reservations") . "</TH>\n";
+	print "    <TH>" . _("Unique Users") . "</TH>\n";
+	print "    <TH>" . _("Hours Used") . "</TH>\n";
+	print "    <TH>" . _("&lt; 2 min wait") . "</TH>\n";
+	print "    <TH>" . _("2-6 min wait") . "</TH>\n";
+	print "    <TH>" . _("6-8 min wait") . "</TH>\n";
+	print "    <TH>" . _("&gt;= 8 min wait") . "</TH>\n";
+	print "    <TH>" . _("Failures") . "</TH>\n";
 	print "  </TR>\n";
 	foreach($imagecount as $key => $value) {
 		print "  <TR>\n";
@@ -480,79 +479,79 @@ function viewStatistics() {
 	}
 	print "</TABLE>\n";
 
-	print _("<H3>Durations:</H3>\n");
+	print "<H3>" . _("Durations:") . "</H3>\n";
 	print "<TABLE>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>0 - 30 Min:</TH>\n");
+	print "    <TH align=right>" . _("0 - 30 Min:") . "</TH>\n";
 	print "    <TD>" . $lengths["30min"] . "</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>30 Min - 1 Hour:</TH>\n");
+	print "    <TH align=right>" . _("30 Min - 1 Hour:") . "</TH>\n";
 	print "    <TD>" . $lengths["1hour"] . "</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>1 Hour - 2 Hours:</TH>\n");
+	print "    <TH align=right>" . _("1 Hour - 2 Hours:") . "</TH>\n";
 	print "    <TD>" . $lengths["2hours"] . "</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>2 Hours - 4 Hours:</TH>\n");
+	print "    <TH align=right>" . _("2 Hours - 4 Hours:") . "</TH>\n";
 	print "    <TD>" . $lengths["4hours"] . "</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>4 Hours - 6 Hours:</TH>\n");
+	print "    <TH align=right>" . _("4 Hours - 6 Hours:") . "</TH>\n";
 	print "    <TD>" . $lengths["6hours"] . "</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>6 Hours - 8 Hours:</TH>\n");
+	print "    <TH align=right>" . _("6 Hours - 8 Hours:") . "</TH>\n";
 	print "    <TD>" . $lengths["8hours"] . "</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>8 Hours - 10 Hours:</TH>\n");
+	print "    <TH align=right>" . _("8 Hours - 10 Hours:") . "</TH>\n";
 	print "    <TD>" . $lengths["10hours"] . "</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>&gt; 10 Hours:</TH>\n");
+	print "    <TH align=right>" . _("&gt; 10 Hours:") . "</TH>\n";
 	print "    <TD>" . $lengths["10hrsplus"] . "</TD>\n";
 	print "  </TR>\n";
 	print "</TABLE>\n";
 
-	print _("<H3>Ending information:</H3>\n");
+	print "<H3>" . _("Ending information:") . "</H3>\n";
 	print "<TABLE>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>Deleted:</TH>\n");
+	print "    <TH align=right>" . _("Deleted:") . "</TH>\n";
 	print "    <TD>" . $ending["deleted"] . "</TD>\n";
 	print "    <TD rowspan=7><img src=\"images/blank.gif\" width=5></TD>\n";
-	print _("    <TD>(Future reservation deleted before start time reached)</TD>\n");
+	print "    <TD>" . _("(Future reservation deleted before start time reached)") . "</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>Released:</TH>\n");
+	print "    <TH align=right>" . _("Released:") . "</TH>\n";
 	print "    <TD>" . $ending["released"] . "</TD>\n";
-	print _("    <TD>(Reservation released before end time reached)</TD>\n");
+	print "    <TD>" . _("(Reservation released before end time reached)") . "</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>Not Acknowledged:</TH>\n");
+	print "    <TH align=right>" . _("Not Acknowledged:") . "</TH>\n";
 	print "    <TD>" . $ending["noack"] . "</TD>\n";
-	print _("    <TD>(\"Connect!\" button never clicked)</TD>\n");
+	print "    <TD>" . _("(\"Connect!\" button never clicked)") . "</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>No Login:</TH>\n");
+	print "    <TH align=right>" . _("No Login:") . "</TH>\n";
 	print "    <TD>" . $ending["nologin"] . "</TD>\n";
-	print _("    <TD>(User never logged in)</TD>\n");
+	print "    <TD>" . _("(User never logged in)") . "</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>End of Reservation:</TH>\n");
+	print "    <TH align=right>" . _("End of Reservation:") . "</TH>\n";
 	print "    <TD>" . $ending["EOR"] . "</TD>\n";
-	print _("    <TD>(End of reservation reached)</TD>\n");
+	print "    <TD>" . _("(End of reservation reached)") . "</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>Timed Out:</TH>\n");
+	print "    <TH align=right>" . _("Timed Out:") . "</TH>\n";
 	print "    <TD>" . $ending["timeout"] . "</TD>\n";
-	print _("    <TD>(Disconnect and no reconnection within 15 minutes)</TD>\n");
+	print "    <TD>" . _("(Disconnect and no reconnection within 15 minutes)") . "</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
-	print _("    <TH align=right>Failed:</TH>\n");
+	print "    <TH align=right>" . _("Failed:") . "</TH>\n";
 	print "    <TD>" . $ending["failed"] . "</TD>\n";
-	print _("    <TD>(Reserved computer failed to get prepared for user)</TD>\n");
+	print "    <TD>" . _("(Reserved computer failed to get prepared for user)") . "</TD>\n";
 	print "  </TR>\n";
 	print "</TABLE>\n";
 	print "<br>\n";
@@ -567,20 +566,20 @@ function viewStatistics() {
 	               'affilid' => $affilid,
 	               'mode' => $mode2,
 	               'provid' => $provid);
-	print _("<H2>Reservations by Day</H2>\n");
+	print "<H2>" . _("Reservations by Day") . "</H2>\n";
 	print "<small>" . _("(Reservations with start time on given day)") . "</small><br>\n";
 	$cdata['divid'] = 'resbyday';
 	$cont = addContinuationsEntry('AJgetStatData', $cdata);
 	print "<input type=hidden id=statdaycont value=\"$cont\">\n";
 	print "<div id=\"resbyday\" class=\"statgraph\">(Loading...)</div>\n";
 
-	print _("<H2>Max Concurrent Reservations By Day</H2>\n");
+	print "<H2>" . _("Max Concurrent Reservations By Day") . "</H2>\n";
 	$cdata['divid'] = 'maxconcurresday';
 	$cont = addContinuationsEntry('AJgetStatData', $cdata);
 	print "<input type=hidden id=statconcurrescont value=\"$cont\">\n";
 	print "<div id=\"maxconcurresday\" class=\"statgraph\">Loading graph data...</div>\n";
 
-	print _("<H2>Max Concurrent Blade Reservations By Day</H2>\n");
+	print "<H2>" . _("Max Concurrent Blade Reservations By Day") . "</H2>\n";
 	$cdata['divid'] = 'maxconcurbladeday';
 	$cont = addContinuationsEntry('AJgetStatData', $cdata);
 	print "<input type=hidden id=statconcurbladecont value=\"$cont\">\n";
@@ -592,7 +591,7 @@ function viewStatistics() {
 	print "<input type=hidden id=statconcurvmcont value=\"$cont\">\n";
 	print "<div id=\"maxconcurvmday\" class=\"statgraph\">Loading graph data...</div>\n";
 
-	print _("<H2>Reservations by Hour</H2>\n");
+	print "<H2>" . _("Reservations by Hour") . "</H2>\n";
 	print "<small>(" . _("Active reservations during given hour averaged over selected dates") . ")</small><br><br>\n";
 	$cdata['divid'] = 'resbyhour';
 	$cont = addContinuationsEntry('AJgetStatData', $cdata);

Modified: vcl/trunk/web/.ht-inc/userpreferences.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/userpreferences.php?rev=1659286&r1=1659285&r2=1659286&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/userpreferences.php (original)
+++ vcl/trunk/web/.ht-inc/userpreferences.php Thu Feb 12 15:09:22 2015
@@ -52,10 +52,10 @@ function userpreferences() {
 			$data["resolution"] = $user["width"] . "x" . $user["height"];
 	}
 
-	print _("<H2 align=center>User Preferences</H2>\n");
+	print "<H2 align=center>" . _("User Preferences") . "</H2>\n";
 	print "<div align=center id=status class=visible>\n";
 	if($mode == "submituserprefs") {
-		print _("<font color=green>User preferences successfully updated</font><br>\n");
+		print "<font color=green>" . _("User preferences successfully updated") . "</font><br>\n";
 	}
 	print "</div>\n";
 	print "<table summary=\"\">\n";
@@ -68,14 +68,14 @@ function userpreferences() {
 	   $user['affiliation'] == 'Local') {
 		$showpersonal = 1;
 		print "      <li><a href=#personal onclick=\"";
-		print _("show('personal'); return false;\">Personal&nbsp;Information</a>");
+		print "show('personal'); return false;\">" . _("Personal Information") . "</a>";
 		print "</li>\n";
 	}
 	print "      <li><a href=#rdpfile onclick=\"";
-	print _("show('rdpfile'); return false;\">RDP&nbsp;Preferences</a>");
+	print "show('rdpfile'); return false;\">" . _("RDP Preferences") . "</a>";
 	print "</li>\n";
 	print "      <li><a href=#uiprefs onclick=\"javascript:show('uiprefs'); ";
-	print _("return false\">General&nbsp;Preferences</a></li>\n");
+	print "return false\">" . _("General Preferences") . "</a></li>\n";
 	print "      </ul>\n";
 	print "      </div>\n";
 	print "    </TD>\n";
@@ -83,20 +83,20 @@ function userpreferences() {
 	print "    <TD rowspan=2>\n";
 	if($showpersonal) {
 		print "      <fieldset id=personal class=shown>\n";
-		print _("      <legend>Personal</legend>\n");
+		print "      <legend>" . _("Personal") . "</legend>\n";
 		print "      <FORM action=\"" . BASEURL . SCRIPT . "\" method=post>\n";
 		print "      <table summary=\"displays your personal information\">\n";
 		$showsubmit = 0;
 		if(! empty($user['firstname'])) {
 			print "        <TR>\n";
-			print _("          <TH align=right>First Name<a href=#updateinfo>*</a>:</TH>\n");
+			print "          <TH align=right>" . _("First Name:") . "<a href=#updateinfo>*</a></TH>\n";
 			print "          <TD>" . $user["firstname"] . "</TD>\n";
 			print "          <TD></TD>\n";
 			print "        </TR>\n";
 		}
 		if(! empty($user['lastname'])) {
 			print "        <TR>\n";
-			print _("          <TH align=right>Last Name<a href=#updateinfo>*</a>:</TH>\n");
+			print "          <TH align=right>" . _("Last Name:") . "<a href=#updateinfo>*</a></TH>\n";
 			print "          <TD>" . $user["lastname"] . "</TD>\n";
 			print "          <TD></TD>\n";
 			print "        </TR>\n";
@@ -104,7 +104,7 @@ function userpreferences() {
 		# preferred name is stored locally; allow setting preferred name if a firstname is defined
 		if(! empty($user['firstname'])) {
 			print "        <TR>\n";
-			print _("          <TH align=right>Preferred Name:</TH>\n");
+			print "          <TH align=right>" . _("Preferred Name:") . "</TH>\n";
 			print "          <TD><label class=hidden for=preferredname>Preferred Name</label>\n";
 			print "              <INPUT type=text name=preferredname maxlength=100 ";
 			print "size=15 value=\"" . $data["preferredname"] . "\"></TD>\n";
@@ -116,17 +116,17 @@ function userpreferences() {
 		}
 		if(! empty($user['email'])) {
 			print "        <TR>\n";
-			print _("          <TH align=right>Email Address<a href=#updateinfo>*</a>:</TH>\n");
+			print "          <TH align=right>" . _("Email Address:") . "<a href=#updateinfo>*</a></TH>\n";
 			print "          <TD>" . $user["email"] . "</TD>\n";
 			print "          <TD></TD>\n";
 			print "        </TR>\n";
 		}
 		if($user['affiliation'] == 'Local') {
 			print "        <TR>\n";
-			print _("          <TD colspan=3 align=center><h3>Change Password</h3></TD>\n");
+			print "          <TD colspan=3 align=center><h3>" . _("Change Password") . "</h3></TD>\n";
 			print "        </TR>\n";
 			print "        <TR>\n";
-			print _("          <TH align=right>Current Password:</TH>\n");
+			print "          <TH align=right>" . _("Current Password:") . "</TH>\n";
 			print "          <TD>\n";
 			print "            <label class=hidden for=currentpassword>Current Password</label>\n";
 			print "            <INPUT type=password name=currentpassword maxlength=100 size=15>\n";
@@ -136,7 +136,7 @@ function userpreferences() {
 			print "</TD>\n";
 			print "        </TR>\n";
 			print "        <TR>\n";
-			print _("          <TH align=right>New Password:</TH>\n");
+			print "          <TH align=right>" . _("New Password:") . "</TH>\n";
 			print "          <TD>\n";
 			print "            <label class=hidden for=newpassword>New Password</label>\n";
 			print "            <INPUT type=password name=newpassword maxlength=100 ";
@@ -145,7 +145,7 @@ function userpreferences() {
 			print "          <TD></TD>\n";
 			print "        </TR>\n";
 			print "        <TR>\n";
-			print _("          <TH align=right>Confirm Password:</TH>\n");
+			print "          <TH align=right>" . _("Confirm Password:") . "</TH>\n";
 			print "          <TD>\n";
 			print "            <label class=hidden for=confirmpassword>Confirm Password</label>\n";
 			print "            <INPUT type=password name=confirmpassword maxlength=100 ";
@@ -164,7 +164,7 @@ function userpreferences() {
 			$cont = addContinuationsEntry('confirmpersonalprefs', array(), SECINDAY, 1, 1, 1);
 			print "      <INPUT type=hidden name=continuation value=\"$cont\">\n";
 			print "      <div align=center>\n";
-			print _("      <INPUT type=submit value=\"Submit Changes\">\n");
+			print "      <INPUT type=submit value=\"" . _("Submit Changes") . "\">\n";
 			print "      </div>\n";
 		}
 		print "      </FORM>\n";
@@ -172,18 +172,18 @@ function userpreferences() {
 	}
 
 	print "      <fieldset id=rdpfile class=shown>\n";
-	print _("      <legend>RDP</legend>\n");
+	print "      <legend>" . _("RDP") . "</legend>\n";
 	print "      <FORM action=\"" . BASEURL . SCRIPT . "\" method=post>\n";
 	print "      <table summary=\"lists adjustable preferences for the RDP ";
 	print "file that is sent when you click the Get RDP File button on the ";
 	print "Connect! page and the port on which RDP is listening\">\n";
 	print "        <TR>\n";
-	print _("          <TD colspan=3><small>Try decreasing <em>Resolution</em> or <em>");
-	print _("Color Depth</em> to<br>speed up your connection if things seem ");
-	print _("slow<br>when connected to a remote computer.</small></TD>\n");
+	print "          <TD colspan=3><div style=\"width: 300px;\"><small>";
+	print _("Try decreasing <em>Resolution</em> or <em>Color Depth</em> to speed up your connection if things seem slow when connected to a remote computer.");
+	print "</div></small></TD>\n";
 	print "        </TR>\n";
 	print "        <TR>\n";
-	print _("          <TH align=right>Resolution:</TH>\n");
+	print "          <TH align=right>" . _("Resolution:") . "</TH>\n";
 	$resolutionArray = array("Full Screen" => "Full Screen",
 	                         "1920x1440" => "1920x1440",
 	                         "1600x1200" => "1600x1200",
@@ -204,7 +204,7 @@ function userpreferences() {
 	print "          <TD></TD>\n";
 	print "        </TR>\n";
 	print "        <TR>\n";
-	print _("          <TH align=right>Color Depth:</TH>\n");
+	print "          <TH align=right>" . _("Color Depth:") . "</TH>\n";
 	print "          <TD>\n";
 	$colordepth = array("8" => "8", "16" => "16", "24" => "24", "32" => "32");
 	printSelectInput("bpp", $colordepth, $data["bpp"]);
@@ -212,7 +212,7 @@ function userpreferences() {
 	print "          <TD></TD>\n";
 	print "        </TR>\n";
 	print "        <TR>\n";
-	print _("          <TH align=right>Audio:</TH>\n");
+	print "          <TH align=right>" . _("Audio:") . "</TH>\n";
 	print "          <TD>\n";
 	$audio = array("none" => _("None"), "local" => _("Use my speakers"));
 	printSelectInput("audiomode", $audio, $data["audiomode"]);
@@ -220,7 +220,7 @@ function userpreferences() {
 	print "          <TD></TD>\n";
 	print "        </TR>\n";
 	print "        <TR>\n";
-	print _("          <TH align=right>Map Local Drives:</TH>\n");
+	print "          <TH align=right>" . _("Map Local Drives:") . "</TH>\n";
 	print "          <TD>\n";
 	$yesno = array(1 => _("Yes"), 0 => _("No"));
 	printSelectInput("mapdrives", $yesno, $data["mapdrives"]);
@@ -228,14 +228,14 @@ function userpreferences() {
 	print "          <TD></TD>\n";
 	print "        </TR>\n";
 	print "        <TR>\n";
-	print _("          <TH align=right>Map Local Printers:</TH>\n");
+	print "          <TH align=right>" . _("Map Local Printers:") . "</TH>\n";
 	print "          <TD>\n";
 	printSelectInput("mapprinters", $yesno, $data["mapprinters"]);
 	print "          </TD>\n";
 	print "          <TD></TD>\n";
 	print "        </TR>\n";
 	print "        <TR>\n";
-	print _("          <TH align=right>Map Local Serial Ports:</TH>\n");
+	print "          <TH align=right>" . _("Map Local Serial Ports:") . "</TH>\n";
 	print "          <TD>\n";
 	printSelectInput("mapserial", $yesno, $data["mapserial"]);
 	print "          </TD>\n";
@@ -255,14 +255,14 @@ function userpreferences() {
 	$cont = addContinuationsEntry('confirmrdpprefs', array(), SECINDAY, 1, 1, 1);
 	print "      <INPUT type=hidden name=continuation value=\"$cont\">\n";
 	print "      <div align=center>\n";
-	print _("      <INPUT type=submit value=\"Submit Changes\">\n");
+	print "      <INPUT type=submit value=\"" . _("Submit Changes") . "\">\n";
 	print "      </div>\n";
 	print "      </FORM>\n";
 	print "      </fieldset>\n";
 
 	print "      <div id=uiprefs class=shown>\n";
 	print "      <fieldset>\n";
-	print _("      <legend>General Preferences</legend>\n");
+	print "      <legend>" . _("General Preferences") . "</legend>\n";
 	print "      <FORM action=\"" . BASEURL . SCRIPT . "\" method=post ";
 	print "onsubmit=\"return validatePublicKeys();\">\n";
 	$cdata = array();
@@ -274,12 +274,12 @@ function userpreferences() {
 		$selected['affiliation'] = 'checked';
 		$selected['allgroups'] = '';
 	}
-	print _("      <p>View User Groups:<br>\n");
+	print "      <p>" . _("View User Groups:") . "<br>\n";
 	print "      <INPUT type=radio id=r1 name=groupview value=affiliation ";
-	print "{$selected['affiliation']}" . _("><label for=r1>matching my affiliation");
+	print "{$selected['affiliation']}" . "><label for=r1>" . _("matching my affiliation");
 	print "</label><br>\n";
 	print "      <INPUT type=radio id=r2 name=groupview value=allgroups ";
-	print "{$selected['allgroups']}" . _("><label for=r2>from all affiliations");
+	print "{$selected['allgroups']}" . "><label for=r2>" . _("from all affiliations");
 	print "</label></p>\n";
 	if($user['emailnotices']) {
 		$selected['enabled'] = 'checked';
@@ -289,12 +289,12 @@ function userpreferences() {
 		$selected['enabled'] = '';
 		$selected['disabled'] = 'checked';
 	}
-	print _("      <p>Send email notifications about reservations:<br>\n");
+	print "      <p>" . _("Send email notifications about reservations:") . "<br>\n";
 	print "      <INPUT type=radio id=r3 name=emailnotify value=2 ";
-	print "{$selected['enabled']}" . _("><label for=r3>Enabled");
+	print "{$selected['enabled']}" . "><label for=r3>" . _("Enabled");
 	print "</label><br>\n";
 	print "      <INPUT type=radio id=r4 name=emailnotify value=1 ";
-	print "{$selected['disabled']}" . _("><label for=r4>Disabled");
+	print "{$selected['disabled']}" . "><label for=r4>" . _("Disabled");
 	print "</label></p>\n";
 
 	###########################
@@ -333,17 +333,15 @@ function userpreferences() {
 	print "name=\"pubkeys\" style=\"width: 27em;\"";
 	if(! $user['usepublickeys'])
 		print " disabled=\"disabled\"";
-	print ">{$user['sshpublickeys']}</textarea><br>\n";
-	print "<strong>NOTE</strong>: Images using network storage (such as AFS) may not<br>\n";
-	print "work well with public key authentication. In some cases,<br>\n";
-	print "you may still be prompted for a password. In other cases,<br>\n";
-	print "you may need to run additional commands after logging in<br>\n";
-	print "to gain access to the network storage.<br>\n";
+	print ">{$user['sshpublickeys']}</textarea><br><br>\n";
+	print "<strong>" . _("NOTE:") . "</strong> ";
+	$h = "      " . _("Images using network storage (such as AFS) may not work well with public key authentication. In some cases, you may still be prompted for a password. In other cases, you may need to run additional commands after logging in to gain access to the network storage.");
+	print preg_replace("/(.{1,55}([ \n]|$))/", '\1<br>', $h) . "\n";
 	print "      </p>\n";
 
 	$cont = addContinuationsEntry('submitgeneralprefs', $cdata, SECINDAY, 1, 0);
 	print "      <INPUT type=hidden name=continuation value=\"$cont\">\n";
-	print _("      <INPUT type=submit value=\"Submit General Preferences\">\n");
+	print "      <INPUT type=submit value=\"" . _("Submit General Preferences") . "\">\n";
 	print "      </FORM>\n";
 	print "      </fieldset>\n";
 	print "      </div>\n";
@@ -391,46 +389,46 @@ function confirmUserPrefs($type) {
 
 	print "<div align=center>\n";
 	if($type == 0) {
-		print _("<H2>Personal Information</H2>\n");
-		print _("<H3>Submit the following changes?</H3>\n");
+		print "<H2>" . _("Personal Information") . "</H2>\n";
+		print "<H3>" . _("Submit the following changes?") . "</H3>\n";
 		print "<table>\n";
 		print "  <TR>\n";
-		print _("    <TH align=right>Preferred Name:</TH>\n");
+		print "    <TH align=right>" . _("Preferred Name:") . "</TH>\n";
 		print "    <TD>" . $data["preferredname"] . "</TD>\n";
 		print "  </TR>\n";
 		print "</table>\n";
 		if($user['affiliation'] == 'Local' &&
 		   ! empty($data['newpassword'])) {
-			print _("New password will be submitted<br>\n");
+			print _("New password will be submitted") . "<br>\n";
 		}
 	}
 	elseif($type == 1) {
-		print _("<H2>RDP Preferences</H2>\n");
-		print _("<H3>Submit the following changes?</H3>\n");
+		print "<H2>" . _("RDP Preferences") . "</H2>\n";
+		print "<H3>" . _("Submit the following changes?") . "</H3>\n";
 		print "<table>\n";
 		print "  <TR>\n";
-		print _("    <TH align=right>Resolution:</TH>\n");
+		print "    <TH align=right>" . _("Resolution:") . "</TH>\n";
 		print "    <TD>" . $data["resolution"] . "</TD>\n";
 		print "  </TR>\n";
 		print "  <TR>\n";
-		print _("    <TH align=right>Color Depth:</TH>\n");
+		print "    <TH align=right>" . _("Color Depth:") . "</TH>\n";
 		$colordepth = array("8" => "8", "16" => "16", "24" => "24", "32" => "32");
 		print "    <TD>" . $colordepth[$data["bpp"]] . "</TD>\n";
 		print "  </TR>\n";
 		print "  <TR>\n";
-		print _("    <TH align=right>Audio:</TH>\n");
+		print "    <TH align=right>" . _("Audio:") . "</TH>\n";
 		print "    <TD>$audio</TD>\n";
 		print "  </TR>\n";
 		print "  <TR>\n";
-		print _("    <TH align=right>Map Local Drives:</TH>\n");
+		print "    <TH align=right>" . _("Map Local Drives:") . "</TH>\n";
 		print "    <TD>$drives</TD>\n";
 		print "  </TR>\n";
 		print "  <TR>\n";
-		print _("    <TH align=right>Map Local Printers:</TH>\n");
+		print "    <TH align=right>" . _("Map Local Printers:") . "</TH>\n";
 		print "    <TD>$printers</TD>\n";
 		print "  </TR>\n";
 		print "  <TR>\n";
-		print _("    <TH align=right>Map Local Serial Ports:</TH>\n");
+		print "    <TH align=right>" . _("Map Local Serial Ports:") . "</TH>\n";
 		print "    <TD>$serial</TD>\n";
 		print "  </TR>\n";
 		print "  <TR>\n";
@@ -445,14 +443,14 @@ function confirmUserPrefs($type) {
 	print "      <FORM action=\"" . BASEURL . SCRIPT . "\" method=post>\n";
 	$cont = addContinuationsEntry('submituserprefs', $data, SECINWEEK, 0, 0);
 	print "      <INPUT type=hidden name=continuation value=\"$cont\">\n";
-	print _("      <INPUT type=submit value=Submit>\n");
+	print "      <INPUT type=submit value=" . _("Submit") . ">\n";
 	print "      </FORM>\n";
 	print "    </TD>\n";
 	print "    <TD>\n";
 	print "      <FORM action=\"" . BASEURL . SCRIPT . "\" method=post>\n";
 	$cont = addContinuationsEntry('userpreferences');
 	print "      <INPUT type=hidden name=continuation value=\"$cont\">\n";
-	print _("      <INPUT type=submit value=Cancel>\n");
+	print "      <INPUT type=submit value=" . _("Cancel") . ">\n";
 	print "      </FORM>\n";
 	print "    </TD>\n";
 	print "  </TR>\n";

Modified: vcl/trunk/web/.ht-inc/utils.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/utils.php?rev=1659286&r1=1659285&r2=1659286&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/utils.php (original)
+++ vcl/trunk/web/.ht-inc/utils.php Thu Feb 12 15:09:22 2015
@@ -207,7 +207,7 @@ function initGlobals() {
 		if(! $user = getUserInfo($userid)) {
 			// if first call to getUserInfo fails, try calling with $noupdate set
 			if(! $user = getUserInfo($userid, 1)) {
-				$ERRORS[1] = _("Failed to get user info from database.  userid was ") . "$userid";
+				$ERRORS[1] = _("Failed to get user info from database. userid was ") . "$userid";
 				abort(1);
 			}
 		}
@@ -662,16 +662,16 @@ function maintenanceCheck() {
 		setVCLLocale();
 		require_once("themes/$skin/page.php");
 		printHTMLHeader();
-		print _("<h2>Site Currently Under Maintenance</h2>\n");
+		print "<h2>" . _("Site Currently Under Maintenance") . "</h2>\n";
 		if(! empty($msg)) {
 			$msg = htmlentities($msg);
 			$msg = preg_replace("/\n/", "<br>\n", $msg);
 			print "$msg<br>\n";
 		}
 		else
-			print _("This site is currently in maintenance.<br>\n");
+			print _("This site is currently in maintenance.") . "<br>\n";
 		$niceend = strftime('%A, %x, %l:%M %P', $end);
-		print _("The maintenance is scheduled to end <b>") . "$niceend" . _("</b>.<br><br><br>\n");
+		printf(_("The maintenance is scheduled to end <strong>%s</strong>."), $niceend) . "<br><br><br>\n";
 		printHTMLFooter();
 		exit;
 	}
@@ -703,18 +703,15 @@ function maintenanceNotice() {
 			$nicestart = strftime('%A, %x, %l:%M %P', $start);
 			$niceend = strftime('%A, %x, %l:%M %P', datetimeToUnix($item['end']));
 			print "<div id=\"maintenancenotice\">\n";
-			print _("<b>NOTICE</b>: This site will be down for maintenance during ");
-			print _("the following times:<br><br>\n");
-			print	_("Start") . ": $nicestart<br>\n";
-			print _("End") . ": $niceend.<br><br>\n";
+			print "<strong>" . _("NOTICE:") . "</strong> ";
+			print _("This site will be down for maintenance during the following times:") . "<br><br>\n";
+			print	_("Start:") . " $nicestart<br>\n";
+			print _("End:") . " $niceend.<br><br>\n";
 			if($item['allowreservations']) {
-				print _("You will be able to access your reserved machines during ");
-				print _("this maintenance. However, you will not be able to access ");
-				print _("information on how to connect to them.<br>\n");
+				print _("You will be able to access your reserved machines during this maintenance. However, you will not be able to access information on how to connect to them.") . "<br>\n";
 			}
 			else {
-				print _("You will not be able to access any of your reservations ");
-				print _("during this maintenance.<br>\n");
+				print _("You will not be able to access any of your reservations during this maintenance.") . "<br>\n";
 			}
 			print "</div>\n";
 			return;
@@ -817,12 +814,12 @@ function stopSession() {
 ////////////////////////////////////////////////////////////////////////////////
 function main() {
 	global $user, $authed, $mode;
-	print _("<H2>Welcome to the Virtual Computing Lab</H2>\n");
+	print "<H2>" . _("Welcome to the Virtual Computing Lab") . "</H2>\n";
 	if($authed) {
 		if(! empty($user['lastname']) && ! empty($user['preferredname']))
-			print _("Hello ") . "{$user["preferredname"]} {$user['lastname']}<br><br>\n";
+			print _("Hello") . " {$user["preferredname"]} {$user['lastname']}<br><br>\n";
 		elseif(! empty($user['lastname']) && ! empty($user['firstname']))
-			print _("Hello ") . "{$user["firstname"]} {$user['lastname']}<br><br>\n";
+			print _("Hello") . " {$user["firstname"]} {$user['lastname']}<br><br>\n";
 		$tmp = array_values($user['groups']);
 		if(count($tmp) == 1 && $tmp[0] == 'nodemo') {
 			print "Your account is a demo account that has expired. ";
@@ -833,21 +830,18 @@ function main() {
 		}
 		$requests = getUserRequests("all", $user["id"]);
 		if($num = count($requests)) {
-			if($num == 1) {
-				print _("You currently have ") . "$num" . _(" reservation</a>.<br>\n");
-			}
-			else {
-				print _("You currently have ") . "$num" . _(" reservations</a>.<br>\n");
-			}
+			if($num == 1)
+				print _("You currently have 1 reservation.") . "<br>\n";
+			else
+				printf(_("You currently have %d reservations."), $num ) . "<br>\n";
 		}
 		else {
-			print _("You do not have any current reservations.<br>\n");
+			print _("You do not have any current reservations.") . "<br>\n";
 		}
-		print _("Please make a selection from the menu to continue.<br>\n");
+		print _("Please make a selection from the menu to continue.") . "<br>\n";
 	}
 	else {
-		print "Click the <b>Log in to VCL</b> button at the top right part of ";
-		print "the page to start using the VCL system<br>\n";
+		print _("Please log in to start using the VCL system.") . "<br>\n";
 	}
 }
 
@@ -920,10 +914,9 @@ function abort($errcode, $query="") {
 		$mailParams = "-f" . ENVELOPESENDER;
 		error_log($message);
 		mail(ERROREMAIL, "Error with VCL pages ($errcode)", $message, '', $mailParams);
-		print _("An error has occurred.  If this problem persists, please email ");
-		print "<a href=\"mailto:" . HELPEMAIL . "?Subject=" . _("Problem%20With%20VCL") . "\">";
-		print HELPEMAIL . "</a> " . _("for further assistance.  Please include the ");
-		print _("steps you took that led up to this problem in your email message.");
+		$subj = rawurlencode(_("Problem With VCL"));
+		$href = "<a href=\"mailto:" . HELPEMAIL . "?Subject=$subj\">" . HELPEMAIL . "</a>";
+		printf(_("An error has occurred. If this problem persists, please email %s for further assistance. Please include the steps you took that led up to this problem in your email message."), $href);
 	}
 
 	// call clearPrivCache in case that helps clear up what caused the error
@@ -5447,11 +5440,9 @@ function getRequestInfo($id, $returnNULL
 		# FIXME handle XMLRPC cases
 		if(! $printedHTMLheader) 
 			print $HTMLheader;
-		print _("<h1>OOPS! - Reservation Has Expired</h1>\n");
-		print _("The selected reservation is no longer available.  Go to ");
-		print "<a href=\"" . BASEURL . SCRIPT . "?mode=viewRequests\">";
-		print _("Reservations</a><br>to request a new reservation or ");
-		print _("select another one that is available.");
+		print "<h1>" . _("OOPS! - Reservation Has Expired") . "</h1>\n";
+		$h = _("The selected reservation is no longer available. Go to <a>Reservations</a> to request a new reservation or select another one that is available.");
+		print preg_replace('|<a>(.+)</a>|', '<a href="' . BASEURL . SCRIPT . '?mode=viewRequests">\1</a>', $h);
 		printHTMLFooter();
 		dbDisconnect();
 		exit;
@@ -7337,7 +7328,7 @@ function showTimeTable($links) {
 	}
 
 	print "<DIV align=center>\n";
-	print _("<H2>Time Table</H2>\n");
+	print "<H2>" . _("Time Table") . "</H2>\n";
 	print "</DIV>\n";
 	$computeridrow = "";
 	$displayedids = array();
@@ -7374,17 +7365,15 @@ function showTimeTable($links) {
 	}
 	if(empty($displayedids)) {
 		if($links) {
-			print _("There are currently no computers available that can run the application you selected.\n");
+			print _("There are currently no computers available that can run the application you selected.") . "\n";
 		}
 		else {
-			print _("There are no computers that meet the specified criteria\n");
+			print _("There are no computers that meet the specified criteria") . "\n";
 		}
 		return;
 	}
 	if($showmessage) {
-		print _("The time you have requested to use the environment is not ");
-		print _("available. You may select from the green blocks of time to ");
-		print _("select an available time slot to make a reservation.<br>\n");
+		print _("The time you have requested to use the environment is not available. You may select from the green blocks of time to select an available time slot to make a reservation.") . "<br>\n";
 	}
 	print "<table summary=\"\">\n";
 	print "  <TR>\n";
@@ -7404,7 +7393,7 @@ function showTimeTable($links) {
 		               'imaging' => $imaging);
 		$cont = addContinuationsEntry($mode, $cdata, SECINDAY);
 		print "<INPUT type=hidden name=continuation value=\"$cont\">\n";
-		print _("<INPUT type=submit value=Previous>\n");
+		print "<INPUT type=submit value=" . _("Previous") . ">\n";
 		print "</FORM>\n";
 	}
 	print "</TD>\n";
@@ -7423,7 +7412,7 @@ function showTimeTable($links) {
 		               'imaging' => $imaging);
 		$cont = addContinuationsEntry($mode, $cdata, SECINDAY);
 		print "<INPUT type=hidden name=continuation value=\"$cont\">\n";
-		print _("<INPUT type=submit value=Next>\n");
+		print "<INPUT type=submit value=" . _("Next") . ">\n";
 		print "</FORM>\n";
 	}
 	print "</TD>\n";
@@ -7515,8 +7504,8 @@ function showTimeTable($links) {
 					print "          <TD bgcolor=\"#ff0000\"><font color=\"#ff0000\">used</font></TD>\n";
 				}
 				else {
-					$title = _("User: ") . $timeslots[$id][$stamp]["unityid"]
-					       . _(" Image: ") . $timeslots[$id][$stamp]["prettyimage"];
+					$title = _("User:") . " " . $timeslots[$id][$stamp]["unityid"]
+					       . " " . _("Image:") . " " . $timeslots[$id][$stamp]["prettyimage"];
 					$ttdata = array('start' => $argstart,
 					                'end' => $argend,
 					                'imageid' => $imageid,
@@ -7556,7 +7545,7 @@ function showTimeTable($links) {
 		               'imaging' => $imaging);
 		$cont = addContinuationsEntry($mode, $cdata, SECINDAY);
 		print "<INPUT type=hidden name=continuation value=\"$cont\">\n";
-		print _("<INPUT type=submit value=Previous>\n");
+		print "<INPUT type=submit value=" . _("Previous") . ">\n";
 		print "</FORM>\n";
 	}
 	print "</TD>\n";
@@ -7575,7 +7564,7 @@ function showTimeTable($links) {
 		               'imaging' => $imaging);
 		$cont = addContinuationsEntry($mode, $cdata, SECINDAY);
 		print "<INPUT type=hidden name=continuation value=\"$cont\">\n";
-		print _("<INPUT type=submit value=Next>\n");
+		print "<INPUT type=submit value=" . _("Next") . ">\n";
 		print "</FORM>\n";
 	}
 	print "</TD>\n";
@@ -9036,9 +9025,6 @@ function labeledFormItem($id, $label, $t
 	if($extra == '')
 		$extra = array();
 	$h = '';
-	$label = _($label);
-	$errmsg = _($errmsg);
-	$help = _($help);
 	if($required)
 		$required = 'true';
 	else
@@ -9302,7 +9288,7 @@ function prettyDatetime($stamp, $showyea
 ////////////////////////////////////////////////////////////////////////////////
 function minToHourMin($min) {
 	if($min < 60)
-		return $min . _(" minutes");
+		return $min . " " . _("minutes");
 	elseif($min == 60)
 		return _("1 hour");
 	elseif($min % 60 == 0)
@@ -9349,11 +9335,11 @@ function secToMinSec($sec) {
 ////////////////////////////////////////////////////////////////////////////////
 function prettyLength($minutes) {
 	if($minutes < 60)
-		return (int)$minutes . _(" minutes");
+		return (int)$minutes . " " . _("minutes");
 	elseif($minutes == 60)
 		return _("1 hour");
 	elseif($minutes % 60 == 0)
-		return $minutes / 60 . _(" hours");
+		return $minutes / 60 . " " . _("hours");
 	else {
 		$hours = (int)($minutes / 60);
 		$min = (int)($minutes % 60);
@@ -10169,9 +10155,9 @@ function getReservationLengths($max) {
 	if($max >= 60)
 		$lengths["60"] = _("1 hour");
 	for($i = 120; $i <= $max && $i < 2880; $i += 120)
-		$lengths[$i] = $i / 60 . _(" hours");
+		$lengths[$i] = $i / 60 . " " . _("hours");
 	for($i = 2880; $i <= $max; $i += 1440)
-		$lengths[$i] = $i / 1440 . _(" days");
+		$lengths[$i] = $i / 1440 . " " . _("days");
 	return $lengths;
 }
 
@@ -10188,12 +10174,12 @@ function getReservationLengths($max) {
 ////////////////////////////////////////////////////////////////////////////////
 function getReservationLength($length) {
 	if($length < 60)
-		return ($length % 60) - ($length % 60 % 15) . " minutes";
+		return ($length % 60) - ($length % 60 % 15) . " " . _("minutes");
 	if($length < 120)
 		return _("1 hour");
 	if($length < 2880)
-		return intval($length / 60) . _(" hours");
-	return intval($length / 1440) . _(" days");
+		return intval($length / 60) . " " . _("hours");
+	return intval($length / 1440) . " " . _("days");
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -10209,7 +10195,7 @@ function getReservationLength($length) {
 ////////////////////////////////////////////////////////////////////////////////
 function getReservationExtenstion($length) {
 	if($length < 60)
-		return ($length % 60) - ($length % 60 % 15) . _(" minutes");
+		return ($length % 60) - ($length % 60 % 15) . " " . _("minutes");
 	if($length < 75)
 		return _("1 hour");
 	if($length < 120) {
@@ -10217,8 +10203,8 @@ function getReservationExtenstion($lengt
 		return sprintf('%d:%02d ' . _('hours'), intval($length / 60), $min);
 	}
 	if($length < 2880)
-		return intval($length / 60) . _(" hours");
-	return intval($length / 1440) . _(" days");
+		return intval($length / 60) . " " . _("hours");
+	return intval($length / 1440) . " " . _("days");
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -11543,28 +11529,21 @@ function continuationsError() {
 	if(array_key_exists('error', $contdata)) {
 		print "<!-- continuationserror -->\n";
 		print "<div id=\"continuationserrormessage\">\n";
+		$subj = rawurlencode(_("Problem With VCL"));
+		$href = "<a href=\"mailto:" . HELPEMAIL . "?Subject=$subj\">" . HELPEMAIL . "</a>";
 		switch($contdata['error']) {
 		case 'invalid input':
-			print _("<h2>Error: Invalid Input</h2><br>\n");
-			print _("You submitted input invalid for this web site. If you have no ");
-			print _("idea why this happened and the problem persists, please email ");
-			print "<a href=\"mailto:" . HELPEMAIL . "?Subject=" . _("Problem%20With%20VCL\">");
-			print HELPEMAIL . "</a> " . _("for further assistance.  Please include the ");
-			print _("steps you took that led up to this problem in your email message.");
+			print "<h2>" . _("Error: Invalid Input") . "</h2><br>\n";
+			printf(_("You submitted input invalid for this web site. If you have no idea why this happened and the problem persists, please email %s for further assistance. Please include the steps you took that led up to this problem in your email message."), $href);
 			break;
 		case 'continuation does not exist':
 		case 'expired':
-			print _("<h2>Error: Invalid Input</h2><br>\n");
-			print _("You submitted expired data to this web site. Please restart the ");
-			print _("steps you were following without using your browser's <strong>");
-			print _("Back</strong> button.");
+			print "<h2>" . _("Error: Invalid Input") . "</h2><br>\n";
+			print _("You submitted expired data to this web site. Please restart the steps you were following without using your browser's <strong>Back</strong> button.");
 			break;
 		default:
-			print _("<h2>Error: Invalid Input</h2><br>\n");
-			print _("An error has occurred.  If this problem persists, please email ");
-			print "<a href=\"mailto:" . HELPEMAIL . "?Subject=" . _("Problem%20With%20VCL\">");
-			print HELPEMAIL . "</a> " . _("for further assistance.  Please include the ");
-			print _("steps you took that led up to this problem in your email message.");
+			print "<h2>" . _("Error: Invalid Input") . "</h2><br>\n";
+			printf(_("An error has occurred. If this problem persists, please email %s for further assistance. Please include the steps you took that led up to this problem in your email message."), $href);
 		}
 		print "</div>\n";
 	}
@@ -12537,42 +12516,42 @@ function getNavMenu($inclogout, $inchome
 
 	$rt .= menulistLI('reservations');
 	$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=viewRequests\">";
-	$rt .= _("Reservations</a></li>\n");
+	$rt .= _("Reservations") . "</a></li>\n";
 
 	#$rt .= menulistLI('config');
 	#$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=config\">";
-	#$rt .= _("Manage Configs</a></li>\n");
+	#$rt .= _("Manage Configs") . "</a></li>\n";
 
 	$rt .= menulistLI('blockAllocations');
 	$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=blockAllocations\">";
-	$rt .= _("Block Allocations</a></li>\n");
+	$rt .= _("Block Allocations") . "</a></li>\n";
 	$rt .= menulistLI('userPreferences');
 	$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=userpreferences\">";
-	$rt .= _("User Preferences</a></li>\n");
+	$rt .= _("User Preferences") . "</a></li>\n";
 	if(in_array("groupAdmin", $user["privileges"])) {
 		$rt .= menulistLI('manageGroups');
 		$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=viewGroups\">";
-		$rt .= _("Manage Groups</a></li>\n");
+		$rt .= _("Manage Groups") . "</a></li>\n";
 	}
 	if(in_array("imageAdmin", $user["privileges"])) {
 		$rt .= menulistLI('image');
 		$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=image\">";
-		$rt .= _("Manage Images</a></li>\n");
+		$rt .= _("Manage Images") . "</a></li>\n";
 	}
 	if(in_array("scheduleAdmin", $user["privileges"])) {
 		$rt .= menulistLI('schedule');
 		$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=schedule\">";
-		$rt .= _("Manage Schedules</a></li>\n");
+		$rt .= _("Manage Schedules") . "</a></li>\n";
 	}
 	if(in_array("computerAdmin", $user["privileges"])) {
 		$rt .= menulistLI('computer');
 		$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=computer\">";
-		$rt .= _("Manage Computers</a></li>\n");
+		$rt .= _("Manage Computers") . "</a></li>\n";
 	}
 	if(in_array("mgmtNodeAdmin", $user["privileges"])) {
 		$rt .= menulistLI('managementnode');
 		$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=managementnode\">";
-		$rt .= _("Management Nodes</a></li>\n");
+		$rt .= _("Management Nodes") . "</a></li>\n";
 	}
 	if(in_array("serverProfileAdmin", $user["privileges"]) ||
 	   in_array("serverCheckOut", $user["privileges"])) {
@@ -12584,34 +12563,34 @@ function getNavMenu($inclogout, $inchome
 		count($computermetadata["schedules"])) {
 		$rt .= menulistLI('timeTable');
 		$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=pickTimeTable\">";
-		$rt .= _("View Time Table</a></li>\n");
+		$rt .= _("View Time Table") . "</a></li>\n";
 	}
 	if(in_array("userGrant", $user["privileges"]) ||
 		in_array("resourceGrant", $user["privileges"]) ||
 		in_array("nodeAdmin", $user["privileges"])) {
 		$rt .= menulistLI('privileges');
 		$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=viewNodes\">";
-		$rt .= _("Privileges</a></li>\n");
+		$rt .= _("Privileges") . "</a></li>\n";
 	}
 	if(checkUserHasPerm('User Lookup (global)') ||
 	   checkUserHasPerm('User Lookup (affiliation only)')) {
 		$rt .= menulistLI('userLookup');
 		$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=userLookup\">";
-		$rt .= _("User Lookup</a></li>\n");
+		$rt .= _("User Lookup") . "</a></li>\n";
 	}
 	if(in_array("computerAdmin", $user["privileges"])) {
 		$rt .= menulistLI('vm');
 		$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=editVMInfo\">";
-		$rt .= _("Virtual Hosts</a></li>\n");
+		$rt .= _("Virtual Hosts") . "</a></li>\n";
 	}
 	if(checkUserHasPerm('Schedule Site Maintenance')) {
 		$rt .= menulistLI('sitemaintenance');
 		$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=siteMaintenance\">";
-		$rt .= _("Site Maintenance</a></li>\n");
+		$rt .= _("Site Maintenance") . "</a></li>\n";
 	}
 	$rt .= menulistLI('statistics');
 	$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=selectstats\">";
-	$rt .= _("Statistics</a></li>\n");
+	$rt .= _("Statistics") . "</a></li>\n";
 	if(checkUserHasPerm('View Dashboard (global)') ||
 	   checkUserHasPerm('View Dashboard (affiliation only)')) {
 		$rt .= menulistLI('dashboard');
@@ -12626,11 +12605,11 @@ function getNavMenu($inclogout, $inchome
 	}
 	$rt .= menulistLI('codeDocumentation');
 	$rt .= "<a href=\"" . DOCUMENTATIONURL . "\">";
-	$rt .= _("Documentation</a></li>\n");
+	$rt .= _("Documentation") . "</a></li>\n";
 	if($inclogout) {
 		$rt .= menulistLI('authentication');
 		$rt .= "<a href=\"" . BASEURL . SCRIPT . "?mode=logout\">";
-		$rt .= _("Logout</a></li>\n");
+		$rt .= _("Logout") . "</a></li>\n";
 	}
 	return $rt;
 }

Modified: vcl/trunk/web/index.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/index.php?rev=1659286&r1=1659285&r2=1659286&view=diff
==============================================================================
--- vcl/trunk/web/index.php (original)
+++ vcl/trunk/web/index.php Thu Feb 12 15:09:22 2015
@@ -54,10 +54,10 @@ maintenanceCheck();
 
 dbConnect();
 
-initGlobals();
-
 setVCLLocale();
 
+initGlobals();
+
 $modes = array_keys($actions['mode']);
 $args = array_keys($actions['args']);
 $hasArg = 0;

Modified: vcl/trunk/web/js/blockallocations.js
URL: http://svn.apache.org/viewvc/vcl/trunk/web/js/blockallocations.js?rev=1659286&r1=1659285&r2=1659286&view=diff
==============================================================================
--- vcl/trunk/web/js/blockallocations.js (original)
+++ vcl/trunk/web/js/blockallocations.js Thu Feb 12 15:09:22 2015
@@ -616,7 +616,7 @@ function blockFormVerifyMonthly(mode) {
 	var date1 = obj.options[obj.selectedIndex].text;
 	obj = dojo.byId('mnday');
 	date1 += " " + obj.options[obj.selectedIndex].text;
-	dojo.byId('confvalue3').innerHTML = date1 + _(" of each month");
+	dojo.byId('confvalue3').innerHTML = date1 + ' ' + _("of each month");
 	var times = new Array();
 	var items = requestBlockAddMonthlyStore._getItemsArray();
 	for(var i = 0; i < len; i++) {
@@ -910,7 +910,7 @@ function deleteBlockConfirmCB(data, ioAr
 		dojo.byId('conftitle2').innerHTML = _('Last Date:');
 		dojo.byId('confvalue2').innerHTML = data.items.lastdate;
 		dojo.byId('conftitle3').innerHTML = _('Repeat on:');
-		dojo.byId('confvalue3').innerHTML = data.items.date1 + _(" of each month");
+		dojo.byId('confvalue3').innerHTML = data.items.date1 + ' ' + _("of each month");
 		dojo.byId('conftitle4').innerHTML = _('During these times:');
 		dojo.byId('confvalue4').innerHTML = data.items.times.join('<br>');
 	}
@@ -971,7 +971,7 @@ function viewBlockAllocationCB(data, ioA
 		dojo.byId('conftitle2').innerHTML = _('Last Date:');
 		dojo.byId('confvalue2').innerHTML = data.items.lastdate;
 		dojo.byId('conftitle3').innerHTML = _('Repeat on:');
-		dojo.byId('confvalue3').innerHTML = data.items.date1 + _(" of each month");
+		dojo.byId('confvalue3').innerHTML = data.items.date1 + ' ' + _("of each month");
 		dojo.byId('conftitle4').innerHTML = _('During these times:');
 		dojo.byId('confvalue4').innerHTML = data.items.times.join('<br>');
 	}
@@ -1045,10 +1045,10 @@ function acceptBlockConfirmCB(data, ioAr
 		dojo.byId('accepttitle2').innerHTML = _('Last Date:');
 		dojo.byId('acceptvalue2').innerHTML = data.items.lastdate;
 		dojo.byId('accepttitle3').innerHTML = _('Repeat on:');
-		dojo.byId('acceptvalue3').innerHTML = data.items.date1 + _(" of each month");
+		dojo.byId('acceptvalue3').innerHTML = data.items.date1 + ' ' + _("of each month");
 		dojo.byId('accepttitle4').innerHTML = _('During these times:');
 		dojo.byId('acceptvalue4').innerHTML = data.items.times.join('<br>');
-		dojo.byId('accepttitle5').innerHTML = 'User Submitted Comments:';
+		dojo.byId('accepttitle5').innerHTML = _('User Submitted Comments:');
 		dojo.byId('acceptvalue5').innerHTML = data.items.comments;
 	}
 	else if(data.items.repeating == 'list') {
@@ -1120,7 +1120,7 @@ function rejectBlockConfirmCB(data, ioAr
 		dojo.byId('rejecttitle2').innerHTML = _('Last Date:');
 		dojo.byId('rejectvalue2').innerHTML = data.items.lastdate;
 		dojo.byId('rejecttitle3').innerHTML = _('Repeat on:');
-		dojo.byId('rejectvalue3').innerHTML = data.items.date1 + _(" of each month");
+		dojo.byId('rejectvalue3').innerHTML = data.items.date1 + ' ' + _("of each month");
 		dojo.byId('rejecttitle4').innerHTML = _('During these times:');
 		dojo.byId('rejectvalue4').innerHTML = data.items.times.join('<br>');
 		dojo.byId('rejecttitle5').innerHTML = _('User Submitted Comments:');
@@ -1331,11 +1331,11 @@ function updateAllocatedMachinesCB(data,
 	graph.labeldata = data.items.virtual.points;
 	graph.render();
 	if(data.items.bare.total != 0)
-		dojo.byId('totalbare').innerHTML = _('Total online: ') + data.items.bare.total;
+		dojo.byId('totalbare').innerHTML = _('Total online:') + ' ' + data.items.bare.total;
 	else
 		dojo.byId('totalbare').innerHTML = '';
 	if(data.items.virtual.total != 0)
-		dojo.byId('totalvirtual').innerHTML = _('Total online: ') + data.items.virtual.total;
+		dojo.byId('totalvirtual').innerHTML = _('Total online:') + ' ' + data.items.virtual.total;
 	else
 		dojo.byId('totalvirtual').innerHTML = '';
 	dojo.byId('allocatedBareMachines').style.height = '320px';

Modified: vcl/trunk/web/js/newresservercommon.js
URL: http://svn.apache.org/viewvc/vcl/trunk/web/js/newresservercommon.js?rev=1659286&r1=1659285&r2=1659286&view=diff
==============================================================================
--- vcl/trunk/web/js/newresservercommon.js (original)
+++ vcl/trunk/web/js/newresservercommon.js Thu Feb 12 15:09:22 2015
@@ -14,6 +14,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
+
 function checkFixedSet(page) {
 	var obj = dijit.byId(page + 'fixedIP');
 	if(obj.get('value') != '' && obj.isValid()) {
@@ -111,7 +112,7 @@ function deployProfileChanged() {
 		onItem: function(item, request) {
 			var desc = profilesstore.getValue(item, 'desc');
 			if(desc == '') {
-				desc = '(No description)';
+				desc = _('(No description)');
 			}
 			dojo.byId('deploydesc').innerHTML = desc;
 		}
@@ -120,7 +121,7 @@ function deployProfileChanged() {
 
 function getServerProfileData(cont, id, cb) {
 	if(id == 'profileid') {
-		dijit.byId('fetchProfilesBtn').set('label', 'Working...');
+		dijit.byId('fetchProfilesBtn').set('label', _('Working...'));
 		dijit.byId('fetchProfilesBtn').set('disabled', true);
 	}
 	var data = {continuation: cont,
@@ -132,7 +133,7 @@ function getServerProfileData(cont, id,
 function getServerProfileDataDeployCB(data, ioArgs) {
 	document.body.style.cursor = 'default';
 	if(data.items.error) {
-		alert('You do not have access to apply this server profile.');
+		alert(_('You do not have access to apply this server profile.'));
 		return;
 	}
 	dojo.byId('appliedprofileid').value = data.items.id;

Modified: vcl/trunk/web/js/requests.js
URL: http://svn.apache.org/viewvc/vcl/trunk/web/js/requests.js?rev=1659286&r1=1659285&r2=1659286&view=diff
==============================================================================
--- vcl/trunk/web/js/requests.js (original)
+++ vcl/trunk/web/js/requests.js Thu Feb 12 15:09:22 2015
@@ -53,8 +53,8 @@ function initViewRequests(imaging) {
 			});
 			var dlg = new dijit.Dialog({
 				id: 'noimageaccessdlg',
-				title: 'Create / Update an Image',
-				content: 'You do not have access to create or update any images.<br><br>',
+				title: _('Create / Update an Image'),
+				content: _('You do not have access to create or update any images.') + '<br><br>',
 				style: 'width: 300px; text-align: center;',
 				closable: false
 			});
@@ -214,7 +214,7 @@ function selectResType() {
 		dojo.removeClass('whentitleserver', 'hidden');
 		if(profilesstore._arrayOfAllItems.length != 0 &&
 		   (profilesstore._arrayOfAllItems.length != 1 ||
-		   profilesstore._arrayOfAllItems[0].name != '(New Profile)'))
+		   profilesstore._arrayOfAllItems[0].name != _('(New Profile)')))
 			dojo.removeClass('deployprofileslist', 'hidden');
 		dojo.removeClass('nrnamespan', 'hidden');
 		dojo.removeClass('nrservergroupspan', 'hidden');
@@ -1141,10 +1141,10 @@ function addRevisionSelection(item) {
 	var mstore = new dojo.store.Memory({data: item.imagerevision});
 	var wrapper = new dojo.data.ObjectStore({objectStore: mstore});
 	var layout = [
-		{field: 'revision', name: 'Revision', width: '60px'},
-		{field: 'user', name: 'User', width: '130px'},
-		{field: 'prettydate', name: 'Created', width: '110px'},
-		{field: 'production', name: 'Production', width: '60px'}
+		{field: 'revision', name: _('Revision'), width: '60px'},
+		{field: 'user', name: _('User'), width: '130px'},
+		{field: 'prettydate', name: _('Created'), width: '110px'},
+		{field: 'production', name: _('Production'), width: '60px'}
 	];
 	var div = document.createElement('div');
 	div.style.width = "100%";

Modified: vcl/trunk/web/js/resources.js
URL: http://svn.apache.org/viewvc/vcl/trunk/web/js/resources.js?rev=1659286&r1=1659285&r2=1659286&view=diff
==============================================================================
--- vcl/trunk/web/js/resources.js (original)
+++ vcl/trunk/web/js/resources.js Thu Feb 12 15:09:22 2015
@@ -22,9 +22,9 @@ function Resource() {
 Resource.prototype.DeleteBtn = function(rscid, rowIndex) {
 	var rowdata = this.grid.getItem(rowIndex);
 	if(! ('deleted' in rowdata) || rowdata.deleted == '0')
-		var label = 'Delete';
+		var label = _('Delete');
 	else
-		var label = 'Undelete';
+		var label = _('Undelete');
 	var btn = new dijit.form.Button({
 		label: label,
 		onClick: function() {
@@ -42,7 +42,7 @@ Resource.prototype.EditBtn = function(rs
 	else
 		var disable = true;
 	var btn = new dijit.form.Button({
-		label: 'Edit',
+		label: _('Edit'),
 		disabled: disable,
 		onClick: function() {
 			editResource(rscid);
@@ -114,7 +114,7 @@ Resource.prototype.addRemItemCB = functi
 		});
 	}
 	else if(data.items.status == 'noaccess') {
-		alert('You do not have access to the submitted resource or group');
+		alert(_('You do not have access to the submitted resource or group'));
 	}
 	document.body.style.cursor = 'default';
 }
@@ -269,7 +269,7 @@ function toggleDeleteResourceCB(data, io
 		div.style = 'text-align: center;';
 		var dlg = new dijit.Dialog({
 			id: 'resourceinusedlg',
-			title: 'Resource In Use',
+			title: _('Resource In Use'),
 			content: data.items.msg,
 			style: 'width: 400px;',
 			autofocus: false,
@@ -289,7 +289,7 @@ function submitToggleDeleteResource() {
 
 function submitToggleDeleteResourceCB(data, ioArgs) {
 	if(data.items.status == 'error') {
-		alert('Problem encountered while attempting to delete resource. Please contact a system administrator.');
+		alert(_('Problem encountered while attempting to delete resource. Please contact a system administrator.'));
 		return;
 	}
 	else if(data.items.status == 'success') {
@@ -384,7 +384,7 @@ function populateLists(selobj, inselobj,
 function populateListsCB(data, ioArgs) {
 	if(data.items.status == 'noaccess') {
 		document.body.style.cursor = 'default';
-		alert('You do not have access to the submitted resource or group');
+		alert(_('You do not have access to the submitted resource or group'));
 		return;
 	}
 	var oldstore = window[data.items.intitle].store;

Modified: vcl/trunk/web/js/resources/image.js
URL: http://svn.apache.org/viewvc/vcl/trunk/web/js/resources/image.js?rev=1659286&r1=1659285&r2=1659286&view=diff
==============================================================================
--- vcl/trunk/web/js/resources/image.js (original)
+++ vcl/trunk/web/js/resources/image.js Thu Feb 12 15:09:22 2015
@@ -30,9 +30,9 @@ Image.prototype.colformatter = function(
 	   obj.field == 'checkuser' ||
 	   obj.field == 'rootaccess') {
 		if(value == "0")
-			return '<span class="rederrormsg">false</span>';
+			return '<span class="rederrormsg">' + _('false') + '</span>';
 		if(value == "1")
-			return '<span class="ready">true</span>';
+			return '<span class="ready">' + _('true') + '</span>';
 	}
 	if(obj.field == 'maxinitialtime' && value == 0)
 		return '(unset)';
@@ -47,7 +47,7 @@ function inlineEditResourceCB(data, ioAr
 			dijit.byId('advancedoptions').toggle();
 		dojo.byId('saveresourcecont').value = data.items.cont;
 		dijit.byId('addeditdlg').set('title', data.items.title);
-		dijit.byId('addeditbtn').set('label', 'Save Changes');
+		dijit.byId('addeditbtn').set('label', _('Save Changes'));
 		dojo.byId('editresid').value = data.items.resid;
 		dijit.byId('name').set('value', data.items.data.prettyname);
 		dijit.byId('owner').set('value', data.items.data.owner);
@@ -71,7 +71,7 @@ function inlineEditResourceCB(data, ioAr
 		dijit.byId('addeditdlg').show();
 	}
 	else if(data.items.status == 'noaccess') {
-		alert('Access denied to edit this item');
+		alert(_('Access denied to edit this item'));
 	}
 }
 
@@ -172,37 +172,37 @@ function saveResource() {
 
 	data['networkspeed'] = parseInt(dijit.byId('networkspeed').get('value'));
 	if((+log10(data['networkspeed']).toFixed(2) % 1) != 0) { // log10(1000) -> 2.9999999999999996
-		errobj.innerHTML = 'Invalid network speed specified';
+		errobj.innerHTML = _('Invalid network speed specified');
 		return;
 	}
 	data['concurrent'] = dijit.byId('concurrent').get('value');
 	if(data['concurrent'] < 0 || data['concurrent'] == 1 || data['concurrent'] > 255) {
-		errobj.innerHTML = 'Max Concurrent Usage must be 0 or from 2 to 255';
+		errobj.innerHTML = _('Max Concurrent Usage must be 0 or from 2 to 255');
 		return;
 	}
 	data['checkout'] = parseInt(dijit.byId('checkout').get('value'));
 	if(data['checkout'] != 0 && data['checkout'] != 1) {
-		errobj.innerHTML = 'Invalid value specified for \'Available for checkout\'';
+		errobj.innerHTML = _('Invalid value specified for \'Available for checkout\'');
 		return;
 	}
 	data['checkuser'] = parseInt(dijit.byId('checkuser').get('value'));
 	if(data['checkuser'] != 0 && data['checkuser'] != 1) {
-		errobj.innerHTML = 'Invalid value specified for \'Check for logged in user\'';
+		errobj.innerHTML = _('Invalid value specified for \'Check for logged in user\'');
 		return;
 	}
 	data['rootaccess'] = parseInt(dijit.byId('rootaccess').get('value'));
 	if(data['rootaccess'] != 0 && data['rootaccess'] != 1) {
-		errobj.innerHTML = 'Invalid value specified for \'Users have administrative access\'';
+		errobj.innerHTML = _('Invalid value specified for \'Users have administrative access\'');
 		return;
 	}
 	if(dijit.byId('sysprep')) {
 		data['sysprep'] = parseInt(dijit.byId('sysprep').get('value'));
 		if(data['sysprep'] != 0 && data['sysprep'] != 1) {
-			errobj.innerHTML = 'Invalid value specified for \'Use sysprep\'';
+			errobj.innerHTML = _('Invalid value specified for \'Use sysprep\'');
 			return;
 		}
 		if(! /[0-9,]+/.test(dojo.byId('connectmethodids').value)) {
-			errobj.innerHTML = 'Invalid Connect Methods specified';
+			errobj.innerHTML = _('Invalid Connect Methods specified');
 			return;
 		}
 		data['connectmethodids'] = dojo.byId('connectmethodids').value;
@@ -328,7 +328,7 @@ function updateCurrentConMethods() {
 }
 
 function addSubimage() {
-	dijit.byId('addbtn').attr('label', 'Working...');
+	dijit.byId('addbtn').attr('label', _('Working...'));
 	var data = {continuation: dojo.byId('addsubimagecont').value,
 	            imageid: dijit.byId('addsubimagesel').value};
 	RPCwrapper(data, addSubimageCB, 1);
@@ -336,12 +336,12 @@ function addSubimage() {
 
 function addSubimageCB(data, ioArgs) {
 	if(data.items.error) {
-		dijit.byId('addbtn').attr('label', 'Add Subimage');
+		dijit.byId('addbtn').attr('label', _('Add Subimage'));
 		alert(data.items.msg);
 		return;
 	}
 	var obj = dojo.byId('cursubimagesel');
-	if(obj.options[0].text == '(None)') {
+	if(obj.options[0].text == _('(None)')) {
 		obj.disabled = false;
 		obj.remove(0);
 	}
@@ -351,7 +351,7 @@ function addSubimageCB(data, ioArgs) {
 	obj.options[index] = new Option(data.items.name, data.items.newid, false, false);
 	sortSelect(obj);
 	dojo.byId('subimgcnt').innerHTML = obj.options.length;
-	dijit.byId('addbtn').attr('label', 'Add Subimage');
+	dijit.byId('addbtn').attr('label', _('Add Subimage'));
 }
 
 function remSubimages() {
@@ -364,7 +364,7 @@ function remSubimages() {
 	if(! imgids.length)
 		return;
 	var ids = imgids.join(',');
-	dijit.byId('rembtn').attr('label', 'Working...');
+	dijit.byId('rembtn').attr('label', _('Working...'));
 	var data = {continuation: dojo.byId('remsubimagecont').value,
 	            imageids: ids};
 	RPCwrapper(data, remSubimagesCB, 1);
@@ -372,7 +372,7 @@ function remSubimages() {
 
 function remSubimagesCB(data, ioArgs) {
 	if(data.items.error) {
-		dijit.byId('rembtn').attr('label', 'Remove Selected Subimage(s)');
+		dijit.byId('rembtn').attr('label', _('Remove Selected Subimage(s)'));
 		alert(data.items.msg);
 		return;
 	}
@@ -383,14 +383,14 @@ function remSubimagesCB(data, ioArgs) {
 	}
 	if(! obj.options.length) {
 		obj.disabled = true;
-		obj.options[0] = new Option('(None)', 'none', false, false);
+		obj.options[0] = new Option(_('(None)'), 'none', false, false);
 		dojo.byId('subimgcnt').innerHTML = 0;
 	}
 	else
 		dojo.byId('subimgcnt').innerHTML = obj.options.length;
 	dojo.byId('addsubimagecont').value = data.items.addcont;
 	dojo.byId('remsubimagecont').value = data.items.remcont;
-	dijit.byId('rembtn').attr('label', 'Remove Selected Subimage(s)');
+	dijit.byId('rembtn').attr('label', _('Remove Selected Subimage(s)'));
 }
 
 function selectConMethodRevision(url) {
@@ -420,7 +420,7 @@ function addConnectMethod2(item) {
 
 function addConnectMethod3() {
 	dojo.byId('cmerror').innerHTML = '';
-	dijit.byId('addcmbtn').attr('label', 'Working...');
+	dijit.byId('addcmbtn').attr('label', _('Working...'));
 	var data = {continuation: dojo.byId('addcmcont').value,
 	            newid: dijit.byId('addcmsel').value};
 	if(dijit.byId('conmethodrevid'))
@@ -432,7 +432,7 @@ function addConnectMethod3() {
 
 function addConnectMethodCB(data, ioArgs) {
 	if(data.items.error) {
-		dijit.byId('addcmbtn').attr('label', 'Add Method');
+		dijit.byId('addcmbtn').attr('label', _('Add Method'));
 		alert(data.items.msg);
 		return;
 	}
@@ -445,7 +445,7 @@ function addConnectMethodCB(data, ioArgs
 	dijit.byId('addcmsel').setStore(cmstore, '', {query: {active: 0}});
 	dojo.byId('addcmcont').value = data.items.addcont;
 	dojo.byId('remcmcont').value = data.items.remcont;
-	dijit.byId('addcmbtn').attr('label', 'Add Method');
+	dijit.byId('addcmbtn').attr('label', _('Add Method'));
 }
 
 function remConnectMethod() {
@@ -458,12 +458,12 @@ function remConnectMethod() {
 	if(! cmids.length)
 		return;
 	if(cmids.length == obj.options.length) {
-		dojo.byId('cmerror').innerHTML = 'There must be at least one item in Current Methods';
+		dojo.byId('cmerror').innerHTML = _('There must be at least one item in Current Methods');
 		setTimeout(function() {dojo.byId('cmerror').innerHTML = '';}, 20000);
 		return;
 	}
 	var ids = cmids.join(',');
-	dijit.byId('remcmbtn').attr('label', 'Working...');
+	dijit.byId('remcmbtn').attr('label', _('Working...'));
 	var data = {continuation: dojo.byId('remcmcont').value,
 	            ids: ids};
 	if(dijit.byId('conmethodrevid'))
@@ -479,7 +479,7 @@ function remConnectMethodCB(data, ioArgs
 		dijit.byId('addcmbtn').set('disabled', false);
 	}
 	if(data.items.error) {
-		dijit.byId('rembtn').attr('label', 'Remove Selected Methods');
+		dijit.byId('rembtn').attr('label', _('Remove Selected Methods'));
 		alert(data.items.msg);
 		return;
 	}
@@ -499,7 +499,7 @@ function remConnectMethodCB(data, ioArgs
 	dojo.byId('addcmcont').value = data.items.addcont;
 	dojo.byId('remcmcont').value = data.items.remcont;
 	updateConnectionMethodList();
-	dijit.byId('remcmbtn').attr('label', 'Remove Selected Methods');
+	dijit.byId('remcmbtn').attr('label', _('Remove Selected Methods'));
 }
 
 function updateConnectionMethodList() {
@@ -546,7 +546,7 @@ function deleteRevisions(cont, idlist) {
 		var obj2 = document.getElementById('radrev' + id);
 		if(obj.checked) {
 			if(obj2.checked) {
-				alert('You cannot delete the production revision.');
+				alert(_('You cannot delete the production revision.'));
 				return;
 			}
 			checkedids.push(id);
@@ -628,7 +628,7 @@ function startImageCB(data, ioArgs) {
 		dojo.byId('updateimage').disabled = 'disabled';
 		dojo.addClass('updateimagelabel', 'disabledlabel');
 	}
-	dijit.byId('addeditbtn').set('label', 'Create Image');
+	dijit.byId('addeditbtn').set('label', _('Create Image'));
 	dijit.byId('addeditbtn').set('disabled', false);
 	dijit.byId('clickthroughDlgBtn').set('disabled', false);
 
@@ -682,7 +682,7 @@ function updateImageCB(data, ioArgs) {
 		}
 	}
 	else if(data.items.status == 'noaccess') {
-		alert('You must be the owner of the image to update it.');
+		alert(_('You must be the owner of the image to update it.'));
 		dijit.byId('updateimagedlg').hide();
 		return;
 	}
@@ -703,7 +703,7 @@ function submitUpdateImageClickthrough()
 
 function submitUpdateImageClickthroughCB(data, ioArgs) {
 	if(data.items.status == 'noaccess') {
-		alert('You must be the owner of the image to update it.');
+		alert(_('You must be the owner of the image to update it.'));
 		dijit.byId('updateimagedlg').hide();
 		dijit.byId('clickthroughdlg').hide();
 		dijit.byId('clickthroughDlgBtn').set('disabled', false);