diff options
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/system_groupmanager.php | 8 | ||||
-rw-r--r-- | src/usr/local/www/system_groupmanager_addprivs.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/system_usermanager.php | 9 | ||||
-rw-r--r-- | src/usr/local/www/system_usermanager_addprivs.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/system_usermanager_passwordmg.php | 2 | ||||
-rwxr-xr-x | src/usr/local/www/system_usermanager_settings_test.php | 14 |
6 files changed, 17 insertions, 20 deletions
diff --git a/src/usr/local/www/system_groupmanager.php b/src/usr/local/www/system_groupmanager.php index 07df162..cf60b3d 100644 --- a/src/usr/local/www/system_groupmanager.php +++ b/src/usr/local/www/system_groupmanager.php @@ -99,8 +99,7 @@ if ($act == "delgroup") { $groupdeleted = $a_group[$id]['name']; unset($a_group[$id]); write_config(); - $savemsg = gettext("Group") . " {$groupdeleted} " . - gettext("successfully deleted") . "<br />"; + $savemsg = sprintf(gettext("Group %s successfully deleted"), $groupdeleted); } if ($act == "delpriv") { @@ -124,8 +123,7 @@ if ($act == "delpriv") { write_config(); $act = "edit"; - $savemsg = gettext("Privilege") . " {$privdeleted} " . - gettext("successfully deleted") . "<br />"; + $savemsg = sprintf(gettext("Privilege %s successfully deleted"), $privdeleted); } if ($act == "edit") { @@ -243,7 +241,7 @@ function build_priv_table() { $privhtml .= '<tr>'; $privhtml .= '<td>' . htmlspecialchars($priv['name']) . '</td>'; $privhtml .= '<td>' . htmlspecialchars($priv['descr']) . '</td>'; - $privhtml .= '<td><a class="fa fa-trash" title="'.gettext('Delete Privilege').'" href="system_groupmanager.php?act=delpriv&groupid='.$id.'&privid='.$i.'"></a></td>'; + $privhtml .= '<td><a class="fa fa-trash" title="' . gettext('Delete Privilege') . '" href="system_groupmanager.php?act=delpriv&groupid=' . $id . '&privid=' . $i . '"></a></td>'; $privhtml .= '</tr>'; } diff --git a/src/usr/local/www/system_groupmanager_addprivs.php b/src/usr/local/www/system_groupmanager_addprivs.php index e1ae561..f6a676d 100644 --- a/src/usr/local/www/system_groupmanager_addprivs.php +++ b/src/usr/local/www/system_groupmanager_addprivs.php @@ -252,7 +252,7 @@ $form->add($section); print $form; ?> -<div class="panel panel-body alert-info col-sm-10 col-sm-offset-2" id="pdesc">Select a privilege from the list above for a description</div> +<div class="panel panel-body alert-info col-sm-10 col-sm-offset-2" id="pdesc"><?=gettext("Select a privilege from the list above for a description")?></div> <script type="text/javascript"> //<![CDATA[ diff --git a/src/usr/local/www/system_usermanager.php b/src/usr/local/www/system_usermanager.php index 07ca150..817813b 100644 --- a/src/usr/local/www/system_usermanager.php +++ b/src/usr/local/www/system_usermanager.php @@ -118,8 +118,7 @@ if ($_GET['act'] == "deluser") { $userdeleted = $a_user[$id]['name']; unset($a_user[$id]); write_config(); - $savemsg = gettext("User")." {$userdeleted} ". - gettext("successfully deleted")."<br />"; + $savemsg = sprintf(gettext("User %s successfully deleted"), $userdeleted); } else if ($act == "new") { /* * set this value cause the text field is read only @@ -160,7 +159,7 @@ if ($_POST['act'] == "delcert") { unset($a_user[$id]['cert'][$_POST['certid']]); write_config(); $_POST['act'] = "edit"; - $savemsg = gettext("Certificate") . " {$certdeleted} " . gettext("association removed.") . "<br />"; + $savemsg = sprintf(gettext("Certificate %s association removed."), $certdeleted); } if ($_POST['act'] == "delprivid") { @@ -169,7 +168,7 @@ if ($_POST['act'] == "delprivid") { local_user_set($a_user[$id]); write_config(); $_POST['act'] = "edit"; - $savemsg = gettext("Privilege ") . $privdeleted . gettext(" removed") . "<br />"; + $savemsg = sprintf(gettext("Privilege %s removed."), $privdeleted); } if ($_POST['save']) { @@ -396,7 +395,7 @@ function build_priv_table() { $privhtml .= '<td>' . htmlspecialchars($priv['descr']) . '</td>'; $privhtml .= '<td>'; if (!$group) { - $privhtml .= '<a class="fa fa-trash no-confirm icon-pointer" title="'.gettext('Delete Privilege').'" id="delprivid' .$i. '"></a></td>'; + $privhtml .= '<a class="fa fa-trash no-confirm icon-pointer" title="' . gettext('Delete Privilege') . '" id="delprivid' . $i . '"></a></td>'; } $privhtml .= '</td>'; diff --git a/src/usr/local/www/system_usermanager_addprivs.php b/src/usr/local/www/system_usermanager_addprivs.php index 3b7703b..0184c94 100644 --- a/src/usr/local/www/system_usermanager_addprivs.php +++ b/src/usr/local/www/system_usermanager_addprivs.php @@ -240,7 +240,7 @@ $form->add($section); print($form); ?> -<div class="panel panel-body alert-info col-sm-10 col-sm-offset-2" id="pdesc">Select a privilege from the list above for a description</div> +<div class="panel panel-body alert-info col-sm-10 col-sm-offset-2" id="pdesc"><?=gettext("Select a privilege from the list above for a description")?></div> <script type="text/javascript"> //<![CDATA[ diff --git a/src/usr/local/www/system_usermanager_passwordmg.php b/src/usr/local/www/system_usermanager_passwordmg.php index 00e6ea1..29d2dda 100644 --- a/src/usr/local/www/system_usermanager_passwordmg.php +++ b/src/usr/local/www/system_usermanager_passwordmg.php @@ -92,7 +92,7 @@ if (isset($_POST['save'])) { write_config(); - $savemsg = gettext("Password successfully changed") . "<br />"; + $savemsg = gettext("Password successfully changed"); } } diff --git a/src/usr/local/www/system_usermanager_settings_test.php b/src/usr/local/www/system_usermanager_settings_test.php index 83b5d29..18238c7 100755 --- a/src/usr/local/www/system_usermanager_settings_test.php +++ b/src/usr/local/www/system_usermanager_settings_test.php @@ -90,18 +90,18 @@ if (!$authcfg) { echo "<table>"; - echo "<tr><td>" . gettext("Attempting connection to") . " " . "<td><center>" . htmlspecialchars($auth_server). "</b></center></td>"; + echo "<tr><td>" . sprintf(gettext("Attempting connection to %s%s%s"), "<td><center>", htmlspecialchars($auth_server), "</center></td>"); if (ldap_test_connection($authcfg)) { - echo "<td><span class=\"text-center text-success\">OK</span></td></tr>"; + echo "<td><span class=\"text-center text-success\">" . gettext("OK") . "</span></td></tr>"; - echo "<tr><td>" . gettext("Attempting bind to") . " " . "<td><center>" . htmlspecialchars($auth_server). "</b></center></td>"; + echo "<tr><td>" . sprintf(gettext("Attempting bind to %s%s%s"), "<td><center>", htmlspecialchars($auth_server), "</center></td>"); if (ldap_test_bind($authcfg)) { - echo "<td><span class=\"text-center text-success\">OK</span></td></tr>"; + echo "<td><span class=\"text-center text-success\">" . gettext("OK") . "</span></td></tr>"; - echo "<tr><td>" . gettext("Attempting to fetch Organizational Units from") . " " . "<td><center>" . htmlspecialchars($auth_server). "</b></center></td>"; + echo "<tr><td>" . sprintf(gettext("Attempting to fetch Organizational Units from %s%s%s"), "<td><center>", htmlspecialchars($auth_server), "</center></td>"); $ous = ldap_get_user_ous(true, $authcfg); if (count($ous)>1) { - echo "<td><span class=\"text-center text-success\">OK</span></td></tr>"; + echo "<td><span class=\"text-center text-success\">" . gettext("OK") . "</span></td></tr>"; echo "</table>"; if (is_array($ous)) { echo "<br/>"; @@ -130,7 +130,7 @@ if (!$authcfg) { ?> </pre> - <a href="javascript:window.close();" class="btn btn-primary">Return</a> + <a href="javascript:window.close();" class="btn btn-primary"><?=gettext("Return")?></a> </div> </div> </div> |