summaryrefslogtreecommitdiffstats
path: root/src/usr/local
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-01-21 23:53:25 +0545
committerPhil Davis <phil.davis@inf.org>2016-01-21 23:53:25 +0545
commitf49cd72565cf246c3ce357ad6fc091f198bb811a (patch)
tree4cc7dd5a47ae7612a3fbb1709b0a0edb21d7318b /src/usr/local
parent321a8b9a7e11d24fdbf10ab10d5ddefba85786e3 (diff)
downloadpfsense-f49cd72565cf246c3ce357ad6fc091f198bb811a.zip
pfsense-f49cd72565cf246c3ce357ad6fc091f198bb811a.tar.gz
Internationalization graph guiconfig head index
Diffstat (limited to 'src/usr/local')
-rwxr-xr-xsrc/usr/local/www/graph.php4
-rw-r--r--src/usr/local/www/guiconfig.inc45
-rwxr-xr-xsrc/usr/local/www/head.inc6
-rw-r--r--src/usr/local/www/index.php4
4 files changed, 31 insertions, 28 deletions
diff --git a/src/usr/local/www/graph.php b/src/usr/local/www/graph.php
index 0f3f421..4853114 100755
--- a/src/usr/local/www/graph.php
+++ b/src/usr/local/www/graph.php
@@ -115,7 +115,7 @@ $attribs['error']='fill="blue" font-family="Arial" font-size="4"';
$attribs['collect_initial']='fill="gray" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4"';
//Error text if we cannot fetch data : depends on which method is used
-$error_text = "Cannot get data about interface " . htmlspecialchars($ifnum);
+$error_text = sprintf(gettext("Cannot get data about interface %s"), htmlspecialchars($ifnum));
$height=100; //SVG internal height : do not modify
$width=200; //SVG internal width : do not modify
@@ -144,7 +144,7 @@ print('<?xml version="1.0" encoding="UTF-8"?>' . "\n");?>
<text id="switch_scale" x="<?=$width*0.55?>" y="11" <?=$attribs['switch_scale']?>><?=gettext("AutoScale"); ?> (<?=$scale_type?>)</text>
<text id="date" x="<?=$width*0.33?>" y="5" <?=$attribs['legend']?>> </text>
<text id="time" x="<?=$width*0.33?>" y="11" <?=$attribs['legend']?>> </text>
- <text id="graphlast" x="<?=$width*0.55?>" y="17" <?=$attribs['legend']?>><?=gettext("Graph shows last"); ?> <?=$time_interval*$nb_plot?> <?=gettext("seconds"); ?></text>
+ <text id="graphlast" x="<?=$width*0.55?>" y="17" <?=$attribs['legend']?>><?=sprintf(gettext("Graph shows last %s seconds"), $time_interval*$nb_plot)?></text>
<polygon id="axis_arrow_x" <?=$attribs['axis']?> points="<?=($width) . "," . ($height)?> <?=($width-2) . "," . ($height-2)?> <?=($width-2) . "," . $height?>"/>
<text id="error" x="<?=$width*0.5?>" y="<?=$height*0.5?>" visibility="hidden" <?=$attribs['error']?> text-anchor="middle"><?=$error_text?></text>
<text id="collect_initial" x="<?=$width*0.5?>" y="<?=$height*0.5?>" visibility="hidden" <?=$attribs['collect_initial']?> text-anchor="middle"><?=gettext("Collecting initial data, please wait"); ?>...</text>
diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc
index b97ae0f..b94018b 100644
--- a/src/usr/local/www/guiconfig.inc
+++ b/src/usr/local/www/guiconfig.inc
@@ -151,8 +151,8 @@ $ldap_urltypes = array(
'SSL - Encrypted' => 636);
$ldap_scopes = array(
- 'one' => "One Level",
- 'subtree' => "Entire Subtree");
+ 'one' => gettext("One Level"),
+ 'subtree' => gettext("Entire Subtree"));
$ldap_protvers = array(
2,
@@ -179,9 +179,9 @@ $ldap_templates = array(
'attr_member' => "uniqueMember"));
$radius_srvcs = array(
- 'both' => "Authentication and Accounting",
- 'auth' => "Authentication",
- 'acct' => "Accounting");
+ 'both' => gettext("Authentication and Accounting"),
+ 'auth' => gettext("Authentication"),
+ 'acct' => gettext("Accounting"));
$netbios_nodetypes = array(
'0' => "none",
@@ -240,7 +240,10 @@ $wkports = array(
/* TCP flags */
$tcpflags = array("fin", "syn", "rst", "psh", "ack", "urg", "ece", "cwr");
-$specialnets = array("(self)" => "This Firewall", "pppoe" => "PPPoE clients", "l2tp" => "L2TP clients");
+$specialnets = array(
+ "(self)" => gettext("This Firewall"),
+ "pppoe" => gettext("PPPoE clients"),
+ "l2tp" => gettext("L2TP clients"));
$spiflist = get_configured_interface_with_descr(false, true);
foreach ($spiflist as $ifgui => $ifdesc) {
@@ -249,16 +252,16 @@ foreach ($spiflist as $ifgui => $ifdesc) {
}
$medias = array(
- "auto" => "autoselect",
- "100full" => "100BASE-TX full-duplex",
- "100half" => "100BASE-TX half-duplex",
- "10full" => "10BASE-T full-duplex",
- "10half" => "10BASE-T half-duplex");
+ "auto" => gettext("autoselect"),
+ "100full" => gettext("100BASE-TX full-duplex"),
+ "100half" => gettext("100BASE-TX half-duplex"),
+ "10full" => gettext("10BASE-T full-duplex"),
+ "10half" => gettext("10BASE-T half-duplex"));
$wlan_modes = array(
- "bss" => "Infrastructure (BSS)",
- "adhoc" => "Ad-hoc (IBSS)",
- "hostap" => "Access Point");
+ "bss" => gettext("Infrastructure (BSS)"),
+ "adhoc" => gettext("Ad-hoc (IBSS)"),
+ "hostap" => gettext("Access Point"));
function do_input_validation($postdata, $reqdfields, $reqdfieldsn, &$input_errors) {
@@ -312,7 +315,7 @@ function print_info_box_np($msg, $name="apply", $value="", $showapply=false, $cl
$msg = '<div class="pull-left">' . $msg . '</div>';
if (stristr($msg, gettext("apply")) != false || stristr($msg, gettext("save")) != false || stristr($msg, gettext("create")) != false || $showapply) {
- $msg .= '<form method="post" class="pull-right"><button type="submit" class="btn btn-default" name="'. $name .'" value="'.$value.'">'.$name.'</button>';
+ $msg .= '<form method="post" class="pull-right"><button type="submit" class="btn btn-default" name="'. $name .'" value="' . $value . '">' . $name . '</button>';
if ($_POST['if']) {
$msg .= "<input type=\"hidden\" name=\"if\" value=\"" . htmlspecialchars($_POST['if']) . "\" />";
@@ -320,10 +323,10 @@ function print_info_box_np($msg, $name="apply", $value="", $showapply=false, $cl
$msg .= '</form>';
} else if ($showbtn) {
- $msg = '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>'. $msg;
+ $msg = '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>' . $msg;
}
- echo '<div class="alert ' . $class . ' clearfix" role="alert">'.$msg.'</div>';
+ echo '<div class="alert ' . $class . ' clearfix" role="alert">' . $msg . '</div>';
}
function print_info_box_np_undo($msg, $name = "apply", $value = "Apply changes", $undo) {
@@ -574,9 +577,9 @@ function dump_clog_no_table($logfile, $tail, $withorig = true, $grepfor = "", $g
$grepline .= " | /usr/bin/egrep -v " . escapeshellarg(implode("|", $grepinvert));
}
if (is_dir($logfile)) {
- $logarr = array("File {$logfile} is a directory.");
+ $logarr = array(sprintf(gettext("File %s is a directory."), $logfile));
} elseif (file_exists($logfile) && filesize($logfile) == 0) {
- $logarr = array("Log file started.");
+ $logarr = array(gettext("Log file started."));
} else {
if ($config['system']['disablesyslogclog']) {
exec("cat " . escapeshellarg($logfile) . "{$grepline} | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr);
@@ -625,9 +628,9 @@ function dump_clog($logfile, $tail, $withorig = true, $grepfor = "", $grepinvert
$grepline .= " | /usr/bin/egrep -v " . escapeshellarg(implode("|", $grepinvert));
}
if (is_dir($logfile)) {
- $logarr = array("File {$logfile} is a directory.");
+ $logarr = array(sprintf(gettext("File %s is a directory."), $logfile));
} elseif (file_exists($logfile) && filesize($logfile) == 0) {
- $logarr = array("Log file started.");
+ $logarr = array(gettext("Log file started."));
} else {
if ($config['system']['disablesyslogclog']) {
exec("cat " . escapeshellarg($logfile) . "{$grepline} | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr);
diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc
index cd9e453..c18461f 100755
--- a/src/usr/local/www/head.inc
+++ b/src/usr/local/www/head.inc
@@ -539,7 +539,7 @@ $pgtitle_output = true;
if ($config['remote_managed_pages']['item']) {
foreach ($config['remote_managed_pages']['item'] as $rmp) {
if ($rmp == $_SERVER['SCRIPT_NAME']) {
- print_info_box_np("This page is currently being managed by a remote machine.");
+ print_info_box_np(gettext("This page is currently being managed by a remote machine."));
include("foot.inc");
exit;
}
@@ -558,7 +558,7 @@ if (are_notices_pending()):?>
<span aria-hidden="true">&times;</span>
</button>
- <h3 class="modal-title" id="myModalLabel">Notices</h3>
+ <h3 class="modal-title" id="myModalLabel"><?=gettext("Notices")?></h3>
</div>
<div class="modal-body">
@@ -597,7 +597,7 @@ if (are_notices_pending()):?>
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal"><?=gettext("Close")?></button>
<button type="button" id="clearallnotices" class="btn btn-primary"><?=gettext("Mark all as read")?></button>
</div>
</div>
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php
index e2e792b..b7a0185 100644
--- a/src/usr/local/www/index.php
+++ b/src/usr/local/www/index.php
@@ -107,7 +107,7 @@ if ($g['disablecrashreporter'] != true) {
}
if ($x > 0) {
- $savemsg = "{$g['product_name']} has detected a crash report or programming bug. Click <a href='crash_reporter.php'>here</a> for more information.";
+ $savemsg = sprintf(gettext("%s has detected a crash report or programming bug. Click <a href='crash_reporter.php'>here</a> for more information."), $g['product_name']);
$class = "warning";
}
}
@@ -357,7 +357,7 @@ foreach ($available as $widgetname => $widgetconfig):
<form action="/" method="post" id="widgetSequence_form" name="widgetForm">
<input type="hidden" name="sequence" value="" />
- <button type="submit" id="btnstore" class="btn btn-primary">Store widget configuration</button>
+ <button type="submit" id="btnstore" class="btn btn-primary"><?=gettext("Store widget configuration")?></button>
</form>
</div>
OpenPOWER on IntegriCloud