From ac899ea94477cd7ab4cb61c6afc1e9e63c47330f Mon Sep 17 00:00:00 2001 From: Sonic853 Date: Tue, 16 Apr 2019 15:18:30 +0800 Subject: [PATCH 1/3] Add l10n support and complete missing translations. --- class.two-factor-core.php | 14 +- includes/function.login-header.php | 6 +- languages/two-factor.pot | 370 +++++++++++++++++++++++++++++ 3 files changed, 382 insertions(+), 8 deletions(-) create mode 100644 languages/two-factor.pot diff --git a/class.two-factor-core.php b/class.two-factor-core.php index bf716932..44cbef13 100644 --- a/class.two-factor-core.php +++ b/class.two-factor-core.php @@ -58,7 +58,11 @@ public static function add_hooks() { * Sites on WordPress 4.6+ benefit from just-in-time loading of translations. */ public static function load_textdomain() { - load_plugin_textdomain( 'two-factor' ); + load_plugin_textdomain( + 'two-factor', + false, + dirname(plugin_basename(__FILE__)).'/languages/' + ); } /** @@ -337,7 +341,7 @@ public static function backup_2fa() { if ( isset( $providers[ $_GET['provider'] ] ) ) { $provider = $providers[ $_GET['provider'] ]; } else { - wp_die( esc_html__( 'Cheatin’ uh?' ), 403 ); + wp_die( esc_html__( 'Cheatin’ uh?', 'two-factor' ), 403 ); } self::login_html( $user, $_GET['wp-auth-nonce'], $_GET['redirect_to'], '', $provider ); @@ -608,7 +612,7 @@ public static function login_form_validate_2fa() { if ( isset( $providers[ $_POST['provider'] ] ) ) { $provider = $providers[ $_POST['provider'] ]; } else { - wp_die( esc_html__( 'Cheatin’ uh?' ), 403 ); + wp_die( esc_html__( 'Cheatin’ uh?', 'two-factor' ), 403 ); } } else { $provider = self::get_primary_provider_for_user( $user->ID ); @@ -683,7 +687,7 @@ public static function login_form_validate_2fa() { * @return array Updated array of columns. */ public static function filter_manage_users_columns( array $columns ) { - $columns['two-factor'] = __( 'Two-Factor' ); + $columns['two-factor'] = __( 'Two-Factor', 'two-factor' ); return $columns; } @@ -738,7 +742,7 @@ public static function user_two_factor_options( $user ) {
- + diff --git a/includes/function.login-header.php b/includes/function.login-header.php index 647a0e6d..5ee2bdc9 100644 --- a/includes/function.login-header.php +++ b/includes/function.login-header.php @@ -40,7 +40,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) { $login_title = get_bloginfo( 'name', 'display' ); /* translators: Login screen title. 1: Login screen name, 2: Network or site name */ - $login_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $login_title ); + $login_title = sprintf( __( '%1$s ‹ %2$s — WordPress', 'two-factor' ), $title, $login_title ); /** * Filters the title tag content for login page. @@ -95,8 +95,8 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) { $login_header_url = network_home_url(); $login_header_title = get_network()->site_name; } else { - $login_header_url = __( 'https://wordpress.org/' ); - $login_header_title = __( 'Powered by WordPress' ); + $login_header_url = __( 'https://wordpress.org/', 'two-factor' ); + $login_header_title = __( 'Powered by WordPress', 'two-factor' ); } /** diff --git a/languages/two-factor.pot b/languages/two-factor.pot new file mode 100644 index 00000000..4df87a35 --- /dev/null +++ b/languages/two-factor.pot @@ -0,0 +1,370 @@ +# Copyright (C) 2019 George Stephanis +# This file is distributed under the same license as the Two Factor plugin. +msgid "" +msgstr "" +"Project-Id-Version: Two Factor 0.4.4\n" +"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/two-factor\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"POT-Creation-Date: 2019-04-16T15:17:38+08:00\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"X-Generator: WP-CLI 2.1.0\n" +"X-Domain: two-factor\n" + +#. Plugin Name of the plugin +msgid "Two Factor" +msgstr "" + +#. Plugin URI of the plugin +msgid "https://wordpress.org/plugins/two-factor/" +msgstr "" + +#. Description of the plugin +msgid "A prototype extensible core to enable Two-Factor Authentication." +msgstr "" + +#. Author of the plugin +msgid "George Stephanis" +msgstr "" + +#. Author URI of the plugin +msgid "https://stephanis.info" +msgstr "" + +#. translators: %s: version number +#: class.two-factor-core.php:100 +msgid "FIDO U2F is not available because you are using PHP %s. (Requires 5.3 or greater)" +msgstr "" + +#: class.two-factor-core.php:262 +msgid "Error: API login for user disabled." +msgstr "" + +#: class.two-factor-core.php:311 +#: class.two-factor-core.php:625 +#: class.two-factor-core.php:638 +msgid "Failed to create a login nonce." +msgstr "" + +#: class.two-factor-core.php:344 +#: class.two-factor-core.php:615 +msgid "Cheatin’ uh?" +msgstr "" + +#. translators: %s: Two-factor method name. +#: class.two-factor-core.php:429 +msgid "Or, use your backup method: %s →" +msgstr "" + +#: class.two-factor-core.php:441 +msgid "Or, use a backup method…" +msgstr "" + +#: class.two-factor-core.php:469 +msgid "Are you lost?" +msgstr "" + +#. translators: %s: site name. +#: class.two-factor-core.php:474 +msgid "← Back to %s" +msgstr "" + +#: class.two-factor-core.php:641 +msgid "ERROR: Invalid verification code." +msgstr "" + +#: class.two-factor-core.php:663 +msgid "You have logged in successfully." +msgstr "" + +#: class.two-factor-core.php:690 +msgid "Two-Factor" +msgstr "" + +#: class.two-factor-core.php:709 +msgid "Disabled" +msgstr "" + +#: class.two-factor-core.php:745 +msgid "Two-Factor Options" +msgstr "" + +#: class.two-factor-core.php:751 +msgid "Enabled" +msgstr "" + +#: class.two-factor-core.php:752 +msgid "Primary" +msgstr "" + +#: class.two-factor-core.php:753 +#: providers/class.two-factor-fido-u2f-admin-list-table.php:26 +#: providers/class.two-factor-fido-u2f-admin-list-table.php:121 +msgid "Name" +msgstr "" + +#. translators: Login screen title. 1: Login screen name, 2: Network or site name +#: includes/function.login-header.php:43 +msgid "%1$s ‹ %2$s — WordPress" +msgstr "" + +#: includes/function.login-header.php:98 +msgid "https://wordpress.org/" +msgstr "" + +#: includes/function.login-header.php:99 +msgid "Powered by WordPress" +msgstr "" + +#: providers/class.two-factor-backup-codes.php:75 +msgid "Two-Factor: You are out of backup codes and need to regenerate!" +msgstr "" + +#: providers/class.two-factor-backup-codes.php:91 +msgctxt "Provider Label" +msgid "Backup Verification Codes (Single Use)" +msgstr "" + +#: providers/class.two-factor-backup-codes.php:123 +msgid "Generate Verification Codes" +msgstr "" + +#. translators: %s: count +#: providers/class.two-factor-backup-codes.php:128 +#: providers/class.two-factor-backup-codes.php:235 +msgid "%s unused code remaining." +msgid_plural "%s unused codes remaining." +msgstr[0] "" + +#: providers/class.two-factor-backup-codes.php:135 +msgid "Write these down! Once you navigate away from this page, you will not be able to view these codes again." +msgstr "" + +#: providers/class.two-factor-backup-codes.php:137 +msgid "Download Codes" +msgstr "" + +#. translators: %s: the site's domain +#: providers/class.two-factor-backup-codes.php:237 +msgid "Two-Factor Backup Codes for %s" +msgstr "" + +#: providers/class.two-factor-backup-codes.php:268 +msgid "Enter a backup verification code." +msgstr "" + +#: providers/class.two-factor-backup-codes.php:270 +#: providers/class.two-factor-email.php:178 +msgid "Verification Code:" +msgstr "" + +#: providers/class.two-factor-backup-codes.php:274 +#: providers/class.two-factor-totp.php:99 +msgid "Submit" +msgstr "" + +#: providers/class.two-factor-dummy.php:41 +msgctxt "Provider Label" +msgid "Dummy Method" +msgstr "" + +#: providers/class.two-factor-dummy.php:54 +msgid "Are you really you?" +msgstr "" + +#: providers/class.two-factor-dummy.php:56 +msgid "Yup." +msgstr "" + +#: providers/class.two-factor-email.php:55 +msgctxt "Provider Label" +msgid "Email" +msgstr "" + +#. translators: %s: site name +#: providers/class.two-factor-email.php:151 +msgid "Your login confirmation code for %s" +msgstr "" + +#. translators: %s: token +#: providers/class.two-factor-email.php:153 +msgid "Enter %s to log in." +msgstr "" + +#: providers/class.two-factor-email.php:176 +msgid "A verification code has been sent to the email address associated with your account." +msgstr "" + +#: providers/class.two-factor-email.php:180 +msgid "Log In" +msgstr "" + +#: providers/class.two-factor-email.php:183 +msgid "Resend Code" +msgstr "" + +#. translators: %s: email address +#: providers/class.two-factor-email.php:256 +msgid "Authentication codes will be sent to %s." +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin-list-table.php:27 +msgid "Added" +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin-list-table.php:28 +msgid "Last Used" +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin-list-table.php:118 +msgid "Quick Edit" +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin-list-table.php:139 +msgid "Cancel" +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin-list-table.php:140 +msgid "Update" +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:89 +#: providers/class.two-factor-fido-u2f.php:160 +msgid "Now insert (and tap) your Security Key." +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:90 +msgid "U2F request failed." +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:93 +msgid "Request OK." +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:94 +msgid "Other U2F error." +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:95 +msgid "Bad U2F request." +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:96 +msgid "Unsupported U2F configuration." +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:97 +msgid "U2F device ineligible." +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:98 +msgid "U2F request timeout reached." +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:100 +msgid "FIDO U2F is not supported in your web browser. Try using Google Chrome." +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:126 +msgid "Error while saving the changes." +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:163 +msgid "Security Keys" +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:167 +msgid "U2F requires an HTTPS connection. You won't be able to add new security keys over HTTP." +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:174 +msgctxt "security key" +msgid "Register New Key" +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:181 +msgid "Your new security key registered." +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:185 +msgid "You can find FIDO U2F Security Key devices for sale from here." +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:269 +msgid "Rename" +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:286 +msgid "Delete" +msgstr "" + +#: providers/class.two-factor-fido-u2f-admin.php:324 +msgid "Item not updated." +msgstr "" + +#: providers/class.two-factor-fido-u2f.php:106 +msgctxt "Provider Label" +msgid "FIDO Universal 2nd Factor (U2F)" +msgstr "" + +#: providers/class.two-factor-fido-u2f.php:132 +msgid "U2F requires an HTTPS connection. Please use an alternative 2nd factor method." +msgstr "" + +#: providers/class.two-factor-fido-u2f.php:144 +msgid "An error occurred while creating authentication data." +msgstr "" + +#: providers/class.two-factor-fido-u2f.php:215 +msgid "Requires an HTTPS connection. Configure your security keys in the \"Security Keys\" section below." +msgstr "" + +#: providers/class.two-factor-fido-u2f.php:251 +msgid "New Security Key" +msgstr "" + +#: providers/class.two-factor-totp.php:59 +msgctxt "Provider Label" +msgid "Time Based One-Time Password (Google Authenticator)" +msgstr "" + +#: providers/class.two-factor-totp.php:85 +msgid "Please scan the QR code or manually enter the key, then enter an authentication code from your app in order to complete setup." +msgstr "" + +#: providers/class.two-factor-totp.php:96 +#: providers/class.two-factor-totp.php:410 +#: tests/providers/class.two-factor-totp.php:75 +msgid "Authentication Code:" +msgstr "" + +#: providers/class.two-factor-totp.php:103 +msgid "Secret key configured and registered." +msgstr "" + +#: providers/class.two-factor-totp.php:106 +msgid "Reset Key" +msgstr "" + +#: providers/class.two-factor-totp.php:108 +msgid "You will have to re-scan the QR code on all devices as the previous codes will stop working." +msgstr "" + +#: providers/class.two-factor-totp.php:141 +msgid "Unable to save Two Factor Authentication code. Please re-scan the QR code and enter the code provided by your application." +msgstr "" + +#: providers/class.two-factor-totp.php:144 +msgid "Invalid Two Factor Authentication code." +msgstr "" + +#: providers/class.two-factor-totp.php:147 +msgid "Invalid Two Factor Authentication secret key." +msgstr "" + +#: providers/class.two-factor-totp.php:424 +msgid "Authenticate" +msgstr "" From 2820245f8c7b3bc41150921deca89b0d4b29180c Mon Sep 17 00:00:00 2001 From: Sonic853 Date: Tue, 16 Apr 2019 17:11:38 +0800 Subject: [PATCH 2/3] Rollback "function.login-header.php". --- includes/function.login-header.php | 6 +- languages/two-factor.pot | 370 ----------------------------- 2 files changed, 3 insertions(+), 373 deletions(-) delete mode 100644 languages/two-factor.pot diff --git a/includes/function.login-header.php b/includes/function.login-header.php index 5ee2bdc9..647a0e6d 100644 --- a/includes/function.login-header.php +++ b/includes/function.login-header.php @@ -40,7 +40,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) { $login_title = get_bloginfo( 'name', 'display' ); /* translators: Login screen title. 1: Login screen name, 2: Network or site name */ - $login_title = sprintf( __( '%1$s ‹ %2$s — WordPress', 'two-factor' ), $title, $login_title ); + $login_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $login_title ); /** * Filters the title tag content for login page. @@ -95,8 +95,8 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) { $login_header_url = network_home_url(); $login_header_title = get_network()->site_name; } else { - $login_header_url = __( 'https://wordpress.org/', 'two-factor' ); - $login_header_title = __( 'Powered by WordPress', 'two-factor' ); + $login_header_url = __( 'https://wordpress.org/' ); + $login_header_title = __( 'Powered by WordPress' ); } /** diff --git a/languages/two-factor.pot b/languages/two-factor.pot deleted file mode 100644 index 4df87a35..00000000 --- a/languages/two-factor.pot +++ /dev/null @@ -1,370 +0,0 @@ -# Copyright (C) 2019 George Stephanis -# This file is distributed under the same license as the Two Factor plugin. -msgid "" -msgstr "" -"Project-Id-Version: Two Factor 0.4.4\n" -"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/two-factor\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2019-04-16T15:17:38+08:00\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"X-Generator: WP-CLI 2.1.0\n" -"X-Domain: two-factor\n" - -#. Plugin Name of the plugin -msgid "Two Factor" -msgstr "" - -#. Plugin URI of the plugin -msgid "https://wordpress.org/plugins/two-factor/" -msgstr "" - -#. Description of the plugin -msgid "A prototype extensible core to enable Two-Factor Authentication." -msgstr "" - -#. Author of the plugin -msgid "George Stephanis" -msgstr "" - -#. Author URI of the plugin -msgid "https://stephanis.info" -msgstr "" - -#. translators: %s: version number -#: class.two-factor-core.php:100 -msgid "FIDO U2F is not available because you are using PHP %s. (Requires 5.3 or greater)" -msgstr "" - -#: class.two-factor-core.php:262 -msgid "Error: API login for user disabled." -msgstr "" - -#: class.two-factor-core.php:311 -#: class.two-factor-core.php:625 -#: class.two-factor-core.php:638 -msgid "Failed to create a login nonce." -msgstr "" - -#: class.two-factor-core.php:344 -#: class.two-factor-core.php:615 -msgid "Cheatin’ uh?" -msgstr "" - -#. translators: %s: Two-factor method name. -#: class.two-factor-core.php:429 -msgid "Or, use your backup method: %s →" -msgstr "" - -#: class.two-factor-core.php:441 -msgid "Or, use a backup method…" -msgstr "" - -#: class.two-factor-core.php:469 -msgid "Are you lost?" -msgstr "" - -#. translators: %s: site name. -#: class.two-factor-core.php:474 -msgid "← Back to %s" -msgstr "" - -#: class.two-factor-core.php:641 -msgid "ERROR: Invalid verification code." -msgstr "" - -#: class.two-factor-core.php:663 -msgid "You have logged in successfully." -msgstr "" - -#: class.two-factor-core.php:690 -msgid "Two-Factor" -msgstr "" - -#: class.two-factor-core.php:709 -msgid "Disabled" -msgstr "" - -#: class.two-factor-core.php:745 -msgid "Two-Factor Options" -msgstr "" - -#: class.two-factor-core.php:751 -msgid "Enabled" -msgstr "" - -#: class.two-factor-core.php:752 -msgid "Primary" -msgstr "" - -#: class.two-factor-core.php:753 -#: providers/class.two-factor-fido-u2f-admin-list-table.php:26 -#: providers/class.two-factor-fido-u2f-admin-list-table.php:121 -msgid "Name" -msgstr "" - -#. translators: Login screen title. 1: Login screen name, 2: Network or site name -#: includes/function.login-header.php:43 -msgid "%1$s ‹ %2$s — WordPress" -msgstr "" - -#: includes/function.login-header.php:98 -msgid "https://wordpress.org/" -msgstr "" - -#: includes/function.login-header.php:99 -msgid "Powered by WordPress" -msgstr "" - -#: providers/class.two-factor-backup-codes.php:75 -msgid "Two-Factor: You are out of backup codes and need to regenerate!" -msgstr "" - -#: providers/class.two-factor-backup-codes.php:91 -msgctxt "Provider Label" -msgid "Backup Verification Codes (Single Use)" -msgstr "" - -#: providers/class.two-factor-backup-codes.php:123 -msgid "Generate Verification Codes" -msgstr "" - -#. translators: %s: count -#: providers/class.two-factor-backup-codes.php:128 -#: providers/class.two-factor-backup-codes.php:235 -msgid "%s unused code remaining." -msgid_plural "%s unused codes remaining." -msgstr[0] "" - -#: providers/class.two-factor-backup-codes.php:135 -msgid "Write these down! Once you navigate away from this page, you will not be able to view these codes again." -msgstr "" - -#: providers/class.two-factor-backup-codes.php:137 -msgid "Download Codes" -msgstr "" - -#. translators: %s: the site's domain -#: providers/class.two-factor-backup-codes.php:237 -msgid "Two-Factor Backup Codes for %s" -msgstr "" - -#: providers/class.two-factor-backup-codes.php:268 -msgid "Enter a backup verification code." -msgstr "" - -#: providers/class.two-factor-backup-codes.php:270 -#: providers/class.two-factor-email.php:178 -msgid "Verification Code:" -msgstr "" - -#: providers/class.two-factor-backup-codes.php:274 -#: providers/class.two-factor-totp.php:99 -msgid "Submit" -msgstr "" - -#: providers/class.two-factor-dummy.php:41 -msgctxt "Provider Label" -msgid "Dummy Method" -msgstr "" - -#: providers/class.two-factor-dummy.php:54 -msgid "Are you really you?" -msgstr "" - -#: providers/class.two-factor-dummy.php:56 -msgid "Yup." -msgstr "" - -#: providers/class.two-factor-email.php:55 -msgctxt "Provider Label" -msgid "Email" -msgstr "" - -#. translators: %s: site name -#: providers/class.two-factor-email.php:151 -msgid "Your login confirmation code for %s" -msgstr "" - -#. translators: %s: token -#: providers/class.two-factor-email.php:153 -msgid "Enter %s to log in." -msgstr "" - -#: providers/class.two-factor-email.php:176 -msgid "A verification code has been sent to the email address associated with your account." -msgstr "" - -#: providers/class.two-factor-email.php:180 -msgid "Log In" -msgstr "" - -#: providers/class.two-factor-email.php:183 -msgid "Resend Code" -msgstr "" - -#. translators: %s: email address -#: providers/class.two-factor-email.php:256 -msgid "Authentication codes will be sent to %s." -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin-list-table.php:27 -msgid "Added" -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin-list-table.php:28 -msgid "Last Used" -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin-list-table.php:118 -msgid "Quick Edit" -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin-list-table.php:139 -msgid "Cancel" -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin-list-table.php:140 -msgid "Update" -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:89 -#: providers/class.two-factor-fido-u2f.php:160 -msgid "Now insert (and tap) your Security Key." -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:90 -msgid "U2F request failed." -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:93 -msgid "Request OK." -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:94 -msgid "Other U2F error." -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:95 -msgid "Bad U2F request." -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:96 -msgid "Unsupported U2F configuration." -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:97 -msgid "U2F device ineligible." -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:98 -msgid "U2F request timeout reached." -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:100 -msgid "FIDO U2F is not supported in your web browser. Try using Google Chrome." -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:126 -msgid "Error while saving the changes." -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:163 -msgid "Security Keys" -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:167 -msgid "U2F requires an HTTPS connection. You won't be able to add new security keys over HTTP." -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:174 -msgctxt "security key" -msgid "Register New Key" -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:181 -msgid "Your new security key registered." -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:185 -msgid "You can find FIDO U2F Security Key devices for sale from here." -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:269 -msgid "Rename" -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:286 -msgid "Delete" -msgstr "" - -#: providers/class.two-factor-fido-u2f-admin.php:324 -msgid "Item not updated." -msgstr "" - -#: providers/class.two-factor-fido-u2f.php:106 -msgctxt "Provider Label" -msgid "FIDO Universal 2nd Factor (U2F)" -msgstr "" - -#: providers/class.two-factor-fido-u2f.php:132 -msgid "U2F requires an HTTPS connection. Please use an alternative 2nd factor method." -msgstr "" - -#: providers/class.two-factor-fido-u2f.php:144 -msgid "An error occurred while creating authentication data." -msgstr "" - -#: providers/class.two-factor-fido-u2f.php:215 -msgid "Requires an HTTPS connection. Configure your security keys in the \"Security Keys\" section below." -msgstr "" - -#: providers/class.two-factor-fido-u2f.php:251 -msgid "New Security Key" -msgstr "" - -#: providers/class.two-factor-totp.php:59 -msgctxt "Provider Label" -msgid "Time Based One-Time Password (Google Authenticator)" -msgstr "" - -#: providers/class.two-factor-totp.php:85 -msgid "Please scan the QR code or manually enter the key, then enter an authentication code from your app in order to complete setup." -msgstr "" - -#: providers/class.two-factor-totp.php:96 -#: providers/class.two-factor-totp.php:410 -#: tests/providers/class.two-factor-totp.php:75 -msgid "Authentication Code:" -msgstr "" - -#: providers/class.two-factor-totp.php:103 -msgid "Secret key configured and registered." -msgstr "" - -#: providers/class.two-factor-totp.php:106 -msgid "Reset Key" -msgstr "" - -#: providers/class.two-factor-totp.php:108 -msgid "You will have to re-scan the QR code on all devices as the previous codes will stop working." -msgstr "" - -#: providers/class.two-factor-totp.php:141 -msgid "Unable to save Two Factor Authentication code. Please re-scan the QR code and enter the code provided by your application." -msgstr "" - -#: providers/class.two-factor-totp.php:144 -msgid "Invalid Two Factor Authentication code." -msgstr "" - -#: providers/class.two-factor-totp.php:147 -msgid "Invalid Two Factor Authentication secret key." -msgstr "" - -#: providers/class.two-factor-totp.php:424 -msgid "Authenticate" -msgstr "" From 1461ce782379f1c2958d309bf221a1340d7a0730 Mon Sep 17 00:00:00 2001 From: Sonic853 Date: Tue, 16 Apr 2019 18:13:48 +0800 Subject: [PATCH 3/3] Rollback one line of code in "class.two-factor-core.php". --- class.two-factor-core.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/class.two-factor-core.php b/class.two-factor-core.php index 44cbef13..bcaf438f 100644 --- a/class.two-factor-core.php +++ b/class.two-factor-core.php @@ -58,11 +58,7 @@ public static function add_hooks() { * Sites on WordPress 4.6+ benefit from just-in-time loading of translations. */ public static function load_textdomain() { - load_plugin_textdomain( - 'two-factor', - false, - dirname(plugin_basename(__FILE__)).'/languages/' - ); + load_plugin_textdomain( 'two-factor' ); } /**