Modified: vcl/trunk/web/.ht-inc/resource.php URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/resource.php?rev=1692548&r1=1692547&r2=1692548&view=diff ============================================================================== --- vcl/trunk/web/.ht-inc/resource.php (original) +++ vcl/trunk/web/.ht-inc/resource.php Fri Jul 24 16:28:20 2015 @@ -155,7 +155,7 @@ class Resource { $h = ''; - $h .= "<H2>" . _("Manage {$this->restypename}s") . "</H2>\n"; + $h .= "<H2>" . i("Manage {$this->restypename}s") . "</H2>\n"; $h .= "<FORM action=\"" . BASEURL . SCRIPT . "\" method=post>\n"; $showsubmit = 0; if(in_array("{$this->restype}Admin", $user["privileges"]) && @@ -163,15 +163,15 @@ class Resource { $cont = addContinuationsEntry("viewResources", $this->basecdata); $h .= "<INPUT type=radio name=continuation value=\"$cont\" checked "; $h .= "id=\"{$this->restype}edit\"><label for=\"{$this->restype}edit\">"; - $h .= _("Edit {$this->restypename} Profiles") . "</label><br>\n"; + $h .= i("Edit {$this->restypename} Profiles") . "</label><br>\n"; $showsubmit = 1; } if(($resAdminCnt && $resGroupCnt) || ($resMapCnt && $maptypeMapCnt)) { if($this->hasmapping) - $label = _("Edit Grouping & Mapping"); + $label = i("Edit Grouping & Mapping"); else - $label = _("Edit Grouping"); + $label = i("Edit Grouping"); $cont = addContinuationsEntry("groupMapHTML", $this->basecdata); $h .= "<INPUT type=radio name=continuation value=\"$cont\" id=\""; $h .= "resgroupmap\"><label for=\"resgroupmap\">$label</label><br>\n"; @@ -182,9 +182,9 @@ class Resource { $h .= $this->extraSelectAdminOptions(); if($showsubmit) - $h .= "<br><INPUT type=submit value=" . _("Submit") . ">\n"; + $h .= "<br><INPUT type=submit value=" . i("Submit") . ">\n"; else - $h .= _("You don't have access to manage any {$this->restype}s.") . "<br>\n"; + $h .= i("You don't have access to manage any {$this->restype}s.") . "<br>\n"; $h .= "</FORM>\n"; return $h; @@ -200,7 +200,7 @@ class Resource { function viewResources() { global $user, $mode; $h = ''; - $h .= "<h2>" . _("{$this->restypename} Profiles") . "</h2>\n"; + $h .= "<h2>" . i("{$this->restypename} Profiles") . "</h2>\n"; $resdata = $this->getData($this->defaultGetDataArgs); if(! empty($resdata)) { @@ -238,10 +238,10 @@ class Resource { } if($this->addable) - $h .= dijitButton('', _("Add New {$this->restypename}"), "addNewResource('" . _("Add {$this->restypename}") . "');"); + $h .= dijitButton('', i("Add New {$this->restypename}"), "addNewResource('" . i("Add {$this->restypename}") . "');"); if(empty($resdata)) { - $h .= "<br><br>(" . _("No {$this->restypename}s found to which you have access.") . ")\n"; + $h .= "<br><br>(" . i("No {$this->restypename}s found to which you have access.") . ")\n"; $cont = addContinuationsEntry("viewResources", $this->basecdata); $url = BASEURL . SCRIPT . "?continuation=$cont"; $h .= "<input type=\"hidden\" id=\"reloadpageurl\" value=\"$url\">\n"; @@ -269,25 +269,25 @@ class Resource { } # filters - $h .= "<div dojoType=\"dijit.TitlePane\" title=\"" . _("Filters (click to expand)") . "\" "; + $h .= "<div dojoType=\"dijit.TitlePane\" title=\"" . i("Filters (click to expand)") . "\" "; $h .= "open=\"false\">\n"; $h .= "<span id=\"namefilter\">\n"; - $h .= "<strong>" . _("Name") . "</strong>:\n"; + $h .= "<strong>" . i("Name") . "</strong>:\n"; $h .= "<div dojoType=\"dijit.form.TextBox\" id=\"namefilter\" length=\"80\">"; $h .= " <script type=\"dojo/connect\" event=\"onKeyUp\" args=\"event\">\n"; $h .= " if(event.keyCode == 13) resource.GridFilter();\n"; $h .= " </script>\n"; $h .= "</div>\n"; - $h .= dijitButton('', _("Apply Name Filter"), "resource.GridFilter();"); + $h .= dijitButton('', i("Apply Name Filter"), "resource.GridFilter();"); $h .= "<br>\n"; $h .= "</span>\n"; # namefilter - $h .= "<strong>" . _("Displayed Fields") . "</strong>:<br>\n"; + $h .= "<strong>" . i("Displayed Fields") . "</strong>:<br>\n"; $h .= $this->addDisplayCheckboxes($fields, $resdata[$testid], $selfields); if($this->deletetoggled) { $h .= "<label for=\"showdeleted\"><strong>"; - $h .= _("Include Deleted {$this->restypename}s:"); + $h .= i("Include Deleted {$this->restypename}s:"); $h .= "</strong>:</label>\n"; $h .= "<input type=\"checkbox\" dojoType=\"dijit.form.CheckBox\" "; $h .= "id=\"showdeleted\" onChange=\"resource.GridFilter();\">\n"; @@ -312,7 +312,7 @@ class Resource { $w = array('5em', '3em', '17em'); $h .= "<th field=\"id\" id=\"delcolth\" width=\"{$w[0]}\" formatter=\"resource.DeleteBtn\" styles=\"text-align: center;\"> </th>\n"; $h .= "<th field=\"id\" width=\"{$w[1]}\" formatter=\"resource.EditBtn\" styles=\"text-align: center;\"> </th>\n"; - $h .= "<th field=\"name\" width=\"{$w[2]}\">" . _("Name") . "</th>\n"; + $h .= "<th field=\"name\" width=\"{$w[2]}\">" . i("Name") . "</th>\n"; if(! array_key_exists('owner', $selfields)) $selfields['owner'] = 1; foreach($fields as $field) @@ -342,8 +342,8 @@ class Resource { $h .= "<h2 id=\"toggleDeleteHeading\"></h2>\n"; $h .= "<span id=\"toggleDeleteQuestion\"></span><br>\n"; $h .= "<div id=\"confdelrescontent\"></div>\n"; - $h .= dijitButton('toggleDeleteBtn', _("Delete {$this->restypename}"), "submitToggleDeleteResource();"); - $h .= dijitButton('', _("Cancel"), "clearHideConfirmDelete();"); + $h .= dijitButton('toggleDeleteBtn', i("Delete {$this->restypename}"), "submitToggleDeleteResource();"); + $h .= dijitButton('', i("Cancel"), "clearHideConfirmDelete();"); $h .= "<input type=hidden id=\"submitdeletecont\">\n"; $h .= "</div>\n"; } @@ -619,7 +619,7 @@ class Resource { if(! array_key_exists($rscid, $resources[$this->restype])) { $type = strtolower($this->restypename); $rt = array('status' => 'noaccess', - 'msg' => _("You do not have access to delete the selected $type."), + 'msg' => i("You do not have access to delete the selected $type."), 'rscid' => $rscid); sendJSON($rt); return; @@ -633,9 +633,9 @@ class Resource { sendJSON($rt); return; } - $rt = array('title' => _("Confirm Delete {$this->restypename}"), - 'question' => _("Delete the following {$this->restype}?"), - 'btntxt' => _("Delete {$this->restypename}"), + $rt = array('title' => i("Confirm Delete {$this->restypename}"), + 'question' => i("Delete the following {$this->restype}?"), + 'btntxt' => i("Delete {$this->restypename}"), 'status' => 'success'); $args = $this->defaultGetDataArgs; if($this->deletetoggled) @@ -643,17 +643,17 @@ class Resource { $args['rscid'] = $rscid; $resdata = $this->getData($args); if($this->deletetoggled && $resdata[$rscid]['deleted']) { - $rt['title'] = _("Confirm Undelete {$this->restypename}"); - $rt['question'] = _("Undelete the following {$this->restype}?"); - $rt['btntxt'] = _("Undelete {$this->restypename}"); + $rt['title'] = i("Confirm Undelete {$this->restypename}"); + $rt['question'] = i("Undelete the following {$this->restype}?"); + $rt['btntxt'] = i("Undelete {$this->restypename}"); } $fields = array_keys($resdata[$rscid]); $rt['fields'] = array(); $rt['fields'][] = array('field' => 'name', - 'name' => _('Name'), + 'name' => i('Name'), 'value' => $resdata[$rscid][$this->namefield]); $rt['fields'][] = array('field' => 'owner', - 'name' => _('Owner'), + 'name' => i('Owner'), 'value' => $resdata[$rscid]['owner']); foreach($fields as $field) { if($field == $this->namefield || @@ -772,24 +772,24 @@ class Resource { uasort($resources, 'sortKeepIndex'); $h = ''; $h .= "<div id=\"groupbyresourcediv\" dojoType=\"dijit.layout.ContentPane\" "; - $h .= "title=\"" . _("Group By {$this->restypename}") . "\">\n"; + $h .= "title=\"" . i("Group By {$this->restypename}") . "\">\n"; $h .= "<div id=\"groupbyresourcedesc\">\n"; $h .= "<div style=\"width: 400px;\">\n"; - $h .= _("Select an item from the drop-down box and click \"Get Groups\" to see all of the groups it is in. Then, select a group it is in and click the Remove button to remove it from that group, or select a group it is not in and click the Add button to add it to that group."); + $h .= i("Select an item from the drop-down box and click \"Get Groups\" to see all of the groups it is in. Then, select a group it is in and click the Remove button to remove it from that group, or select a group it is not in and click the Add button to add it to that group."); $h .= "</div><br>\n"; $h .= "</div>\n"; # groupbyresourcedesc $h .= "<div id=\"groupbyresourcesel\">\n"; - $h .= _($this->restypename) . ":<select id=\"resources\">\n"; + $h .= i($this->restypename) . ":<select id=\"resources\">\n"; foreach($resources as $id => $res) $h .= "<option value=$id>$res</option>\n"; $h .= "</select>\n"; - $h .= dijitButton('fetchGrpsButton', _("Get Groups"), + $h .= dijitButton('fetchGrpsButton', i("Get Groups"), "populateLists('resources', 'ingroups', 'inresourcename', 'outresourcename', 'resgroupinggroupscont');"); $h .= "</div>\n"; # groupbyresourcesel $h .= "<table><tbody><tr>\n"; # select for groups resource is in $h .= "<td valign=top>\n"; - $h .= sprintf(_("Groups %s is in:"), "<span style=\"font-weight: bold;\" id=\"inresourcename\"></span>"); + $h .= sprintf(i("Groups %s is in:"), "<span style=\"font-weight: bold;\" id=\"inresourcename\"></span>"); $h .= "<br>\n"; $h .= "<table dojoType=\"dojox.grid.DataGrid\" jsId=\"ingroups\" "; $h .= "store=\"resourcetogroupsstore\" style=\"width: 240px; height: 250px;\" query=\"{inout: 1}\" "; @@ -803,14 +803,14 @@ class Resource { $h .= "</td>\n"; # transfer buttons $h .= "<td style=\"vertical-align: middle;\">\n"; - $h .= dijitButton('', "<div style=\"width: 50px;\"><-" . _("Add") . "</div>", + $h .= dijitButton('', "<div style=\"width: 50px;\"><-" . i("Add") . "</div>", "resource.addRemItem('addgrpcont', 'resources', 'outgroups');"); $cdata = $this->basecdata; $cdata['mode'] = 'add'; $cont = addContinuationsEntry('AJaddRemGroupResource', $cdata); $h .= "<input type=\"hidden\" id=\"addgrpcont\" value=\"$cont\">\n"; $h .= "<br><br><br>\n"; - $h .= dijitButton('', "<div style=\"width: 50px;\">" . _("Remove") . "-></div>", + $h .= dijitButton('', "<div style=\"width: 50px;\">" . i("Remove") . "-></div>", "resource.addRemItem('remgrpcont', 'resources', 'ingroups');"); $cdata['mode'] = 'remove'; $cont = addContinuationsEntry('AJaddRemGroupResource', $cdata); @@ -818,7 +818,7 @@ class Resource { $h .= "</td>\n"; # select for groups resource is not in $h .= "<td valign=top>\n"; - $h .= sprintf(_("Groups %s is not in:"), "<span style=\"font-weight: bold;\" id=\"outresourcename\"></span>"); + $h .= sprintf(i("Groups %s is not in:"), "<span style=\"font-weight: bold;\" id=\"outresourcename\"></span>"); $h .= "<br>\n"; $h .= "<table dojoType=\"dojox.grid.DataGrid\" jsId=\"outgroups\" "; $h .= "store=\"resourcetogroupsstore\" style=\"width: 240px; height: 250px;\" query=\"{inout: 1}\" "; @@ -950,11 +950,11 @@ class Resource { return ''; $h = ''; $h .= "<div id=\"groupbygroupdiv\" dojoType=\"dijit.layout.ContentPane\" "; - $h .= "title=\"" . _("Group By Group") . "\">\n"; + $h .= "title=\"" . i("Group By Group") . "\">\n"; $h .= "<div style=\"width: 420px;\">\n"; - $h .= _("Select a group from the drop-down box and click \"Get {$this->restypename}s\" to see all of the resources in it. Then, select a resource in it and click the Remove button to remove it from that group, or select a resource that is not in it and click the Add button to add it to that group."); + $h .= i("Select a group from the drop-down box and click \"Get {$this->restypename}s\" to see all of the resources in it. Then, select a resource in it and click the Remove button to remove it from that group, or select a resource that is not in it and click the Add button to add it to that group."); $h .= "</div><br>\n"; - $h .= _("Group:") . "<select id=\"resgroups\">\n"; + $h .= i("Group:") . "<select id=\"resgroups\">\n"; # build list of groups $tmp = getUserResources(array($this->restype . "Admin"), array('manageGroup'), 1); $groups = $tmp[$this->restype]; @@ -967,7 +967,7 @@ class Resource { $h .= "<table><tbody><tr>\n"; # select for resources in group $h .= "<td valign=top>\n"; - $h .= sprintf(_("{$this->restypename}s in %s:"), "<span style=\"font-weight: bold;\" id=\"ingroupname\"></span>"); + $h .= sprintf(i("{$this->restypename}s in %s:"), "<span style=\"font-weight: bold;\" id=\"ingroupname\"></span>"); $h .= "<br>\n"; $h .= "<table dojoType=\"dojox.grid.DataGrid\" jsId=\"inresources\" "; $h .= "store=\"grouptoresourcesstore\" style=\"width: 240px; height: 250px;\" query=\"{inout: 1}\" "; @@ -981,14 +981,14 @@ class Resource { $h .= "</td>\n"; # transfer buttons $h .= "<td style=\"vertical-align: middle;\">\n"; - $h .= dijitButton('', "<div style=\"width: 50px;\"><-" . _("Add") . "</div>", + $h .= dijitButton('', "<div style=\"width: 50px;\"><-" . i("Add") . "</div>", "resource.addRemItem('additemcont', 'resgroups', 'outresources');"); $cdata = $this->basecdata; $cdata['mode'] = 'add'; $cont = addContinuationsEntry('AJaddRemResourceGroup', $cdata); $h .= "<input type=\"hidden\" id=\"additemcont\" value=\"$cont\">\n"; $h .= "<br><br><br>\n"; - $h .= dijitButton('', "<div style=\"width: 50px;\">" . _("Remove") . "-></div>", + $h .= dijitButton('', "<div style=\"width: 50px;\">" . i("Remove") . "-></div>", "resource.addRemItem('remitemcont', 'resgroups', 'inresources');"); $cdata['mode'] = 'remove'; $cont = addContinuationsEntry('AJaddRemResourceGroup', $cdata); @@ -996,7 +996,7 @@ class Resource { $h .= "</td>\n"; # select for groups resource is not in $h .= "<td valign=top>\n"; - $h .= sprintf(_("{$this->restypename}s not in %s:"), "<span style=\"font-weight: bold;\" id=\"outgroupname\"></span>"); + $h .= sprintf(i("{$this->restypename}s not in %s:"), "<span style=\"font-weight: bold;\" id=\"outgroupname\"></span>"); $h .= "<br>\n"; $h .= "<table dojoType=\"dojox.grid.DataGrid\" jsId=\"outresources\" "; $h .= "store=\"grouptoresourcesstore\" style=\"width: 240px; height: 250px;\" query=\"{inout: 1}\" "; @@ -1149,25 +1149,25 @@ class Resource { $h = ''; if(! count($groups) || ! count($mapgroups)) { - $h .= _("You don't have access to manage any mappings for this resource type."); + $h .= i("You don't have access to manage any mappings for this resource type."); return $h; } $h .= "<div id=\"mapbyresgroupdiv\" dojoType=\"dijit.layout.ContentPane\" "; - $h .= "title=\"" . _("Map By {$this->restypename} Group") . "\">\n"; + $h .= "title=\"" . i("Map By {$this->restypename} Group") . "\">\n"; $h .= "<div style=\"width: 390px;\">\n"; - $h .= _("Select an item from the drop-down box and click \"Get {$this->maptypename} Groups\" to see all of the groups it maps to. Then, select a group it does not map to and click the Add button to map it to that group, or select a group it maps to and click the Remove button to unmap it from that group."); + $h .= i("Select an item from the drop-down box and click \"Get {$this->maptypename} Groups\" to see all of the groups it maps to. Then, select a group it does not map to and click the Add button to map it to that group, or select a group it maps to and click the Remove button to unmap it from that group."); $h .= "</div><br>\n"; - $h .= _("{$this->restypename} Group:") . "<select id=\"groups\">\n"; + $h .= i("{$this->restypename} Group:") . "<select id=\"groups\">\n"; foreach($groups as $id => $group) $h .= "<option value=$id>$group</option>\n"; $h .= "</select>\n"; - $h .= dijitButton('', _("Get {$this->maptypename} Groups"), + $h .= dijitButton('', i("Get {$this->maptypename} Groups"), "populateLists('groups', 'inmapgroups', 'inmapgroupname', 'outmapgroupname', 'mapbyresgroupcont');"); $h .= "<table><tbody><tr>\n"; # select for groups mapped to $h .= "<td valign=top>\n"; - $h .= sprintf(_("{$this->maptypename} Groups %s maps to:"), "<span style=\"font-weight: bold;\" id=\"inmapgroupname\"></span>"); + $h .= sprintf(i("{$this->maptypename} Groups %s maps to:"), "<span style=\"font-weight: bold;\" id=\"inmapgroupname\"></span>"); $h .= "<br>\n"; $h .= "<table dojoType=\"dojox.grid.DataGrid\" jsId=\"inmapgroups\" "; $h .= "store=\"mapbyresgroupstore\" style=\"width: 240px; height: 250px;\" query=\"{inout: 1}\" "; @@ -1181,7 +1181,7 @@ class Resource { $h .= "</td>\n"; # transfer buttons $h .= "<td style=\"vertical-align: middle;\">\n"; - $h .= dijitButton('', "<div style=\"width: 50px;\"><-" . _("Add") . "</div>", + $h .= dijitButton('', "<div style=\"width: 50px;\"><-" . i("Add") . "</div>", "resource.addRemItem('addmapgrpcont', 'groups', 'outmapgroups');"); $cdata = $this->basecdata; $cdata['mode'] = 'add'; @@ -1190,7 +1190,7 @@ class Resource { $h .= "<br>\n"; $h .= "<br>\n"; $h .= "<br>\n"; - $h .= dijitButton('', "<div style=\"width: 50px;\">" . _("Remove") . "-></div>", + $h .= dijitButton('', "<div style=\"width: 50px;\">" . i("Remove") . "-></div>", "resource.addRemItem('remmapgrpcont', 'groups', 'inmapgroups');"); $cdata['mode'] = 'remove'; $cont = addContinuationsEntry('AJaddRemMapToGroup', $cdata); @@ -1198,7 +1198,7 @@ class Resource { $h .= "</td>\n"; # select for groups resource is not in $h .= "<td valign=top>\n"; - $h .= sprintf(_("{$this->maptypename} Groups %s does not map to:"), "<span style=\"font-weight: bold;\" id=\"outmapgroupname\"></span>"); + $h .= sprintf(i("{$this->maptypename} Groups %s does not map to:"), "<span style=\"font-weight: bold;\" id=\"outmapgroupname\"></span>"); $h .= "<br>\n"; $h .= "<table dojoType=\"dojox.grid.DataGrid\" jsId=\"outmapgroups\" "; $h .= "store=\"mapbyresgroupstore\" style=\"width: 240px; height: 250px;\" query=\"{inout: 1}\" "; @@ -1348,20 +1348,20 @@ class Resource { } $h .= "<div id=\"mapbymaptogroupdiv\" dojoType=\"dijit.layout.ContentPane\" "; - $h .= "title=\"" . _("Map By {$this->maptypename} Group") . "\">\n"; + $h .= "title=\"" . i("Map By {$this->maptypename} Group") . "\">\n"; $h .= "<div style=\"width: 410px;\">\n"; - $h .= _("Select an item from the drop-down box and click \"Get {$this->restypename} Groups\" to see all of the groups it maps to. Then, select a group it does not map to and click the Add button to map it to that group, or select a group it maps to and click the Remove button to unmap it from that group."); + $h .= i("Select an item from the drop-down box and click \"Get {$this->restypename} Groups\" to see all of the groups it maps to. Then, select a group it does not map to and click the Add button to map it to that group, or select a group it maps to and click the Remove button to unmap it from that group."); $h .= "</div><br>\n"; - $h .= _("{$this->maptypename} Group:") . "<select id=\"maptogroups\">\n"; + $h .= i("{$this->maptypename} Group:") . "<select id=\"maptogroups\">\n"; foreach($mapgroups as $id => $group) $h .= "<option value=$id>$group</option>\n"; $h .= "</select>\n"; - $h .= dijitButton('', _("Get {$this->restypename} Groups"), + $h .= dijitButton('', i("Get {$this->restypename} Groups"), "populateLists('maptogroups', 'inmaptogroups', 'inmaptogroupname', 'outmaptogroupname', 'mapbymaptogroupcont');"); $h .= "<table><tbody><tr>\n"; # select for groups mapped to $h .= "<td valign=top>\n"; - $h .= sprintf(_("{$this->restypename} Groups %s maps to:"), "<span style=\"font-weight: bold;\" id=\"inmaptogroupname\"></span>"); + $h .= sprintf(i("{$this->restypename} Groups %s maps to:"), "<span style=\"font-weight: bold;\" id=\"inmaptogroupname\"></span>"); $h .= "<br>\n"; $h .= "<table dojoType=\"dojox.grid.DataGrid\" jsId=\"inmaptogroups\" "; $h .= "store=\"mapbymaptogroupstore\" style=\"width: 240px; height: 250px;\" query=\"{inout: 1}\" "; @@ -1375,14 +1375,14 @@ class Resource { $h .= "</td>\n"; # transfer buttons $h .= "<td style=\"vertical-align: middle;\">\n"; - $h .= dijitButton('', "<div style=\"width: 50px;\"><-" . _("Add") . "</div>", + $h .= dijitButton('', "<div style=\"width: 50px;\"><-" . i("Add") . "</div>", "resource.addRemItem('addmaptogrpcont', 'maptogroups', 'outmaptogroups');"); $cdata = $this->basecdata; $cdata['mode'] = 'add'; $cont = addContinuationsEntry('AJaddRemGroupMapTo', $cdata); $h .= "<input type=\"hidden\" id=\"addmaptogrpcont\" value=\"$cont\">\n"; $h .= "<br><br><br>\n"; - $h .= dijitButton('', "<div style=\"width: 50px;\">" . _("Remove") . "-></div>", + $h .= dijitButton('', "<div style=\"width: 50px;\">" . i("Remove") . "-></div>", "resource.addRemItem('remmaptogrpcont', 'maptogroups', 'inmaptogroups');"); $cdata['mode'] = 'remove'; $cont = addContinuationsEntry('AJaddRemGroupMapTo', $cdata); @@ -1390,7 +1390,7 @@ class Resource { $h .= "</td>\n"; # select for groups resource is not in $h .= "<td valign=top>\n"; - $h .= sprintf(_("{$this->restypename} Groups %s does not map to:"), "<span style=\"font-weight: bold;\" id=\"outmaptogroupname\"></span>"); + $h .= sprintf(i("{$this->restypename} Groups %s does not map to:"), "<span style=\"font-weight: bold;\" id=\"outmaptogroupname\"></span>"); $h .= "<br>\n"; $h .= "<table dojoType=\"dojox.grid.DataGrid\" jsId=\"outmaptogroups\" "; $h .= "store=\"mapbymaptogroupstore\" style=\"width: 240px; height: 250px;\" query=\"{inout: 1}\" "; @@ -1646,7 +1646,7 @@ function AJstartImage() { ($data['stateid'] == 14 && ($data['laststateid'] == 11 || $data['laststateid'] == 12))) { $ret = array('status' => 'resgone', - 'errmsg' => _("The reservation you selected to image has expired.")); + 'errmsg' => i("The reservation you selected to image has expired.")); sendJSON($ret); return; } @@ -1677,7 +1677,7 @@ function AJstartImage() { } else { $data['status'] = 'error'; - $data['errmsg'] = _("There was an error in starting the imaging process. Please contact a system administrator."); + $data['errmsg'] = i("There was an error in starting the imaging process. Please contact a system administrator."); sendJSON($data); return; } @@ -1725,13 +1725,13 @@ function AJstartImage() { $comments = ''; } if(preg_match('/\w/', $comments)) { - $cmt = sprintf(_("These are the comments from the previous revision (%s):"), + $cmt = sprintf(i("These are the comments from the previous revision (%s):"), $revisions[$revid]['revision']); $cmt .= "<br>"; $cmt .= "{$revisions[$revid]['comments']}<br><br>"; } else - $cmt = _("The previous revision did not have any comments.") . "<br><br>"; + $cmt = i("The previous revision did not have any comments.") . "<br><br>"; $arr['comments'] = $cmt; $cdata = array('obj' => $obj, 'requestid' => $requestid,
Modified: vcl/trunk/web/.ht-inc/schedule.php URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/schedule.php?rev=1692548&r1=1692547&r2=1692548&view=diff ============================================================================== --- vcl/trunk/web/.ht-inc/schedule.php (original) +++ vcl/trunk/web/.ht-inc/schedule.php Fri Jul 24 16:28:20 2015 @@ -82,16 +82,16 @@ class Schedule extends Resource { $h .= "<div style=\"text-align: center;\">\n"; # name - $errmsg = _("Name cannot contain single (') or double (") quotes, less than (<), or greater than (>) and can be from 2 to 30 characters long"); - $h .= labeledFormItem('name', _('Name'), 'text', '^([A-Za-z0-9-!@#$%^&\*\(\)_=\+\[\]{}\\\|:;,\./\?~` ]){2,30}$', + $errmsg = i("Name cannot contain single (') or double (") quotes, less than (<), or greater than (>) and can be from 2 to 30 characters long"); + $h .= labeledFormItem('name', i('Name'), 'text', '^([A-Za-z0-9-!@#$%^&\*\(\)_=\+\[\]{}\\\|:;,\./\?~` ]){2,30}$', 1, '', $errmsg, '', '', '200px'); # owner $extra = array('onKeyPress' => 'setOwnerChecking'); - $h .= labeledFormItem('owner', _('Owner'), 'text', '', 1, - "{$user['unityid']}@{$user['affiliation']}", _('Unknown user'), + $h .= labeledFormItem('owner', i('Owner'), 'text', '', 1, + "{$user['unityid']}@{$user['affiliation']}", i('Unknown user'), 'checkOwner', $extra, '200px'); - #$h .= labeledFormItem('owner', _('Owner'), 'text', '{$user['unityid']}@{$user['affiliation']}', - # 1, '', _('Unknown user'), 'checkOwner', 'onKeyPress', 'setOwnerChecking'); + #$h .= labeledFormItem('owner', i('Owner'), 'text', '{$user['unityid']}@{$user['affiliation']}', + # 1, '', i('Unknown user'), 'checkOwner', 'onKeyPress', 'setOwnerChecking'); $cont = addContinuationsEntry('AJvalidateUserid'); $h .= "<input type=\"hidden\" id=\"valuseridcont\" value=\"$cont\">\n"; Modified: vcl/trunk/web/.ht-inc/siteconfig.php URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/siteconfig.php?rev=1692548&r1=1692547&r2=1692548&view=diff ============================================================================== --- vcl/trunk/web/.ht-inc/siteconfig.php (original) +++ vcl/trunk/web/.ht-inc/siteconfig.php Fri Jul 24 16:28:20 2015 @@ -26,12 +26,12 @@ function siteconfig() { if(! checkUserHasPerm('Site Configuration (global)') && ! checkUserHasPerm('Site Configuration (affiliation only)')) { - print "<h2>" . _("Site Configuration") . "</h2>\n"; + print "<h2>" . i("Site Configuration") . "</h2>\n"; print "You do not have access to this part of the site.<br>\n"; return; } $h = ''; - $h .= "<h2>" . _("Site Configuration") . "</h2>\n"; + $h .= "<h2>" . i("Site Configuration") . "</h2>\n"; $globalopts = 0; if(checkUserHasPerm('Site Configuration (global)')) @@ -126,15 +126,15 @@ function timeSourceHTML($globalopts) { if(! $globalopts) return ''; $h = "<div class=\"configwidget\">\n"; - $h .= "<h3>" . _("Time Source") . "</h3>\n"; + $h .= "<h3>" . i("Time Source") . "</h3>\n"; $h .= "<span class=\"siteconfigdesc\">\n"; - $h .= _("Set the default list of time servers to be used on installed nodes. These can be overridden for each management node under the settings for a given management node. Separate hostnames using a comma (,).") . "<br><br>\n"; + $h .= i("Set the default list of time servers to be used on installed nodes. These can be overridden for each management node under the settings for a given management node. Separate hostnames using a comma (,).") . "<br><br>\n"; $h .= "</span>\n"; $val = getVariable('timesource|global', '', 1); $hostreg = '(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])'; - $h .= labeledFormItem('timesource', _('Time Servers'), 'text', "^($hostreg){1}(,$hostreg)*$", '', $val['value']); + $h .= labeledFormItem('timesource', i('Time Servers'), 'text', "^($hostreg){1}(,$hostreg)*$", '', $val['value']); $h .= "<div id=\"timesourcemsg\"></div>\n"; - $h .= dijitButton('timesourcebtn', _('Submit Changes'), "saveTimeSource();", 1); + $h .= dijitButton('timesourcebtn', i('Submit Changes'), "saveTimeSource();", 1); $cont = addContinuationsEntry('AJupdateTimeSource', array('origval' => $val)); $h .= "<input type=hidden id=timesourcecont value=\"$cont\">\n"; $h .= "</div>\n"; @@ -151,7 +151,7 @@ function timeSourceHTML($globalopts) { function AJupdateTimeSource() { if(! checkUserHasPerm('Site Configuration (global)')) { $arr = array('status' => 'noaccess', - 'msg' => _('You do not have access to set the global Time Server setting.')); + 'msg' => i('You do not have access to set the global Time Server setting.')); sendJSON($arr); return; } @@ -169,7 +169,7 @@ function AJupdateTimeSource() { $arr = array('status' => 'failed', 'msgid' => 'timesourcemsg', 'btn' => 'timesourcebtn', - 'errmsg' => _('Invalid server(s) specified.')); + 'errmsg' => i('Invalid server(s) specified.')); sendJSON($arr); return; } @@ -180,7 +180,7 @@ function AJupdateTimeSource() { $arr = array('status' => 'success', 'msgid' => 'timesourcemsg', 'btn' => 'timesourcebtn', - 'msg' => _('Time Server successfully updated')); + 'msg' => i('Time Server successfully updated')); sendJSON($arr); } @@ -218,9 +218,9 @@ class TimeVariable { $this->basecdata = array(); $this->scale60 = 0; $this->defaultval = 900; - $this->addmsg = _("Time out for %s added"); - $this->updatemsg = _("Time out values saved"); - $this->delmsg = _("Time out for %s deleted"); + $this->addmsg = i("Time out for %s added"); + $this->updatemsg = i("Time out values saved"); + $this->delmsg = i("Time out for %s deleted"); $this->minval = 5; } @@ -263,8 +263,8 @@ class TimeVariable { if($this->scale60) $dispval = (int)($dispval / 60); } - $label = _('Global'); - unset_by_val(_('Global'), $affils); + $label = i('Global'); + unset_by_val(i('Global'), $affils); } else { $key = "{$this->key}|{$user['affiliation']}"; @@ -309,7 +309,7 @@ class TimeVariable { $dispval = (int)($dispval / 60); $h .= "<span id=\"{$key}span\">\n"; $h .= labeledFormItem($key, $label, 'spinner', "{min:{$this->minval}, max:{$this->maxval}}", 1, $dispval, '', '', $extra, '', '', 0); - $h .= dijitButton("{$key}delbtn", _("Delete"), "{$this->jsname}.deleteAffiliationSetting('$key', '{$this->domidbase}');") . "<br>\n"; + $h .= dijitButton("{$key}delbtn", i("Delete"), "{$this->jsname}.deleteAffiliationSetting('$key', '{$this->domidbase}');") . "<br>\n"; $h .= "</span>\n"; $origvals[$key] = array('key' => $prekey, 'val' => $val); unset_by_val($label, $affils); @@ -333,7 +333,7 @@ class TimeVariable { $h .= "smallDelta=\"1\" "; $h .= "largeDelta=\"10\" "; $h .= "id=\"{$this->domidbase}newval\">\n"; - $h .= dijitButton("{$this->domidbase}addbtn", _('Add'), "{$this->jsname}.addAffiliationSetting();"); + $h .= dijitButton("{$this->domidbase}addbtn", i('Add'), "{$this->jsname}.addAffiliationSetting();"); $cont = addContinuationsEntry('AJaddAffiliationSetting', $this->basecdata); $h .= "<input type=\"hidden\" id=\"{$this->domidbase}addcont\" value=\"$cont\">\n"; $h .= "</div>\n"; @@ -348,7 +348,7 @@ class TimeVariable { $keys = implode(',', $tmp); $h .= "<div id=\"{$this->domidbase}msg\"></div>\n"; $h .= "<input type=\"hidden\" id=\"{$this->domidbase}savekeys\" value=\"$keys\">\n"; - $h .= dijitButton("{$this->domidbase}btn", _('Submit Changes'), "{$this->jsname}.saveSettings();", 1); + $h .= dijitButton("{$this->domidbase}btn", i('Submit Changes'), "{$this->jsname}.saveSettings();", 1); $cdata = $this->basecdata; $cdata['origvals'] = $origvals; $cont = addContinuationsEntry('AJupdateAllSettings', $cdata); @@ -368,7 +368,7 @@ class TimeVariable { global $user; if(! checkUserHasPerm('Site Configuration (global)')) { $arr = array('status' => 'noaccess', - 'msg' => _('You do not have access to modify settings for other affiliations.')); + 'msg' => i('You do not have access to modify settings for other affiliations.')); sendJSON($arr); return; } @@ -377,7 +377,7 @@ class TimeVariable { if(! array_key_exists($affilid, $affils)) { $arr = array('status' => 'failed', 'msgid' => "{$this->domidbase}msg", - 'errmsg' => _('Invalid affiliation submitted.')); + 'errmsg' => i('Invalid affiliation submitted.')); sendJSON($arr); return; } @@ -385,7 +385,7 @@ class TimeVariable { if($value < $this->minval || $value > $this->maxval) { $arr = array('status' => 'failed', 'msgid' => "{$this->domidbase}msg", - 'errmsg' => _('Invalid value submitted.')); + 'errmsg' => i('Invalid value submitted.')); sendJSON($arr); return; } @@ -435,7 +435,7 @@ class TimeVariable { if(! checkUserHasPerm('Site Configuration (global)') && ! checkUserHasPerm('Site Configuration (affiliation only)')) { $arr = array('status' => 'noaccess', - 'msg' => _('You do not have access to modify the submitted settings.')); + 'msg' => i('You do not have access to modify the submitted settings.')); sendJSON($arr); return; } @@ -453,7 +453,7 @@ class TimeVariable { $arr = array('status' => 'failed', 'msgid' => "{$this->domidbase}msg", 'btn' => "{$this->domidbase}btn", - 'errmsg' => _("Invalid value submitted for ") . $affil); + 'errmsg' => i("Invalid value submitted for ") . $affil); sendJSON($arr); return; } @@ -490,7 +490,7 @@ class TimeVariable { function AJdeleteAffiliationSetting() { if(! checkUserHasPerm('Site Configuration (global)')) { $arr = array('status' => 'noaccess', - 'msg' => _('You do not have access to delete the submitted setting.')); + 'msg' => i('You do not have access to delete the submitted setting.')); sendJSON($arr); return; } @@ -499,7 +499,7 @@ class TimeVariable { if(! array_key_exists($key, $origvals)) { $arr = array('status' => 'failed', 'msgid' => "{$this->domidbase}msg", - 'msg' => _('Invalid data submitted.')); + 'msg' => i('Invalid data submitted.')); sendJSON($arr); return; } @@ -549,9 +549,9 @@ class connectedUserCheck extends TimeVar ///////////////////////////////////////////////////////////////////////////// function __construct() { parent::__construct(); - $this->name = _('Connected User Check Threshold'); + $this->name = i('Connected User Check Threshold'); $this->key = 'ignore_connections_gte'; - $this->desc = _("Do not perform user-logged-in time out checks if reservation duration is greater than the specified value (in hours)."); + $this->desc = i("Do not perform user-logged-in time out checks if reservation duration is greater than the specified value (in hours)."); $this->domidbase = 'connectedusercheck'; $this->basecdata['obj'] = $this; $this->jsname = 'connectedUserCheck'; @@ -579,9 +579,9 @@ class acknowledge extends TimeVariable { ///////////////////////////////////////////////////////////////////////////// function __construct() { parent::__construct(); - $this->name = _('Acknowledge Reservation Timeout'); + $this->name = i('Acknowledge Reservation Timeout'); $this->key = 'acknowledgetimeout'; - $this->desc = _("Once a reservation is ready, users have this long to click the Connect button before the reservation is timed out (in minutes, does not apply to Server Reservations)."); + $this->desc = i("Once a reservation is ready, users have this long to click the Connect button before the reservation is timed out (in minutes, does not apply to Server Reservations)."); $this->domidbase = 'acknowledge'; $this->basecdata['obj'] = $this; $this->jsname = 'acknowledge'; @@ -607,9 +607,9 @@ class initialconnecttimeout extends Time ///////////////////////////////////////////////////////////////////////////// function __construct() { parent::__construct(); - $this->name = _('Connect To Reservation Timeout'); + $this->name = i('Connect To Reservation Timeout'); $this->key = 'initialconnecttimeout'; - $this->desc = _("After clicking the Connect button for a reservation, users have this long to connect to a reserved node before the reservation is timed out (in minutes, does not apply to Server Reservations)."); + $this->desc = i("After clicking the Connect button for a reservation, users have this long to connect to a reserved node before the reservation is timed out (in minutes, does not apply to Server Reservations)."); $this->domidbase = 'initialconnecttimeout'; $this->basecdata['obj'] = $this; $this->jsname = 'initialconnecttimeout'; @@ -635,9 +635,9 @@ class reconnecttimeout extends TimeVaria ///////////////////////////////////////////////////////////////////////////// function __construct() { parent::__construct(); - $this->name = _('Re-connect To Reservation Timeout'); + $this->name = i('Re-connect To Reservation Timeout'); $this->key = 'reconnecttimeout'; - $this->desc = _("After disconnecting from a reservation, users have this long to reconnect to a reserved node before the reservation is timed out (in minutes, does not apply to Server Reservations)."); + $this->desc = i("After disconnecting from a reservation, users have this long to reconnect to a reserved node before the reservation is timed out (in minutes, does not apply to Server Reservations)."); $this->domidbase = 'reconnecttimeout'; $this->basecdata['obj'] = $this; $this->jsname = 'reconnecttimeout'; @@ -663,18 +663,18 @@ class generalInuse extends TimeVariable ///////////////////////////////////////////////////////////////////////////// function __construct() { parent::__construct(); - $this->name = _('In-Use Reservation Check'); + $this->name = i('In-Use Reservation Check'); $this->key = 'general_inuse_check'; - $this->desc = _("Frequency at which a general check of each reservation is done (in minutes)."); + $this->desc = i("Frequency at which a general check of each reservation is done (in minutes)."); $this->domidbase = 'generalinuse'; $this->basecdata['obj'] = $this; $this->jsname = 'generalInuse'; $this->scale60 = 1; $this->maxval = 60; $this->defaultval = 300; - $this->addmsg = _("In-Use check for %s added"); - $this->updatemsg = _("In-Use check values saved"); - $this->delmsg = _("In-Use check for %s deleted"); + $this->addmsg = i("In-Use check for %s added"); + $this->updatemsg = i("In-Use check values saved"); + $this->delmsg = i("In-Use check for %s deleted"); } } @@ -695,18 +695,18 @@ class serverInuse extends TimeVariable { ///////////////////////////////////////////////////////////////////////////// function __construct() { parent::__construct(); - $this->name = _('In-Use Reservation Check (servers)'); + $this->name = i('In-Use Reservation Check (servers)'); $this->key = 'server_inuse_check'; - $this->desc = _("Frequency at which a general check of each server reservation is done (in minutes)."); + $this->desc = i("Frequency at which a general check of each server reservation is done (in minutes)."); $this->domidbase = 'serverinuse'; $this->basecdata['obj'] = $this; $this->jsname = 'serverInuse'; $this->scale60 = 1; $this->maxval = 240; $this->defaultval = 900; - $this->addmsg = _("In-Use check for %s added"); - $this->updatemsg = _("In-Use check values saved"); - $this->delmsg = _("In-Use check for %s deleted"); + $this->addmsg = i("In-Use check for %s added"); + $this->updatemsg = i("In-Use check values saved"); + $this->delmsg = i("In-Use check for %s deleted"); } } @@ -727,18 +727,18 @@ class clusterInuse extends TimeVariable ///////////////////////////////////////////////////////////////////////////// function __construct() { parent::__construct(); - $this->name = _('In-Use Reservation Check (clusters)'); + $this->name = i('In-Use Reservation Check (clusters)'); $this->key = 'cluster_inuse_check'; - $this->desc = _("Frequency at which a general check of each cluster reservation is done (in minutes)."); + $this->desc = i("Frequency at which a general check of each cluster reservation is done (in minutes)."); $this->domidbase = 'clusterinuse'; $this->basecdata['obj'] = $this; $this->jsname = 'clusterInuse'; $this->scale60 = 1; $this->maxval = 240; $this->defaultval = 900; - $this->addmsg = _("In-Use check for %s added"); - $this->updatemsg = _("In-Use check values saved"); - $this->delmsg = _("In-Use check for %s deleted"); + $this->addmsg = i("In-Use check for %s added"); + $this->updatemsg = i("In-Use check values saved"); + $this->delmsg = i("In-Use check for %s deleted"); } } @@ -759,18 +759,18 @@ class generalEndNotice1 extends TimeVari ///////////////////////////////////////////////////////////////////////////// function __construct() { parent::__construct(); - $this->name = _('First Notice For Reservation Ending'); + $this->name = i('First Notice For Reservation Ending'); $this->key = 'general_end_notice_first'; - $this->desc = _("Users are notified two times that their reservations are going to end when getting close to the end time. This is the time before the end that the first of those notices should be sent."); + $this->desc = i("Users are notified two times that their reservations are going to end when getting close to the end time. This is the time before the end that the first of those notices should be sent."); $this->domidbase = 'generalendnotice1'; $this->basecdata['obj'] = $this; $this->jsname = 'generalEndNotice1'; $this->scale60 = 1; $this->maxval = 120; $this->defaultval = 600; - $this->addmsg = _("End notice time for %s added"); - $this->updatemsg = _("End notice time values saved"); - $this->delmsg = _("End notice time for %s deleted"); + $this->addmsg = i("End notice time for %s added"); + $this->updatemsg = i("End notice time values saved"); + $this->delmsg = i("End notice time for %s deleted"); } } @@ -791,18 +791,18 @@ class generalEndNotice2 extends TimeVari ///////////////////////////////////////////////////////////////////////////// function __construct() { parent::__construct(); - $this->name = _('Second Notice For Reservation Ending'); + $this->name = i('Second Notice For Reservation Ending'); $this->key = 'general_end_notice_second'; - $this->desc = _("Users are notified two times that their reservations are going to end when getting close to the end time. This is the time before the end that the second of those notices should be sent."); + $this->desc = i("Users are notified two times that their reservations are going to end when getting close to the end time. This is the time before the end that the second of those notices should be sent."); $this->domidbase = 'generalendnotice2'; $this->basecdata['obj'] = $this; $this->jsname = 'generalEndNotice2'; $this->scale60 = 1; $this->maxval = 60; $this->defaultval = 300; - $this->addmsg = _("End notice time for %s added"); - $this->updatemsg = _("End notice time values saved"); - $this->delmsg = _("End notice time for %s deleted"); + $this->addmsg = i("End notice time for %s added"); + $this->updatemsg = i("End notice time values saved"); + $this->delmsg = i("End notice time for %s deleted"); } } @@ -834,7 +834,7 @@ class GlobalSingleVariable { ///////////////////////////////////////////////////////////////////////////// function __construct() { $this->basecdata = array('obj' => $this); - $this->updatemsg = _("New value saved"); + $this->updatemsg = i("New value saved"); $this->label = $this->name; $type = 'text'; } @@ -875,7 +875,7 @@ class GlobalSingleVariable { break; } $h .= "<div id=\"{$this->domidbase}msg\"></div>\n"; - $h .= dijitButton("{$this->domidbase}btn", _('Submit Changes'), "{$this->jsname}.saveSettings();", 1); + $h .= dijitButton("{$this->domidbase}btn", i('Submit Changes'), "{$this->jsname}.saveSettings();", 1); $cdata = $this->basecdata; $cont = addContinuationsEntry('AJupdateAllSettings', $cdata); $h .= "<input type=\"hidden\" id=\"{$this->domidbase}cont\" value=\"$cont\">\n"; @@ -893,7 +893,7 @@ class GlobalSingleVariable { function AJupdateAllSettings() { if(! checkUserHasPerm('Site Configuration (global)')) { $arr = array('status' => 'noaccess', - 'msg' => _('You do not have access to modify the submitted settings.')); + 'msg' => i('You do not have access to modify the submitted settings.')); sendJSON($arr); return; } @@ -904,7 +904,7 @@ class GlobalSingleVariable { $arr = array('status' => 'failed', 'msgid' => "{$this->domidbase}msg", 'btn' => "{$this->domidbase}btn", - 'errmsg' => _("Invalid value submitted")); + 'errmsg' => i("Invalid value submitted")); sendJSON($arr); return; } @@ -915,7 +915,7 @@ class GlobalSingleVariable { $arr = array('status' => 'failed', 'msgid' => "{$this->domidbase}msg", 'btn' => "{$this->domidbase}btn", - 'errmsg' => _("Invalid value submitted")); + 'errmsg' => i("Invalid value submitted")); sendJSON($arr); return; } @@ -926,7 +926,7 @@ class GlobalSingleVariable { $arr = array('status' => 'failed', 'msgid' => "{$this->domidbase}msg", 'btn' => "{$this->domidbase}btn", - 'errmsg' => _("unsupported type")); + 'errmsg' => i("unsupported type")); sendJSON($arr); return; case 'textarea': @@ -935,7 +935,7 @@ class GlobalSingleVariable { $arr = array('status' => 'failed', 'msgid' => "{$this->domidbase}msg", 'btn' => "{$this->domidbase}btn", - 'errmsg' => _("Invalid value submitted")); + 'errmsg' => i("Invalid value submitted")); if(isset($this->invalidvaluemsg)) $arr['errmsg'] = $this->invalidvaluemsg; sendJSON($arr); @@ -946,7 +946,7 @@ class GlobalSingleVariable { $arr = array('status' => 'failed', 'msgid' => "{$this->domidbase}msg", 'btn' => "{$this->domidbase}btn", - 'errmsg' => _("Invalid value submitted")); + 'errmsg' => i("Invalid value submitted")); sendJSON($arr); return; } @@ -988,10 +988,10 @@ class userPasswordLength extends GlobalS ///////////////////////////////////////////////////////////////////////////// function __construct() { parent::__construct(); - $this->name = _('User Reservation Password Length'); + $this->name = i('User Reservation Password Length'); $this->key = 'user_password_length'; - $this->label = _("Password Length"); - $this->desc = _("For reservations not using federated authentication, VCL generates random user passwords. This specifies how many characters should be in the password."); + $this->label = i("Password Length"); + $this->desc = i("For reservations not using federated authentication, VCL generates random user passwords. This specifies how many characters should be in the password."); $this->domidbase = 'userpasswordlength'; $this->basecdata['obj'] = $this; $this->jsname = 'userPasswordLength'; @@ -1020,10 +1020,10 @@ class userPasswordSpecialChar extends Gl ///////////////////////////////////////////////////////////////////////////// function __construct() { parent::__construct(); - $this->name = _('User Reservation Password Special Characters'); + $this->name = i('User Reservation Password Special Characters'); $this->key = 'user_password_spchar'; - $this->label = _("Include Special Characters"); - $this->desc = _("For reservations not using federated authentication, VCL generates random user passwords. This specifies if characters other than letters and numbers should be included in the passwords."); + $this->label = i("Include Special Characters"); + $this->desc = i("For reservations not using federated authentication, VCL generates random user passwords. This specifies if characters other than letters and numbers should be included in the passwords."); $this->domidbase = 'userpasswordspchar'; $this->basecdata['obj'] = $this; $this->jsname = 'userPasswordSpecialChar'; @@ -1049,16 +1049,16 @@ class NATportRange extends GlobalSingleV ///////////////////////////////////////////////////////////////////////////// function __construct() { parent::__construct(); - $this->name = _('NAT Port Ranges'); + $this->name = i('NAT Port Ranges'); $this->key = 'nat_port_range'; - $this->label = _("NAT Port Ranges"); - $this->desc = _("Port ranges available for use on NAT servers. Type of port (TCP/UDP) is not specified. List ranges one per line (ex: 10000-20000)."); + $this->label = i("NAT Port Ranges"); + $this->desc = i("Port ranges available for use on NAT servers. Type of port (TCP/UDP) is not specified. List ranges one per line (ex: 10000-20000)."); $this->domidbase = 'natportrange'; $this->basecdata['obj'] = $this; $this->jsname = 'natPortRange'; $this->defaultval = '10000-60000'; $this->type = 'textarea'; - $this->invalidvaluemsg = _("Invalid value submitted. Must be numeric ranges of ports of the form 10000-20000, one per line."); + $this->invalidvaluemsg = i("Invalid value submitted. Must be numeric ranges of ports of the form 10000-20000, one per line."); } //////////////////////////////////////////////////////////////////////////////// Modified: vcl/trunk/web/.ht-inc/statistics.php URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/statistics.php?rev=1692548&r1=1692547&r2=1692548&view=diff ============================================================================== --- vcl/trunk/web/.ht-inc/statistics.php (original) +++ vcl/trunk/web/.ht-inc/statistics.php Fri Jul 24 16:28:20 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>" . i("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 i("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 i("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>" . i("View General Statistics") . "</label> - \n"; + print i("Select an affiliation:") . "\n"; $affils = getAffiliations(); if(! array_key_exists($affilid, $affils)) $affilid = $user['affiliationid']; @@ -116,14 +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"); + print "<label for=stattype3>" . i("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=" . i("Submit") . ">\n"; print "</FORM>\n"; } @@ -166,7 +166,7 @@ function viewStatistics() { $affilid = $user['affiliationid']; if($affilid == 0) - $statsfor = _("All Affiliations"); + $statsfor = i("All Affiliations"); else $statsfor = $affils[$affilid]; @@ -174,15 +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] = i("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] = i("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] = i("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(); @@ -191,15 +191,15 @@ function viewStatistics() { $timestart = microtime(1); if($mode2 == 'default') - print "<H2>" . _("Statistic Information for") . " $statsfor</H2>\n"; + print "<H2>" . i("Statistic Information for") . " $statsfor</H2>\n"; elseif($mode2 == 'provisioning') - print "<H2>" . _("Statistic Information for") . " {$provs[$provid]}</H2>\n"; + print "<H2>" . i("Statistic Information for") . " {$provs[$provid]}</H2>\n"; print "<H3>"; $tmp = mktime(0, 0, 0, $month1, $day1, $year1); $starttime = strftime('%x', $tmp); $tmp = mktime(0, 0, 0, $month2, $day2, $year2); $endtime = strftime('%x', $tmp); - printf(_("Reservation information between %s and %s:"), $starttime, $endtime); + printf(i("Reservation information between %s and %s:"), $starttime, $endtime); print "</H3>\n"; $reloadid = getUserlistID('vclreload@Local'); if($mode2 == 'default') { @@ -393,46 +393,46 @@ 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>" . i("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>" . i("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>" . i("\"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>" . i("\"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>" . i("Unavailable:") . "</TH>\n"; print " <TD>$notavailable</TD>\n"; print " </TR>\n"; print " <TR>\n"; - print " <TH align=right>" . _("Load times < 2 minutes:") . "</TH>\n"; + print " <TH align=right>" . i("Load times < 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>" . i("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>" . i("Load times 6-8 minutes:") . "</TH>\n"; print " <TD>{$loadtimes['6to8']}</TD>\n"; print " <TR>\n"; - print " <TH align=right>" . _("Load times >= 8 minutes:") . "</TH>\n"; + print " <TH align=right>" . i("Load times >= 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>" . i("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>"; - printf(_("Unique Users of %s:"), $key); + printf(i("Unique Users of %s:"), $key); print "</TH>\n"; print " <TD>" . count($osusers[$key]) . "</TD>\n"; print " </TR>\n"; @@ -442,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>" . _("< 2 min wait") . "</TH>\n"; - print " <TH>" . _("2-6 min wait") . "</TH>\n"; - print " <TH>" . _("6-8 min wait") . "</TH>\n"; - print " <TH>" . _(">= 8 min wait") . "</TH>\n"; - print " <TH>" . _("Failures") . "</TH>\n"; + print " <TH>" . i("Reservations") . "</TH>\n"; + print " <TH>" . i("Unique Users") . "</TH>\n"; + print " <TH>" . i("Hours Used") . "</TH>\n"; + print " <TH>" . i("< 2 min wait") . "</TH>\n"; + print " <TH>" . i("2-6 min wait") . "</TH>\n"; + print " <TH>" . i("6-8 min wait") . "</TH>\n"; + print " <TH>" . i(">= 8 min wait") . "</TH>\n"; + print " <TH>" . i("Failures") . "</TH>\n"; print " </TR>\n"; foreach($imagecount as $key => $value) { print " <TR>\n"; @@ -479,79 +479,79 @@ function viewStatistics() { } print "</TABLE>\n"; - print "<H3>" . _("Durations:") . "</H3>\n"; + print "<H3>" . i("Durations:") . "</H3>\n"; print "<TABLE>\n"; print " <TR>\n"; - print " <TH align=right>" . _("0 - 30 Min:") . "</TH>\n"; + print " <TH align=right>" . i("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>" . i("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>" . i("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>" . i("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>" . i("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>" . i("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>" . i("8 Hours - 10 Hours:") . "</TH>\n"; print " <TD>" . $lengths["10hours"] . "</TD>\n"; print " </TR>\n"; print " <TR>\n"; - print " <TH align=right>" . _("> 10 Hours:") . "</TH>\n"; + print " <TH align=right>" . i("> 10 Hours:") . "</TH>\n"; print " <TD>" . $lengths["10hrsplus"] . "</TD>\n"; print " </TR>\n"; print "</TABLE>\n"; - print "<H3>" . _("Ending information:") . "</H3>\n"; + print "<H3>" . i("Ending information:") . "</H3>\n"; print "<TABLE>\n"; print " <TR>\n"; - print " <TH align=right>" . _("Deleted:") . "</TH>\n"; + print " <TH align=right>" . i("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>" . i("(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>" . i("Released:") . "</TH>\n"; print " <TD>" . $ending["released"] . "</TD>\n"; - print " <TD>" . _("(Reservation released before end time reached)") . "</TD>\n"; + print " <TD>" . i("(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>" . i("Not Acknowledged:") . "</TH>\n"; print " <TD>" . $ending["noack"] . "</TD>\n"; - print " <TD>" . _("(\"Connect!\" button never clicked)") . "</TD>\n"; + print " <TD>" . i("(\"Connect!\" button never clicked)") . "</TD>\n"; print " </TR>\n"; print " <TR>\n"; - print " <TH align=right>" . _("No Login:") . "</TH>\n"; + print " <TH align=right>" . i("No Login:") . "</TH>\n"; print " <TD>" . $ending["nologin"] . "</TD>\n"; - print " <TD>" . _("(User never logged in)") . "</TD>\n"; + print " <TD>" . i("(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>" . i("End of Reservation:") . "</TH>\n"; print " <TD>" . $ending["EOR"] . "</TD>\n"; - print " <TD>" . _("(End of reservation reached)") . "</TD>\n"; + print " <TD>" . i("(End of reservation reached)") . "</TD>\n"; print " </TR>\n"; print " <TR>\n"; - print " <TH align=right>" . _("Timed Out:") . "</TH>\n"; + print " <TH align=right>" . i("Timed Out:") . "</TH>\n"; print " <TD>" . $ending["timeout"] . "</TD>\n"; - print " <TD>" . _("(Disconnect and no reconnection within 15 minutes)") . "</TD>\n"; + print " <TD>" . i("(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>" . i("Failed:") . "</TH>\n"; print " <TD>" . $ending["failed"] . "</TD>\n"; - print " <TD>" . _("(Reserved computer failed to get prepared for user)") . "</TD>\n"; + print " <TD>" . i("(Reserved computer failed to get prepared for user)") . "</TD>\n"; print " </TR>\n"; print "</TABLE>\n"; print "<br>\n"; @@ -566,33 +566,33 @@ function viewStatistics() { 'affilid' => $affilid, 'mode' => $mode2, 'provid' => $provid); - print "<H2>" . _("Reservations by Day") . "</H2>\n"; - print "<small>" . _("(Reservations with start time on given day)") . "</small><br>\n"; + print "<H2>" . i("Reservations by Day") . "</H2>\n"; + print "<small>" . i("(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>" . i("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>" . i("Max Concurrent Blade Reservations By Day") . "</H2>\n"; $cdata['divid'] = 'maxconcurbladeday'; $cont = addContinuationsEntry('AJgetStatData', $cdata); print "<input type=hidden id=statconcurbladecont value=\"$cont\">\n"; print "<div id=\"maxconcurbladeday\" class=\"statgraph\">Loading graph data...</div>\n"; - print "<H2>" . _("Max Concurrent Virtual Machine Reservations By Day") . "</H2>\n"; + print "<H2>" . i("Max Concurrent Virtual Machine Reservations By Day") . "</H2>\n"; $cdata['divid'] = 'maxconcurvmday'; $cont = addContinuationsEntry('AJgetStatData', $cdata); 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 "<small>(" . _("Active reservations during given hour averaged over selected dates") . ")</small><br><br>\n"; + print "<H2>" . i("Reservations by Hour") . "</H2>\n"; + print "<small>(" . i("Active reservations during given hour averaged over selected dates") . ")</small><br><br>\n"; $cdata['divid'] = 'resbyhour'; $cont = addContinuationsEntry('AJgetStatData', $cdata); print "<input type=hidden id=statreshourcont value=\"$cont\">\n"; @@ -952,7 +952,7 @@ function getStatGraphDayConUsersData($st while($row = mysql_fetch_assoc($qh)) $cachepts[$row['statdate']] = $row['value']; if((count($cachepts) + 31) < $daycnt) { - $data = array('nodata' => _('(too much computational time required to generate this graph)')); + $data = array('nodata' => i('(too much computational time required to generate this graph)')); return $data; } for($daystart = $startunix; $daystart < $endunix; $daystart += SECINDAY) { @@ -1096,7 +1096,7 @@ function getStatGraphConBladeUserData($s while($row = mysql_fetch_assoc($qh)) $cachepts[$row['statdate']] = $row['value']; if((count($cachepts) + 31) < $daycnt) { - $data = array('nodata' => _('(too much computational time required to generate this graph)')); + $data = array('nodata' => i('(too much computational time required to generate this graph)')); return $data; } for($daystart = $startunix; $daystart < $endunix; $daystart += SECINDAY) { @@ -1274,7 +1274,7 @@ function getStatGraphConVMUserData($star while($row = mysql_fetch_assoc($qh)) $cachepts[$row['statdate']] = $row['value']; if((count($cachepts) + 31) < $daycnt) { - $data = array('nodata' => _('(too much computational time required to generate this graph)')); + $data = array('nodata' => i('(too much computational time required to generate this graph)')); return $data; } for($daystart = $startunix; $daystart < $endunix; $daystart += SECINDAY) { Modified: vcl/trunk/web/.ht-inc/userpreferences.php URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/userpreferences.php?rev=1692548&r1=1692547&r2=1692548&view=diff ============================================================================== --- vcl/trunk/web/.ht-inc/userpreferences.php (original) +++ vcl/trunk/web/.ht-inc/userpreferences.php Fri Jul 24 16:28:20 2015 @@ -52,10 +52,10 @@ function userpreferences() { $data["resolution"] = $user["width"] . "x" . $user["height"]; } - print _("<H2 align=center>User Preferences</H2>\n"); + print i("<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>" . i("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 Information") . "</a>"; + print "show('personal'); return false;\">" . i("Personal Information") . "</a>"; print "</li>\n"; } print " <li><a href=#rdpfile onclick=\""; - print "show('rdpfile'); return false;\">" . _("RDP Preferences") . "</a>"; + print "show('rdpfile'); return false;\">" . i("RDP Preferences") . "</a>"; print "</li>\n"; print " <li><a href=#uiprefs onclick=\"javascript:show('uiprefs'); "; - print "return false\">" . _("General Preferences") . "</a></li>\n"; + print "return false\">" . i("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>" . i("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>" . i("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>" . i("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>" . i("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>" . i("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>" . i("Change Password") . "</h3></TD>\n"; print " </TR>\n"; print " <TR>\n"; - print " <TH align=right>" . _("Current Password:") . "</TH>\n"; + print " <TH align=right>" . i("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>" . i("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>" . i("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=\"" . i("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>" . i("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><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 i("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>" . i("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>" . i("Color Depth:") . "</TH>\n"; print " <TD>\n"; $colordepth = array("8" => "8", "16" => "16", "24" => "24", "32" => "32"); printSelectInput("bpp", $colordepth, $data["bpp"]); @@ -212,37 +212,37 @@ function userpreferences() { print " <TD></TD>\n"; print " </TR>\n"; print " <TR>\n"; - print " <TH align=right>" . _("Audio:") . "</TH>\n"; + print " <TH align=right>" . i("Audio:") . "</TH>\n"; print " <TD>\n"; - $audio = array("none" => _("None"), "local" => _("Use my speakers")); + $audio = array("none" => i("None"), "local" => i("Use my speakers")); printSelectInput("audiomode", $audio, $data["audiomode"]); print " </TD>\n"; print " <TD></TD>\n"; print " </TR>\n"; print " <TR>\n"; - print " <TH align=right>" . _("Map Local Drives:") . "</TH>\n"; + print " <TH align=right>" . i("Map Local Drives:") . "</TH>\n"; print " <TD>\n"; - $yesno = array(1 => _("Yes"), 0 => _("No")); + $yesno = array(1 => i("Yes"), 0 => i("No")); printSelectInput("mapdrives", $yesno, $data["mapdrives"]); print " </TD>\n"; print " <TD></TD>\n"; print " </TR>\n"; print " <TR>\n"; - print " <TH align=right>" . _("Map Local Printers:") . "</TH>\n"; + print " <TH align=right>" . i("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>" . i("Map Local Serial Ports:") . "</TH>\n"; print " <TD>\n"; printSelectInput("mapserial", $yesno, $data["mapserial"]); print " </TD>\n"; print " <TD></TD>\n"; print " </TR>\n"; print " <TR>\n"; - print " <TH align=right>" . _("RDP Port") . ":</TH>\n"; + print " <TH align=right>" . i("RDP Port") . ":</TH>\n"; print " <TD>\n"; print " <INPUT type=text name=rdpport maxlength=5 "; print "size=8 value=\"" . $data["rdpport"] . "\"></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=\"" . i("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>" . i("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>" . i("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>" . i("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>" . i("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>" . i("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>" . i("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>" . i("Disabled"); print "</label></p>\n"; ########################### @@ -316,32 +316,32 @@ function userpreferences() { $selected['enabled'] = ''; $selected['disabled'] = 'checked'; } - print " <p>" . _("Use public key authentication for SSH logins:") . "<br>\n"; + print " <p>" . i("Use public key authentication for SSH logins:") . "<br>\n"; print " <INPUT type=radio id=r5 name=pubkeyauth value=2 "; print "{$selected['enabled']} onclick=\"togglePubKeys(1);\"><label for=r5>"; - print _("Enabled") . "</label><br>\n"; + print i("Enabled") . "</label><br>\n"; print " <INPUT type=radio id=r6 name=pubkeyauth value=1 "; print "{$selected['disabled']} onclick=\"togglePubKeys(0);\"><label for=r6>"; - print _("Disabled") . "</label><br><br>\n"; - print " " . _("Public keys:") . "<br>\n"; + print i("Disabled") . "</label><br><br>\n"; + print " " . i("Public keys:") . "<br>\n"; print " <div style=\"width: 300px;\" id=\"pubkeyerr\" "; print "class=\"hidden\">"; print "<font color=\"red\"><em>\n "; - print _("Public keys can only contain letters, numbers, spaces, and these characters: + / @ . ="); + print i("Public keys can only contain letters, numbers, spaces, and these characters: + / @ . ="); print "</em></font></div>\n"; print " <textarea id=\"pubkeys\" dojoType=\"dijit.form.Textarea\" "; print "name=\"pubkeys\" style=\"width: 27em;\""; if(! $user['usepublickeys']) print " disabled=\"disabled\""; 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 "<strong>" . i("NOTE:") . "</strong> "; + $h = " " . i("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=\"" . i("Submit General Preferences") . "\">\n"; print " </FORM>\n"; print " </fieldset>\n"; print " </div>\n"; @@ -371,68 +371,68 @@ function confirmUserPrefs($type) { } if($data["audiomode"] == "none") - $audio = _("None"); + $audio = i("None"); else - $audio = _("Use my speakers"); + $audio = i("Use my speakers"); if($data["mapdrives"] == 0) - $drives = _("No"); + $drives = i("No"); else - $drives = _("Yes"); + $drives = i("Yes"); if($data["mapprinters"] == 0) - $printers = _("No"); + $printers = i("No"); else - $printers = _("Yes"); + $printers = i("Yes"); if($data["mapserial"] == 0) - $serial = _("No"); + $serial = i("No"); else - $serial = _("Yes"); + $serial = i("Yes"); print "<div align=center>\n"; if($type == 0) { - print "<H2>" . _("Personal Information") . "</H2>\n"; - print "<H3>" . _("Submit the following changes?") . "</H3>\n"; + print "<H2>" . i("Personal Information") . "</H2>\n"; + print "<H3>" . i("Submit the following changes?") . "</H3>\n"; print "<table>\n"; print " <TR>\n"; - print " <TH align=right>" . _("Preferred Name:") . "</TH>\n"; + print " <TH align=right>" . i("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 i("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>" . i("RDP Preferences") . "</H2>\n"; + print "<H3>" . i("Submit the following changes?") . "</H3>\n"; print "<table>\n"; print " <TR>\n"; - print " <TH align=right>" . _("Resolution:") . "</TH>\n"; + print " <TH align=right>" . i("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>" . i("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>" . i("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>" . i("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>" . i("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>" . i("Map Local Serial Ports:") . "</TH>\n"; print " <TD>$serial</TD>\n"; print " </TR>\n"; print " <TR>\n"; - print " <TH align=right>" . _("RDP Port") . ":</TH>\n"; + print " <TH align=right>" . i("RDP Port") . ":</TH>\n"; print " <TD>{$data['rdpport']}</TD>\n"; print " </TR>\n"; print "</table>\n"; @@ -443,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=" . i("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=" . i("Cancel") . ">\n"; print " </FORM>\n"; print " </TD>\n"; print " </TR>\n"; @@ -611,11 +611,11 @@ function processUserPrefsInput($checks=1 if(strlen($return["preferredname"]) > 25) { $submitErr |= PREFNAMEERR; - $submitErrMsg[PREFNAMEERR] = _("Preferred name can only be up to 25 characters"); + $submitErrMsg[PREFNAMEERR] = i("Preferred name can only be up to 25 characters"); } if(! preg_match('/^[a-zA-Z ]*$/', $return["preferredname"])) { $submitErr |= PREFNAMEERR; - $submitErrMsg[PREFNAMEERR] = _("Preferred name can only contain letters and spaces"); + $submitErrMsg[PREFNAMEERR] = i("Preferred name can only contain letters and spaces"); } if($user['affiliation'] == 'Local' && array_key_exists('newpassword', $_POST)) { $return['newpassword'] = $_POST['newpassword']; @@ -629,13 +629,13 @@ function processUserPrefsInput($checks=1 if(! empty($return['newpassword']) && ! empty($confirmpwd) && ! validateLocalAccount($user['unityid'], $curr)) { $submitErr |= LOCALPASSWORDERR; - $submitErrMsg[LOCALPASSWORDERR] = _("Password incorrect"); + $submitErrMsg[LOCALPASSWORDERR] = i("Password incorrect"); } elseif((empty($return['newpassword']) && ! empty($confirmpwd)) || (! empty($return['newpassword']) && empty($confirmpwd)) || ($return['newpassword'] != $confirmpwd)) { $submitErr |= LOCALPASSWORDERR; - $submitErrMsg[LOCALPASSWORDERR] = _("Passwords do not match"); + $submitErrMsg[LOCALPASSWORDERR] = i("Passwords do not match"); } } if($return['rdpport'] != $user['rdpport']) { @@ -651,13 +651,13 @@ function processUserPrefsInput($checks=1 } if($nochange) { $submitErr |= RDPPORTERR; - $submitErrMsg[RDPPORTERR] = _("RDP Port cannot be changed while you have active reservations"); + $submitErrMsg[RDPPORTERR] = i("RDP Port cannot be changed while you have active reservations"); } } if(! ($submitErr & RDPPORTERR) && ($return['rdpport'] < 1024 || $return['rdpport'] > 65535)) { $submitErr |= RDPPORTERR; - $submitErrMsg[RDPPORTERR] = _("RDP Port must be between 1024 and 65535"); + $submitErrMsg[RDPPORTERR] = i("RDP Port must be between 1024 and 65535"); } return $return; }
