summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Lucas <rafalucas.unicamp@gmail.com>2010-06-30 15:39:37 -0300
committerRafael Lucas <rafalucas.unicamp@gmail.com>2010-06-30 15:39:37 -0300
commitc24e9a112c60c05663e8ecb7d33056b9460b7380 (patch)
treefcf7955c3905898fb703af8b194293f67898add2
parent912fca454276710cb7a54548048ccca34034273f (diff)
downloadpfsense-c24e9a112c60c05663e8ecb7d33056b9460b7380.zip
pfsense-c24e9a112c60c05663e8ecb7d33056b9460b7380.tar.gz
Implement gettext() calls
-rwxr-xr-xusr/local/www/firewall_virtual_ip.php24
-rwxr-xr-xusr/local/www/interfaces_vlan_edit.php32
2 files changed, 28 insertions, 28 deletions
diff --git a/usr/local/www/firewall_virtual_ip.php b/usr/local/www/firewall_virtual_ip.php
index f4b4567..69b44e3 100755
--- a/usr/local/www/firewall_virtual_ip.php
+++ b/usr/local/www/firewall_virtual_ip.php
@@ -101,7 +101,7 @@ if ($_GET['act'] == "del") {
foreach ($config['nat']['rule'] as $rule) {
if($rule['destination']['address'] <> "") {
if ($rule['destination']['address'] == $a_vip[$_GET['id']]['subnet']) {
- $input_errors[] = "This entry cannot be deleted because it is still referenced by at least one NAT mapping.";
+ $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one NAT mapping.");
break;
}
}
@@ -128,7 +128,7 @@ if ($_GET['act'] == "del") {
} else if ($_GET['changes'] == "mods")
$id = $_GET['id'];
-$pgtitle = array("Firewall","Virtual IP Addresses");
+$pgtitle = array(gettext("Firewall"),gettext("Virtual IP Addresses"));
include("head.inc");
?>
@@ -143,7 +143,7 @@ include("head.inc");
print_info_box($savemsg);
else
if (is_subsystem_dirty('vip'))
- print_info_box_np("The VIP configuration has been changed.<br>You must apply the changes in order for them to take effect.");
+ print_info_box_np(gettext("The VIP configuration has been changed.<br>You must apply the changes in order for them to take effect."));
?>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
@@ -151,8 +151,8 @@ include("head.inc");
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Virtual IPs", true, "firewall_virtual_ip.php");
- $tab_array[] = array("CARP Settings", false, "pkg_edit.php?xml=carp_settings.xml&id=0");
+ $tab_array[] = array(gettext("Virtual IPs"), true, "firewall_virtual_ip.php");
+ $tab_array[] = array(gettext("CARP Settings"), false, "pkg_edit.php?xml=carp_settings.xml&id=0");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -164,9 +164,9 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="30%" class="listhdrr">Virtual IP address</td>
- <td width="10%" class="listhdrr">Type</td>
- <td width="40%" class="listhdr">Description</td>
+ <td width="30%" class="listhdrr"><?=gettext("Virtual IP address");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Type");?></td>
+ <td width="40%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -200,7 +200,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle"><a href="firewall_virtual_ip_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a></td>
- <td valign="middle"><a href="firewall_virtual_ip.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this entry?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td valign="middle"><a href="firewall_virtual_ip.php?act=del&id=<?=$i;?>" onclick="return confirm(<?=gettext('Do you really want to delete this entry?');?>)"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -220,9 +220,9 @@ include("head.inc");
</tr>
<tr>
<td colspan="4">
- <p><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>The virtual IP addresses defined on this page may be used in <a href="firewall_nat.php">NAT</a> mappings.<br>
- You can check the status of your CARP Virtual IPs and interfaces <a href="carp_status.php">here</a>.</span></p>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note:");?><br>
+ </strong></span><?=gettext("The virtual IP addresses defined on this page may be used in ");?><a href="firewall_nat.php">NAT</a><?=gettext(" mappings.");?><br>
+ <?=gettext("You can check the status of your CARP Virtual IPs and interfaces ");?><a href="carp_status.php">here</a>.</span></p>
</td>
</tr>
</table>
diff --git a/usr/local/www/interfaces_vlan_edit.php b/usr/local/www/interfaces_vlan_edit.php
index db676f7..8233092 100755
--- a/usr/local/www/interfaces_vlan_edit.php
+++ b/usr/local/www/interfaces_vlan_edit.php
@@ -71,13 +71,13 @@ if ($_POST) {
$pconfig = $_POST;
/* input validation */
- $reqdfields = explode(" ", "if tag");
- $reqdfieldsn = explode(",", "Parent interface,VLAN tag");
+ $reqdfields = explode(" ", gettext("if tag"));
+ $reqdfieldsn = explode(",", gettext("Parent interface,VLAN tag"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if ($_POST['tag'] && (!is_numericint($_POST['tag']) || ($_POST['tag'] < '1') || ($_POST['tag'] > '4094'))) {
- $input_errors[] = "The VLAN tag must be an integer between 1 and 4094.";
+ $input_errors[] = gettext("The VLAN tag must be an integer between 1 and 4094.");
}
foreach ($a_vlans as $vlan) {
@@ -85,14 +85,14 @@ if ($_POST) {
continue;
if (($vlan['if'] == $_POST['if']) && ($vlan['tag'] == $_POST['tag'])) {
- $input_errors[] = "A VLAN with the tag {$vlan['tag']} is already defined on this interface.";
+ $input_errors[] = sprintf(gettext("A VLAN with the tag %s is already defined on this interface."),$vlan['tag']);
break;
}
}
if (is_array($config['qinqs']['qinqentry'])) {
foreach ($config['qinqs']['qinqentry'] as $qinq)
if ($qinq['tag'] == $_POST['tag'] && $qinq['if'] == $_POST['if'])
- $input_errors[] = "A QinQ VLAN exists with this tag please remove it to use this tag with.";
+ $input_errors[] = gettext("A QinQ VLAN exists with this tag please remove it to use this tag with.");
}
if (!$input_errors) {
@@ -104,7 +104,7 @@ if ($_POST) {
$vlan['vlanif'] = interface_vlan_configure($vlan);
if ($vlan['vlanif'] == "" || !stristr($vlan['vlanif'], "vlan"))
- $input_errors[] = "Error occured creating interface, please retry.";
+ $input_errors[] = gettext("Error occured creating interface, please retry.");
else {
if (isset($id) && $a_vlans[$id])
$a_vlans[$id] = $vlan;
@@ -123,7 +123,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","VLAN","Edit");
+$pgtitle = array(gettext("Firewall"),gettext("VLAN"),gettext("Edit"));
include("head.inc");
?>
@@ -134,10 +134,10 @@ include("head.inc");
<form action="interfaces_vlan_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">VLAN configuration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("VLAN configuration");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Parent interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Parent interface");?></td>
<td width="78%" class="vtable">
<select name="if" class="formselect">
<?php
@@ -153,27 +153,27 @@ include("head.inc");
?>
</select>
<br/>
- <span class="vexpl">Only VLAN capable interfaces will be shown.</span></td>
+ <span class="vexpl"><?=gettext("Only VLAN capable interfaces will be shown.");?></span></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">VLAN tag </td>
+ <td valign="top" class="vncellreq"><?=gettext("VLAN tag ");?></td>
<td class="vtable">
<input name="tag" type="text" class="formfld unknown" id="tag" size="6" value="<?=htmlspecialchars($pconfig['tag']);?>">
<br>
- <span class="vexpl">802.1Q VLAN tag (between 1 and 4094) </span></td>
+ <span class="vexpl"><?=gettext("802.1Q VLAN tag (between 1 and 4094) ");?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here").
+ ("for your reference (not parsed).");?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input type="hidden" name="vlanif" value="<?=$pconfig['vlanif']; ?>">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input type="button" value="Cancel" onclick="history.back()">
<?php if (isset($id) && $a_vlans[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
OpenPOWER on IntegriCloud