Modified: vcl/trunk/web/.ht-inc/image.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/image.php?rev=1659286&r1=1659285&r2=1659286&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/image.php (original)
+++ vcl/trunk/web/.ht-inc/image.php Thu Feb 12 15:09:22 2015
@@ -114,35 +114,35 @@ class Image extends Resource {
        function fieldDisplayName($field) {
                switch($field) {
                        case 'os':
-                               return 'OS';
+                               return _("OS");
                        case 'installtype':
-                               return 'Install Type';
+                               return _("Install Type");
                        case 'ostype':
-                               return 'OS Type';
+                               return _("OS Type");
                        case 'minram':
-                               return 'Required RAM';
+                               return _("Required RAM");
                        case 'minprocnumber':
-                               return 'Required Cores';
+                               return _("Required Cores");
                        case 'minprocspeed':
-                               return 'Processor Speed';
+                               return _("Processor Speed");
                        case 'minnetwork':
-                               return 'Min. Network Speed';
+                               return _("Min. Network Speed");
                        case 'maxconcurrent':
-                               return 'Max Concurrent Usage';
+                               return _("Max Concurrent Usage");
                        case 'reloadtime':
-                               return 'Est. Reload Time';
+                               return _("Est. Reload Time");
                        case 'lastupdate':
-                               return 'Last Updated';
+                               return _("Last Updated");
                        case 'forcheckout':
-                               return 'Available for checkout';
+                               return _("Available for checkout");
                        case 'maxinitialtime':
-                               return 'Max Initial Time';
+                               return _("Max Initial Time");
                        case 'checkuser':
-                               return 'Check Logged in User';
+                               return _("Check Logged in User");
                        case 'rootaccess':
-                               return 'Admin. Access';
+                               return _("Admin. Access");
                }
-               return ucfirst($field);
+               return _(ucfirst($field));
        }
 
        
/////////////////////////////////////////////////////////////////////////////
@@ -170,7 +170,7 @@ class Image extends Resource {
                       . "LIMIT 1";
                $qh = doQuery($query);
                if($row = mysql_fetch_assoc($qh))
-                       $msgs[] = "There is at least one 
<strong>reservation</strong> for this image. The latest end time is " . 
prettyDatetime($row['end'], 1) . '.';
+                       $msgs[] = sprintf(_("There is at least one 
<strong>reservation</strong> for this image. The latest end time is %s."), 
prettyDatetime($row['end'], 1));;
 
                # check blockComputers
                $query = "SELECT br.name, "
@@ -188,7 +188,7 @@ class Image extends Resource {
                       . "LIMIT 1";
                $qh = doQuery($query);
                if($row = mysql_fetch_assoc($qh))
-                       $msgs[] = "There is at least one <strong>Block 
Allocation</strong> with computers currently allocated with this image. Block 
Allocation \"{$row['name']}\" has the latest end time which is " . 
prettyDatetime($row['end'], 1) . '.';
+                       $msgs[] = sprintf(_("There is at least one 
<strong>Block Allocation</strong> with computers currently allocated with this 
image. Block Allocation %s has the latest end time which is %s."), 
$row['name'], prettyDatetime($row['end'], 1));
 
                # check blockRequest
                $query = "SELECT br.name, "
@@ -204,7 +204,7 @@ class Image extends Resource {
                       . "LIMIT 1";
                $qh = doQuery($query);
                if($row = mysql_fetch_assoc($qh))
-                       $msgs[] = "There is at least one <strong>Block 
Allocation</strong> configured to use this image. Block Allocation 
\"{$row['name']}\" has the latest end time which is " . 
prettyDatetime($row['end'], 1) . '.';
+                       $msgs[] = sprintf(_("There is at least one 
<strong>Block Allocation</strong> configured to use this image. Block 
Allocation %s has the latest end time which is %s."), $row['name'], 
prettyDatetime($row['end'], 1));
 
                # check serverprofile
                $query = "SELECT name "
@@ -215,7 +215,7 @@ class Image extends Resource {
                while($row = mysql_fetch_assoc($qh))
                        $profiles[] = $row['name'];
                if(count($profiles))
-                       $msgs[] = "The following <strong>Server 
Profiles</strong> are configured to use this image:<br><br>\n" . 
implode("<br>\n", $profiles);
+                       $msgs[] = _("The following <strong>Server 
Profiles</strong> are configured to use this image:") . "<br><br>\n" . 
implode("<br>\n", $profiles);
 
                # check subimages
                $query = "SELECT DISTINCT i.prettyname "
@@ -230,7 +230,7 @@ class Image extends Resource {
                while($row = mysql_fetch_assoc($qh))
                        $images[] = $row['prettyname'];
                if(count($images))
-                       $msgs[] = "The following <strong>images</strong> have 
the selected image assigned as a <strong>subimage</strong>:<br><br>\n" . 
implode("<br>\n", $images);
+                       $msgs[] = _("The following <strong>images</strong> have 
the selected image assigned as a <strong>subimage</strong>:") . "<br><br>\n" . 
implode("<br>\n", $images);
 
                # check vmprofile
                $query = "SELECT profilename "
@@ -240,12 +240,12 @@ class Image extends Resource {
                while($row = mysql_fetch_assoc($qh))
                        $profiles[] = $row['profilename'];
                if(count($profiles))
-                       $msgs[] = "The following <strong>VM Host 
Profiles</strong> have the this image selected:<br><br>\n" . implode("<br>\n", 
$profiles);
+                       $msgs[] = _("The following <strong>VM Host 
Profiles</strong> have the this image selected:") . "<br><br>\n" . 
implode("<br>\n", $profiles);
 
                if(empty($msgs))
                        return '';
 
-               $msg = "The selected image is currently being used in the 
following ways and cannot be deleted at this time.<br><br>\n";
+               $msg = _("The selected image is currently being used in the 
following ways and cannot be deleted at this time.") . "<br><br>\n";
                $msg .= implode("<br><br>\n", $msgs) . "<br><br>\n";
                return $msg;
        }
@@ -297,7 +297,8 @@ class Image extends Resource {
                $cdata = array('imaging' => 1);
                $cont = addContinuationsEntry("viewRequests", $cdata);
                $h .= "<INPUT type=radio name=\"continuation\" value=\"$cont\" 
id=\"";
-               $h .= "createimage\"><label for=\"createimage\">Create / Update 
an Image ";
+               $h .= "createimage\"><label for=\"createimage\">";
+               $h .= _("Create / Update an Image");
                $h .= "</label><br>\n";
                return $h;
        }
@@ -318,9 +319,9 @@ class Image extends Resource {
                $h .= "<div dojoType=dijit.Dialog\n";
                $h .= "      id=\"addeditdlg\"\n";
                if($add)
-                       $h .= "      title=\"Add {$this->restypename}\"\n";
+                       $h .= "      title=\"" . _("Add {$this->restypename}") 
. "\"\n";
                else
-                       $h .= "      title=\"Edit {$this->restypename}\"\n";
+                       $h .= "      title=\"" . _("Edit {$this->restypename}") 
. "\"\n";
                $h .= "      duration=250\n";
                $h .= "      draggable=true>\n";
                $h .= "<div id=\"addeditdlgcontent\">\n";
@@ -330,61 +331,58 @@ class Image extends Resource {
                if(! $add)
                        $h .= "<div style=\"width: 80%; margin-left: 10%; 
overflow: auto; height: 80%;\">\n";
                # name
-               $errmsg = "Name cannot contain dashes (-), single (') or double 
(&quot;) quotes, "
-                       . "less than (&lt;), or greater than (&gt;) and can be 
from 2 to 60 "
-                       . "characters long";
-               $h .= labeledFormItem('name', 'Name', 'text', 
'^([A-Za-z0-9!@#$%^&\*\(\)_=\+\[\]{}\\\|:;,\./\?~` ]){2,60}$',
+               $errmsg = _("Name cannot contain dashes (-), single (') or 
double (&quot;) quotes, less than (&lt;), or greater than (&gt;) and can be 
from 2 to 60 characters long");
+               $h .= labeledFormItem('name', _('Name'), 'text', 
'^([A-Za-z0-9!@#$%^&\*\(\)_=\+\[\]{}\\\|:;,\./\?~` ]){2,60}$',
                                      1, '', $errmsg); 
                # owner
                $extra = array('onKeyPress' => 'setOwnerChecking');
-               $h .= labeledFormItem('owner', 'Owner', 'text', '', 1, '', 
'Unknown user',
+               $h .= labeledFormItem('owner', _('Owner'), 'text', '', 1, '', 
_('Unknown user'),
                                      'checkOwner', $extra);
-               #$h .= labeledFormItem('owner', 'Owner', 'text', 
'{$user['unityid']}@{$user['affiliation']}',
-               #                      1, '', 'Unknown user', 'checkOwner', 
'onKeyPress', 'setOwnerChecking');
+               #$h .= labeledFormItem('owner', _('Owner'), 'text', 
'{$user['unityid']}@{$user['affiliation']}',
+               #                      1, '', _('Unknown user'), 'checkOwner', 
'onKeyPress', 'setOwnerChecking');
                $cont = addContinuationsEntry('AJvalidateUserid');
                $h .= "<input type=\"hidden\" id=\"valuseridcont\" 
value=\"$cont\">\n";
                # description
                $h .= "<fieldset>\n";
-               $h .= "<legend>Image Description</legend>\n";
-               $h .= "Description of image (required - users will<br>\nsee 
this on the <strong>";
-               $h .= "New Reservations</strong> page):<br>\n";
+               $h .= "<legend>" . _("Image Description") . "</legend>\n";
+               $h .= _("Description of image (required - users will see this 
on the <strong>New Reservations</strong> page):");
+               $h .= "<br>\n";
                $h .= "<textarea dojoType=\"dijit.form.Textarea\" 
id=\"description\" ";
                $h .= "style=\"width: 400px; text-align: left;\"></textarea>\n";
                $h .= "</fieldset>\n";
                # usage notes
                $h .= "<fieldset>\n";
-               $h .= "<legend>Usage Notes</legend>\n";
-               $h .= "Optional notes to the user explaining how to use the 
image<br>";
-               $h .= "(users will see this on the <strong>Connect!</strong> 
page):<br>\n";
+               $h .= "<legend>" . _("Usage Notes") . "</legend>\n";
+               $h .= _("Optional notes to the user explaining how to use the 
image (users will see this on the <strong>Connect!</strong> page):");
+               $h .= "<br>\n";
                $h .= "<textarea dojoType=\"dijit.form.Textarea\" id=\"usage\" 
";
                $h .= "style=\"width: 400px; text-align: left;\"></textarea>\n";
                $h .= "</fieldset>\n";
                if($add) {
                        $h .= "<fieldset>\n";
-                       $h .= "<legend>Revision Comments</legend>\n";
-                       $h .= "Notes for yourself and other admins about how 
the image ";
-                       $h .= "was setup/installed.<br>\nThese are optional and 
are not visible ";
-                       $h .= "to end users.<br>\n";
+                       $h .= "<legend>" . _("Revision Comments") . 
"</legend>\n";
+                       $h .= _("Notes for yourself and other admins about how 
the image was setup/installed. These are optional and are not visible to end 
users.");
+                       $h .= "<br>\n";
                        $h .= "<textarea dojoType=\"dijit.form.Textarea\" 
id=\"imgcomments\" ";
                        $h .= "style=\"width: 400px; text-align: 
left;\"></textarea>";
                        $h .= "</fieldset>\n";
                }
                # advanced options
-               $h .= "<div dojoType=\"dijit.TitlePane\" title=\"Advanced 
Options - leave ";
-               $h .= "default values unless you really know what you are doing 
(click to ";
-               $h .= "expand)\" open=\"false\" style=\"width: 460px\" 
id=\"advancedoptions\" ";
+               $h .= "<div dojoType=\"dijit.TitlePane\" title=\"";
+               $h .= _("Advanced Options - leave default values unless you 
really know what you are doing (click to expand)");
+               $h .= "\" open=\"false\" style=\"width: 460px\" 
id=\"advancedoptions\" ";
                $h .= "onShow=\"delayedEditResize();\" 
onHide=\"delayedEditResize();\">\n";
                # RAM
                $extra = array('smallDelta' => 256, 'largeDelta' => 1024);
-               $h .= labeledFormItem('ram', 'Required RAM', 'spinner', 
'{min:512, max:8388607}',
+               $h .= labeledFormItem('ram', _('Required RAM'), 'spinner', 
'{min:512, max:8388607}',
                                      1, 1024, '', '', $extra);
                # cores
                $extra = array('smallDelta' => 1, 'largeDelta' => 2);
-               $h .= labeledFormItem('cores', 'Required Cores', 'spinner', 
'{min:1, max:255}',
+               $h .= labeledFormItem('cores', _('Required Cores'), 'spinner', 
'{min:1, max:255}',
                                      1, 1, '', '', $extra);
                # proc speed
                $extra = array('smallDelta' => 500, 'largeDelta' => 8000);
-               $h .= labeledFormItem('cpuspeed', 'Processor Speed', 'spinner', 
'{min:500, max:8000}',
+               $h .= labeledFormItem('cpuspeed', _('Processor Speed'), 
'spinner', '{min:500, max:8000}',
                                      1, 1000, '', '', $extra);
                # network speed
                $vals = array('10' => '10 Mbps',
@@ -392,33 +390,33 @@ class Image extends Resource {
                              '1000' => '1 Gbps',
                              '10000' => '10 Gbps',
                              '100000' => '100 Gbps');
-               $h .= labeledFormItem('networkspeed', 'Minimum Network Speed', 
'select', $vals);
+               $h .= labeledFormItem('networkspeed', _('Minimum Network 
Speed'), 'select', $vals);
                # concurrent usage
                $extra = array('smallDelta' => 1, 'largeDelta' => 10);
-               $h .= labeledFormItem('concurrent', 'Max Concurrent Usage', 
'spinner','{min:0, max:255}',
-                                      1, 0, '', '', $extra, '', '(0 = 
unlimited)');
+               $h .= labeledFormItem('concurrent', _('Max Concurrent Usage'), 
'spinner','{min:0, max:255}',
+                                      1, 0, '', '', $extra, '', _('(0 = 
unlimited)'));
                # reload time
                if(! $add) {
                        $extra = array('smallDelta' => 1, 'largeDelta' => 5);
-                       $h .= labeledFormItem('reload', 'Estimated Reload 
Time', 'spinner',
+                       $h .= labeledFormItem('reload', _('Estimated Reload 
Time'), 'spinner',
                                              '{min:1, max:255}', 1, 5, '', '', 
$extra);
                }
                # for checkout
                $yesno = array('1' => 'Yes',
                              '0' => 'No');
-               $h .= labeledFormItem('checkout', 'Available for checkout', 
'select', $yesno);
+               $h .= labeledFormItem('checkout', _('Available for checkout'), 
'select', $yesno);
                # check user
-               $h .= labeledFormItem('checkuser', 'Check for logged in user', 
'select', $yesno);
+               $h .= labeledFormItem('checkuser', _('Check for logged in 
user'), 'select', $yesno);
                # admin access
-               $h .= labeledFormItem('rootaccess', 'Users have administrative 
access', 'select', $yesno);
+               $h .= labeledFormItem('rootaccess', _('Users have 
administrative access'), 'select', $yesno);
                # sysprep
                if($add)
-                       $h .= labeledFormItem('sysprep', 'Use sysprep', 
'select', $yesno);
+                       $h .= labeledFormItem('sysprep', _('Use sysprep'), 
'select', $yesno);
                # connect methods
-               $h .= "<label for=\"connectmethodlist\">Connect 
methods:</label>\n";
+               $h .= "<label for=\"connectmethodlist\">" . _("Connect 
methods:") . "</label>\n";
                $h .= "<div class=\"labeledform\"><span 
id=\"connectmethodlist\"></span><br>\n";
                $h .= "<div dojoType=\"dijit.form.DropDownButton\" 
id=\"connectmethoddlg\">\n";
-               $h .= "  <span>Modify Connection Methods</span>\n";
+               $h .= "  <span>" . _("Modify Connection Methods") . "</span>\n";
                // if leave off the href attribute, inital sizing of popup is 
wrong
                $h .= "  <div dojoType=\"dijit.TooltipDialog\" 
id=\"connectmethodttd\" href=\"\"></div>\n";
                $h .= "</div>\n";
@@ -432,7 +430,7 @@ class Image extends Resource {
                        $h .= "<br>\n";
                        $h .= "<div align=\"center\">\n";
                        $h .= "<div dojoType=\"dijit.form.DropDownButton\" 
id=\"subimagebtn\">";
-                       $h .= "  <span>Manage Subimages</span>\n";
+                       $h .= "  <span>" . _("Manage Subimages") . "</span>\n";
                        // if leave off the href attribute, inital sizing of 
popup is wrong
                        $h .= "  <div dojoType=\"dijit.TooltipDialog\" 
id=\"subimagedlg\" href=\"\"></div>\n";
                        $h .= "</div>\n";
@@ -454,31 +452,30 @@ class Image extends Resource {
                $h .= "</div>\n"; # addeditdlgcontent
 
                $h .= "<div id=\"editdlgbtns\" align=\"center\">\n";
-               $h .= dijitButton('addeditbtn', "Confirm", "saveResource();");
+               $h .= dijitButton('addeditbtn', _("Confirm"), 
"saveResource();");
                $script  = "    dijit.byId('addeditdlg').hide();\n";
                $script .= "    dijit.registry.filter(function(widget, 
index){return widget.id.match(/^comments/);}).forEach(function(widget) 
{widget.destroy();});\n";
-               $h .= dijitButton('', "Cancel", $script);
+               $h .= dijitButton('', _("Cancel"), $script);
                $h .= "</div>\n"; # editdlgbtns
                $h .= "</div>\n"; # addeditdlg
 
                $h .= "<div dojoType=dijit.Dialog\n";
                $h .= "      id=\"autoconfirmdlg\"\n";
-               $h .= "      title=\"Confirm Manual Install\"\n";
+               $h .= "      title=\"" . _("Confirm Manual Install") . "\"\n";
                $h .= "      duration=250\n";
                $h .= "      draggable=true>\n";
                $h .= "<strong><span 
id=\"autoconfirmcontent\"></span></strong><br><br>\n";
-               $h .= "This method cannot be automatically added to the image 
by VCL. The<br>\n";
-               $h .= "image must be created with the software for this method 
already installed.<br>\n";
-               $h .= "If this image already has software for this method 
installed in it, please<br>\n";
-               $h .= "click <strong>Software is Manually Installed</strong>. 
Otherwise, click cancel.<br><br>\n";
+               $h .= "<div style=\"width: 230px;\">\n";
+               $h .= _("This method cannot be automatically added to the image 
by VCL. The image must be created with the software for this method already 
installed. If this image already has software for this method installed in it, 
please click <strong>Software is Manually Installed</strong>. Otherwise, click 
cancel.");
+               $h .= "</div><br><br>\n";
                $h .= "   <div align=\"center\">\n";
                $script  = "       dijit.byId('autoconfirmdlg').hide();\n";
                $script .= "       addConnectMethod3();\n";
                $script .= "       
dijit.byId('connectmethoddlg').openDropDown();\n";
-               $h .= dijitButton('', "Software is Manually Installed", 
$script);
+               $h .= dijitButton('', _("Software is Manually Installed"), 
$script);
                $script  = "       dijit.byId('autoconfirmdlg').hide();\n";
                $script .= "       
dijit.byId('connectmethoddlg').openDropDown();\n";
-               $h .= dijitButton('', "Cancel", $script);
+               $h .= dijitButton('', _("Cancel"), $script);
                $h .= "   </div>\n";
                $h .= "</div>\n"; # autoconfirmdlg
                return $h;
@@ -499,9 +496,9 @@ class Image extends Resource {
                $methods = getConnectMethods($imageid);
                $revisions = getImageRevisions($imageid);
        
-               $h  = "<h3>Modify Connection Methods</h3>";
+               $h  = "<h3>" . _("Modify Connection Methods") . "</h3>";
                if(! $newimage && count($revisions) > 1) {
-                       $h .= "Selected Revision ID: ";
+                       $h .= _("Selected Revision ID:") . " ";
                        $cdata = $this->basecdata;
                        $cdata['imageid'] = $imageid;
                        $cdata['revids'] = array_keys($revisions);
@@ -530,12 +527,12 @@ class Image extends Resource {
                $h .= "<div dojoType=\"dijit.form.Select\" id=\"addcmsel\" ";
                $h .= "store=\"cmstore\" query=\"{active: 0}\" ";
                $h .= "onSetStore=\"updateCurrentConMethods();\"></div>";
-               $h .= dijitButton('addcmbtn', "Add Method", 
"addConnectMethod();");
+               $h .= dijitButton('addcmbtn', _("Add Method"), 
"addConnectMethod();");
                $h .= "<br>";
-               $h .= "<h3>Current Methods</h3>";
+               $h .= "<h3>" . _("Current Methods") . "</h3>";
                $h .= "<select id=\"curmethodsel\" multiple size=\"5\">";
                $h .= "</select><br>";
-               $h .= dijitButton('remcmbtn', "Remove Selected Methods(s)", 
"remConnectMethod();");
+               $h .= dijitButton('remcmbtn', _("Remove Selected Methods(s)"), 
"remConnectMethod();");
                $h .= "<br>";
                $h .= "<div id=\"cmerror\" class=\"rederrormsg\"></div>\n";
                $adminimages = getUserResources(array("imageAdmin"), 
array("administer"));
@@ -550,8 +547,9 @@ class Image extends Resource {
                $cont = addContinuationsEntry('AJremImageConnectMethod', 
$cdata, 3600, 1, 0);
                $h .= "<INPUT type=hidden id=remcmcont value=\"$cont\">";
                if(! $newimage) {
-                       $h .= "NOTE: Connection Method changes take effect 
immediately; you<br>do ";
-                       $h .= "<strong>not</strong> need to click \"Submit 
Changes\" to submit them.";
+                       $h .= "<div style=\"width: 280px;\">\n";
+                       $h .= _("NOTE: Connection Method changes take effect 
immediately; you do <strong>not</strong> need to click \"Submit Changes\" to 
submit them.");
+                       $h .= "</div>\n";
                }
                print $h;
        }
@@ -570,11 +568,11 @@ class Image extends Resource {
 
                $resources = getUserResources(array("imageAdmin"));
                if(empty($resources['image'])) {
-                       print "You do not have access to add any subimages to 
this image.";
+                       print _("You do not have access to add any subimages to 
this image.");
                        return;
                }
 
-               $h  = "<h3>Add New Subimage</h3>";
+               $h  = "<h3>" . _("Add New Subimage") . "</h3>";
                $h .= "<select dojoType=\"dijit.form.FilteringSelect\" 
id=\"addsubimagesel\">";
                foreach($resources['image'] as $id => $name) {
                        if($name == 'No Image')
@@ -582,9 +580,9 @@ class Image extends Resource {
                        $h .= "<option value=$id>$name</option>";
                }
                $h .= "</select>";
-               $h .= dijitButton('addbtn', "Add Subimage", "addSubimage();");
+               $h .= dijitButton('addbtn', _("Add Subimage"), 
"addSubimage();");
                $h .= "<br>";
-               $h .= "<h3>Current Subimages</h3>";
+               $h .= "<h3>" . _("Current Subimages") . "</h3>";
                $subimgcnt = 0;
                if(array_key_exists("subimages", $image) && 
count($image["subimages"])) {
                        $subimages = array();
@@ -601,11 +599,11 @@ class Image extends Resource {
                else {
                        $h .= "<select id=\"cursubimagesel\" multiple 
size=\"10\" disabled>";
                        $image['subimages'] = array();
-                       $h .= "<option value=\"none\">(None)</option>";
+                       $h .= "<option value=\"none\">" . _("(None)") . 
"</option>";
                }
                $h .= "</select><br>";
-               $h .= "total subimages: <span 
id=subimgcnt>$subimgcnt</span><br>";
-               $h .= dijitButton('rembtn', "Remove Selected Subimage(s)", 
"remSubimages();");
+               $h .= _("total subimages:") . " <span 
id=subimgcnt>$subimgcnt</span><br>";
+               $h .= dijitButton('rembtn', _("Remove Selected Subimage(s)"), 
"remSubimages();");
                $h .= "<br>";
                $adminimages = getUserResources(array("imageAdmin"), 
array("administer"));
                $adminids = array_keys($adminimages["image"]);
@@ -619,8 +617,9 @@ class Image extends Resource {
                $h .= "<INPUT type=\"hidden\" id=\"addsubimagecont\" 
value=\"$cont\">";
                $cont = addContinuationsEntry('AJremSubimage', $cdata, 
SECINDAY, 1, 0);
                $h .= "<INPUT type=\"hidden\" id=\"remsubimagecont\" 
value=\"$cont\">";
-               $h .= "NOTE: Subimage changes take effect immediately; you 
do<br>";
-               $h .= "<strong>not</strong> need to click \"Submit Changes\" to 
submit them.";
+               $h .= "<div style=\"width: 320px;\">\n";
+               $h .= _("NOTE: Subimage changes take effect immediately; you do 
<strong>not</strong> need to click \"Submit Changes\" to submit them.");
+               $h .= "</div>\n";
                print $h;
        }
 
@@ -668,7 +667,7 @@ class Image extends Resource {
                # save continuation
                $cont = addContinuationsEntry('AJsaveResource', $cdata);
 
-               $ret = array('title' => "Edit {$this->restypename}",
+               $ret = array('title' => _("Edit {$this->restypename}"),
                             'cont' => $cont,
                             'resid' => $imageid,
                             'data' => $data,
@@ -839,7 +838,7 @@ class Image extends Resource {
                # add the image
                if(! $imageid = $this->addResource($data)) {
                        sendJSON(array('status' => 'adderror',
-                                      'errormsg' => 'Error encountered while 
trying to create new image.<br>Please contact an admin for assistance.'));
+                                      'errormsg' => _("Error encountered while 
trying to create new image.<br>Please contact an admin for assistance.")));
                        return;
                }
 
@@ -1234,25 +1233,22 @@ class Image extends Resource {
        function getRevisionHTML($imageid) {
                $revisions = getImageRevisions($imageid);
                $rt = '';
-               $rt .= "<h3>Revisions of this Image</h3>\n";
+               $rt .= "<h3>" . _("Revisions of this Image") . "</h3>\n";
                $rt .= "<table summary=\"\"><tr><td>\n";
                if(count($revisions) > 1 && isImageBlockTimeActive($imageid)) {
                        $rt .= "<font color=\"red\">";
-                       $warn  = "WARNING: This image is part of an active 
block allocation. ";
-                       $warn .= "Changing the production revision of the image 
at this time ";
-                       $warn .= "will result in new reservations under the 
block allocation ";
-                       $warn .= "to have full reload times instead of a &lt; 1 
minutes wait.";
+                       $warn = _("WARNING: This image is part of an active 
block allocation. Changing the production revision of the image at this time 
will result in new reservations under the block allocation to have full reload 
times instead of a &lt; 1 minutes wait.");
                        $rt .= preg_replace("/(.{1,100}([ \n]|$))/", '\1<br>', 
$warn);
                        $rt .= "</font><br>\n";
                }
                $rt .= "<table summary=\"\" id=\"revisiontable\">\n";
                $rt .= "  <tr>\n";
                $rt .= "    <td></td>\n";
-               $rt .= "    <th>Revision</th>\n";
-               $rt .= "    <th>Creator</th>\n";
-               $rt .= "    <th>Created</th>\n";
-               $rt .= "    <th nowrap>In Production</th>\n";
-               $rt .= "    <th>Comments (click to edit)</th>\n";
+               $rt .= "    <th>" . _("Revision") . "</th>\n";
+               $rt .= "    <th>" . _("Creator") . "</th>\n";
+               $rt .= "    <th>" . _("Created") . "</th>\n";
+               $rt .= "    <th nowrap>" . _("In Production") . "</th>\n";
+               $rt .= "    <th>" . _("Comments (click to edit)") . "</th>\n";
                $rt .= "  </tr>\n";
                foreach($revisions AS $rev) {
                        if($rev['deleted'] == 1)
@@ -1295,7 +1291,8 @@ class Image extends Resource {
                $cdata['imageid'] = $imageid;
                $cont = addContinuationsEntry('AJdeleteRevisions', $cdata);
                $ids = implode(',', $keys);
-               $rt .= "<button onclick=\"deleteRevisions('$cont', '$ids'); 
return false;\">Delete selected revisions</button>\n";
+               $rt .= "<button onclick=\"deleteRevisions('$cont', '$ids'); 
return false;\">";
+               $rt .= _("Delete selected revisions") . "</button>\n";
                $rt .= "</div>\n";
                $rt .= "</td></tr></table>\n";
                return $rt;
@@ -1316,14 +1313,14 @@ class Image extends Resource {
                $imagemetaid = getContinuationVar('imagemetaid');
                if(! in_array($imageid, $adminids)) {
                        $arr = array('error' => 'noimageaccess',
-                               'msg' => 'You do not have access to manage this 
image.');
+                               'msg' => _("You do not have access to manage 
this image."));
                        sendJSON($arr);
                        return;
                }
                $newid = processInputVar('imageid', ARG_NUMERIC);
                if(! in_array($newid, $userimageids)) {
                        $arr = array('error' => 'nosubimageaccess',
-                               'msg' => 'You do not have access to add this 
subimage.');
+                               'msg' => _("You do not have access to add this 
subimage."));
                        sendJSON($arr);
                        return;
                }
@@ -1383,7 +1380,7 @@ class Image extends Resource {
                $imagemetaid = getContinuationVar('imagemetaid');
                if(! in_array($imageid, $adminids)) {
                        $arr = array('error' => 'noimageaccess',
-                               'msg' => 'You do not have access to manage this 
image.');
+                               'msg' => _("You do not have access to manage 
this image."));
                        sendJSON($arr);
                        return;
                }
@@ -1392,14 +1389,14 @@ class Image extends Resource {
                foreach($remids as $id) {
                        if(! is_numeric($id)) {
                                $arr = array('error' => 'invalidinput',
-                                            'msg' => 'Non-numeric data was 
submitted for an image id.');
+                                            'msg' => _("Non-numeric data was 
submitted for an image id."));
                                sendJSON($arr);
                                return;
                        }
                }
                if(is_null($imagemetaid)) {
                        $arr = array('error' => 'nullimagemetaid',
-                               'msg' => 'Invalid infomation id database. 
Contact your system administrator.');
+                               'msg' => _("Invalid infomation id database. 
Contact your system administrator."));
                        sendJSON($arr);
                        return;
                }
@@ -1535,12 +1532,11 @@ class Image extends Resource {
                if(preg_match("/[-'\"]/", $return["name"]) ||
                        strlen($return["name"]) > 60 || strlen($return["name"]) 
< 2) {
                        $return['error'] = 1;
-                       $errormsg[] = "Name must be from 2 to 60 characters and 
cannot "
-                                   . "contain any dashes (-), single (') or 
double (\") quotes.";
+                       $errormsg[] = _("Name must be from 2 to 60 characters 
and cannot contain any dashes (-), single (') or double (\") quotes.");
                }
                elseif(! preg_match('/^[\x20-\x7E]+$/', $return["name"])) {
                        $return['error'] = 1;
-                       $errormsg[] = "Name can only contain alphabets, 
numbers, signs, and spaces.";
+                       $errormsg[] = _("Name can only contain alphabets, 
numbers, signs, and spaces.");
                }
                else {
                        if($return['mode'] == 'edit')
@@ -1549,60 +1545,60 @@ class Image extends Resource {
                                $imageid = '';
                        if($this->checkForImageName($return["name"], "long", 
$imageid)) {
                                $return['error'] = 1;
-                               $errormsg[] = "An image already exists with 
this name.";
+                               $errormsg[] = _("An image already exists with 
this name.");
                        }
                }
                if($return["ram"] < 0 || $return["ram"] > 8388607) {
                        $return['error'] = 1;
-                       $errormsg[] = "RAM must be between 0 and 8388607";
+                       $errormsg[] = _("RAM must be between 0 and 8388607");
                }
                if($return["cores"] < 0 || $return["cores"] > 255) {
                        $return['error'] = 1;
-                       $errormsg[] = "Cores must be between 0 and 255";
+                       $errormsg[] = _("Cores must be between 0 and 255");
                }
                if($return["cpuspeed"] < 0 || $return["cpuspeed"] > 20000) {
                        $return['error'] = 1;
-                       $errormsg[] = "Processor Speed must be between 0 and 
20000";
+                       $errormsg[] = _("Processor Speed must be between 0 and 
20000");
                }
                $lognetwork = log10($return['networkspeed']);
                if($lognetwork < 1 || $lognetwork > 5) {
                        $return['error'] = 1;
-                       $errormsg[] = "Invalid value submitted for network 
speed";
+                       $errormsg[] = _("Invalid value submitted for network 
speed");
                }
                if((! is_numeric($return['concurrent']) && ! 
empty($return['concurrent'])) ||
                        (is_numeric($return['concurrent']) && 
($return["concurrent"] < 0 || $return["concurrent"] > 255))) {
                        $return['error'] = 1;
-                       $errormsg[] = "Max concurrent usage must be 0 or 
between 2 and 255";
+                       $errormsg[] = _("Max concurrent usage must be 0 or 
between 2 and 255");
                }
                if($return['mode'] == 'edit' && 
                   ($return["reload"] < 0 || $return["reload"] > 120)) {
                        $return['error'] = 1;
-                       $errormsg[] = "Estimated Reload Time must be between 0 
and 120";
+                       $errormsg[] = _("Estimated Reload Time must be between 
0 and 120");
                }
                if(! validateUserid($return["owner"])) {
                        $return['error'] = 1;
-                       $errormsg[] = "Submitted ID is not valid";
+                       $errormsg[] = _("Submitted ID is not valid");
                }
                if($return['checkout'] != 0 && $return['checkout'] != 1) {
                        $return['error'] = 1;
-                       $errormsg[] = "Available for checkout must be Yes or 
No";
+                       $errormsg[] = _("Available for checkout must be Yes or 
No");
                }
                if($return['checkuser'] != 0 && $return['checkuser'] != 1) {
                        $return['error'] = 1;
-                       $errormsg[] = "Check for logged in user must be Yes or 
No";
+                       $errormsg[] = _("Check for logged in user must be Yes 
or No");
                }
                if($return['rootaccess'] != 0 && $return['rootaccess'] != 1) {
                        $return['error'] = 1;
-                       $errormsg[] = "Users have administrative access must be 
Yes or No";
+                       $errormsg[] = _("Users have administrative access must 
be Yes or No");
                }
                if($return['mode'] == 'add' && $return['sysprep'] != 0 &&
                   $return['sysprep'] != 1) {
                        $return['error'] = 1;
-                       $errormsg[] = "Use sysprep must be Yes or No";
+                       $errormsg[] = _("Use sysprep must be Yes or No");
                }
                if(empty($return['desc'])) {
                        $return['error'] = 1;
-                       $errormsg[] = "You must include a description of the 
image<br>";
+                       $errormsg[] = _("You must include a description of the 
image") . "<br>";
                }
                if($return['mode'] == 'add') {
                        if(! preg_match('/^[,0-9]+$/', 
$return['connectmethodids'])) {
@@ -1899,13 +1895,13 @@ class Image extends Resource {
                $newimage = getContinuationVar('newimage');
                if(! array_key_exists($newid, $methods)) {
                        $arr = array('error' => 'invalidmethod',
-                               'msg' => 'Invalid method submitted.');
+                               'msg' => _("Invalid method submitted."));
                        sendJSON($arr);
                        return;
                }
                if($revid != 0 && ! in_array($revid, $revids)) {
                        $arr = array('error' => 'invalidrevision',
-                               'msg' => 'Invalid revision id submitted.');
+                               'msg' => _("Invalid revision id submitted."));
                        sendJSON($arr);
                        return;
                }
@@ -1988,14 +1984,14 @@ class Image extends Resource {
                foreach($remids as $id) {
                        if(! is_numeric($id)) {
                                $arr = array('error' => 'invalidinput',
-                                            'msg' => 'Non-numeric data was 
submitted for a connection method id.');
+                                            'msg' => _("Non-numeric data was 
submitted for a connection method id."));
                                sendJSON($arr);
                                return;
                        }
                }
                if($revid != 0 && ! in_array($revid, $revids)) {
                        $arr = array('error' => 'invalidrevision',
-                               'msg' => 'Invalid revision id submitted.');
+                               'msg' => _("Invalid revision id submitted."));
                        sendJSON($arr);
                        return;
                }
@@ -2136,7 +2132,7 @@ class Image extends Resource {
                                $inuseids[] = $row['revision'];
                        $inuseids = implode(',', $inuseids);
                        $rc = array('status' => 'error',
-                                   'msg' => "The following revisions are in 
use and cannot be deleted at this time: $inuseids");
+                                   'msg' => _("The following revisions are in 
use and cannot be deleted at this time:") . " $inuseids");
                        sendJSON($rc);
                        return;
                }

Modified: vcl/trunk/web/.ht-inc/managementnode.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/managementnode.php?rev=1659286&r1=1659285&r2=1659286&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/managementnode.php (original)
+++ vcl/trunk/web/.ht-inc/managementnode.php Thu Feb 12 15:09:22 2015
@@ -292,13 +292,13 @@ class ManagementNode extends Resource {
 
                #$h .= "<div style=\"width: 80%; margin-left: 10%;\">\n";
                # name
-               $errmsg = "Name can only contain letters, numbers, dashes(-), 
periods(.), and underscores(_). It can be from 1 to 50 characters long.";
-               $h .= labeledFormItem('name', 'Name*', 'text', 
'^([a-zA-Z0-9_][-a-zA-Z0-9_\.]{1,49})$',
+               $errmsg = _("Name can only contain letters, numbers, dashes(-), 
periods(.), and underscores(_). It can be from 1 to 50 characters long.");
+               $h .= labeledFormItem('name', _('Name') . '*', 'text', 
'^([a-zA-Z0-9_][-a-zA-Z0-9_\.]{1,49})$',
                                      1, '', $errmsg); 
                # owner
                $extra = array('onKeyPress' => 'setOwnerChecking');
-               $h .= labeledFormItem('owner', 'Owner*', 'text', '', 1,
-                                     
"{$user['unityid']}@{$user['affiliation']}", 'Unknown user',
+               $h .= labeledFormItem('owner', _('Owner') . '*', 'text', '', 1,
+                                     
"{$user['unityid']}@{$user['affiliation']}", _('Unknown user'),
                                      'checkOwner', $extra);
                $cont = addContinuationsEntry('AJvalidateUserid');
                $h .= "<input type=\"hidden\" id=\"valuseridcont\" 
value=\"$cont\">\n";
@@ -306,77 +306,77 @@ class ManagementNode extends Resource {
                # IP address
                $ipreg = 
'(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';
                $ipreg1 = "^$ipreg$";
-               $errmsg = "Invalid IP address specified - must be a valid IPV4 
address";
-               $h .= labeledFormItem('ipaddress', 'IP Address*', 'text', 
$ipreg1, 1, '', $errmsg); 
+               $errmsg = _("Invalid IP address specified - must be a valid 
IPV4 address");
+               $h .= labeledFormItem('ipaddress', _('IP Address') . '*', 
'text', $ipreg1, 1, '', $errmsg); 
 
                # State
                $vals = array(2 => "available", 10 => "maintenance", 5 => 
"failed");
-               $h .= labeledFormItem('stateid', 'State', 'select', $vals);
+               $h .= labeledFormItem('stateid', _('State'), 'select', $vals);
 
                # sysadmin email
                $reg = 
'^([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4},)*([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})$';
-               $errmsg = "Invalid email address(es) specified";
-               $h .= labeledFormItem('sysadminemail', "SysAdmin Email 
Address(es)", 'text', $reg, 0, '',
+               $errmsg = _("Invalid email address(es) specified");
+               $h .= labeledFormItem('sysadminemail', _("SysAdmin Email 
Address(es)"), 'text', $reg, 0, '',
                                      $errmsg, '', '', '', 
helpIcon('sysadminemailhelp')); 
 
                # shared mailbox
                $reg = '^([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})$';
-               $errmsg = "Invalid email address specified";
-               $h .= labeledFormItem('sharedmailbox', 'Address for Shadow 
Emails', 'text', $reg, 0, '',
+               $errmsg = _("Invalid email address specified");
+               $h .= labeledFormItem('sharedmailbox', _('Address for Shadow 
Emails'), 'text', $reg, 0, '',
                                      $errmsg, '', '', '', 
helpIcon('sharedmailboxhelp')); 
 
                # checkininterval
                $extra = array('smallDelta' => 1, 'largeDelta' => 2);
-               $h .= labeledFormItem('checkininterval', 'Check-in Interval 
(sec)', 'spinner', '{min:5,max:30,places:0}',
+               $h .= labeledFormItem('checkininterval', _('Check-in Interval 
(sec)'), 'spinner', '{min:5,max:30,places:0}',
                                      1, '6', '', '', $extra, '', 
helpIcon('checkinhelp'));
 
                # installpath
                $reg = '^([-a-zA-Z0-9_\.\/]){2,100}$';
-               $errmsg = "Invalid install path specified";
-               $h .= labeledFormItem('installpath', 'Install Path', 'text', 
$reg, 0, '', $errmsg,
+               $errmsg = _("Invalid install path specified");
+               $h .= labeledFormItem('installpath', _('Install Path'), 'text', 
$reg, 0, '', $errmsg,
                                      '', '', '', helpIcon('installpathhelp')); 
 
                # timeserver list
                $reg = '^(([a-zA-Z0-9_][-a-zA-Z0-9_\.]{1,49})(,?)){1,5}$';
-               $errmsg = "Invalid time server(s) specified. Must be comman 
delimited list of hostnames or IP addresses, with up to 5 allowed";
+               $errmsg = _("Invalid time server(s) specified. Must be comman 
delimited list of hostnames or IP addresses, with up to 5 allowed");
                $val = getVariable('timesource|global');
-               $h .= labeledFormItem('timeservers', 'Time Server(s)', 'text', 
$reg, 0, $val, $errmsg,
+               $h .= labeledFormItem('timeservers', _('Time Server(s)'), 
'text', $reg, 0, $val, $errmsg,
                                      '', '', '', helpIcon('timeservershelp')); 
 
                # keys
                $reg = '^([-a-zA-Z0-9_\.\/,]){2,1024}$';
-               $errmsg = "Invalid path to identity key files";
-               $h .= labeledFormItem('keys', 'End Node SSH Identity Key 
Files', 'text', $reg, 0, '', $errmsg,
+               $errmsg = _("Invalid path to identity key files");
+               $h .= labeledFormItem('keys', _('End Node SSH Identity Key 
Files'), 'text', $reg, 0, '', $errmsg,
                                      '', '', '', helpIcon('identityhelp')); 
 
                # sshport
                $extra = array('smallDelta' => 1, 'largeDelta' => 2);
-               $h .= labeledFormItem('sshport', 'SSH Port for this node', 
'spinner', '{min:1,max:65535,places:0}',
+               $h .= labeledFormItem('sshport', _('SSH Port for this node'), 
'spinner', '{min:1,max:65535,places:0}',
                                      1, '22', '', '', $extra, '', 
helpIcon('sshporthelp'));
 
                # image library
                $h .= "<div class=\"boxedoptions\">\n";
                # imagelibenable
                $extra = array('onChange' => 'toggleImageLibrary();');
-               $h .= labeledFormItem('imagelibenable', 'Enable Image Library', 
'check', '', '', '', '', '',
+               $h .= labeledFormItem('imagelibenable', _('Enable Image 
Library'), 'check', '', '', '', '', '',
                                      $extra, '', helpIcon('imagelibhelp'));
 
                # imagelibgroupid
                $disabled = array('disabled' => 'true');
                $vals = getUserResources(array('mgmtNodeAdmin'), 
array("manageGroup"), 1);
-               $h .= labeledFormItem('imagelibgroupid', 'Image Library 
Management Node Group', 'select',
+               $h .= labeledFormItem('imagelibgroupid', _('Image Library 
Management Node Group'), 'select',
                                      $vals['managementnode'], '', '', '', '', 
$disabled, '', helpIcon('imagelibgrouphelp'));
 
                # imagelibuser
                $reg = '^([-a-zA-Z0-9_\.\/,]){2,20}$';
-               $errmsg = "Invalid image library user";
-               $h .= labeledFormItem('imagelibuser', 'Image Library User', 
'text', $reg, 0, '', $errmsg,
+               $errmsg = _("Invalid image library user");
+               $h .= labeledFormItem('imagelibuser', _('Image Library User'), 
'text', $reg, 0, '', $errmsg,
                                      '', $disabled, '', 
helpIcon('imagelibuserhelp')); 
 
                # imagelibkey
                $reg = '^([-a-zA-Z0-9_\.\/,]){2,100}$';
-               $errmsg = "Invalid image library identity key";
-               $h .= labeledFormItem('imagelibkey', 'Image Library SSH 
Identity Key File', 'text', $reg, 0, '', $errmsg,
+               $errmsg = _("Invalid image library identity key");
+               $h .= labeledFormItem('imagelibkey', _('Image Library SSH 
Identity Key File'), 'text', $reg, 0, '', $errmsg,
                                      '', $disabled, '', 
helpIcon('imagelibkeyhelp')); 
                $h .= "</div>\n"; # image library
 
@@ -387,47 +387,47 @@ class ManagementNode extends Resource {
                $vals = array('dynamicDHCP' => 'Dynamic DHCP',
                              'manualDHCP' => 'Manual DHCP',
                              'static' => 'Static');
-               $h .= labeledFormItem('publicIPconfig', 'Public NIC 
configuration method', 'select', $vals,
+               $h .= labeledFormItem('publicIPconfig', _('Public NIC 
configuration method'), 'select', $vals,
                                      '', '', '', '', $extra, '', 
helpIcon('ipconfighelp'));
 
                # netmask
-               $errmsg = "Invalid public netmask";
-               $h .= labeledFormItem('publicnetmask', 'Public Netmask', 
'text', $ipreg1, 0, '', $errmsg,
+               $errmsg = _("Invalid public netmask");
+               $h .= labeledFormItem('publicnetmask', _('Public Netmask'), 
'text', $ipreg1, 0, '', $errmsg,
                                      '', $disabled, '', 
helpIcon('netmaskhelp')); 
 
                # gateway
                $reg = '^[a-zA-Z0-9_][-a-zA-Z0-9_\.]{1,56}$';
-               $errmsg = "Invalid public gateway";
-               $h .= labeledFormItem('publicgateway', 'Public Gateway', 
'text', $reg, 0, '', $errmsg,
+               $errmsg = _("Invalid public gateway");
+               $h .= labeledFormItem('publicgateway', _('Public Gateway'), 
'text', $reg, 0, '', $errmsg,
                                      '', $disabled, '', 
helpIcon('gatewayhelp')); 
 
                # dnsserver
                $reg = "^($ipreg,)*($ipreg)$";
-               $errmsg = "Invalid public DNS server";
-               $h .= labeledFormItem('publicdnsserver', 'Public DNS Server', 
'text', $reg, 0, '', $errmsg,
+               $errmsg = _("Invalid public DNS server");
+               $h .= labeledFormItem('publicdnsserver', _('Public DNS 
Server'), 'text', $reg, 0, '', $errmsg,
                                      '', $disabled, '', 
helpIcon('dnsserverhelp')); 
                $h .= "</div>\n"; # IP config method
 
                # available public networks
-               $h .= labeledFormItem('availablenetworks', 'Available Public 
Networks', 'textarea', '', 1,
+               $h .= labeledFormItem('availablenetworks', _('Available Public 
Networks'), 'textarea', '', 1,
                                      '', '', '', '', '', 
helpIcon('availnetshelp'));
 
                # federated auth
-               $h .= labeledFormItem('federatedauth', 'Affiliations using 
Federated Authentication for Linux Images',
+               $h .= labeledFormItem('federatedauth', _('Affiliations using 
Federated Authentication for Linux Images'),
                                      'textarea', '', 1, '', '', '', '', '', 
helpIcon('federatedauthhelp'));
 
                # NAT Host
                $h .= "<div id=\"nathost\" class=\"boxedoptions\">\n";
                # use as NAT host
                $extra = array('onChange' => "toggleNAThost();");
-               $h .= labeledFormItem('nathostenabled', 'Use as NAT Host', 
'check', '', '', '1', '', '', $extra);
+               $h .= labeledFormItem('nathostenabled', _('Use as NAT Host'), 
'check', '', '', '1', '', '', $extra);
                # public IP
-               $errmsg = "Invalid NAT Public IP address specified - must be a 
valid IPV4 address";
-               $h .= labeledFormItem('natpublicipaddress', 'NAT Public IP 
Address', 'text', $ipreg1, 1, '', $errmsg,
+               $errmsg = _("Invalid NAT Public IP address specified - must be 
a valid IPV4 address");
+               $h .= labeledFormItem('natpublicipaddress', _('NAT Public IP 
Address'), 'text', $ipreg1, 1, '', $errmsg,
                                      '', '', '', helpIcon('natpubliciphelp')); 
                # internal IP
-               $errmsg = "Invalid NAT Internal IP address specified - must be 
a valid IPV4 address";
-               $h .= labeledFormItem('natinternalipaddress', 'NAT Internal IP 
Address', 'text', $ipreg1, 1, '', $errmsg,
+               $errmsg = _("Invalid NAT Internal IP address specified - must 
be a valid IPV4 address");
+               $h .= labeledFormItem('natinternalipaddress', _('NAT Internal 
IP Address'), 'text', $ipreg1, 1, '', $errmsg,
                                      '', '', '', 
helpIcon('natinternaliphelp')); 
                $h .= "</div>\n"; # NAT Host
 


Reply via email to