';
- echo 'Derzeit sind keine Adressen gesperrt.';
+ echo '
';
+ echo __('There are no ip addresses blocked.', BDP_LV_PLUGIN_SLUG);
echo '
-
- IP |
- Gesperrt bis |
- Aktion |
-
- = $blockedIps ?>
+
+
+
+
+
+
+
+ = __('IP address', BDP_LV_PLUGIN_SLUG); ?> |
+ = __('Blocked until', BDP_LV_PLUGIN_SLUG); ?> |
+ = __('Actions', BDP_LV_PLUGIN_SLUG); ?> |
+
+
+
+ = $blockedIps ?>
+
[
- 'email' => 'E-Mail an Administrator'
+ 'email' => __('E-Mail to site admin', BDP_LV_PLUGIN_SLUG)
],
];
@@ -16,7 +15,7 @@ function kompass_print_checkbox($settingName) {
$setting = $options[$settingName];
foreach ($setting as $radioOption => $optionText) {
- $isChecked = in_array($radioOption, $currentSetting) ? 'checked ' : '' ;
+ $isChecked = in_array($radioOption, $currentSetting) ? 'checked ' : '' ;
echo ' [
- 'REMOTE_ADDR' => 'Direkte Verbrindung',
- 'HTTP_X_FORWARDED_FOR' => 'Hinter einem Proxy'
+ 'REMOTE_ADDR' => __('Direct connection', BDP_LV_PLUGIN_SLUG),
+ 'HTTP_X_FORWARDED_FOR' => __('Behind a proxy', BDP_LV_PLUGIN_SLUG)
],
'kompass_limit_login_cookies' => [
- true => 'Ja',
- false => 'Nein'
+ true => __('Yes', BDP_LV_PLUGIN_SLUG),
+ false => __('No', BDP_LV_PLUGIN_SLUG)
],
'kompass_password_minimal_strength' => [
- '1' => 'Alle Passwörter erlauben',
- '2' => 'Mittelstarke Passwörter',
- '3' => 'Nur Starke Passwörter'
+ '1' => __('Allow all password strengths', BDP_LV_PLUGIN_SLUG),
+ '2' => __('At least passwords with medium strength', BDP_LV_PLUGIN_SLUG),
+ '3' => __('Only allow strong passwords', BDP_LV_PLUGIN_SLUG)
]
];
@@ -30,6 +30,6 @@ function kompass_print_radio($settingName) {
name="' . $settingName . '"
value="' . $radioOption . '"
id="setting_' . $settingName . '_' . $radioOption . '" />' .
- ' ';
+ '
';
}
}
diff --git a/modules/LimitLoginAttempts/Views/tab-control.php b/modules/LimitLoginAttempts/Views/tab-control.php
index c94a830..8a22eea 100644
--- a/modules/LimitLoginAttempts/Views/tab-control.php
+++ b/modules/LimitLoginAttempts/Views/tab-control.php
@@ -1,18 +1,18 @@
'.
- '
- Optionen
- '.
- '
- Blocklist
- '.
- '
- Allowlist
- '.
- '
- Gesperrte IPs
- ';
+ '' .
+ __('Options', BDP_LV_PLUGIN_SLUG) .
+ ''.
+ '' .
+ __('Blocklist', BDP_LV_PLUGIN_SLUG) .
+ ''.
+ '' .
+ __('Allowlist', BDP_LV_PLUGIN_SLUG) .
+ ''.
+ '' .
+ __('Blocked IP addresses', BDP_LV_PLUGIN_SLUG) .
+ '';
}
\ No newline at end of file
diff --git a/modules/LimitLoginAttempts/includes/block-and-allow-list-form.php b/modules/LimitLoginAttempts/includes/block-and-allow-list-form.php
index 265584d..87b827d 100644
--- a/modules/LimitLoginAttempts/includes/block-and-allow-list-form.php
+++ b/modules/LimitLoginAttempts/includes/block-and-allow-list-form.php
@@ -1,47 +1,56 @@
-
-
-
-
-
-
+
+
+
+
+
+
+ = __('IP address', BDP_LV_PLUGIN_SLUG); ?> |
+ = __('Actions', BDP_LV_PLUGIN_SLUG); ?> |
+
+
+
+ foreach ($elements as $currentIp) {
+ echo '';
+ echo '' . $currentIp .' | ';
+ echo ''
+ . __('Delete', BDP_LV_PLUGIN_SLUG) . ' | ';
+ echo '
';
+ }
+ ?>
+
+
+
+
= __('IP-Adresse hinzufügen', BDP_LV_PLUGIN_SLUG); ?>
diff --git a/modules/LimitLoginAttempts/includes/gui_elements.php b/modules/LimitLoginAttempts/includes/gui_elements.php
index ed7cbbd..24d9a35 100644
--- a/modules/LimitLoginAttempts/includes/gui_elements.php
+++ b/modules/LimitLoginAttempts/includes/gui_elements.php
@@ -1,14 +1,13 @@
';
}
-function _kompass_limit_logins_settings_callback($args) {
+function _kompass_limit_logins_settings_callback(array $args) {
$setting = get_option($args['setting'], null);
if (null === $setting) {
- $setting = '';
+ return;
}
$value = esc_attr($setting);
@@ -19,22 +18,17 @@ function _kompass_limit_logins_settings_callback($args) {
kompass_print_textbox($args['setting'], $value);
}
-function _kompass_limit_logins_settings_radio_callback($args)
+function _kompass_limit_logins_settings_radio_callback(array $args)
{
kompass_print_radio($args['setting']);
}
-function _kompass_limit_logins_settings_checkbox_callback($args) {
+function _kompass_limit_logins_settings_checkbox_callback(array $args) {
kompass_print_checkbox($args['setting']);
}
-
-
-
-
-
add_settings_section(
'custom_settings_section',
- 'Optionen',
+ __('Options', BDP_LV_PLUGIN_SLUG),
'custom_settings_section_callback',
BDP_LV_PLUGIN_SLUG . '-limit-login-attempts'
);
@@ -44,73 +38,73 @@ $settings_page = BDP_LV_PLUGIN_SLUG . '-limit-login-attempts';
add_settings_field(
- 'kompass_lla_1',
- 'Maximale Wiederholungen',
+ 'kompass_lla_1',
+ __('Maximum reps until lockout', BDP_LV_PLUGIN_SLUG),
'_kompass_limit_logins_settings_callback',
$settings_page,
'custom_settings_section',
['setting' => 'kompass_limit_login_allowed_retries']);
add_settings_field(
- 'kompass_lla_2',
- 'Dauer der Sperre (in Minuten)',
+ 'kompass_lla_2',
+ __('Duration of lockout (in minutes)', BDP_LV_PLUGIN_SLUG),
'_kompass_limit_logins_settings_callback',
$settings_page,
'custom_settings_section',
['setting' => 'kompass_limit_login_lockout_duration', 'unit_division' => 60 ]);
add_settings_field(
- 'kompass_lla_3',
- 'Maximale Anzahl an Sperrungen',
+ 'kompass_lla_3',
+ __('Maximum number of lockouts', BDP_LV_PLUGIN_SLUG),
'_kompass_limit_logins_settings_callback',
$settings_page,
'custom_settings_section',
['setting' => 'kompass_limit_login_allowed_lockouts']);
add_settings_field(
- 'kompass_lla_4',
- 'Langzeitsperre in Stunden',
+ 'kompass_lla_4',
+ __('Long-term duration (in hours)', BDP_LV_PLUGIN_SLUG),
'_kompass_limit_logins_settings_callback',
$settings_page,
'custom_settings_section',
['setting' => 'kompass_limit_login_long_duration', 'unit_division' => 3600]);
add_settings_field(
- 'kompass_lla_5',
- 'Mininmale Passwort-Stärke:',
- '_kompass_limit_logins_settings_radio_callback',
+ 'kompass_lla_5',
+ __('Minimum password strength', BDP_LV_PLUGIN_SLUG),
+ '_kompass_limit_logins_settings_radio_callback',
$settings_page,
'custom_settings_section',
['setting' => 'kompass_password_minimal_strength']);
add_settings_field(
- 'kompass_lla_6',
- 'Seite erreichbar über:',
- '_kompass_limit_logins_settings_radio_callback',
+ 'kompass_lla_6',
+ __('Page accessible via', BDP_LV_PLUGIN_SLUG),
+ '_kompass_limit_logins_settings_radio_callback',
$settings_page,
'custom_settings_section',
['setting' => 'kompass_limit_login_client_type']);
add_settings_field(
- 'kompass_lla_7',
- 'Cookies verarbeiten',
- '_kompass_limit_logins_settings_radio_callback',
+ 'kompass_lla_7',
+ __('Handle cookies', BDP_LV_PLUGIN_SLUG),
+ '_kompass_limit_logins_settings_radio_callback',
$settings_page,
'custom_settings_section',
['setting' => 'kompass_limit_login_cookies']);
add_settings_field(
- 'kompass_lla_8',
- 'Bei Sperrung benachrichtigen',
- '_kompass_limit_logins_settings_checkbox_callback',
+ 'kompass_lla_8',
+ __('Notify if blocked', BDP_LV_PLUGIN_SLUG),
+ '_kompass_limit_logins_settings_checkbox_callback',
$settings_page,
'custom_settings_section',
['setting' => 'kompass_limit_login_lockout_notify']);
add_settings_field(
- 'kompass_lla_9',
- 'Fehlversuche bis zur Benachrichtigung',
- '_kompass_limit_logins_settings_callback',
+ 'kompass_lla_9',
+ __('Failed attempts until notification', BDP_LV_PLUGIN_SLUG),
+ '_kompass_limit_logins_settings_callback',
$settings_page,
'custom_settings_section',
['setting' => 'kompass_limit_login_notify_email_after']);
diff --git a/modules/LimitLoginAttempts/includes/validators.php b/modules/LimitLoginAttempts/includes/validators.php
index e2fb154..5b7d7fe 100644
--- a/modules/LimitLoginAttempts/includes/validators.php
+++ b/modules/LimitLoginAttempts/includes/validators.php
@@ -1,20 +1,16 @@