summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorSteve Beaver <sbeaver@netgate.com>2017-02-03 10:49:19 -0500
committerSteve Beaver <sbeaver@netgate.com>2017-02-03 10:49:19 -0500
commit4ebcee2400a9542663e78960f5f4305902c87a70 (patch)
tree8f8b630fd3a1caf8db4749459bb25895a4eb6a2b /src/usr
parent4b329613ee7bb2dc85dd72035709853b83061a58 (diff)
downloadpfsense-4ebcee2400a9542663e78960f5f4305902c87a70.zip
pfsense-4ebcee2400a9542663e78960f5f4305902c87a70.tar.gz
Several more fixes for setHelp to assist with translation
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/diag_confbak.php2
-rw-r--r--src/usr/local/www/firewall_rules_edit.php2
-rw-r--r--src/usr/local/www/firewall_schedule_edit.php13
-rw-r--r--src/usr/local/www/firewall_virtual_ip_edit.php2
-rw-r--r--src/usr/local/www/services_captiveportal_vouchers_edit.php4
-rw-r--r--src/usr/local/www/services_ntpd_acls.php4
-rw-r--r--src/usr/local/www/system_gateways_edit.php7
-rw-r--r--src/usr/local/www/system_update_settings.php4
8 files changed, 21 insertions, 17 deletions
diff --git a/src/usr/local/www/diag_confbak.php b/src/usr/local/www/diag_confbak.php
index 9ef862c..b8175fb 100644
--- a/src/usr/local/www/diag_confbak.php
+++ b/src/usr/local/www/diag_confbak.php
@@ -158,7 +158,7 @@ $section->addInput(new Form_Input(
'Backup Count',
'number',
$config['system']['backupcount']
-))->setHelp('Maximum number of old configurations to keep in the cache, 0 for no backups, or leave blank for the default value (' . $g['default_config_backup_count'] . ' for the current platform).');
+))->setHelp('Maximum number of old configurations to keep in the cache, 0 for no backups, or leave blank for the default value (%s for the current platform).', $g['default_config_backup_count']);
$space = exec("/usr/bin/du -sh /conf/backup | /usr/bin/awk '{print $1;}'");
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
index 46d009a..f2d5eef 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -1303,7 +1303,7 @@ $group->add(new Form_Select(
((isset($pconfig['icmptype']) && strlen($pconfig['icmptype']) > 0) ? explode(',', $pconfig['icmptype']) : 'any'),
isset($icmplookup[$pconfig['ipprotocol']]) ? $icmplookup[$pconfig['ipprotocol']]['icmptypes'] : array('any' => gettext('any')),
true
-))->setHelp('<div id="icmptype_help">' . (isset($icmplookup[$pconfig['ipprotocol']]) ? $icmplookup[$pconfig['ipprotocol']]['helpmsg'] : '') . '</div>');
+))->setHelp('%s', '<div id="icmptype_help">' . (isset($icmplookup[$pconfig['ipprotocol']]) ? $icmplookup[$pconfig['ipprotocol']]['helpmsg'] : '') . '</div>');
$group->addClass('icmptype_section');
$section->add($group);
diff --git a/src/usr/local/www/firewall_schedule_edit.php b/src/usr/local/www/firewall_schedule_edit.php
index 7ace758..9b56d40 100644
--- a/src/usr/local/www/firewall_schedule_edit.php
+++ b/src/usr/local/www/firewall_schedule_edit.php
@@ -358,8 +358,11 @@ $input = new Form_Input(
$pconfig['name']
);
-$input->setHelp((is_schedule_inuse($pconfig['name']) != true) ? 'The name of the schedule may only consist of the characters "a-z, A-Z, 0-9 and _".':
- 'This schedule is in use so the name may not be modified!');
+if (is_schedule_inuse($pconfig['name']) != true) {
+ $input->setHelp('The name of the schedule may only consist of the characters "a-z, A-Z, 0-9 and _".');
+} else {
+ $input->setHelp('This schedule is in use so the name may not be modified!');
+}
if (is_schedule_inuse($pconfig['name']) == true) {
$input->setReadonly();
@@ -700,7 +703,7 @@ function repeatExistingDays() {
tempstr = 'w' + week + 'p' + daypos;
daycell = eval('document.getElementById(tempstr)');
if (daydone == "-1") {
- if ($("#"+tempstr).hasClass("bg-info")) {
+ if ($("#"+tempstr).hasClass("bg-info")) {
daytogglerepeating(week,daypos,true);
} else {
daytogglerepeating(week,daypos,false);
@@ -764,11 +767,11 @@ function daytoggle(id) {
var daycell = document.getElementById(idmod);
if (daycell != null) {
- if ($("#"+idmod).hasClass("bg-success")) {
+ if ($("#"+idmod).hasClass("bg-success")) {
$("#"+idmod).removeClass("bg-success");
str = id + ",";
daysSelected = daysSelected.replace(str, "");
- } else if ($("#"+idmod).hasClass("bg-info")) {
+ } else if ($("#"+idmod).hasClass("bg-info")) {
daytogglerepeating(week,daypos,true);
} else { //color is white cell
if (!runrepeat) {
diff --git a/src/usr/local/www/firewall_virtual_ip_edit.php b/src/usr/local/www/firewall_virtual_ip_edit.php
index f428ee1..eb99142 100644
--- a/src/usr/local/www/firewall_virtual_ip_edit.php
+++ b/src/usr/local/www/firewall_virtual_ip_edit.php
@@ -378,7 +378,7 @@ $section->addInput(new Form_IpAddress(
'subnet',
'*Address(es)',
$pconfig['subnet']
-))->addMask('subnet_bits', $pconfig['subnet_bits'])->setHelp('<span id="address_note"></span>');
+))->addMask('subnet_bits', $pconfig['subnet_bits'])->setHelp('%s', '<span id="address_note"></span>');
$section->addInput(new Form_Checkbox(
'noexpand',
diff --git a/src/usr/local/www/services_captiveportal_vouchers_edit.php b/src/usr/local/www/services_captiveportal_vouchers_edit.php
index 87afc48..07792a6 100644
--- a/src/usr/local/www/services_captiveportal_vouchers_edit.php
+++ b/src/usr/local/www/services_captiveportal_vouchers_edit.php
@@ -185,7 +185,7 @@ $section->addInput(new Form_Input(
'*Roll #',
'text',
$pconfig['number']
-))->setHelp('Enter the Roll# (0..%d) found on top of the generated/printed vouchers', [$maxnumber]);
+))->setHelp('Enter the Roll# (0..%d) found on top of the generated/printed vouchers', $maxnumber);
$section->addInput(new Form_Input(
'minutes',
@@ -199,7 +199,7 @@ $section->addInput(new Form_Input(
'*Count',
'text',
$pconfig['count']
-))->setHelp('Enter the number of vouchers (1..%d) found on top of the generated/printed vouchers. WARNING: Changing this number for an existing Roll will mark all vouchers as unused again', [$maxcount]);
+))->setHelp('Enter the number of vouchers (1..%d) found on top of the generated/printed vouchers. WARNING: Changing this number for an existing Roll will mark all vouchers as unused again', $maxcount);
$section->addInput(new Form_Input(
'descr',
diff --git a/src/usr/local/www/services_ntpd_acls.php b/src/usr/local/www/services_ntpd_acls.php
index 9c0db87..291b65a 100644
--- a/src/usr/local/www/services_ntpd_acls.php
+++ b/src/usr/local/www/services_ntpd_acls.php
@@ -235,11 +235,13 @@ $counter = 0;
foreach ($networkacl as $item) {
$group = new Form_Group($counter == 0 ? 'Networks':'');
+ $helptext = ($counter == $numrows) ? gettext('Network/mask'):"";
+
$group->add(new Form_IpAddress(
'acl_network' . $counter,
null,
$item['acl_network']
- ))->addMask('mask' . $counter, $item['mask'])->setWidth(3)->setHelp(($counter == $numrows) ? 'Network/mask':null);
+ ))->addMask('mask' . $counter, $item['mask'])->setWidth(3)->setHelp($helptext);
$group->add(new Form_Checkbox(
'kod' . $counter,
diff --git a/src/usr/local/www/system_gateways_edit.php b/src/usr/local/www/system_gateways_edit.php
index ef16244..a1f40dd 100644
--- a/src/usr/local/www/system_gateways_edit.php
+++ b/src/usr/local/www/system_gateways_edit.php
@@ -593,8 +593,7 @@ $section->addInput(new Form_Checkbox(
'Disabled',
'Disable this gateway',
$pconfig['disabled']
-))->setHelp('Set this option to disable this gateway without removing it from the '.
- 'list.');
+))->setHelp('Set this option to disable this gateway without removing it from the list.');
$section->addInput(new Form_Select(
'interface',
@@ -770,7 +769,7 @@ $section->addInput(new Form_Input(
'placeholder' => $dpinger_default['interval'],
'max' => 86400
]
-))->setHelp('How often an ICMP probe will be sent in milliseconds. Default is %d.', [$dpinger_default['interval']]);
+))->setHelp('How often an ICMP probe will be sent in milliseconds. Default is %d.', $dpinger_default['interval']);
$section->addInput(new Form_Input(
'loss_interval',
@@ -806,7 +805,7 @@ $group->add(new Form_Input(
]
));
$group->setHelp('Time interval in milliseconds between checking for an alert condition. Default is %d.',
- [$dpinger_default['alert_interval']]);
+ $dpinger_default['alert_interval']);
$section->add($group);
$section->addInput(new Form_StaticText(
diff --git a/src/usr/local/www/system_update_settings.php b/src/usr/local/www/system_update_settings.php
index b1118a7..f29d876 100644
--- a/src/usr/local/www/system_update_settings.php
+++ b/src/usr/local/www/system_update_settings.php
@@ -196,7 +196,7 @@ if (file_exists("/usr/local/bin/git")) {
'Repository URL',
'text',
($gitcfg['repositoryurl'] ? $gitcfg['repositoryurl'] : '')
- ))->setHelp('The most recently used repository was %s. This repository will be used if the field is left blank.', [$lastrepositoryurl]);
+ ))->setHelp('The most recently used repository was %s. This repository will be used if the field is left blank.', $lastrepositoryurl);
if (is_dir("/root/pfsense/pfSenseGITREPO/pfSenseGITREPO")) {
exec("cd /root/pfsense/pfSenseGITREPO/pfSenseGITREPO && git branch", $output_str);
@@ -218,7 +218,7 @@ if (file_exists("/usr/local/bin/git")) {
'text',
($gitcfg['branch'] ? $gitcfg['branch'] : '')
))->setHelp('The most recently used branch was "%s". (Usually the branch name is master)' .
- '<br />Note: Sync will not be performed if a branch is not specified.', [$lastbranch]);
+ '<br />Note: Sync will not be performed if a branch is not specified.', $lastbranch);
$group = new Form_Group('Sync options');
OpenPOWER on IntegriCloud