summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/pkg-utils.inc2
-rw-r--r--etc/inc/radius.inc2
-rw-r--r--etc/inc/voucher.inc2
-rw-r--r--etc/inc/vpn.inc2
-rw-r--r--etc/inc/xmlrpc_client.inc14
-rwxr-xr-xusr/local/www/interfaces.php4
-rw-r--r--usr/local/www/system_crlmanager.php4
-rwxr-xr-xusr/local/www/vpn_pppoe_edit.php4
8 files changed, 17 insertions, 17 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index ecd0f1c..40fb4f1 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -573,7 +573,7 @@ function install_package($package, $pkg_info = "") {
update_output_window($static_output);
if($pkgid == -1) {
$config['installedpackages']['package'][] = $pkg_info;
- $changedesc = gettext("Installed") . $pkg_info['name'] . gettext("package.");
+ $changedesc = sprintf(gettext("Installed %s package."),$pkg_info['name']);
$to_output = gettext("done.") . "\n";
} else {
$config['installedpackages']['package'][$pkgid] = $pkg_info;
diff --git a/etc/inc/radius.inc b/etc/inc/radius.inc
index 2c433d1..5f0a5ea 100644
--- a/etc/inc/radius.inc
+++ b/etc/inc/radius.inc
@@ -421,7 +421,7 @@ class Auth_RADIUS extends PEAR {
return true;
default:
- return $this->raiseError(gettext("Unexpected return value:") . $req);
+ return $this->raiseError(sprintf(gettext("Unexpected return value: %s"),$req));
}
}
diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc
index dc95092..57cc377 100644
--- a/etc/inc/voucher.inc
+++ b/etc/inc/voucher.inc
@@ -632,7 +632,7 @@ function voucher_log($priority, $message) {
define_syslog_variables();
$message = trim($message);
openlog("logportalauth", LOG_PID, LOG_LOCAL4);
- syslog($priority, gettext("Voucher: ") . $message);
+ syslog($priority, sprintf(gettext("Voucher: %s"),$message));
closelog();
}
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 1e6780f..89c1a5e 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -403,7 +403,7 @@ function vpn_ipsec_configure($ipchg = false)
$fn = "{$g['varetc_path']}/racoon.motd";
$fd1 = fopen($fn, "w");
if (!$fd1) {
- printf(gettext("Error: cannot open server %s in vpn.%s"). $fn, "\n");
+ printf(gettext("Error: cannot open server %s in vpn.\n"), $fn);
return 1;
}
diff --git a/etc/inc/xmlrpc_client.inc b/etc/inc/xmlrpc_client.inc
index a192815..3318f2a 100644
--- a/etc/inc/xmlrpc_client.inc
+++ b/etc/inc/xmlrpc_client.inc
@@ -946,15 +946,15 @@ class XML_RPC_Client extends XML_RPC_Base {
* but keep it here for backwards compatibility.
*/
if (!$fp && $this->proxy) {
- $this->raiseError(gettext('Connection to proxy server ')
- . $this->proxy . ':' . $this->proxy_port
- . gettext(' failed. ') . $this->errstr,
+ $this->raiseError(sprintf(gettext('Connection to proxy server
+ %1$s:%2$s failed. %3$s')
+ ,$this->proxy,$this->proxy_port,$this->errstr),
XML_RPC_ERROR_CONNECTION_FAILED);
return 0;
} elseif (!$fp) {
- $this->raiseError(gettext('Connection to RPC server ')
- . $server . ':' . $port
- . gettext(' failed. ') . $this->errstr,
+ $this->raiseError(sprintf(gettext('Connection to RPC server
+ %1$s:%2$s failed. %3$s')
+ ,$server,$port,$this->errstr),
XML_RPC_ERROR_CONNECTION_FAILED);
return 0;
}
@@ -1465,7 +1465,7 @@ class XML_RPC_Message extends XML_RPC_Base
!preg_match('@^HTTP/[0-9\.]+ 10[0-9]([A-Z ]+)?[\r\n]+HTTP/[0-9\.]+ 200@', $data))
{
$errstr = substr($data, 0, strpos($data, "\n") - 1);
- error_log(gettext("HTTP error, got response: ") . $errstr);
+ error_log(sprintf(gettext("HTTP error, got response: %s"),$errstr));
$r = new XML_RPC_Response(0, $XML_RPC_err['http_error'],
$XML_RPC_str['http_error'] . ' (' .
$errstr . ')');
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 95a8313..a62fee5 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -657,7 +657,7 @@ if ($_POST['apply']) {
}
if($skip == false) {
$gateway_item['gateway'] = "dynamic";
- $gateway_item['descr'] = gettext("Interface") . $if . gettext("dynamic gateway");
+ $gateway_item['descr'] = sprintf(gettext("Interface %s dynamic gateway"),$if);
$gateway_item['name'] = "GW_" . strtoupper($if);
$gateway_item['interface'] = "{$if}";
} else {
@@ -1617,7 +1617,7 @@ $types = array("none" => gettext("None"), "staticv4" => gettext("Static IPv4"),
<?php if(is_readable("/var/db/dhcp6c_duid")) {
// $current_duid = file_get_contents("/var/db/dhcp6c_duid");
}
- echo gettext("The current DUID is: '") . $current_duid ."'";
+ printf(gettext("The current DUID is: '%s'"),$current_duid);
?>
</td>
diff --git a/usr/local/www/system_crlmanager.php b/usr/local/www/system_crlmanager.php
index 2ecc866..201d8ab 100644
--- a/usr/local/www/system_crlmanager.php
+++ b/usr/local/www/system_crlmanager.php
@@ -525,11 +525,11 @@ function method_change() {
<td class="list">
<?php if ($cainternal == "YES"): ?>
<a href="system_crlmanager.php?act=new&caref=<?php echo $ca['refid']; ?>">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("Add or Import CRL for ") . $ca['descr'];?>" alt="<?=gettext("add crl");?>" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?php printf(gettext("Add or Import CRL for %s"),$ca['descr']);?>" alt="<?=gettext("add crl");?>" width="17" height="17" border="0" />
</a>
<?php else: ?>
<a href="system_crlmanager.php?act=new&caref=<?php echo $ca['refid']; ?>&importonly=yes">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("Import CRL for ") . $ca['descr'];?>" alt="<?=gettext("add crl");?>" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?php printf(gettext("Import CRL for %s"),$ca['descr']);?>" alt="<?=gettext("add crl");?>" width="17" height="17" border="0" />
</a>
<?php endif; ?>
</td>
diff --git a/usr/local/www/vpn_pppoe_edit.php b/usr/local/www/vpn_pppoe_edit.php
index 6c94797..ea6f5f0 100755
--- a/usr/local/www/vpn_pppoe_edit.php
+++ b/usr/local/www/vpn_pppoe_edit.php
@@ -139,9 +139,9 @@ if ($_POST) {
for($x=0; $x<4999; $x++) {
if ($_POST["username{$x}"]) {
if (empty($_POST["password{$x}"]))
- $input_errors[] = gettext("No password specified for username ") . $_POST["username{$x}"];
+ $input_errors[] = sprintf(gettext("No password specified for username %s"),$_POST["username{$x}"]);
if ($_POST["ip{$x}"] <> "" && !is_ipaddr($_POST["ip{$x}"]))
- $input_errors[] = gettext("Incorrect ip address specified for username ") . $_POST["username{$x}"];
+ $input_errors[] = sprintf(gettext("Incorrect ip address specified for username %s"),$_POST["username{$x}"]);
}
}
}
OpenPOWER on IntegriCloud