Skip to content

Commit

Permalink
Reduce translation message categories
Browse files Browse the repository at this point in the history
  • Loading branch information
yurabakhtin committed Oct 18, 2024
1 parent 670b642 commit b5fd1f4
Show file tree
Hide file tree
Showing 104 changed files with 1,796 additions and 2,053 deletions.
2 changes: 1 addition & 1 deletion controllers/UserSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class UserSettingsController extends BaseAccountController
public function init()
{
$this->setActionTitles([
'index' => Yii::t('TwofaModule.config', 'Two-Factor Authentication'),
'index' => Yii::t('TwofaModule.base', 'Two-Factor Authentication'),
]);
return parent::init();
}
Expand Down
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Changelog
----------------------
- Enh #58: Tests for `next` version
- Enh #65: Use PHP CS Fixer
- Enh #66: Reduce translation message categories

1.1.3 (June 8, 2023)
--------------------
Expand Down
8 changes: 4 additions & 4 deletions drivers/GoogleAuthenticatorDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ public function renderUserSettings($params)
{
Yii::$app->getView()->registerJsConfig('twofa', [
'text' => [
'confirm.action.header' => Yii::t('TwofaModule.config', '<strong>Request</strong> new code'),
'confirm.action.question' => Yii::t('TwofaModule.config', 'Do you really want to request a new code?') . '<br><br>'
. Yii::t('TwofaModule.config', 'Please <strong>do not forget</strong> to update the code in your authenticator app! If you do not do so, you will not be able to login.'),
'confirm.action.button' => Yii::t('TwofaModule.config', 'Request new code'),
'confirm.action.header' => Yii::t('TwofaModule.base', '<strong>Request</strong> new code'),
'confirm.action.question' => Yii::t('TwofaModule.base', 'Do you really want to request a new code?') . '<br><br>'
. Yii::t('TwofaModule.base', 'Please <strong>do not forget</strong> to update the code in your authenticator app! If you do not do so, you will not be able to login.'),
'confirm.action.button' => Yii::t('TwofaModule.base', 'Request new code'),
],
]);

Expand Down
66 changes: 44 additions & 22 deletions messages/am/base.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,47 @@
<?php

return [
'Code' => 'ኮድ',
'<strong>Two-factor</strong> authentication' => '',
'A confirmation code hast just been sent to your email address. Please enter the code from the email in order to proceed.' => '',
'Authentication method' => '',
'Code is not valid!' => '',
'Code:' => '',
'Date and time:' => '',
'Disable two-factor authentication (not recommended)' => '',
'Email' => '',
'Hello {displayName}!' => '',
'Log out' => '',
'Open the two-factor authentication app on your device to view your authentication code and verify your identity.' => '',
'Pin code' => '',
'Please enter your verifying code.' => '',
'Remember this browser for {0} days' => '',
'Time-based one-time passwords (e.g. Google Authenticator)' => '',
'Two-Factor Authentication' => '',
'Verify' => '',
'Verifying code is not valid!' => '',
'Your account is secured by a two-factor authentication system. Please use the following code to proceed.' => '',
'Your login verification code' => '',
'<strong>Request</strong> new code' => '',
'<strong>Two-Factor Authentication</strong> module configuration' => '',
'<strong>Two-Factor Authentication</strong> settings' => '',
'<strong>Two-factor</strong> authentication' => '',
'A confirmation code hast just been sent to your email address. Please enter the code from the email in order to proceed.' => '',
'Account:' => '',
'Authentication method' => '',
'Can\'t scan the code?' => '',
'Code' => 'ኮድ',
'Code is not valid!' => '',
'Code:' => '',
'Date and time:' => '',
'Default method for the mandatory groups' => '',
'Disable two-factor authentication (not recommended)' => '',
'Do you really want to request a new code?' => '',
'Email' => '',
'Enabled methods' => '',
'Google Authenticator' => '',
'Hello {displayName}!' => '',
'Install an application that implements a time-based one-time password (TOTP) algorithm, such as {googleAuthenticatorLink}, and use it to scan the QR code shown below.' => '',
'Leave empty to disable this feature.' => '',
'Length of verifying code' => '',
'List of IPs or subnets to whitelist, currently yours is {0}. Use coma separator to create a list, example: "{0}, 127.0.0.1"' => '',
'Log out' => '',
'Mandatory for the following groups' => '',
'Open the two-factor authentication app on your device to view your authentication code and verify your identity.' => '',
'Pin code' => '',
'Please <strong>do not forget</strong> to update the code in your authenticator app! If you do not do so, you will not be able to login.' => '',
'Please enter your verifying code.' => '',
'Remember browser option amount of days' => '',
'Remember this browser for {0} days' => '',
'Request new code' => '',
'Secret:' => '',
'This module is disabled because no drivers are selected, however users from the enforced groups always fallback to {defaultDriverName} driver by default.' => '',
'Time based: Yes' => '',
'Time-based one-time passwords (e.g. Google Authenticator)' => '',
'To connect the app manually, provide the following details to the TOTP app (e.g. Google Authenticator).' => '',
'Trusted networks list' => '',
'Two-Factor Authentication' => '',
'Two-factor authentication (2FA) provides an additional level of security for your account. Once enabled, you will be prompted to enter a code in addition to entering your username and password.' => '',
'Verify' => '',
'Verifying code is not valid!' => '',
'Your account is secured by a two-factor authentication system. Please use the following code to proceed.' => '',
'Your login verification code' => '',
];
28 changes: 0 additions & 28 deletions messages/am/config.php

This file was deleted.

66 changes: 44 additions & 22 deletions messages/an/base.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,47 @@
<?php

return [
'Code' => 'Codigo',
'Email' => 'Correu-e',
'<strong>Two-factor</strong> authentication' => '',
'A confirmation code hast just been sent to your email address. Please enter the code from the email in order to proceed.' => '',
'Authentication method' => '',
'Code is not valid!' => '',
'Code:' => '',
'Date and time:' => '',
'Disable two-factor authentication (not recommended)' => '',
'Hello {displayName}!' => '',
'Log out' => '',
'Open the two-factor authentication app on your device to view your authentication code and verify your identity.' => '',
'Pin code' => '',
'Please enter your verifying code.' => '',
'Remember this browser for {0} days' => '',
'Time-based one-time passwords (e.g. Google Authenticator)' => '',
'Two-Factor Authentication' => '',
'Verify' => '',
'Verifying code is not valid!' => '',
'Your account is secured by a two-factor authentication system. Please use the following code to proceed.' => '',
'Your login verification code' => '',
'<strong>Request</strong> new code' => '',
'<strong>Two-Factor Authentication</strong> module configuration' => '',
'<strong>Two-Factor Authentication</strong> settings' => '',
'<strong>Two-factor</strong> authentication' => '',
'A confirmation code hast just been sent to your email address. Please enter the code from the email in order to proceed.' => '',
'Account:' => '',
'Authentication method' => '',
'Can\'t scan the code?' => '',
'Code' => 'Codigo',
'Code is not valid!' => '',
'Code:' => '',
'Date and time:' => '',
'Default method for the mandatory groups' => '',
'Disable two-factor authentication (not recommended)' => '',
'Do you really want to request a new code?' => '',
'Email' => 'Correu-e',
'Enabled methods' => '',
'Google Authenticator' => '',
'Hello {displayName}!' => '',
'Install an application that implements a time-based one-time password (TOTP) algorithm, such as {googleAuthenticatorLink}, and use it to scan the QR code shown below.' => '',
'Leave empty to disable this feature.' => '',
'Length of verifying code' => '',
'List of IPs or subnets to whitelist, currently yours is {0}. Use coma separator to create a list, example: "{0}, 127.0.0.1"' => '',
'Log out' => '',
'Mandatory for the following groups' => '',
'Open the two-factor authentication app on your device to view your authentication code and verify your identity.' => '',
'Pin code' => '',
'Please <strong>do not forget</strong> to update the code in your authenticator app! If you do not do so, you will not be able to login.' => '',
'Please enter your verifying code.' => '',
'Remember browser option amount of days' => '',
'Remember this browser for {0} days' => '',
'Request new code' => '',
'Secret:' => '',
'This module is disabled because no drivers are selected, however users from the enforced groups always fallback to {defaultDriverName} driver by default.' => '',
'Time based: Yes' => '',
'Time-based one-time passwords (e.g. Google Authenticator)' => '',
'To connect the app manually, provide the following details to the TOTP app (e.g. Google Authenticator).' => '',
'Trusted networks list' => '',
'Two-Factor Authentication' => '',
'Two-factor authentication (2FA) provides an additional level of security for your account. Once enabled, you will be prompted to enter a code in addition to entering your username and password.' => '',
'Verify' => '',
'Verifying code is not valid!' => '',
'Your account is secured by a two-factor authentication system. Please use the following code to proceed.' => '',
'Your login verification code' => '',
];
28 changes: 0 additions & 28 deletions messages/an/config.php

This file was deleted.

27 changes: 25 additions & 2 deletions messages/ar/base.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,47 @@
<?php
return array (
return [
'<strong>Request</strong> new code' => '<strong>طلب</strong> رمز جديد',
'<strong>Two-Factor Authentication</strong> module configuration' => 'إعداد وحدة <strong>المصادقة الثنائية</strong>',
'<strong>Two-Factor Authentication</strong> settings' => 'إعدادات <strong>المصادقة الثنائية</strong>',
'<strong>Two-factor</strong> authentication' => 'المصادقة <strong>الثنائية</strong>',
'A confirmation code hast just been sent to your email address. Please enter the code from the email in order to proceed.' => 'لقد تم للتو إرسال رمز التأكيد إلى عنوان بريدك الإلكتروني. الرجاء إدخال الرمز من البريد الإلكتروني للمتابعة.',
'Account:' => 'الحساب:',
'Authentication method' => 'طريقة المصادقة',
'Can\'t scan the code?' => 'ألا يمكن مسح الرمز؟',
'Code' => 'الرمز',
'Code is not valid!' => 'الرمز غير صالح',
'Code:' => 'الرمز:',
'Date and time:' => 'التاريخ و الوقت:',
'Default method for the mandatory groups' => 'الطريقة الافتراضية للمجموعات الإلزامية',
'Disable two-factor authentication (not recommended)' => 'تعطيل المصادقة الثنائية (غير مستحسن)',
'Do you really want to request a new code?' => 'هل تريد حقًا طلب رمز جديد؟',
'Email' => 'البريد الإلكتروني',
'Enabled methods' => 'الطرق الممكنة',
'Google Authenticator' => 'أداة مصادقة جوجل',
'Hello {displayName}!' => 'مرحباً {displayName}!',
'Install an application that implements a time-based one-time password (TOTP) algorithm, such as {googleAuthenticatorLink}, and use it to scan the QR code shown below.' => 'قم بتثبيت تطبيق يطبق خوارزمية كلمة المرور لمرة واحدة (TOTP) المستندة إلى الوقت، مثل {googleAuthenticatorLink}، واستخدمه لمسح رمز الاستجابة السريعة الموضح أدناه.',
'Leave empty to disable this feature.' => 'اتركه فارغًا لتعطيل هذه الميزة.',
'Length of verifying code' => 'طول رمز التحقق',
'List of IPs or subnets to whitelist, currently yours is {0}. Use coma separator to create a list, example: "{0}, 127.0.0.1"' => 'قائمة عناوين IP أو الشبكات الفرعية المراد إدراجها في القائمة البيضاء، القائمة حاليًا هي {0}. استخدم فاصل الفاصلة لإنشاء قائمة، على سبيل المثال: "{0}، 127.0.0.1"',
'Log out' => 'تسجيل الخروج',
'Mandatory for the following groups' => 'إلزامية للمجموعات التالية',
'Open the two-factor authentication app on your device to view your authentication code and verify your identity.' => 'افتح تطبيق المصادقة الثنائية على جهازك لعرض رمز المصادقة الخاص بك والتحقق من هويتك.',
'Pin code' => 'رمز التعريف الشخصي',
'Please <strong>do not forget</strong> to update the code in your authenticator app! If you do not do so, you will not be able to login.' => 'من فضلك <strong>لا تنس</strong> تحديث الكود في تطبيق المصادقة الخاص بك! إذا لم تقم بذلك، فلن تتمكن من تسجيل الدخول.',
'Please enter your verifying code.' => 'الرجاء إدخال رمز التحقق الخاص بك.',
'Remember browser option amount of days' => 'مدة خيار تذكر المتصفح من الأيام',
'Remember this browser for {0} days' => 'تذكر هذا المتصفح لمدة {0} يومًا',
'Request new code' => 'طلب رمز جديد',
'Secret:' => 'الرمز السري:',
'This module is disabled because no drivers are selected, however users from the enforced groups always fallback to {defaultDriverName} driver by default.' => 'تم تعطيل هذه الوحدة نظرًا لعدم تحديد أي برامج تشغيل، إلا أن المستخدمين من المجموعات المفروضة يلجأون دائمًا إلى برنامج التشغيل {defaultDriverName} بشكل افتراضي.',
'Time based: Yes' => 'على أساس الوقت: نعم',
'Time-based one-time passwords (e.g. Google Authenticator)' => 'كلمات المرور المستندة إلى الوقت والتي تستخدم لمرة واحدة (مثل Google Authenticator)',
'To connect the app manually, provide the following details to the TOTP app (e.g. Google Authenticator).' => 'لتوصيل التطبيق يدويًا، قم بتقديم التفاصيل التالية إلى تطبيق TOTP (مثل Google Authenticator).',
'Trusted networks list' => 'قائمة الشبكات الموثوقة',
'Two-Factor Authentication' => 'المصادقة الثنائية',
'Two-factor authentication (2FA) provides an additional level of security for your account. Once enabled, you will be prompted to enter a code in addition to entering your username and password.' => 'توفر المصادقة الثنائية (2FA) مستوى إضافيًا من الأمان لحسابك. بمجرد التمكين، سيُطلب منك إدخال رمز بالإضافة إلى إدخال اسم المستخدم وكلمة المرور الخاصين بك.',
'Verify' => 'التحقق',
'Verifying code is not valid!' => 'رمز التحقق غير صالح!',
'Your account is secured by a two-factor authentication system. Please use the following code to proceed.' => 'يتم تأمين حسابك من خلال نظام المصادقة الثنائية. الرجاء استخدام الكود التالي للمتابعة.',
'Your login verification code' => 'رمز التحقق من تسجيل الدخول الخاص بك',
);
];
Loading

0 comments on commit b5fd1f4

Please sign in to comment.