summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-02-09 16:22:29 +0545
committerPhil Davis <phil.davis@inf.org>2017-02-09 16:22:29 +0545
commit781d9ce43324b73dfbec26220a440c604a26658d (patch)
treed00d4e1bad8ecc312de9c4b32377c3c030a1b420
parentf0136b178022cf3b04a6c3d577d457cf3bc03418 (diff)
downloadpfsense-781d9ce43324b73dfbec26220a440c604a26658d.zip
pfsense-781d9ce43324b73dfbec26220a440c604a26658d.tar.gz
setHelp and gettext for system*
-rw-r--r--src/usr/local/www/system.php4
-rw-r--r--src/usr/local/www/system_advanced_admin.php10
-rw-r--r--src/usr/local/www/system_advanced_firewall.php32
-rw-r--r--src/usr/local/www/system_advanced_misc.php4
-rw-r--r--src/usr/local/www/system_advanced_network.php18
-rw-r--r--src/usr/local/www/system_authservers.php2
-rw-r--r--src/usr/local/www/system_certmanager.php7
-rw-r--r--src/usr/local/www/system_gateway_groups.php6
-rw-r--r--src/usr/local/www/system_hasync.php28
-rw-r--r--src/usr/local/www/system_routes_edit.php4
-rw-r--r--src/usr/local/www/system_update_settings.php14
11 files changed, 63 insertions, 66 deletions
diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php
index 64d843c..d76a5de 100644
--- a/src/usr/local/www/system.php
+++ b/src/usr/local/www/system.php
@@ -546,8 +546,8 @@ $section->addInput(new Form_Select(
'*Timezone',
$pconfig['timezone'],
array_combine($timezonelist, $timezonedesc)
-))->setHelp('Select a geographic region name (Continent/Location) to determine the timezone for the firewall. ' .
- '<br/>Choose a special or "Etc" zone only in cases where the geographic zones do not properly handle the clock offset required for this firewall.');
+))->setHelp('Select a geographic region name (Continent/Location) to determine the timezone for the firewall. %1$s' .
+ 'Choose a special or "Etc" zone only in cases where the geographic zones do not properly handle the clock offset required for this firewall.', '<br/>');
$section->addInput(new Form_Input(
'timeservers',
diff --git a/src/usr/local/www/system_advanced_admin.php b/src/usr/local/www/system_advanced_admin.php
index 232b43f..93e958d 100644
--- a/src/usr/local/www/system_advanced_admin.php
+++ b/src/usr/local/www/system_advanced_admin.php
@@ -402,12 +402,12 @@ $section->addInput(new Form_Checkbox(
'Disable webConfigurator anti-lockout rule',
$pconfig['noantilockout']
))->setHelp('When this is '.
- 'unchecked, access to the webConfigurator on the %s interface is always '.
+ 'unchecked, access to the webConfigurator on the %1$s interface is always '.
'permitted, regardless of the user-defined firewall rule set. Check this box to '.
'disable this automatically added rule, so access to the webConfigurator is '.
'controlled by the user-defined firewall rules (ensure a firewall rule is '.
- 'in place that allows access, to avoid being locked out!) <em>Hint: the &quot;Set interface(s) IP address&quot; '.
- 'option in the console menu resets this setting as well.</em>', $lockout_interface);
+ 'in place that allows access, to avoid being locked out!) %2$sHint: the &quot;Set interface(s) IP address&quot; '.
+ 'option in the console menu resets this setting as well.%3$s', $lockout_interface, '<em>', '</em>');
$section->addInput(new Form_Checkbox(
'nodnsrebindcheck',
@@ -482,8 +482,8 @@ if (!$g['enableserial_force']) {
isset($pconfig['enableserial'])
))->setHelp('Note: This will redirect the console output and messages to '.
'the serial port. The console menu can still be accessed from the internal video '.
- 'card/keyboard. A <b>null modem</b> serial cable or adapter is required to use the '.
- 'serial console.');
+ 'card/keyboard. A %1$snull modem%2$s serial cable or adapter is required to use the '.
+ 'serial console.', '<b>', '</b>');
}
$section->addInput(new Form_Select(
diff --git a/src/usr/local/www/system_advanced_firewall.php b/src/usr/local/www/system_advanced_firewall.php
index 4321298..27a5e23 100644
--- a/src/usr/local/www/system_advanced_firewall.php
+++ b/src/usr/local/www/system_advanced_firewall.php
@@ -425,9 +425,9 @@ $section->addInput(new Form_Checkbox(
'Disable Firewall',
'Disable all packet filtering.',
isset($config['system']['disablefilter'])
-))->setHelp('Note: This converts %s into a routing only platform!<br/>'.
+))->setHelp('Note: This converts %1$s into a routing only platform!%2$s'.
'Note: This will also turn off NAT! To only disable NAT, '.
- 'and not firewall rules, visit the %s page.', $g["product_name"], '<a href="firewall_nat_out.php">Outbound NAT</a>');
+ 'and not firewall rules, visit the %3$sOutbound NAT%4$s page.', $g["product_name"], '<br/>', '<a href="firewall_nat_out.php">', '</a>');
$section->addInput(new Form_Checkbox(
'disablescrub',
@@ -473,9 +473,9 @@ $section->addInput(new Form_Input(
'number',
$pconfig['maximumstates'],
['min' => 1, 'placeholder' => pfsense_default_state_size()]
-))->setHelp('Maximum number of connections to hold in the firewall state table. '.
- '<br/>Note: Leave this blank for the default. On this system the default '.
- 'size is: %d', pfsense_default_state_size());
+))->setHelp('Maximum number of connections to hold in the firewall state table. %1$s'.
+ 'Note: Leave this blank for the default. On this system the default '.
+ 'size is: %2$d', '<br/>', pfsense_default_state_size());
$section->addInput(new Form_Input(
'maximumtableentries',
@@ -484,8 +484,9 @@ $section->addInput(new Form_Input(
$pconfig['maximumtableentries'],
['placeholder' => pfsense_default_table_entries_size()]
))->setHelp('Maximum number of table entries for systems such as aliases, '.
- 'sshlockout, snort, etc, combined.<br/>Note: Leave this blank for the '.
- 'default. On this system the default size is: %d',
+ 'sshlockout, snort, etc, combined.%1$sNote: Leave this blank for the '.
+ 'default. On this system the default size is: %2$d',
+ '<br/>',
pfsense_default_table_entries_size());
$section->addInput(new Form_Input(
@@ -538,8 +539,8 @@ $section->addInput(new Form_Input(
$pconfig['aliasesresolveinterval'],
['placeholder' => '300']
))->setHelp('Interval, in seconds, that will be used to resolve hostnames '.
- 'configured on aliases. <br/>Note: Leave this blank for the default '.
- '(300s).');
+ 'configured on aliases. %1$sNote: Leave this blank for the default '.
+ '(300s).', '<br/>');
$section->addInput(new Form_Checkbox(
'checkaliasesurlcert',
@@ -586,21 +587,22 @@ if (count($config['interfaces']) > 1) {
'proxy' => gettext('NAT + proxy'),
'purenat' => gettext('Pure NAT'),
)
- ))->setHelp('</span><ul class="help-block"><li>The pure NAT mode uses a set of NAT rules to direct '.
+ ))->setHelp('%1$sThe pure NAT mode uses a set of NAT rules to direct '.
'packets to the target of the port forward. It has better scalability, '.
'but it must be possible to accurately determine the interface and '.
'gateway IP used for communication with the target at the time the '.
'rules are loaded. There are no inherent limits to the number of ports '.
'other than the limits of the protocols. All protocols available for '.
- 'port forwards are supported.</li><li>The NAT + proxy mode uses a '.
+ 'port forwards are supported.%2$sThe NAT + proxy mode uses a '.
'helper program to send packets to the target of the port forward. '.
'It is useful in setups where the interface and/or gateway IP used '.
'for communication with the target cannot be accurately determined at '.
'the time the rules are loaded. Reflection rules are not created for '.
'ranges larger than 500 ports and will not be used for more than 1000 '.
'ports total between all port forwards. Only TCP and UDP protocols are '.
- 'supported.</li></ul><span class="help-block">Individual rules may be configured to override '.
- 'this system setting on a per-rule basis.');
+ 'supported.%3$sIndividual rules may be configured to override '.
+ 'this system setting on a per-rule basis.',
+ '</span><ul class="help-block"><li>', '</li><li>', '</li></ul><span class="help-block">');
$section->addInput(new Form_Input(
'reflectiontimeout',
@@ -608,8 +610,8 @@ if (count($config['interfaces']) > 1) {
'number',
$config['system']['reflectiontimeout'],
['min' => 1]
- ))->setHelp('Enter value for Reflection timeout in seconds.<br/>Note: Only '.
- 'applies to Reflection on port forwards in NAT + proxy mode.');
+ ))->setHelp('Enter value for Reflection timeout in seconds.%1$sNote: Only '.
+ 'applies to Reflection on port forwards in NAT + proxy mode.', '<br/>');
$section->addInput(new Form_Checkbox(
'enablebinatreflection',
diff --git a/src/usr/local/www/system_advanced_misc.php b/src/usr/local/www/system_advanced_misc.php
index 9665a6e..ac7e226 100644
--- a/src/usr/local/www/system_advanced_misc.php
+++ b/src/usr/local/www/system_advanced_misc.php
@@ -571,8 +571,8 @@ $section->addInput(new Form_Select(
'Hard disk standby time',
$pconfig['harddiskstandby'],
['' => gettext("Always on")] + array_combine($opts, $vals)
-))->setHelp("Puts the hard disk into standby mode when the selected number of minutes has elapsed since the last access." . "<br />" .
- "<strong> Do not set this for CF cards.</strong>");
+))->setHelp('Puts the hard disk into standby mode when the selected number of minutes has elapsed since the last access.%1$s' .
+ '%2$sDo not set this for CF cards.%3$s', '<br />', '<strong>', '</strong>');
$form->add($section);
diff --git a/src/usr/local/www/system_advanced_network.php b/src/usr/local/www/system_advanced_network.php
index de4bda8..297d82a 100644
--- a/src/usr/local/www/system_advanced_network.php
+++ b/src/usr/local/www/system_advanced_network.php
@@ -190,7 +190,7 @@ $group->add(new Form_Input(
$group->setHelp('These options create an RFC 2893 compatible mechanism for IPv4 NAT encapsulation of IPv6 packets, ' .
'that can be used to tunnel IPv6 packets over IPv4 routing infrastructures. ' .
- 'IPv6 firewall rules are <a href="firewall_rules.php">also required</a>, to control and pass encapsulated traffic.');
+ 'IPv6 firewall rules are %1$salso required%2$s, to control and pass encapsulated traffic.', '<a href="firewall_rules.php">', '</a>');
$section->add($group);
@@ -223,16 +223,12 @@ $btncopyduid = new Form_Button(
$btncopyduid->setAttribute('type','button')->removeClass('btn-primary')->addClass('btn-success btn-sm');
$group->add($btncopyduid);
-$group->setHelp('This is the DHCPv6 Unique Identifier (DUID) used by the firewall when requesting an IPv6 address. ' .
- '<br />' .
+$group->setHelp('This is the DHCPv6 Unique Identifier (DUID) used by the firewall when requesting an IPv6 address. %1$s' .
'By default, the firewall automatically creates a dynamic DUID which is not saved in the firewall configuration. '.
'To ensure the same DUID is retained by the firewall at all times, enter a DUID in this field. ' .
- 'The new DUID will take effect after a reboot or when the WAN interface(s) are reconfigured by the firewall.' .
- '<br />' .
- 'If the firewall is configured to use a RAM disk for /var, the best practice is to store a DUID here otherwise the DUID will change on each reboot.' .
- '<br />' .
- '<br />' .
- 'You may use the Copy DUID button to copy the system detected DUID shown in the placeholder. ');
+ 'The new DUID will take effect after a reboot or when the WAN interface(s) are reconfigured by the firewall.%1$s' .
+ 'If the firewall is configured to use a RAM disk for /var, the best practice is to store a DUID here otherwise the DUID will change on each reboot.%1$s%1$s' .
+ 'You may use the Copy DUID button to copy the system detected DUID shown in the placeholder. ', '<br />');
$section->add($group);
@@ -244,11 +240,11 @@ $section->addInput(new Form_Checkbox(
'Hardware Checksum Offloading',
'Disable hardware checksum offload',
isset($config['system']['disablechecksumoffloading'])
-))->setHelp('Checking this option will disable hardware checksum offloading.<br/>'.
+))->setHelp('Checking this option will disable hardware checksum offloading.%1$s'.
'Checksum offloading is broken in some hardware, particularly some Realtek cards. '.
'Rarely, drivers may have problems with checksum offloading and some specific '.
'NICs. This will take effect after a machine reboot or re-configure of each '.
- 'interface.');
+ 'interface.', '<br/>');
$section->addInput(new Form_Checkbox(
'disablesegmentationoffloading',
diff --git a/src/usr/local/www/system_authservers.php b/src/usr/local/www/system_authservers.php
index 67953c2..7d9e186 100644
--- a/src/usr/local/www/system_authservers.php
+++ b/src/usr/local/www/system_authservers.php
@@ -601,7 +601,7 @@ $group->add(new Form_Input(
$pconfig['ldap_authcn']
))->setHelp('Note: Semi-Colon separated. This will be prepended to the search '.
'base dn above or the full container path can be specified containing a dc= '.
- 'component.<br/>Example: CN=Users;DC=example,DC=com or OU=Staff;OU=Freelancers');
+ 'component.%1$sExample: CN=Users;DC=example,DC=com or OU=Staff;OU=Freelancers', '<br/>');
$group->add(new Form_Button(
'Select',
diff --git a/src/usr/local/www/system_certmanager.php b/src/usr/local/www/system_certmanager.php
index 7459650..58be022 100644
--- a/src/usr/local/www/system_certmanager.php
+++ b/src/usr/local/www/system_certmanager.php
@@ -615,10 +615,9 @@ if ($act == "new" || (($_POST['save'] == gettext("Save")) && $input_errors)) {
if (!$internal_ca_count) {
$section->addInput(new Form_StaticText(
'*Certificate authority',
- gettext('No internal Certificate Authorities have been defined. ').
- gettext('An internal CA must be defined in order to create an internal certificate. ').
- '<a href="system_camanager.php?act=new&amp;method=internal"> '. gettext("Create") .'</a>'.
- gettext(' an internal CA.')
+ gettext('No internal Certificate Authorities have been defined. ') .
+ gettext('An internal CA must be defined in order to create an internal certificate. ') .
+ sprintf(gettext('%1$sCreate%2$s an internal CA.'), '<a href="system_camanager.php?act=new&amp;method=internal"> ', '</a>')
));
} else {
$allCas = array();
diff --git a/src/usr/local/www/system_gateway_groups.php b/src/usr/local/www/system_gateway_groups.php
index d65a1e8..5502a31 100644
--- a/src/usr/local/www/system_gateway_groups.php
+++ b/src/usr/local/www/system_gateway_groups.php
@@ -190,9 +190,9 @@ endforeach;
</nav>
<div class="infoblock">
- <?php print_info_box(gettext('Remember to use these Gateway Groups in firewall rules in order to enable load balancing, failover, ' .
- 'or policy-based routing.' . '<br />' .
- 'Without rules directing traffic into the Gateway Groups, they will not be used.'), 'info', false); ?>
+ <?php print_info_box(sprintf(gettext('Remember to use these Gateway Groups in firewall rules in order to enable load balancing, failover, ' .
+ 'or policy-based routing.%1$s' .
+ 'Without rules directing traffic into the Gateway Groups, they will not be used.'), '<br />'), 'info', false); ?>
</div>
<?php
include("foot.inc");
diff --git a/src/usr/local/www/system_hasync.php b/src/usr/local/www/system_hasync.php
index cc80028..70293f0 100644
--- a/src/usr/local/www/system_hasync.php
+++ b/src/usr/local/www/system_hasync.php
@@ -125,19 +125,19 @@ $section->addInput(new Form_Checkbox(
($pconfig['pfsyncenabled'] === 'on'),
'on'
))->setHelp('Each firewall sends these messages out via multicast on a specified interface, using the PFSYNC protocol (IP Protocol 240).' .
- ' It also listens on that interface for similar messages from other firewalls, and imports them into the local state table.<br />' .
- 'This setting should be enabled on all members of a failover group.<br />' .
- 'Clicking "Save" will force a configuration sync if it is enabled! (see Configuration Synchronization Settings below)');
+ ' It also listens on that interface for similar messages from other firewalls, and imports them into the local state table.%1$s' .
+ 'This setting should be enabled on all members of a failover group.%1$s' .
+ 'Clicking "Save" will force a configuration sync if it is enabled! (see Configuration Synchronization Settings below)', '<br />');
$section->addInput(new Form_Select(
'pfsyncinterface',
'Synchronize Interface',
$pconfig['pfsyncinterface'],
$iflist
-))->setHelp('If Synchronize States is enabled this interface will be used for communication.<br />' .
- 'It is recommended to set this to an interface other than LAN! A dedicated interface works the best.<br />' .
- 'An IP must be defined on each machine participating in this failover group.<br />' .
- 'An IP must be assigned to the interface on any participating sync nodes.');
+))->setHelp('If Synchronize States is enabled this interface will be used for communication.%1$s' .
+ 'It is recommended to set this to an interface other than LAN! A dedicated interface works the best.%1$s' .
+ 'An IP must be defined on each machine participating in this failover group.%1$s' .
+ 'An IP must be assigned to the interface on any participating sync nodes.', '<br />');
$section->addInput(new Form_Input(
'pfsyncpeerip',
@@ -157,25 +157,25 @@ $section->addInput(new Form_Input(
'text',
$pconfig['synchronizetoip'],
['placeholder' => 'IP Address']
-))->setHelp('Enter the IP address of the firewall to which the selected configuration sections should be synchronized.<br /><br />' .
- 'XMLRPC sync is currently only supported over connections using the same protocol and port as this system - make sure the remote system\'s port and protocol are set accordingly!<br />' .
- 'Do not use the Synchronize Config to IP and password option on backup cluster members!');
+))->setHelp('Enter the IP address of the firewall to which the selected configuration sections should be synchronized.%1$s%1$s' .
+ 'XMLRPC sync is currently only supported over connections using the same protocol and port as this system - make sure the remote system\'s port and protocol are set accordingly!%1$s' .
+ 'Do not use the Synchronize Config to IP and password option on backup cluster members!', '<br />');
$section->addInput(new Form_Input(
'username',
'Remote System Username',
'text',
$pconfig['username']
-))->setHelp('Enter the webConfigurator username of the system entered above for synchronizing the configuration.<br />' .
- 'Do not use the Synchronize Config to IP and username option on backup cluster members!');
+))->setHelp('Enter the webConfigurator username of the system entered above for synchronizing the configuration.%1$s' .
+ 'Do not use the Synchronize Config to IP and username option on backup cluster members!', '<br />');
$section->addPassword(new Form_Input(
'passwordfld',
'Remote System Password',
'password',
$pconfig['passwordfld']
-))->setHelp('Enter the webConfigurator password of the system entered above for synchronizing the configuration.<br />' .
- 'Do not use the Synchronize Config to IP and password option on backup cluster members!');
+))->setHelp('Enter the webConfigurator password of the system entered above for synchronizing the configuration.%1$s' .
+ 'Do not use the Synchronize Config to IP and password option on backup cluster members!', '<br />');
$group = new Form_MultiCheckboxGroup('Select options to sync');
diff --git a/src/usr/local/www/system_routes_edit.php b/src/usr/local/www/system_routes_edit.php
index 3b65dff..42fbf71 100644
--- a/src/usr/local/www/system_routes_edit.php
+++ b/src/usr/local/www/system_routes_edit.php
@@ -259,8 +259,8 @@ $section->addInput(new Form_Select(
'*Gateway',
$pconfig['gateway'],
$allGateways
-))->setHelp('Choose which gateway this route applies to or <a href="'.
- '/system_gateways_edit.php">add a new one first</a>');
+))->setHelp('Choose which gateway this route applies to or %1$sadd a new one first%2$s',
+ '<a href="/system_gateways_edit.php">', '</a>');
$section->addInput(new Form_Checkbox(
'disabled',
diff --git a/src/usr/local/www/system_update_settings.php b/src/usr/local/www/system_update_settings.php
index f29d876..6984ca3 100644
--- a/src/usr/local/www/system_update_settings.php
+++ b/src/usr/local/www/system_update_settings.php
@@ -157,8 +157,8 @@ $section->addInput(new Form_Select(
'*Branch',
get_repo_name($config['system']['pkg_repo_conf_path']),
build_repo_list()
-))->setHelp('Please select the stable, or the development branch from which to update the system firmware. ' . ' <br />' .
- 'Use of the development version is at your own risk!');
+))->setHelp('Please select the stable, or the development branch from which to update the system firmware. %1$s' .
+ 'Use of the development version is at your own risk!', '<br />');
$form->add($section);
@@ -217,8 +217,8 @@ if (file_exists("/usr/local/bin/git")) {
'Branch name',
'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);
+ ))->setHelp('The most recently used branch was "%1$s". (Usually the branch name is master)' .
+ '%2$sNote: Sync will not be performed if a branch is not specified.', $lastbranch, '<br />');
$group = new Form_Group('Sync options');
@@ -241,21 +241,21 @@ if (file_exists("/usr/local/bin/git")) {
null,
'Show Files',
isset($gitcfg['show_files'])
- ))->setHelp('Show different and missing files.<br />With \'Diff/Minimal\' option..');
+ ))->setHelp('Show different and missing files.%1$sWith \'Diff/Minimal\' option..', '<br />');
$group->add(new Form_Checkbox(
'show_command',
null,
'Show Command',
isset($gitcfg['show_command'])
- ))->setHelp('Show constructed command.<br />With \'Diff/Minimal\' option.');
+ ))->setHelp('Show constructed command.%1$sWith \'Diff/Minimal\' option.', '<br />');
$group->add(new Form_Checkbox(
'dryrun',
null,
'Dry Run',
isset($gitcfg['dryrun'])
- ))->setHelp('Dry-run only.<br />No files copied.');
+ ))->setHelp('Dry-run only.%1$sNo files copied.', '<br />');
$group->setHelp('See "playback gitsync --help" in console "PHP Shell + pfSense tools" for additional information.');
$section->add($group);
OpenPOWER on IntegriCloud