From 72bbf93d2c31757d02259eba801e86ef8e71192d Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Fri, 28 Jan 2022 06:32:45 +0200 Subject: [PATCH] Add translations --- inc/class-adminsettings.php | 4 +- inc/class-ajax.php | 8 +- inc/class-webauthn-provider.php | 4 +- lang/two-factor-provider-webauthn-ru_RU.mo | Bin 0 -> 6047 bytes lang/two-factor-provider-webauthn-ru_RU.po | 233 +++++++++++++++++++++ lang/two-factor-provider-webauthn.pot | 14 +- 6 files changed, 248 insertions(+), 15 deletions(-) create mode 100644 lang/two-factor-provider-webauthn-ru_RU.mo create mode 100644 lang/two-factor-provider-webauthn-ru_RU.po diff --git a/inc/class-adminsettings.php b/inc/class-adminsettings.php index 311b4a0f..b56f1ee5 100644 --- a/inc/class-adminsettings.php +++ b/inc/class-adminsettings.php @@ -81,7 +81,7 @@ public function register_settings(): void { ], 'help' => __( // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText - 'Discouraged: user verificatoin is not required (e.g., in the interest of minimizing disruption to the user interaction flow).
' + 'Discouraged: user verification is not required (e.g., in the interest of minimizing disruption to the user interaction flow).
' . 'Preferred: user verification (like entering a PIN code) is preferred but not required for successful authentication.
' . 'Required: user verification is required for successful authentication. Please note that not all browsers support this setting.
', 'two-factor-provider-webauthn' @@ -116,7 +116,7 @@ public function register_settings(): void { 'help' => __( // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText 'Chrome for Android sometimes ignores the AppID extension required for interoperability between the old U2F and the modern WebAuthn protocol.
' - . 'When enabled, this compatibility enables the check whther the security key used was registered with U2F and if so, forces the use of the AppID extension.', + . 'When enabled, this hack enables the check whether the security key used was registered with U2F and if so, forces the use of the AppID extension.', 'two-factor-provider-webauthn' ), ] diff --git a/inc/class-ajax.php b/inc/class-ajax.php index 5b653fd9..85dea3f1 100644 --- a/inc/class-ajax.php +++ b/inc/class-ajax.php @@ -29,7 +29,7 @@ public function admin_init(): void { private function verify_nonce( string $nonce ): void { if ( false === check_ajax_referer( $nonce, false, false ) ) { - wp_send_json_error( __( 'The nonce has expired. Please reload the page and try again', 'two-factor-provider-webauthn' ), 400 ); + wp_send_json_error( __( 'The nonce has expired. Please reload the page and try again.', 'two-factor-provider-webauthn' ), 400 ); } } @@ -81,7 +81,7 @@ public function wp_ajax_webauthn_register(): void { /** @var mixed */ $context = unserialize( base64_decode( $context ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_unserialize if ( ! ( $context instanceof RegistrationContext ) ) { - throw new UnexpectedValueException( __( 'Unable to retrieve the registration context', 'two-factor-provider-webauthn' ) ); + throw new UnexpectedValueException( __( 'Unable to retrieve the registration context.', 'two-factor-provider-webauthn' ) ); } // We cannot use WordPress sanitization functions here: the credential must not be altered. @@ -91,7 +91,7 @@ public function wp_ajax_webauthn_register(): void { // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized $credential = $_POST['credential'] ?? null; // Dangerous to sanitize; the code will validate the value if ( ! is_string( $credential ) ) { - throw new InvalidArgumentException( __( 'Bad request', 'two-factor-provider-webauthn' ) ); + throw new InvalidArgumentException( __( 'Bad request.', 'two-factor-provider-webauthn' ) ); } /** @var mixed */ @@ -117,7 +117,7 @@ public function wp_ajax_webauthn_register(): void { 'nonce' => wp_create_nonce( "webauthn-register_key_{$user->ID}" ), ] ); } else { - throw new InvalidArgumentException( __( 'Bad request', 'two-factor-provider-webauthn' ) ); + throw new InvalidArgumentException( __( 'Bad request.', 'two-factor-provider-webauthn' ) ); } } catch ( Throwable $e ) { wp_send_json_error( $e->getMessage(), 400 ); diff --git a/inc/class-webauthn-provider.php b/inc/class-webauthn-provider.php index da94de1e..ceb8e037 100644 --- a/inc/class-webauthn-provider.php +++ b/inc/class-webauthn-provider.php @@ -104,7 +104,7 @@ public function validate_authentication( $user ) { /** @var mixed */ $context = unserialize( base64_decode( $context ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_unserialize -- the value was stored serialize()'d if ( ! ( $context instanceof AuthenticationContext ) ) { - throw new UnexpectedValueException( __( 'Unable to retrieve the authentication context', 'two-factor-provider-webauthn' ) ); + throw new UnexpectedValueException( __( 'Unable to retrieve the authentication context.', 'two-factor-provider-webauthn' ) ); } // We cannot use WordPress sanitization functions here: the response from webauthn must not be altered. @@ -115,7 +115,7 @@ public function validate_authentication( $user ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing $response = $_POST['webauthn_response'] ?? null; // Dangerous to sanitize; the code will validate the value if ( ! is_string( $response ) ) { - throw new InvalidArgumentException( __( 'Bad request', 'two-factor-provider-webauthn' ) ); + throw new InvalidArgumentException( __( 'Bad request.', 'two-factor-provider-webauthn' ) ); } /** @var mixed $credential */ diff --git a/lang/two-factor-provider-webauthn-ru_RU.mo b/lang/two-factor-provider-webauthn-ru_RU.mo new file mode 100644 index 0000000000000000000000000000000000000000..5694649d60f26cec150819657b27a01e6105be69 GIT binary patch literal 6047 zcmb7{-ESP#8OBeG>4#fdN-3q^hd^mkvg?q32$>LSVh2*}#EKn0Dz(yhckCUqp4raK z+PGC!zyzogk%Ee#NI(nfRV#I4V&Z(+mAGkP7o|&dk~y$HwU- zyU)&Tzr@?*THf)T7ALl+{@t44#7x)7BN$&q#;8~EV=50{(|5}V^pzQt={33Yu z$Bf~>`5IrZg0~d+Z-X~-{|-0>z6b6B@5h+zJ;T>^;IF~2fNy{|fGc1b{0F!by!sQ^ z26uzvVif!q_%rZU@OAKd@Nb|6-vzgW{{MVf;4Sbo+@I&`4)C1u%kbDpnubi!{H~0{uyP(YAzVmxqKIFa?w=U^L9P5(yp~hX*Y1Wd)rYvzMY#DjP_6n^ zGZ6cBE^6AO$&WO$u|E?X`{O2ZZptKYkrsp6)%lq>!qnzsZBFrr=zM@57N1w zeQ}f|rAFOLC!=`!3KkrULjMY;jdm>F<5ltNr%gXe%Vu9Kj;4LfR(2q)#!*nU2?J>` z?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M zE%RfE&!Tldm$Ng>Y_*?gpRn0!%v{uh?5xesW#`+^wx7P+WG`c9x&3(i@lv+JCYt;t z1CM1FWS)Pm_DPey!hTPf?6q|>w1J#kYCoPWv7$4#@UPfRb5`^9y2LFiR`pYUKCMc01NVDSsdhhw4cPp#q3=B zDV{9ztHstQv;j=u__9L9G}LKf{>y4Gdn-HLo@WlvT6l6iyI_k*ARH2x;e+MwG?6XI zkL7G(^J$$jVG#STSj&s)PAf)oOE`qYBrrGYG#*NOZ#lQ} z6ViI;*yv+AQ zo#lC+@wJ*N#u%3Y`Ip003s|>o}J7KZQVo{Wf6ylX1Fte9&faawQE^|NUW8JaSWUs-DAX})4-<@9LQX~FbuG^@;bg45ZWiy|pG|?*Yo@X!hfu;7d zc6+veZt&-SKGPl=FF>2hMv}>l-*z zR_XG>$j)gO^5%Td?$}W8l_aH#yjs-J=^OG;J(dT~E5!F)c8(Azxedxfue|P{w1+b) zKAxf>EAtZ7ifUVl;Jc_5bzi49EI>*A;_LD=mv?TxMKrH>=W&Dcx~f_49XY`Jg7RF_ zA$0vgKl=lA94D?eR6q+ZWEJ>QUI+RmJv&51yp)}Lt{2Qj#YXBeWDB(+LfPUy zP4g_2MhnnOS}9xCMYpg?T#IC>^K!^_D{DowaFIAEszJHeIN>Olq9W&dtvfnrp&)mr zdwTn%Vsc&9^#v4?cWEicu|$<3!;?Iq&Er(@lD=fqj+N)>(=8%ZljA^Osb}Jp2$Xj< z(QIMu;D6(^|h}(dDhxb=FO* z;lp|;9Ke#;A|L8dx!82>;-sRIQ`;)4JH literal 0 HcmV?d00001 diff --git a/lang/two-factor-provider-webauthn-ru_RU.po b/lang/two-factor-provider-webauthn-ru_RU.po new file mode 100644 index 00000000..20d61321 --- /dev/null +++ b/lang/two-factor-provider-webauthn-ru_RU.po @@ -0,0 +1,233 @@ +# Copyright (C) 2022 Volodymyr Kolesnykov +# This file is distributed under the MIT. +msgid "" +msgstr "" +"Project-Id-Version: WebAuthn Provider for Two Factor 1.0.0\n" +"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/two-factor-" +"provider-webauthn\n" +"POT-Creation-Date: 2022-01-28T06:26:54+02:00\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: WP-CLI 2.5.0\n" +"X-Domain: two-factor-provider-webauthn\n" + +#. Plugin Name of the plugin +msgid "WebAuthn Provider for Two Factor" +msgstr "WebAuthn Provider for Two Factor" + +#. Description of the plugin +msgid "WebAuthn Provider for Two Factor plugin." +msgstr "WebAuthn Provider для плагина Two Factor." + +#. Author of the plugin +msgid "Volodymyr Kolesnykov" +msgstr "Владимир Колесников" + +#: inc/class-admin.php:29 +msgid "TwoFactor WebAuthn Settings" +msgstr "Настройки TwoFactor WebAuthn" + +#: inc/class-admin.php:29 +msgid "TwoFactor WebAuthn" +msgstr "TwoFactor WebAuthn" + +#: inc/class-adminsettings.php:47 +msgid "Authenticator Attachment Modality" +msgstr "" + +#: inc/class-adminsettings.php:54 +msgctxt "Authenticator attachment modality" +msgid "None" +msgstr "Нет" + +#: inc/class-adminsettings.php:55 +msgctxt "Authenticator attachment modality" +msgid "Cross-platform" +msgstr "Кросс-платформенная" + +#: inc/class-adminsettings.php:56 +msgctxt "Authenticator attachment modality" +msgid "Platform" +msgstr "Платформозависимая" + +#: inc/class-adminsettings.php:58 +msgid "" +"Platform attachment is for authenticators physically bound to a " +"client device (like a fingerprint scanner on a smartphone).
Cross-" +"platform attachment is for removable authenticators which can \"roam\" " +"between client devices (like a security key).
Consider using None if you do not need to restrict your users to the specific class of " +"authenticators.
Details" +msgstr "" + +#: inc/class-adminsettings.php:71 +msgid "User Verification Requirement" +msgstr "Требование проверки пользователя" + +#: inc/class-adminsettings.php:78 +msgctxt "User Verification Requirement" +msgid "Discouraged" +msgstr "Не проверять" + +#: inc/class-adminsettings.php:79 +msgctxt "User Verification Requirement" +msgid "Preferred" +msgstr "По возможности" + +#: inc/class-adminsettings.php:80 +msgctxt "User Verification Requirement" +msgid "Required" +msgstr "Обязательно проверять" + +#: inc/class-adminsettings.php:82 +msgid "" +"Discouraged: user verification is not required (e.g., in the " +"interest of minimizing disruption to the user interaction flow).
Preferred: user verification (like entering a PIN code) is " +"preferred but not required for successful authentication.
Required: user verification is required for successful authentication. Please " +"note that not all browsers support this setting.
" +msgstr "" + +#: inc/class-adminsettings.php:94 +msgid "Timeout" +msgstr "Таймаут" + +#: inc/class-adminsettings.php:101 +msgid "" +"The default timeout for security key operations, in seconds. Set to 0 to use " +"the browser default value." +msgstr "Значение таймаута для операций с ключами безопасности по умолчанию (в секундах). Установите в 0 для использования значения браузера по умолчанию." + +#: inc/class-adminsettings.php:110 +msgid "U2F compatibility hack" +msgstr "Хак для совместивости с U2F" + +#: inc/class-adminsettings.php:116 +msgid "" +"Chrome for Android sometimes ignores the AppID extension required for " +"interoperability between the old U2F and the modern WebAuthn protocol.
When enabled, this hack enables the check whether the security key used was " +"registered with U2F and if so, forces the use of the AppID extension." +msgstr "" +"Chrome для Android иногда иенорирует расширение AppID, необходимое для " +"функциональной соместимости между старым протоколом U2F и новым протоколом " +"WebAuthn.
Разрешение данного хака включает проверку, был ли ключ " +"зарегистрирован при помощи U2F; если да, то поддержка AppID включается " +"принудительно." + +#: inc/class-ajax.php:32 +msgid "The nonce has expired. Please reload the page and try again." +msgstr "" +"Срок действия одноразового номера истёк. Пожалуйста, обновите страницу и " +"попытайтесь выполнить действие снова." + +#: inc/class-ajax.php:84 +msgid "Unable to retrieve the registration context." +msgstr "Не удалось получить контекст регистрации." + +#: inc/class-ajax.php:94 inc/class-ajax.php:120 +#: inc/class-webauthn-provider.php:118 +msgid "Bad request." +msgstr "Неверный запрос." + +#: inc/class-ajax.php:147 +msgid "Key name cannot be empty." +msgstr "Имя ключа не может быть пустым." + +#: inc/class-ajax.php:156 +msgid "Failed to rename the key." +msgstr "Не удалось переименовать ключ." + +#: inc/class-key-table.php:33 +msgid "Name" +msgstr "Имя" + +#: inc/class-key-table.php:34 +msgid "Counter" +msgstr "Счётчик" + +#: inc/class-key-table.php:35 +msgid "Added" +msgstr "Добавлен" + +#: inc/class-key-table.php:36 +msgid "Last Used" +msgstr "Последнее использование" + +#: inc/class-key-table.php:57 +msgid "Rename" +msgstr "Переименовать" + +#: inc/class-key-table.php:63 +msgid "Revoke" +msgstr "Отозвать" + +#: inc/class-webauthn-credential-store.php:121 +msgid "New Key" +msgstr "Новый ключ" + +#: inc/class-webauthn-provider.php:47 +msgctxt "Provider label" +msgid "WebAuthn" +msgstr "WebAuthn" + +#: inc/class-webauthn-provider.php:59 +msgid "" +"WebAuthn requires an HTTPS connection. Please use an alternative second " +"factor method." +msgstr "" +"Для использования WebAuthn требуется соединение HTTPS. Пожалуйста, " +"воспользуйтесь альтернативным методом двухфакторной аутентификации." + +#: inc/class-webauthn-provider.php:107 +msgid "Unable to retrieve the authentication context." +msgstr "Не удалось получить контекст аутентификации." + +#: views/login.php:2 +msgid "Please insert (and tap) your security key." +msgstr "Пожалуйста, вставьте и коснитесь ключа безопасности." + +#: views/user-options.php:3 +msgid "" +"Requires an HTTPS connection. Please configure your security keys in the Security Keys (WebAuthn) " +"section below." +msgstr "Требуется безопасное соединение (HTTPS). Для управления ключами воспользуйтесь секцией Ключи безопасности (WebAuthn)" + +#: views/user-profile.php:10 +msgid "Security Keys (WebAuthn)" +msgstr "Ключи безопасности (WebAuthn)" + +#: views/user-profile.php:14 +msgid "You need to enable JavaScript to manage security keys." +msgstr "Для управления ключами безопасности необходимо включить JavaScript." + +#: views/user-profile.php:21 +msgid "" +"WebAuthn requires an HTTPS connection. You will be unable to add new " +"security keys over HTTP." +msgstr "Для WebAuthn требуется соединение HTTPS. Добавление новых ключей по HTTP невозможно." + +#: views/user-profile.php:28 +msgid "Key name:" +msgstr "Имя ключа:" + +#: views/user-profile.php:30 +msgctxt "security key" +msgid "Register New Key" +msgstr "Зарегистрировать новый ключ" + +#: views/user-profile.php:53 +msgid "Are you sure to revoke this key?" +msgstr "Вы уверены, что хотите отозвать данный ключ?" + +#: views/user-profile.php:62 +msgid "New name:" +msgstr "Новое имя:" diff --git a/lang/two-factor-provider-webauthn.pot b/lang/two-factor-provider-webauthn.pot index b74d2c06..be3acb69 100644 --- a/lang/two-factor-provider-webauthn.pot +++ b/lang/two-factor-provider-webauthn.pot @@ -9,7 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2022-01-28T02:02:32+02:00\n" +"POT-Creation-Date: 2022-01-28T06:32:00+02:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.5.0\n" "X-Domain: two-factor-provider-webauthn\n" @@ -77,7 +77,7 @@ msgid "Required" msgstr "" #: inc/class-adminsettings.php:82 -msgid "Discouraged: user verificatoin is not required (e.g., in the interest of minimizing disruption to the user interaction flow).
Preferred: user verification (like entering a PIN code) is preferred but not required for successful authentication.
Required: user verification is required for successful authentication. Please note that not all browsers support this setting.
" +msgid "Discouraged: user verification is not required (e.g., in the interest of minimizing disruption to the user interaction flow).
Preferred: user verification (like entering a PIN code) is preferred but not required for successful authentication.
Required: user verification is required for successful authentication. Please note that not all browsers support this setting.
" msgstr "" #: inc/class-adminsettings.php:94 @@ -93,21 +93,21 @@ msgid "U2F compatibility hack" msgstr "" #: inc/class-adminsettings.php:116 -msgid "Chrome for Android sometimes ignores the AppID extension required for interoperability between the old U2F and the modern WebAuthn protocol.
When enabled, this compatibility enables the check whther the security key used was registered with U2F and if so, forces the use of the AppID extension." +msgid "Chrome for Android sometimes ignores the AppID extension required for interoperability between the old U2F and the modern WebAuthn protocol.
When enabled, this hack enables the check whether the security key used was registered with U2F and if so, forces the use of the AppID extension." msgstr "" #: inc/class-ajax.php:32 -msgid "The nonce has expired. Please reload the page and try again" +msgid "The nonce has expired. Please reload the page and try again." msgstr "" #: inc/class-ajax.php:84 -msgid "Unable to retrieve the registration context" +msgid "Unable to retrieve the registration context." msgstr "" #: inc/class-ajax.php:94 #: inc/class-ajax.php:120 #: inc/class-webauthn-provider.php:118 -msgid "Bad request" +msgid "Bad request." msgstr "" #: inc/class-ajax.php:147 @@ -156,7 +156,7 @@ msgid "WebAuthn requires an HTTPS connection. Please use an alternative second f msgstr "" #: inc/class-webauthn-provider.php:107 -msgid "Unable to retrieve the authentication context" +msgid "Unable to retrieve the authentication context." msgstr "" #: views/login.php:2