diff options
author | Rafael Lucas <rafalucas.unicamp@gmail.com> | 2010-06-24 17:21:56 -0300 |
---|---|---|
committer | Rafael Lucas <rafalucas.unicamp@gmail.com> | 2010-06-24 17:21:56 -0300 |
commit | 38f90dc89097e838c82b7f253952fa4bdf6b48d5 (patch) | |
tree | 1f6d05b9c0fd03b5bbf76034c0e0c7bb92bd53da | |
parent | d975e2e4109aa17e2ee8bb4bfd714ea12d16e5ca (diff) | |
download | pfsense-38f90dc89097e838c82b7f253952fa4bdf6b48d5.zip pfsense-38f90dc89097e838c82b7f253952fa4bdf6b48d5.tar.gz |
Implement gettext() calls
-rwxr-xr-x | usr/local/www/firewall_rules.php | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php index b9888e6..4809d2f 100755 --- a/usr/local/www/firewall_rules.php +++ b/usr/local/www/firewall_rules.php @@ -41,7 +41,7 @@ ##|*MATCH=firewall_rules.php* ##|-PRIV -$pgtitle = array("Firewall", "Rules"); +$pgtitle = array(gettext("Firewall"),gettext("Rules")); $statusurl = "status_filter_reload.php"; $logurl = "diag_logs_filter.php"; @@ -146,7 +146,7 @@ if ($_POST) { clear_subsystem_dirty('filter'); - $savemsg = "The settings have been applied. The firewall rules are now reloading in the background. You can also <a href='status_filter_reload.php'>monitor</a> the reload progress."; + $savemsg = gettext("The settings have been applied").". ".gettext("The firewall rules are now reloading in the background").". ".gettext("You can also ")."<a href='status_filter_reload.php'>".gettext("monitor")."</a>".gettext("the reload progress")."."; } } @@ -249,7 +249,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript </script> <?php if ($savemsg) print_info_box($savemsg); ?> <?php if (is_subsystem_dirty('filter')): ?><p> -<?php print_info_box_np("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br> +<?php print_info_box_np(gettext("The firewall rule configuration has been changed").".<br>".gettext("You must apply the changes in order for them to take effect").".");?><br> <?php endif; ?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td class="tabnavtbl"> @@ -260,7 +260,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript $active = true; else $active = false; - $tab_array[] = array("Floating", $active, "firewall_rules.php?if=FloatingRules"); + $tab_array[] = array(gettext("Floating"), $active, "firewall_rules.php?if=FloatingRules"); $tabscounter = 0; $i = 0; foreach ($iflist as $ifent => $ifname) { if ($ifent == $if) $active = true; @@ -278,16 +278,16 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript <tr id="frheader"> <td width="3%" class="list"> </td> <td width="5%" class="list"> </td> - <td width="3%" class="listhdrr">ID</td> - <td width="6%" class="listhdrr">Proto</td> - <td width="12%" class="listhdrr">Source</td> - <td width="6%" class="listhdrr">Port</td> - <td width="12%" class="listhdrr">Destination</td> - <td width="6%" class="listhdrr">Port</td> - <td width="5%" class="listhdrr">Gateway</td> - <td width="8%" class="listhdrr">Queue</td> - <td width="5%" class="listhdrr">Schedule</td> - <td width="19%" class="listhdr">Description</td> + <td width="3%" class="listhdrr"><?=gettext("ID");?></td> + <td width="6%" class="listhdrr"><?=gettext("Proto");?></td> + <td width="12%" class="listhdrr"><?=gettext("Source");?></td> + <td width="6%" class="listhdrr"><?=gettext("Port");?></td> + <td width="12%" class="listhdrr"><?=gettext("Destination");?></td> + <td width="6%" class="listhdrr"><?=gettext("Port");?></td> + <td width="5%" class="listhdrr"><?=gettext("Gateway");?></td> + <td width="8%" class="listhdrr"><?=gettext("Queue");?></td> + <td width="5%" class="listhdrr"><?=gettext("Schedule");?></td> + <td width="19%" class="listhdr"><?=gettext("Description");?></td> <td width="10%" class="list"> <table border="0" cellspacing="0" cellpadding="1"> <tr> @@ -305,9 +305,9 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript <td> <?php if ($nrules == 0): ?> <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0"><?php else: ?> - <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected rules" onclick="return confirm('Do you really want to delete the selected rules?')"><?php endif; ?> + <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" onclick="return confirm(<?=gettext('Do you really want to delete the selected rules?');?>)"><?php endif; ?> </td> - <td align="center" valign="middle"><a href="firewall_rules_edit.php?if=<?=$if;?>&after=-1"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add new rule" width="17" height="17" border="0"></a></td> + <td align="center" valign="middle"><a href="firewall_rules_edit.php?if=<?=$if;?>&after=-1"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add new rule");?>" width="17" height="17" border="0"></a></td> </tr> </table> </td> @@ -317,24 +317,24 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript <td class="list"> </td> <td class="listt" align="center"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" width="11" height="11" border="0"></td> <td class="listlr" style="background-color: #e0e0e0"></td> - <td class="listr" style="background-color: #e0e0e0">*</td> - <td class="listr" style="background-color: #e0e0e0">RFC 1918 networks</td> - <td class="listr" style="background-color: #e0e0e0">*</td> - <td class="listr" style="background-color: #e0e0e0">*</td> - <td class="listr" style="background-color: #e0e0e0">*</td> - <td class="listr" style="background-color: #e0e0e0">*</td> - <td class="listr" style="background-color: #e0e0e0">*</td> + <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td> + <td class="listr" style="background-color: #e0e0e0"><?=gettext("RFC 1918 networks");?></td> + <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td> + <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td> + <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td> + <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td> + <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td> <td class="listr" style="background-color: #e0e0e0"></td> - <td class="listbg">Block private networks</td> + <td class="listbg"><?=gettext("Block private networks");?></td> <td valign="middle" nowrap class="list"> <table border="0" cellspacing="0" cellpadding="1"> <tr> - <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules before this rule"></td> - <td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit rule" width="17" height="17" border="0"></a></td> + <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected rules before this rule");?>"></td> + <td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit rule");?>" width="17" height="17" border="0"></a></td> </tr> <tr> <td align="center" valign="middle"></td> - <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="add a new rule based on this one" width="17" height="17" border="0"></td> + <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="<?=gettext("add a new rule based on this one");?>" width="17" height="17" border="0"></td> </tr> </table> </td> @@ -345,24 +345,24 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript <td class="list"> </td> <td class="listt" align="center"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" width="11" height="11" border="0"></td> <td class="listlr" style="background-color: #e0e0e0"></td> - <td class="listr" style="background-color: #e0e0e0">*</td> - <td class="listr" style="background-color: #e0e0e0">Reserved/not assigned by IANA</td> - <td class="listr" style="background-color: #e0e0e0">*</td> - <td class="listr" style="background-color: #e0e0e0">*</td> - <td class="listr" style="background-color: #e0e0e0">*</td> - <td class="listr" style="background-color: #e0e0e0">*</td> - <td class="listr" style="background-color: #e0e0e0">*</td> + <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td> + <td class="listr" style="background-color: #e0e0e0"><?=gettext("Reserved/not assigned by IANA");?></td> + <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td> + <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td> + <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td> + <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td> + <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td> <td class="listr" style="background-color: #e0e0e0">*</td> - <td class="listbg">Block bogon networks</td> + <td class="listbg"><?=gettext("Block bogon networks");?></td> <td valign="middle" nowrap class="list"> <table border="0" cellspacing="0" cellpadding="1"> <tr> - <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules before this rule"></td> - <td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit rule" width="17" height="17" border="0"></a></td> + <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected rules before this rule");?>"></td> + <td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit rule");?>" width="17" height="17" border="0"></a></td> </tr> <tr> <td align="center" valign="middle"></td> - <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="add a new rule based on this one" width="17" height="17" border="0"></td> + <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="<?=gettext("add a new rule based on this one");?>" width="17" height="17" border="0"></td> </tr> </table> </td> @@ -400,7 +400,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript $textss = $textse = ""; } ?> - <a href="?if=<?=$if;?>&act=toggle&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" title="click to toggle enabled/disabled status"></a> + <a href="?if=<?=$if;?>&act=toggle&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" title="<?=gettext("click to toggle enabled/disabled status");?>></a> <?php if (isset($filterent['log'])): $iconfnlog = "log_s"; if (isset($filterent['disabled'])) @@ -436,8 +436,8 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript $sched_caption_escaped = ""; $sched_content = ""; $schedstatus = false; - $dayArray = array ('Mon','Tues','Wed','Thur','Fri','Sat','Sun'); - $monthArray = array ('January','February','March','April','May','June','July','August','September','October','November','December'); + $dayArray = array (gettext('Mon'),gettext('Tues'),gettext('Wed'),gettext('Thur'),gettext('Fri'),gettext('Sat'),gettext('Sun')); + $monthArray = array (gettext('January'),gettext('February'),gettext('March'),gettext('April'),gettext('May'),gettext('June'),gettext('July'),gettext('August'),gettext('September'),gettext('October'),gettext('November'),gettext('December')); if($config['schedules']['schedule'] <> "" and is_array($config['schedules']['schedule'])){ foreach ($a_schedules as $schedule) { @@ -548,12 +548,12 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript if ($iconfn == "block" || $iconfn == "reject") { $image = "icon_block"; - $alttext = "Traffic matching this rule is currently being denied"; + $alttext = gettext("Traffic matching this rule is currently being denied"); } else { $image = "icon_pass"; - $alttext = "Traffic matching this rule is currently being allowed"; + $alttext = gettext("Traffic matching this rule is currently being allowed"); } $printicon = true; } @@ -563,7 +563,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript $image = "icon_block_d"; else $image = "icon_block"; - $alttext = "This rule is not currently active because its period has expired"; + $alttext = gettext("This rule is not currently active because its period has expired"); $printicon = true; } } @@ -627,9 +627,9 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript <td class="listt"></td> <td class="listlr" colspan="10" align="center" valign="middle"> <span class="gray"> - No rules are currently defined for this interface.<br> - All incoming connections on this interface will be blocked until you add pass rules.<br><br> - Click the <a href="firewall_rules_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add new rule" border="0" width="17" height="17" align="absmiddle"></a> button to add a new rule.</span> + <?=gettext("No rules are currently defined for this interface"."<br>". + "All incoming connections on this interface will be blocked until you add pass rules.<br><br>");?> + Click the <a href="firewall_rules_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add new rule");?>" border="0" width="17" height="17" align="absmiddle"></a><?=gettext(" button to add a new rule.");?></span> </td> <?php endif; ?> <tr id="fr<?=$nrules;?>"> @@ -649,16 +649,16 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript <table border="0" cellspacing="0" cellpadding="1"> <tr> <td> - <?php if ($nrules == 0): ?><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules to end" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="move selected rules to end" onMouseOver="fr_insline(<?=$nrules;?>, true)" onMouseOut="fr_insline(<?=$nrules;?>, false)"><?php endif; ?></td> + <?php if ($nrules == 0): ?><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected rules to end");?>" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="<?=gettext("move selected rules to end");?>" onMouseOver="fr_insline(<?=$nrules;?>, true)" onMouseOut="fr_insline(<?=$nrules;?>, false)"><?php endif; ?></td> <td></td> </tr> <tr> <td> <?php if ($nrules == 0): ?> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0"><?php else: ?> - <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected rules" onclick="return confirm('Do you really want to delete the selected rules?')"><?php endif; ?> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" border="0"><?php else: ?> + <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title=<?=gettext("delete selected rules");?>" onclick="return confirm(<?=gettext('Do you really want to delete the selected rules?');?>)"><?php endif; ?> </td> - <td><a href="firewall_rules_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add new rule" width="17" height="17" border="0"></a></td> + <td><a href="firewall_rules_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add new rule");?>" width="17" height="17" border="0"></a></td> </tr> </table> </td> @@ -667,39 +667,39 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass.gif" width="11" height="11"></td> - <td>pass</td> + <td><?=gettext("pass");?></td> <td width="14"></td> <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" width="11" height="11"></td> - <td>block</td> + <td><?=gettext("block");?></td> <td width="14"></td> <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_reject.gif" width="11" height="11"></td> - <td>reject</td> + <td><?=gettext("reject");?></td> <td width="14"></td> <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_log.gif" width="11" height="11"></td> - <td>log</td> + <td><?=gettext("log");?></td> </tr> <tr> <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass_d.gif" width="11" height="11"></td> - <td nowrap>pass (disabled)</td> + <td nowrap><?=gettext("pass (disabled)");?></td> <td> </td> <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block_d.gif" width="11" height="11"></td> - <td nowrap>block (disabled)</td> + <td nowrap><?=gettext("block (disabled)");?></td> <td> </td> <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_reject_d.gif" width="11" height="11"></td> - <td nowrap>reject (disabled)</td> + <td nowrap><?=gettext("reject (disabled)");?></td> <td> </td> <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_log_d.gif" width="11" height="11"></td> - <td nowrap>log (disabled)</td> + <td nowrap><?=gettext("log (disabled)");?></td> </tr> <tr> <td colspan="10"> <p> - <strong><span class="red">Hint:<br> - </span></strong>Rules are evaluated on a first-match basis (i.e. - the action of the first rule to match a packet will be executed). - This means that if you use block rules, you'll have to pay attention - to the rule order. Everything that isn't explicitly passed is blocked - by default.</p> + <strong><span class="red"><?=gettext("Hint:");?><br> + </span></strong><?=gettext("Rules are evaluated on a first-match basis (i.e.". + "the action of the first rule to match a packet will be executed).". + "This means that if you use block rules, you'll have to pay attention". + "to the rule order. Everything that isn't explicitly passed is blocked". + "by default.");?></p> </td> </tr> </table> |