summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-08-11 22:18:34 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-08-11 22:18:34 -0600
commitddc55e124418ff8b417a4353afcc5a814af4041d (patch)
tree6e4988855444d56ad77e7b562d0ee052c2117f19 /usr/local
parente36c52f4c0cc9819f7fd6ed6daa3e0f36d57bba5 (diff)
downloadpfsense-ddc55e124418ff8b417a4353afcc5a814af4041d.zip
pfsense-ddc55e124418ff8b417a4353afcc5a814af4041d.tar.gz
Modify various (s)printf format strings to allow translations to change the order of the inserted strings.
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/diag_confbak.php4
-rw-r--r--usr/local/www/diag_logs_filter_summary.php2
-rwxr-xr-xusr/local/www/diag_logs_vpn.php2
-rwxr-xr-xusr/local/www/diag_pkglogs.php2
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php4
-rwxr-xr-xusr/local/www/firewall_nat_out.php4
-rwxr-xr-xusr/local/www/interfaces_assign.php8
-rw-r--r--usr/local/www/interfaces_wireless_edit.php2
-rwxr-xr-xusr/local/www/pkg_mgr.php2
-rw-r--r--usr/local/www/services_captiveportal_vouchers_edit.php2
-rwxr-xr-xusr/local/www/services_wol.php6
-rw-r--r--usr/local/www/status_rrd_graph_img.php2
-rwxr-xr-xusr/local/www/system_firmware_check.php2
-rw-r--r--usr/local/www/vpn_ipsec_phase1.php2
14 files changed, 22 insertions, 22 deletions
diff --git a/usr/local/www/diag_confbak.php b/usr/local/www/diag_confbak.php
index 8c3ff7d..ec1f100 100755
--- a/usr/local/www/diag_confbak.php
+++ b/usr/local/www/diag_confbak.php
@@ -46,7 +46,7 @@ if($_GET['newver'] != "") {
$confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache'));
if(config_restore($g['conf_path'] . '/backup/config-' . $_GET['newver'] . '.xml') == 0)
- $savemsg = sprintf(gettext("Successfully reverted to timestamp %s with description \"%s\"."), date(gettext("n/j/y H:i:s"), $_GET['newver']), $confvers[$_GET['newver']]['description']);
+ $savemsg = sprintf(gettext('Successfully reverted to timestamp %1$s with description "%2$s".'), date(gettext("n/j/y H:i:s"), $_GET['newver']), $confvers[$_GET['newver']]['description']);
else
$savemsg = gettext("Unable to revert to the selected configuration.");
conf_mount_ro();
@@ -56,7 +56,7 @@ if($_GET['rmver'] != "") {
conf_mount_rw();
$confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache'));
unlink_if_exists($g['conf_path'] . '/backup/config-' . $_GET['rmver'] . '.xml');
- $savemsg = sprintf(gettext("Deleted backup with timestamp %s and description \"%s\"."), date(gettext("n/j/y H:i:s"), $_GET['rmver']),$confvers[$_GET['rmver']]['description']);
+ $savemsg = sprintf(gettext('Deleted backup with timestamp %1$s and description "%2$s".'), date(gettext("n/j/y H:i:s"), $_GET['rmver']),$confvers[$_GET['rmver']]['description']);
conf_mount_ro();
}
diff --git a/usr/local/www/diag_logs_filter_summary.php b/usr/local/www/diag_logs_filter_summary.php
index 1171b89..96a2ecd 100644
--- a/usr/local/www/diag_logs_filter_summary.php
+++ b/usr/local/www/diag_logs_filter_summary.php
@@ -204,7 +204,7 @@ include("head.inc"); ?>
</td></tr>
<tr><td align="center">
-<?php printf (gettext("This is a firewall log summary, of the last %s lines of the firewall log (Max %s)."), $gotlines, $lines)?><br />
+<?php printf (gettext('This is a firewall log summary, of the last %1$s lines of the firewall log (Max %2$s).'), $gotlines, $lines)?><br />
<?=gettext("NOTE: IE8 users must enable compatibility view.")?>
<?php
diff --git a/usr/local/www/diag_logs_vpn.php b/usr/local/www/diag_logs_vpn.php
index 2af0ea3..8c36eb0 100755
--- a/usr/local/www/diag_logs_vpn.php
+++ b/usr/local/www/diag_logs_vpn.php
@@ -131,7 +131,7 @@ include("head.inc");
</td></tr>
<tr>
<td colspan="4" class="listtopic">
- <?php printf(gettext("Last %s %s VPN log entries"),$nentries,$vpns[$vpntype]);?></td>
+ <?php printf(gettext('Last %1$s %2$s VPN log entries'),$nentries,$vpns[$vpntype]);?></td>
</tr>
<tr>
<td class="listhdrr"><?=gettext("Time");?></td>
diff --git a/usr/local/www/diag_pkglogs.php b/usr/local/www/diag_pkglogs.php
index bf7be9e..9fb2b8f 100755
--- a/usr/local/www/diag_pkglogs.php
+++ b/usr/local/www/diag_pkglogs.php
@@ -112,7 +112,7 @@ include("head.inc");
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" class="listtopic">
- <?php printf(gettext("Last %s %s log entries"),$nentries,$curtab); ?></td>
+ <?php printf(gettext('Last %1$s %2$s log entries'),$nentries,$curtab); ?></td>
</tr>
<?php
$package =& $config['installedpackages']['package'][$apkgid];
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index b0ae4a3..a6411bc 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -260,7 +260,7 @@ if ($_POST) {
if (!is_ipaddr($_POST["address{$x}"])
&& !is_hostname($_POST["address{$x}"])
&& !is_iprange($_POST["address{$x}"]))
- $input_errors[] = sprintf(gettext("%s is not a valid %s alias."), $_POST["address{$x}"], $_POST['type']);
+ $input_errors[] = sprintf(gettext('%1$s is not a valid %2$s alias.'), $_POST["address{$x}"], $_POST['type']);
}
if (is_iprange($_POST["address{$x}"])) {
list($startip, $endip) = explode('-', $_POST["address{$x}"]);
@@ -279,7 +279,7 @@ if ($_POST) {
}
}
if ($wrongaliases <> "")
- $input_errors[] = sprintf(gettext("The alias(es): %s %scannot be nested because they are not of the same type."), $wrongaliases, " \n");
+ $input_errors[] = sprintf(gettext('The alias(es): %1$s %2$scannot be nested because they are not of the same type.'), $wrongaliases, " \n");
}
if (!$input_errors) {
diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php
index d387385..ae72e07 100755
--- a/usr/local/www/firewall_nat_out.php
+++ b/usr/local/www/firewall_nat_out.php
@@ -108,7 +108,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = "{$osn}/{$ossubnet}";
$natent['dstport'] = "500";
- $natent['descr'] = sprintf(gettext("Auto created rule for ISAKMP - %s to %s"),$ifdesc,$ifdesc2);
+ $natent['descr'] = sprintf(gettext('Auto created rule for ISAKMP - %1$s to %2$s'),$ifdesc,$ifdesc2);
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
@@ -118,7 +118,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = "{$osn}/{$ossubnet}";
$natent['sourceport'] = "";
- $natent['descr'] = sprintf(gettext("Auto created rule for %s to %s"),$ifdesc,$ifdesc2);
+ $natent['descr'] = sprintf(gettext('Auto created rule for %1$s to %2$s'),$ifdesc,$ifdesc2);
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php
index a67934f..565245b 100755
--- a/usr/local/www/interfaces_assign.php
+++ b/usr/local/www/interfaces_assign.php
@@ -182,9 +182,9 @@ if ($_POST['apply']) {
/* Deliver error message for any port with more than one assignment */
foreach ($portifmap as $portname => $ifnames) {
if (count($ifnames) > 1) {
- $errstr = sprintf(gettext("Port %s ".
- " was assigned to %s" .
- " interfaces:"), $portname, count($ifnames));
+ $errstr = sprintf(gettext('Port %1$s '.
+ ' was assigned to %2$s' .
+ ' interfaces:'), $portname, count($ifnames));
foreach ($portifmap[$portname] as $ifn)
$errstr .= " " . $ifn;
@@ -429,7 +429,7 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed"))
<?php foreach ($portlist as $portname => $portinfo): ?>
<option value="<?=$portname;?>" <?php if ($portname == $iface['if']) echo " selected";?>>
<?php if ($portinfo['isvlan']) {
- $descr = sprintf(gettext("VLAN %s on %s"),$portinfo['tag'],$portinfo['if']);
+ $descr = sprintf(gettext('VLAN %1$s on %2$s'),$portinfo['tag'],$portinfo['if']);
if ($portinfo['descr'])
$descr .= " (" . $portinfo['descr'] . ")";
echo htmlspecialchars($descr);
diff --git a/usr/local/www/interfaces_wireless_edit.php b/usr/local/www/interfaces_wireless_edit.php
index 4108413..c5c511a 100644
--- a/usr/local/www/interfaces_wireless_edit.php
+++ b/usr/local/www/interfaces_wireless_edit.php
@@ -120,7 +120,7 @@ if ($_POST) {
}
if (!$input_errors) {
if (!interface_wireless_clone($clone['cloneif'], $clone)) {
- $input_errors[] = sprintf(gettext("Error creating interface with mode %s. The %s interface may not support creating more clones with the selected mode."), $wlan_modes[$clone['mode']], $clone['if']);
+ $input_errors[] = sprintf(gettext('Error creating interface with mode %1$s. The %2$s interface may not support creating more clones with the selected mode.'), $wlan_modes[$clone['mode']], $clone['if']);
} else {
if (isset($id) && $a_clones[$id]) {
if ($clone['if'] != $a_clones[$id]['if'])
diff --git a/usr/local/www/pkg_mgr.php b/usr/local/www/pkg_mgr.php
index efdc085..7500489 100755
--- a/usr/local/www/pkg_mgr.php
+++ b/usr/local/www/pkg_mgr.php
@@ -57,7 +57,7 @@ if($pkg_info) {
$savemsg = sprintf(gettext("Unable to retrieve package info from %s. Cached data will be used."), $xmlrpc_base_url);
$pkg_info = unserialize(@file_get_contents("{$g['tmp_path']}/pkg_info.cache"));
} else {
- $savemsg = sprintf(gettext("Unable to communicate with %s. Please verify DNS and interface configuration, and that %s has functional Internet connectivity."), $xmlrpc_base_url, $g['product_name']);
+ $savemsg = sprintf(gettext('Unable to communicate with %1$s. Please verify DNS and interface configuration, and that %2$s has functional Internet connectivity.'), $xmlrpc_base_url, $g['product_name']);
}
}
diff --git a/usr/local/www/services_captiveportal_vouchers_edit.php b/usr/local/www/services_captiveportal_vouchers_edit.php
index bd9ad73..96e563f 100644
--- a/usr/local/www/services_captiveportal_vouchers_edit.php
+++ b/usr/local/www/services_captiveportal_vouchers_edit.php
@@ -116,7 +116,7 @@ if ($_POST) {
$rollent['active'] = array();
voucher_write_used_db($rollent['number'], $rollent['used']);
voucher_write_active_db($rollent['number'], array()); // create empty DB
- voucher_log(LOG_INFO,sprintf(gettext("All %s vouchers from Roll %s marked unused"), $rollent['count'], $rollent['number']));
+ voucher_log(LOG_INFO,sprintf(gettext('All %1$s vouchers from Roll %2$s marked unused'), $rollent['count'], $rollent['number']));
} else {
// existing roll has been modified but without changing the count
// read active and used DB from ramdisk and store it in XML config
diff --git a/usr/local/www/services_wol.php b/usr/local/www/services_wol.php
index b798e39..d13dbfa 100755
--- a/usr/local/www/services_wol.php
+++ b/usr/local/www/services_wol.php
@@ -58,10 +58,10 @@ if($_GET['wakeall'] <> "") {
get_interface_subnet($if));
/* Execute wol command and check return code. */
if(!mwexec("/usr/local/bin/wol -i {$bcip} {$mac}")){
- $savemsg .= sprintf(gettext("Sent magic packet to %s (%s)%s"),$mac, $description, ".<br>");
+ $savemsg .= sprintf(gettext('Sent magic packet to %1$s (%2$s)%3$s'),$mac, $description, ".<br>");
}
else {
- $savemsg .= sprintf(gettext("Please check the %ssystem log%s, the wol command for %s (%s) did not complete successfully%s"),'<a href=\"/diag_logs.php\">','</a>',$description,$mac,".<br>");
+ $savemsg .= sprintf(gettext('Please check the %1$ssystem log%2$s, the wol command for %3$s (%4$s) did not complete successfully%5$s'),'<a href=\"/diag_logs.php\">','</a>',$description,$mac,".<br>");
}
}
}
@@ -96,7 +96,7 @@ if ($_POST || $_GET['mac']) {
$savemsg .= sprintf(gettext("Sent magic packet to %s."),$mac);
}
else {
- $savemsg .= sprintf(gettext("Please check the %ssystem log%s, the wol command for %s did not complete successfully%s"),'<a href=\"/diag_logs.php\">', '</a>', $mac, ".<br>");
+ $savemsg .= sprintf(gettext('Please check the %1$ssystem log%2$s, the wol command for %3$s did not complete successfully%4$s'),'<a href=\"/diag_logs.php\">', '</a>', $mac, ".<br>");
}
}
}
diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php
index 6414a9c..4e7b887 100644
--- a/usr/local/www/status_rrd_graph_img.php
+++ b/usr/local/www/status_rrd_graph_img.php
@@ -930,7 +930,7 @@ if (file_exists("$rrdtmppath$curdatabase-$curgraph.png")) {
usleep(500);
}
if(($graphcmdreturn <> 0) || (! $data)) {
- log_error(sprintf(gettext("Failed to create graph with error code %s, the error is: %s"),$graphcmdreturn,$graphcmdoutput));
+ log_error(sprintf(gettext('Failed to create graph with error code %1$s, the error is: %2$s'),$graphcmdreturn,$graphcmdoutput));
if(strstr($curdatabase, "queues")) {
log_error(sprintf(gettext("failed to create graph from %s%s, removing database"),$rrddbpath,$curdatabase));
exec("/bin/rm -f $rrddbpath$curif$queues");
diff --git a/usr/local/www/system_firmware_check.php b/usr/local/www/system_firmware_check.php
index 8057a3c..cb80b6a 100755
--- a/usr/local/www/system_firmware_check.php
+++ b/usr/local/www/system_firmware_check.php
@@ -139,7 +139,7 @@ if (!$remote_version) {
if(isset($curcfg['alturl']['enable']))
$static_text .= gettext("Could not contact custom update server.") . "\\n";
else
- $static_text .= sprintf(gettext("Could not contact %s update server %s%s"), $g['product_name'], $updater_url, "\\n");
+ $static_text .= sprintf(gettext('Could not contact %1$s update server %2$s%3$s'), $g['product_name'], $updater_url, "\\n");
} else {
$static_text .= gettext("Obtaining current version information...");
update_output_window($static_text);
diff --git a/usr/local/www/vpn_ipsec_phase1.php b/usr/local/www/vpn_ipsec_phase1.php
index b72891c..b549ea0 100644
--- a/usr/local/www/vpn_ipsec_phase1.php
+++ b/usr/local/www/vpn_ipsec_phase1.php
@@ -163,7 +163,7 @@ if ($_POST) {
if ($p1index <> $t) {
$tremotegw = $pconfig['remotegw'];
if (($ph1tmp['remote-gateway'] == $tremotegw) && !isset($ph1tmp['disabled'])) {
- $input_errors[] = sprintf(gettext("The remote gateway \"%s\" is already used by phase1 \"${ph1tmp['descr']}\"."), $tremotegw);
+ $input_errors[] = sprintf(gettext('The remote gateway "%1$s" is already used by phase1 "%2$s".'), $tremotegw, $ph1tmp['descr']);
}
}
$t++;
OpenPOWER on IntegriCloud