Revision addc0439
Added by Renato Botelho almost 15 years ago
etc/inc/auth.inc | ||
---|---|---|
930 | 930 |
/* Iterate through the user containers for search */ |
931 | 931 |
foreach ($ldac_splits as $i => $ldac_split) { |
932 | 932 |
/* Make sure we just use the first user we find */ |
933 |
log_error(sprintf(gettext("Now Searching in server %1$s, container %2$s with filter %3$s."), $ldapname, $ldac_split, $ldapfilter));
|
|
933 |
log_error(sprintf(gettext('Now Searching in server %1$s, container %2$s with filter %3$s.'), $ldapname, $ldac_split, $ldapfilter));
|
|
934 | 934 |
if ($ldapscope == "one") |
935 | 935 |
$ldapfunc = "ldap_list"; |
936 | 936 |
else |
... | ... | |
963 | 963 |
|
964 | 964 |
/* Now lets bind as the user we found */ |
965 | 965 |
if (!($res = @ldap_bind($ldap, $userdn, $passwd))) { |
966 |
log_error(sprintf(gettext("ERROR! Could not login to server %1$s as user %2$s."), $ldapname, $username));
|
|
966 |
log_error(sprintf(gettext('ERROR! Could not login to server %1$s as user %2$s.'), $ldapname, $username));
|
|
967 | 967 |
@ldap_unbind($ldap); |
968 | 968 |
return false; |
969 | 969 |
} |
970 | 970 |
|
971 |
log_error(sprintf(gettext("Logged in successfully as %1$s via LDAP server %2$s with DN = %3$s."), $username, $ldapname, $userdn));
|
|
971 |
log_error(sprintf(gettext('Logged in successfully as %1$s via LDAP server %2$s with DN = %3$s.'), $username, $ldapname, $userdn));
|
|
972 | 972 |
|
973 | 973 |
/* At this point we are bound to LDAP so the user was auth'd okay. Close connection. */ |
974 | 974 |
@ldap_unbind($ldap); |
... | ... | |
1147 | 1147 |
$_SESSION['Logged_In'] = "True"; |
1148 | 1148 |
$_SESSION['Username'] = $_POST['usernamefld']; |
1149 | 1149 |
$_SESSION['last_access'] = time(); |
1150 |
log_error(sprintf(gettext("Successful login for user '%1$s' from: %2$s"), $_POST['usernamefld'], $_SERVER['REMOTE_ADDR']));
|
|
1150 |
log_error(sprintf(gettext("Successful login for user '%1\$s' from: %2\$s"), $_POST['usernamefld'], $_SERVER['REMOTE_ADDR']));
|
|
1151 | 1151 |
$HTTP_SERVER_VARS['AUTH_USER'] = $_SESSION['Username']; |
1152 | 1152 |
if (isset($_POST['postafterlogin'])) |
1153 | 1153 |
return true; |
... | ... | |
1160 | 1160 |
} else { |
1161 | 1161 |
/* give the user an error message */ |
1162 | 1162 |
$_SESSION['Login_Error'] = gettext("Username or Password incorrect"); |
1163 |
log_error(sprintf(gettext("Login attempt with user: '%1$s' from: '%2$s' failed."), $_POST['usernamefld'], $_SERVER['REMOTE_ADDR']));
|
|
1163 |
log_error(sprintf(gettext("Login attempt with user: '%1\$s' from: '%2\$s' failed."), $_POST['usernamefld'], $_SERVER['REMOTE_ADDR']));
|
|
1164 | 1164 |
if(isAjax()) { |
1165 | 1165 |
echo "showajaxmessage('{$_SESSION['Login_Error']}');"; |
1166 | 1166 |
return; |
... | ... | |
1200 | 1200 |
if (isset($_GET['logout'])) { |
1201 | 1201 |
|
1202 | 1202 |
if ($_SESSION['Logout']) |
1203 |
log_error(sprintf(gettext("Session timed out for user '%1$s' from: %2$s"), $_SESSION['Username'], $_SERVER['REMOTE_ADDR']));
|
|
1203 |
log_error(sprintf(gettext("Session timed out for user '%1\$s' from: %2\$s"), $_SESSION['Username'], $_SERVER['REMOTE_ADDR']));
|
|
1204 | 1204 |
else |
1205 |
log_error(sprintf(gettext("User logged out for user '%1$s' from: %2$s"), $_SESSION['Username'], $_SERVER['REMOTE_ADDR']));
|
|
1205 |
log_error(sprintf(gettext("User logged out for user '%1\$s' from: %2\$s"), $_SESSION['Username'], $_SERVER['REMOTE_ADDR']));
|
|
1206 | 1206 |
|
1207 | 1207 |
/* wipe out $_SESSION */ |
1208 | 1208 |
$_SESSION = array(); |
etc/inc/authgui.inc | ||
---|---|---|
88 | 88 |
global $config, $g; |
89 | 89 |
$g['theme'] = $config['theme']; |
90 | 90 |
if(isAjax()) { |
91 |
printf(gettext("Error: %1$s Description: %2$s"), $http_code, $desc);
|
|
91 |
printf(gettext('Error: %1$s Description: %2$s'), $http_code, $desc);
|
|
92 | 92 |
return; |
93 | 93 |
} |
94 | 94 |
|
etc/inc/cmd_chain.inc | ||
---|---|---|
98 | 98 |
$ignore_return_text = $cmd['ignore_return_text']; |
99 | 99 |
// Should we perform verbose debugging? |
100 | 100 |
if($this->is_debugging == true) { |
101 |
log_error(sprintf(gettext("CmdCHAIN is executing -> %1$s - %2$s"), $cmd_title, $command));
|
|
101 |
log_error(sprintf(gettext('CmdCHAIN is executing -> %1$s - %2$s'), $cmd_title, $command));
|
|
102 | 102 |
usleep(100); // give network stack time to deliver network syslog message |
103 | 103 |
} |
104 | 104 |
// Execute command |
... | ... | |
106 | 106 |
if($this->ignore_return_text == true) |
107 | 107 |
continue; |
108 | 108 |
if(intval($status) <> 0) { |
109 |
log_error(sprintf(gettext("%s failed with return code -> %1$s. The command was %2$s"), $cmd_title, $status, $command));
|
|
109 |
log_error(sprintf(gettext('%1$s failed with return code -> %2$s. The command was %3$s'), $cmd_title, $status, $command));
|
|
110 | 110 |
if($this->halt_on_errors == true) |
111 |
return(sprintf(gettext("%s failed with return code -> %1$s. The command was %2$s"), $cmd_title, $status, $command));
|
|
111 |
return(sprintf(gettext('%1$s failed with return code -> %2$s. The command was %3$s'), $cmd_title, $status, $command));
|
|
112 | 112 |
} |
113 | 113 |
} |
114 | 114 |
return; |
etc/inc/config.lib.inc | ||
---|---|---|
201 | 201 |
conf_mount_rw(); |
202 | 202 |
unlink_if_exists("{$g['tmp_path']}/config.cache"); |
203 | 203 |
copy("$file","/cf/conf/config.xml"); |
204 |
log_error(sprintf(gettext("%1$s is restoring the configuration %2$s"), $g['product_name'], $file));
|
|
205 |
file_notice("config.xml", sprintf(gettext("%1$s is restoring the configuration %2$s"), $g['product_name'], $file), "pfSenseConfigurator", "");
|
|
204 |
log_error(sprintf(gettext('%1$s is restoring the configuration %2$s'), $g['product_name'], $file));
|
|
205 |
file_notice("config.xml", sprintf(gettext('%1$s is restoring the configuration %2$s'), $g['product_name'], $file), "pfSenseConfigurator", "");
|
|
206 | 206 |
conf_mount_ro(); |
207 | 207 |
} |
208 | 208 |
} |
... | ... | |
404 | 404 |
log_error(sprintf(gettext("Ended Configuration upgrade at %s"), $now)); |
405 | 405 |
|
406 | 406 |
if ($prev_version != $config['version']) |
407 |
write_config(sprintf(gettext("Upgraded config version level from %1$s to %2$s"), $prev_version, $config['version']));
|
|
407 |
write_config(sprintf(gettext('Upgraded config version level from %1$s to %2$s'), $prev_version, $config['version']));
|
|
408 | 408 |
|
409 | 409 |
if($g['booting']) |
410 | 410 |
echo gettext("Loading new configuration..."); |
... | ... | |
640 | 640 |
|
641 | 641 |
while ($data = fread($fp, 4096)) { |
642 | 642 |
if (!xml_parse($xml_parser, $data, feof($fp))) { |
643 |
$xmlerr = sprintf(gettext("%1$s at line %2$d"),
|
|
643 |
$xmlerr = sprintf(gettext('%1$s at line %2$d'),
|
|
644 | 644 |
xml_error_string(xml_get_error_code($xml_parser)), |
645 | 645 |
xml_get_current_line_number($xml_parser)); |
646 | 646 |
return false; |
etc/inc/filter.inc | ||
---|---|---|
323 | 323 |
$line_number = $line_error[1]; |
324 | 324 |
$line_split = file("{$g['tmp_path']}/rules.debug"); |
325 | 325 |
if(is_array($line_split)) |
326 |
$line_error = sprintf(gettext("The line in question reads [%1$d]: %2$s"), $line_number, $line_split[$line_number-1]);
|
|
326 |
$line_error = sprintf(gettext('The line in question reads [%1$d]: %2$s'), $line_number, $line_split[$line_number-1]);
|
|
327 | 327 |
if($line_error and $line_number) { |
328 |
$error_msg = sprintf(gettext("There were error(s) loading the rules: %1$s - %2$s"), $rules_error, $line_error);
|
|
328 |
$error_msg = sprintf(gettext('There were error(s) loading the rules: %1$s - %2$s'), $rules_error, $line_error);
|
|
329 | 329 |
file_notice("filter_load", $error_msg, "Filter Reload", ""); |
330 | 330 |
log_error($error_msg); |
331 | 331 |
update_filter_reload_status($error_msg); |
... | ... | |
612 | 612 |
$gatewayip = $member['gwip']; |
613 | 613 |
if (($int <> "") && is_ipaddr($gatewayip)) { |
614 | 614 |
if ($g['debug']) |
615 |
log_error(sprintf(gettext("Setting up route with %1$s on %2$s"), $gatewayip, $int));
|
|
615 |
log_error(sprintf(gettext('Setting up route with %1$s on %2$s'), $gatewayip, $int));
|
|
616 | 616 |
if ($member['weight'] > 1) { |
617 | 617 |
$routeto .= str_repeat("( {$int} {$gatewayip} ) ", $member['weight']); |
618 | 618 |
} else |
... | ... | |
1285 | 1285 |
} |
1286 | 1286 |
if($numberofnathosts > 0): |
1287 | 1287 |
foreach ($FilterIflist as $if => $ifcfg) { |
1288 |
update_filter_reload_status(sprintf(gettext("Creating outbound rules %1$s - (%2$s)"), $if, $ifcfg['descr']));
|
|
1288 |
update_filter_reload_status(sprintf(gettext('Creating outbound rules %1$s - (%2$s)'), $if, $ifcfg['descr']));
|
|
1289 | 1289 |
if(interface_has_gateway($if)) { |
1290 | 1290 |
$target = $ifcfg['ip']; |
1291 | 1291 |
/* create outbound nat entries for all local networks */ |
... | ... | |
2701 | 2701 |
$rules = ""; |
2702 | 2702 |
$files = glob("/usr/local/pkg/*.inc"); |
2703 | 2703 |
foreach($files as $pkg_inc) { |
2704 |
update_filter_reload_status(sprintf(gettext("Checking for %1$s PF hooks in package %2$s"), $ruletype, $pkg_inc));
|
|
2704 |
update_filter_reload_status(sprintf(gettext('Checking for %1$s PF hooks in package %2$s'), $ruletype, $pkg_inc));
|
|
2705 | 2705 |
require_once($pkg_inc); |
2706 | 2706 |
$pkg = basename($pkg_inc, ".inc"); |
2707 | 2707 |
$pkg_generate_rules = "{$pkg}_generate_rules"; |
2708 | 2708 |
if(function_exists($pkg_generate_rules)) { |
2709 |
update_filter_reload_status(sprintf(gettext("Processing early %1$s rules for package %2$s"), $ruletype, $pkg_inc));
|
|
2709 |
update_filter_reload_status(sprintf(gettext('Processing early %1$s rules for package %2$s'), $ruletype, $pkg_inc));
|
|
2710 | 2710 |
$tmprules = $pkg_generate_rules("$ruletype"); |
2711 | 2711 |
file_put_contents("{$g['tmp_path']}/rules.test.packages", $aliases . $tmprules); |
2712 | 2712 |
$status = mwexec("/sbin/pfctl -nf {$g['tmp_path']}/rules.test.packages"); |
etc/inc/filter_log.inc | ||
---|---|---|
203 | 203 |
$service = getservbyport($port, $proto); |
204 | 204 |
$portstr = ""; |
205 | 205 |
if ($service) { |
206 |
$portstr = sprintf(gettext("<span title=\"Service %1$s/%2$s: %3$s\">%4$s</span>"), $port, $proto, $service, htmlspecialchars($port));
|
|
206 |
$portstr = sprintf('<span title="' . gettext('Service %1$s/%2$s: %3$s') . '">' . htmlspecialchars($port) . '</span>', $port, $proto, $service);
|
|
207 | 207 |
} else { |
208 | 208 |
$portstr = htmlspecialchars($port); |
209 | 209 |
} |
etc/inc/gwlb.inc | ||
---|---|---|
452 | 452 |
} |
453 | 453 |
} |
454 | 454 |
if($changed && $current_gw) |
455 |
write_config(sprintf(gettext("Updating gateway group gateway for %1$s - new gateway is %2$s"), $interfac, $current_gw));
|
|
455 |
write_config(sprintf(gettext('Updating gateway group gateway for %1$s - new gateway is %2$s'), $interfac, $current_gw));
|
|
456 | 456 |
} |
457 | 457 |
|
458 | 458 |
function lookup_gateway_ip_by_name($name) { |
etc/inc/interfaces.inc | ||
---|---|---|
1113 | 1113 |
*/ |
1114 | 1114 |
} |
1115 | 1115 |
if(!is_ipaddr($gateways[$pid])){ |
1116 |
log_error(sprintf(gettext("Could not get a PPTP/L2TP Remote IP address from %1$s for %2$s in interfaces_ppps_configure."), $dhcp_gateway, $gway));
|
|
1116 |
log_error(sprintf(gettext('Could not get a PPTP/L2TP Remote IP address from %1$s for %2$s in interfaces_ppps_configure.'), $dhcp_gateway, $gway));
|
|
1117 | 1117 |
return 0; |
1118 | 1118 |
} |
1119 | 1119 |
break; |
... | ... | |
1737 | 1737 |
if($vip['password'] != "") |
1738 | 1738 |
$password = " pass \"" . $vip_password . "\""; |
1739 | 1739 |
|
1740 |
log_error(sprintf(gettext("Found carpdev interface %1$s on top of interface %2$s"), $vip['interface'], $interface));
|
|
1740 |
log_error(sprintf(gettext('Found carpdev interface %1$s on top of interface %2$s'), $vip['interface'], $interface));
|
|
1741 | 1741 |
if (empty($vip['interface'])) |
1742 | 1742 |
return; |
1743 | 1743 |
|
... | ... | |
1853 | 1853 |
// example: wlan2 |
1854 | 1854 |
exec("/sbin/ifconfig wlan create wlandev {$baseif} {$mode} bssid 2>&1", $out, $ret); |
1855 | 1855 |
if($ret <> 0) { |
1856 |
log_error(sprintf(gettext("Failed to clone interface %1$s with error code %2$s, output %3$s"), $baseif, $ret, $out[0]));
|
|
1856 |
log_error(sprintf(gettext('Failed to clone interface %1$s with error code %2$s, output %3$s'), $baseif, $ret, $out[0]));
|
|
1857 | 1857 |
return false; |
1858 | 1858 |
} |
1859 | 1859 |
$newif = trim($out[0]); |
... | ... | |
2397 | 2397 |
" link " . escapeshellarg($random_mac)); |
2398 | 2398 |
$wancfg['spoofmac'] = $random_mac; |
2399 | 2399 |
write_config(); |
2400 |
file_notice("MAC Address altered", sprintf(gettext("The INVALID MAC address (ff:ff:ff:ff:ff:ff) on interface %1$s has been automatically replaced with %2$s"), $realif, $random_mac), "Interfaces");
|
|
2400 |
file_notice("MAC Address altered", sprintf(gettext('The INVALID MAC address (ff:ff:ff:ff:ff:ff) on interface %1$s has been automatically replaced with %2$s'), $realif, $random_mac), "Interfaces");
|
|
2401 | 2401 |
} |
2402 | 2402 |
} |
2403 | 2403 |
|
etc/inc/meta.inc | ||
---|---|---|
129 | 129 |
$tagend = substr($fdata, $tagend_off + 4, $tagend_len - 4); |
130 | 130 |
|
131 | 131 |
if ($tagbeg != $tagend) { |
132 |
printf(gettext("error: tag mismatch ( %1$s != %2$s ) in '%3$s'%4$s"), $tagbeg, $tagend, $fpath, "\n");
|
|
132 |
printf(gettext("error: tag mismatch ( %1\$s != %2\$s ) in '%3\$s'%4\$s"), $tagbeg, $tagend, $fpath, "\n");
|
|
133 | 133 |
break; |
134 | 134 |
} |
135 | 135 |
|
... | ... | |
140 | 140 |
$mdata = substr($fdata, $mdata_off, $mdata_len); |
141 | 141 |
|
142 | 142 |
if (!strlen($mdata)) { |
143 |
printf(gettext("warning: tag %1$s has no data in '%2$s'%3$s"), $tagbeg, $fpath, "\n");
|
|
143 |
printf(gettext("warning: tag %1\$s has no data in '%2\$s'%3\$s"), $tagbeg, $fpath, "\n");
|
|
144 | 144 |
break; |
145 | 145 |
} |
146 | 146 |
|
... | ... | |
160 | 160 |
|
161 | 161 |
$valtag = stripos($line, "##|*"); |
162 | 162 |
if ($valtag === false || $valtag) { |
163 |
printf(gettext("warning: tag %1$s has malformed data in '%2$s'%3$s"), $tagbeg, $fpath, "\n");
|
|
163 |
printf(gettext("warning: tag %1\$s has malformed data in '%2\$s'%3\$s"), $tagbeg, $fpath, "\n");
|
|
164 | 164 |
continue; |
165 | 165 |
} |
166 | 166 |
|
... | ... | |
182 | 182 |
} |
183 | 183 |
|
184 | 184 |
if (!isset($vname) || !isset($vdata)) { |
185 |
printf(gettext("warning: tag %1$s has invalid data in '%2$s'%3$s"), $tagbeg, $fpath, "\n");
|
|
185 |
printf(gettext("warning: tag %1\$s has invalid data in '%2\$s'%3\$s"), $tagbeg, $fpath, "\n");
|
|
186 | 186 |
continue; |
187 | 187 |
} |
188 | 188 |
|
etc/inc/notices.inc | ||
---|---|---|
326 | 326 |
log_error(sprintf(gettext("Message sent to %s OK"), $to)); |
327 | 327 |
return; |
328 | 328 |
} else { |
329 |
log_error(sprintf(gettext("Could not send the message to %1$s -- Error: %2$s"), $to, $smtp->error));
|
|
330 |
return(sprintf(gettext("Could not send the message to %1$s -- Error: %2$s"), $to, $smtp->error));
|
|
329 |
log_error(sprintf(gettext('Could not send the message to %1$s -- Error: %2$s'), $to, $smtp->error));
|
|
330 |
return(sprintf(gettext('Could not send the message to %1$s -- Error: %2$s'), $to, $smtp->error));
|
|
331 | 331 |
} |
332 | 332 |
|
333 | 333 |
} |
etc/inc/pfsense-utils.inc | ||
---|---|---|
483 | 483 |
$s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); |
484 | 484 |
if ($s == false) { |
485 | 485 |
log_error(gettext("Error creating socket!")); |
486 |
log_error(sprintf(gettext("Error code is '%1$s' - %2$s"), socket_last_error($s), socket_strerror(socket_last_error($s))));
|
|
486 |
log_error(sprintf(gettext("Error code is '%1\$s' - %2\$s"), socket_last_error($s), socket_strerror(socket_last_error($s))));
|
|
487 | 487 |
} else { |
488 | 488 |
// setting a broadcast option to socket: |
489 | 489 |
$opt_ret = socket_set_option($s, 1, 6, TRUE); |
... | ... | |
491 | 491 |
log_error(sprintf(gettext("setsockopt() failed, error: %s"), strerror($opt_ret))); |
492 | 492 |
$e = socket_sendto($s, $msg, strlen($msg), 0, $addr, 2050); |
493 | 493 |
socket_close($s); |
494 |
log_error(sprintf(gettext("Magic Packet sent (%1$s) to {%2$s} MAC=%3$s"), $e, $addr, $mac));
|
|
494 |
log_error(sprintf(gettext('Magic Packet sent (%1$s) to {%2$s} MAC=%3$s'), $e, $addr, $mac));
|
|
495 | 495 |
return true; |
496 | 496 |
} |
497 | 497 |
|
... | ... | |
737 | 737 |
log_error(sprintf(gettext("XMLRPC communication error: %s"), $cli->errstr)); |
738 | 738 |
return false; |
739 | 739 |
} elseif($resp->faultCode()) { |
740 |
log_error(sprintf(gettext("XMLRPC request failed with error %1$s: %2$s"), $resp->faultCode(), $resp->faultString()));
|
|
740 |
log_error(sprintf(gettext('XMLRPC request failed with error %1$s: %2$s'), $resp->faultCode(), $resp->faultString()));
|
|
741 | 741 |
return false; |
742 | 742 |
} else { |
743 | 743 |
return XML_RPC_Decode($resp->value()); |
... | ... | |
1402 | 1402 |
|
1403 | 1403 |
if(trim($oldcontents) != trim($contents)) { |
1404 | 1404 |
if($g['debug']) { |
1405 |
log_error(sprintf(gettext("DNSCACHE: Found old IP %1$s and new IP %2$s"), $oldcontents, $contents));
|
|
1405 |
log_error(sprintf(gettext('DNSCACHE: Found old IP %1$s and new IP %2$s'), $oldcontents, $contents));
|
|
1406 | 1406 |
} |
1407 | 1407 |
return ($oldcontents); |
1408 | 1408 |
} else { |
... | ... | |
1573 | 1573 |
for ($i = 0; isset($config["$section"]["$subsection"][$i]["$fielda"]); $i++) { |
1574 | 1574 |
if($debug) fwrite($fd, "$i\n"); |
1575 | 1575 |
if($config["$section"]["$subsection"][$i]["$fielda"]["$fieldb"] == $origname) { |
1576 |
if($debug) fwrite($fd, sprintf(gettext("Setting old alias value %1$s to %2$s%3$s"), $origname, $new_alias_name, "\n"));
|
|
1576 |
if($debug) fwrite($fd, sprintf(gettext('Setting old alias value %1$s to %2$s%3$s'), $origname, $new_alias_name, "\n"));
|
|
1577 | 1577 |
$config["$section"]["$subsection"][$i]["$fielda"]["$fieldb"] = $new_alias_name; |
1578 | 1578 |
} |
1579 | 1579 |
} |
... | ... | |
1582 | 1582 |
for ($i = 0; isset($config["$section"]["$subsection"][$i]["$fielda"]); $i++) { |
1583 | 1583 |
if($config["$section"]["$subsection"][$i]["$fielda"] == $origname) { |
1584 | 1584 |
$config["$section"]["$subsection"][$i]["$fielda"] = $new_alias_name; |
1585 |
if($debug) fwrite($fd, sprintf(gettext("Setting old alias value %1$s to %2$s%3$s"), $origname, $new_alias_name, "\n"));
|
|
1585 |
if($debug) fwrite($fd, sprintf(gettext('Setting old alias value %1$s to %2$s%3$s'), $origname, $new_alias_name, "\n"));
|
|
1586 | 1586 |
} |
1587 | 1587 |
} |
1588 | 1588 |
} |
etc/inc/pkg-utils.inc | ||
---|---|---|
236 | 236 |
|
237 | 237 |
$package =& $config['installedpackages']['package'][$pkg_id]; |
238 | 238 |
if(!file_exists("/usr/local/pkg/" . $package['configurationfile'])) { |
239 |
log_error(sprintf(gettext("The %1$s package is missing required dependencies and must be reinstalled. %2$s"), $package['name'], $package['configurationfile']));
|
|
239 |
log_error(sprintf(gettext('The %1$s package is missing required dependencies and must be reinstalled. %2$s'), $package['name'], $package['configurationfile']));
|
|
240 | 240 |
uninstall_package_from_name($package['name']); |
241 | 241 |
install_package($package['name']); |
242 | 242 |
return; |
... | ... | |
662 | 662 |
fwrite($fd_log, print_r($tarout, true) . "\n"); |
663 | 663 |
} |
664 | 664 |
if($pkg_chmod <> "") { |
665 |
fwrite($fd_log, sprintf(gettext("Changing file mode to %1$s for %2$s%3$s%4$s"), $pkg_chmod, $prefix, $filename, "\n"));
|
|
665 |
fwrite($fd_log, sprintf(gettext('Changing file mode to %1$s for %2$s%3$s%4$s'), $pkg_chmod, $prefix, $filename, "\n"));
|
|
666 | 666 |
@chmod($prefix . $filename, $pkg_chmod); |
667 | 667 |
system("/bin/chmod {$pkg_chmod} {$prefix}{$filename}"); |
668 | 668 |
} |
etc/inc/rrd.inc | ||
---|---|---|
42 | 42 |
exec("$rrdtool dump {$rrddatabase} {$xmldumpfile} 2>&1", $dumpout, $dumpret); |
43 | 43 |
if ($dumpret <> 0) { |
44 | 44 |
$dumpout = implode(" ", $dumpout); |
45 |
log_error(sprintf(gettext("RRD dump failed exited with %1$s, the error is: %2$s"), $dumpret, $dumpout));
|
|
45 |
log_error(sprintf(gettext('RRD dump failed exited with %1$s, the error is: %2$s'), $dumpret, $dumpout));
|
|
46 | 46 |
} |
47 | 47 |
return($dumpret); |
48 | 48 |
} |
... | ... | |
53 | 53 |
exec("$rrdcreatecmd 2>&1", $rrdcreateoutput, $rrdcreatereturn); |
54 | 54 |
if ($rrdcreatereturn <> 0) { |
55 | 55 |
$rrdcreateoutput = implode(" ", $rrdcreateoutput); |
56 |
log_error(sprintf(gettext("RRD create failed exited with %1$s, the error is: %2$s"), $rrdcreatereturn, $rrdcreateoutput));
|
|
56 |
log_error(sprintf(gettext('RRD create failed exited with %1$s, the error is: %2$s'), $rrdcreatereturn, $rrdcreateoutput));
|
|
57 | 57 |
} |
58 | 58 |
return $rrdcreatereturn; |
59 | 59 |
} |
... | ... | |
67 | 67 |
$numdsold = count($rrdoldxml['ds']); |
68 | 68 |
$numrranew = count($rrdnewxml['rra']); |
69 | 69 |
$numdsnew = count($rrdnewxml['ds']); |
70 |
log_error(sprintf(gettext("Import RRD has %1$s DS values and %2$s RRA databases, new format RRD has %3$s DS values and %4$s RRA databases"), $numdsold, $numrraold, $numdsnew ,$numrranew));
|
|
70 |
log_error(sprintf(gettext('Import RRD has %1$s DS values and %2$s RRA databases, new format RRD has %3$s DS values and %4$s RRA databases'), $numdsold, $numrraold, $numdsnew ,$numrranew));
|
|
71 | 71 |
|
72 | 72 |
/* add data sources not found in the old array from the new array */ |
73 | 73 |
$i = 0; |
... | ... | |
151 | 151 |
|
152 | 152 |
$numrranew = count($rrdoldxml['rra']); |
153 | 153 |
$numdsnew = count($rrdoldxml['ds']); |
154 |
log_error(sprintf(gettext("The new RRD now has %1$s DS values and %2$s RRA databases"), $numdsnew, $numrranew));
|
|
154 |
log_error(sprintf(gettext('The new RRD now has %1$s DS values and %2$s RRA databases'), $numdsnew, $numrranew));
|
|
155 | 155 |
return $rrdoldxml; |
156 | 156 |
} |
157 | 157 |
|
... | ... | |
238 | 238 |
exec("cd /;LANG=C /usr/bin/tar -xzf {$g['cf_conf_path']}/rrd.tgz 2>&1", $rrdrestore, $rrdreturn); |
239 | 239 |
$rrdrestore = implode(" ", $rrdrestore); |
240 | 240 |
if($rrdreturn <> 0) { |
241 |
log_error(sprintf(gettext("RRD restore failed exited with %1$s, the error is: %2$s%3$s"), $rrdreturn, $rrdrestore, "\n"));
|
|
241 |
log_error(sprintf(gettext('RRD restore failed exited with %1$s, the error is: %2$s%3$s'), $rrdreturn, $rrdrestore, "\n"));
|
|
242 | 242 |
} |
243 | 243 |
} |
244 | 244 |
} |
etc/inc/services.inc | ||
---|---|---|
94 | 94 |
exec("cd /;LANG=C /usr/bin/tar -xzf {$g['cf_conf_path']}/dhcpleases.tgz 2>&1", $dhcprestore, $dhcpreturn); |
95 | 95 |
$dhcprestore = implode(" ", $dhcprestore); |
96 | 96 |
if($dhcpreturn <> 0) { |
97 |
log_error(sprintf(gettext("DHCP leases restore failed exited with %1$s, the error is: %2$s%3$s"), $dhcpreturn, $dhcprestore, "\n"));
|
|
97 |
log_error(sprintf(gettext('DHCP leases restore failed exited with %1$s, the error is: %2$s%3$s'), $dhcpreturn, $dhcprestore, "\n"));
|
|
98 | 98 |
} |
99 | 99 |
} |
100 | 100 |
} |
etc/inc/smtp.inc | ||
---|---|---|
236 | 236 |
&& !strcmp(@gethostbyname($this->exclude_address),$ip)) |
237 | 237 |
return(sprintf(gettext("domain \"%s\" resolved to an address excluded to be valid"), $domain)); |
238 | 238 |
if($this->debug) |
239 |
$this->OutputDebug(sprintf(gettext("Connecting to host address \"%1$s\" port %2$s..."), $ip, $port));
|
|
239 |
$this->OutputDebug(sprintf(gettext('Connecting to host address "%1$s" port %2$s...'), $ip, $port));
|
|
240 | 240 |
if(($this->connection=($this->timeout ? @fsockopen(($this->ssl ? "ssl://" : "").$ip,$port,$errno,$error,$this->timeout) : @fsockopen(($this->ssl ? "ssl://" : "").$ip,$port)))) |
241 | 241 |
return(""); |
242 | 242 |
$error=($this->timeout ? strval($error) : "??"); |
... | ... | |
253 | 253 |
case "-7": |
254 | 254 |
return(gettext("-7 setvbuf() call failed")); |
255 | 255 |
} |
256 |
return(sprintf(gettext("could not connect to the host \"%1$s\": %2$s"), $domain, $error));
|
|
256 |
return(sprintf(gettext('could not connect to the host "%1$s": %2$s'), $domain, $error));
|
|
257 | 257 |
} |
258 | 258 |
|
259 | 259 |
Function SASLAuthenticate($mechanisms, $credentials, &$authenticated, &$mechanism) |
... | ... | |
286 | 286 |
case SASL_NOMECH: |
287 | 287 |
if(strlen($this->authentication_mechanism)) |
288 | 288 |
{ |
289 |
$this->error=printf(gettext("authenticated mechanism %1$s may not be used: %2$s"), $this->authentication_mechanism, $sasl->error);
|
|
289 |
$this->error=printf(gettext('authenticated mechanism %1$s may not be used: %2$s'), $this->authentication_mechanism, $sasl->error);
|
|
290 | 290 |
return(0); |
291 | 291 |
} |
292 | 292 |
break; |
etc/inc/system.inc | ||
---|---|---|
362 | 362 |
if(isset($route_arr['default'])) { |
363 | 363 |
$action = "change"; |
364 | 364 |
} |
365 |
log_error(sprintf(gettext("ROUTING: %1$s default route to %2$s"), $action, $gatewayip));
|
|
365 |
log_error(sprintf(gettext('ROUTING: %1$s default route to %2$s'), $action, $gatewayip));
|
|
366 | 366 |
mwexec("/sbin/route {$action} default " . escapeshellarg($gatewayip)); |
367 | 367 |
} |
368 | 368 |
} |
etc/inc/util.inc | ||
---|---|---|
783 | 783 |
$mute = false; |
784 | 784 |
if(($retval <> 0) && ($mute === false)) { |
785 | 785 |
$output = implode(" ", $oarr); |
786 |
log_error(sprintf(gettext("The command '%1$s' returned exit code '%2$d', the output was '%3$s' "), $command, $retval, $output));
|
|
786 |
log_error(sprintf(gettext("The command '%1\$s' returned exit code '%2\$d', the output was '%3\$s' "), $command, $retval, $output));
|
|
787 | 787 |
} |
788 | 788 |
return $retval; |
789 | 789 |
} |
etc/inc/voucher.inc | ||
---|---|---|
153 | 153 |
list($timestamp,$minutes) = explode(",", $line); |
154 | 154 |
// we have an already active voucher here. |
155 | 155 |
$remaining = intval((($timestamp + 60*$minutes) - time())/60); |
156 |
$test_result[] = sprintf(gettext("%1$s (%2$s/%3$s) active and good for %4$d Minutes"), $voucher, $roll, $nr, $remaining);
|
|
156 |
$test_result[] = sprintf(gettext('%1$s (%2$s/%3$s) active and good for %4$d Minutes'), $voucher, $roll, $nr, $remaining);
|
|
157 | 157 |
$total_minutes += $remaining; |
158 | 158 |
} else { |
159 | 159 |
// voucher not used. Check if ticket Id is on the roll (not too high) |
... | ... | |
164 | 164 |
$pos = $nr >> 3; // divide by 8 -> octet |
165 | 165 |
$mask = 1 << ($nr % 8); |
166 | 166 |
if (ord($bitstring[$roll][$pos]) & $mask) { |
167 |
$test_result[] = sprintf(gettext("%1$s (%2$s/%3$s) already used and expired"), $voucher, $roll, $nr);
|
|
167 |
$test_result[] = sprintf(gettext('%1$s (%2$s/%3$s) already used and expired'), $voucher, $roll, $nr);
|
|
168 | 168 |
$total_minutes = -1; // voucher expired |
169 | 169 |
$error++; |
170 | 170 |
} else { |
171 | 171 |
// mark bit for this voucher as used |
172 | 172 |
$bitstring[$roll][$pos] = chr(ord($bitstring[$roll][$pos]) | $mask); |
173 |
$test_result[] = sprintf(gettext("%1$s (%2$s/%3$) good for %4$d Minutes"), $voucher, $roll, $nr, $minutes_per_roll[$roll]);
|
|
173 |
$test_result[] = sprintf(gettext('%1$s (%2$s/%3$) good for %4$d Minutes'), $voucher, $roll, $nr, $minutes_per_roll[$roll]);
|
|
174 | 174 |
$total_minutes += $minutes_per_roll[$roll]; |
175 | 175 |
} |
176 | 176 |
} |
177 | 177 |
} else { |
178 |
$test_result[] = sprintf(gettext("%1$s (%2$s/%3$s): not found on any registererd Roll"), $voucher, $roll, $nr);
|
|
178 |
$test_result[] = sprintf(gettext('%1$s (%2$s/%3$s): not found on any registererd Roll'), $voucher, $roll, $nr);
|
|
179 | 179 |
} |
180 | 180 |
} else { |
181 | 181 |
// hmm, thats weird ... not what I expected |
... | ... | |
339 | 339 |
fwrite($fd, $vdb . "\n"); |
340 | 340 |
fclose($fd); |
341 | 341 |
} else { |
342 |
voucher_log(LOG_ERR, sprintf(gettext("cant write %1$s/voucher_used_%2$s.db"), $g['vardb_path'], $roll));
|
|
342 |
voucher_log(LOG_ERR, sprintf(gettext('cant write %1$s/voucher_used_%2$s.db'), $g['vardb_path'], $roll));
|
|
343 | 343 |
} |
344 | 344 |
} |
345 | 345 |
|
... | ... | |
418 | 418 |
$vdb = trim(fgets($fd)); |
419 | 419 |
fclose($fd); |
420 | 420 |
} else { |
421 |
voucher_log(LOG_ERR, sprintf(gettext("cant read %1$s/voucher_used_%2$s.db"), $g['vardb_path'], $roll));
|
|
421 |
voucher_log(LOG_ERR, sprintf(gettext('cant read %1$s/voucher_used_%2$s.db'), $g['vardb_path'], $roll));
|
|
422 | 422 |
} |
423 | 423 |
} |
424 | 424 |
return base64_decode($vdb); |
etc/inc/vpn.inc | ||
---|---|---|
839 | 839 |
if(is_ipaddr($gatewayip)) { |
840 | 840 |
/* FIXME: does adding route-to and reply-to on the in/outbound |
841 | 841 |
* rules fix this? smos@ 13-01-2009 */ |
842 |
log_error(sprintf(gettext("IPSEC interface is not WAN but %1$s, adding static route for VPN endpoint %2$s via %3$s"), $parentinterface, $rgip, $gatewayip));
|
|
842 |
log_error(sprintf(gettext('IPSEC interface is not WAN but %1$s, adding static route for VPN endpoint %2$s via %3$s'), $parentinterface, $rgip, $gatewayip));
|
|
843 | 843 |
mwexec("/sbin/route delete -host {$rgip}"); |
844 | 844 |
mwexec("/sbin/route add -host {$rgip} {$gatewayip}"); |
845 | 845 |
} |
... | ... | |
1650 | 1650 |
} |
1651 | 1651 |
|
1652 | 1652 |
if((!is_ipaddr($old_ep)) || (! is_ipaddr($ep))) { |
1653 |
log_error(sprintf(gettext("IPSEC: ERROR: One of the endpoints is not a IP address. Old EP '%1$s' new EP '%2$s'"), $old_ep, $ep));
|
|
1653 |
log_error(sprintf(gettext("IPSEC: ERROR: One of the endpoints is not a IP address. Old EP '%1\$s' new EP '%2\$s'"), $old_ep, $ep));
|
|
1654 | 1654 |
} |
1655 | 1655 |
if((! is_ipaddr($rgip)) || (! is_ipaddr($old_gw))) { |
1656 |
log_error(sprintf(gettext("IPSEC: ERROR: One of the remote endpoints is not a IP address. Old RG '%1$s' new RG '%2$s'"), $old_gw, $rgip));
|
|
1656 |
log_error(sprintf(gettext("IPSEC: ERROR: One of the remote endpoints is not a IP address. Old RG '%1\$s' new RG '%2\$s'"), $old_gw, $rgip));
|
|
1657 | 1657 |
} |
1658 | 1658 |
|
1659 | 1659 |
$spdconf = ""; |
... | ... | |
1699 | 1699 |
"{$phase2['protocol']}/tunnel/{$rgip}-" . |
1700 | 1700 |
"{$ep}/unique;\n"; |
1701 | 1701 |
|
1702 |
log_error(sprintf(gettext("Reloading IPsec tunnel '%1$s'. Previous IP '%2$s', current IP '%3$s'. Reloading policy"), $phase1['descr'], $old_gw, $rgip));
|
|
1702 |
log_error(sprintf(gettext("Reloading IPsec tunnel '%1\$s'. Previous IP '%2\$s', current IP '%3\$s'. Reloading policy"), $phase1['descr'], $old_gw, $rgip));
|
|
1703 | 1703 |
|
1704 | 1704 |
$now = time(); |
1705 | 1705 |
$spdfile = tempnam("{$g['tmp_path']}", "spd.conf.reload.{$now}."); |
etc/inc/xmlparse.inc | ||
---|---|---|
82 | 82 |
|
83 | 83 |
} else if (isset($ptr)) { |
84 | 84 |
/* multiple entries not allowed for this element, bail out */ |
85 |
die(sprintf(gettext("XML error: %1$s at line %2$d cannot occur more than once") . "\n",
|
|
85 |
die(sprintf(gettext('XML error: %1$s at line %2$d cannot occur more than once') . "\n",
|
|
86 | 86 |
$name, |
87 | 87 |
xml_get_current_line_number($parser))); |
88 | 88 |
} |
... | ... | |
179 | 179 |
|
180 | 180 |
while ($data = fread($fp, 4096)) { |
181 | 181 |
if (!xml_parse($xml_parser, $data, feof($fp))) { |
182 |
log_error(sprintf(gettext("XML error: %1$s at line %2$d") . "\n",
|
|
182 |
log_error(sprintf(gettext('XML error: %1$s at line %2$d') . "\n",
|
|
183 | 183 |
xml_error_string(xml_get_error_code($xml_parser)), |
184 | 184 |
xml_get_current_line_number($xml_parser))); |
185 | 185 |
return -1; |
etc/inc/xmlparse_attr.inc | ||
---|---|---|
75 | 75 |
|
76 | 76 |
} else if (isset($ptr)) { |
77 | 77 |
/* multiple entries not allowed for this element, bail out */ |
78 |
die(sprintf(gettext("XML error: %1$s at line %2$d cannot occur more than once") . "\n",
|
|
78 |
die(sprintf(gettext('XML error: %1$s at line %2$d cannot occur more than once') . "\n",
|
|
79 | 79 |
$name, |
80 | 80 |
xml_get_current_line_number($parser))); |
81 | 81 |
} else if (isset($writeattrs)) { |
... | ... | |
194 | 194 |
|
195 | 195 |
while ($data = fread($fp, 4096)) { |
196 | 196 |
if (!xml_parse($xml_parser, $data, feof($fp))) { |
197 |
log_error(sprintf(gettext("XML error: %1$s at line %2$d") . "\n",
|
|
197 |
log_error(sprintf(gettext('XML error: %1$s at line %2$d') . "\n",
|
|
198 | 198 |
xml_error_string(xml_get_error_code($xml_parser)), |
199 | 199 |
xml_get_current_line_number($xml_parser))); |
200 | 200 |
if (isset($parsed_attributes)) { |
etc/inc/xmlrpc_client.inc | ||
---|---|---|
303 | 303 |
if (!in_array($XML_RPC_xh[$parser]['stack'][0], $XML_RPC_valid_parents[$name])) { |
304 | 304 |
$name = $GLOBALS['XML_RPC_func_ereg_replace']('[^a-zA-Z0-9._-]', '', $name); |
305 | 305 |
$XML_RPC_xh[$parser]['isf'] = 2; |
306 |
$XML_RPC_xh[$parser]['isf_reason'] = sprintf(gettext("xmlrpc element %1$s cannot be child of %2$s"), $name, $XML_RPC_xh[$parser]['stack'][0]);
|
|
306 |
$XML_RPC_xh[$parser]['isf_reason'] = sprintf(gettext('xmlrpc element %1$s cannot be child of %2$s'), $name, $XML_RPC_xh[$parser]['stack'][0]);
|
|
307 | 307 |
return; |
308 | 308 |
} |
309 | 309 |
} |
Also available in: Unified diff
Fix quotes to use %N$X on gettext calls