From 2e12732fa20769ec2d0383f43d097012c2f1ff34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87a=C4=9Fda=C5=9F=20SAYGILI?= Date: Sun, 27 Nov 2022 14:15:17 +0300 Subject: [PATCH 1/4] feat: add Turkish lang file --- src/Language/tr/Auth.php | 98 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 src/Language/tr/Auth.php diff --git a/src/Language/tr/Auth.php b/src/Language/tr/Auth.php new file mode 100644 index 000000000..b20716411 --- /dev/null +++ b/src/Language/tr/Auth.php @@ -0,0 +1,98 @@ + '{0} is not a valid authenticator.', + 'unknownUserProvider' => 'Unable to determine the User Provider to use.', + 'invalidUser' => 'Unable to locate the specified user.', + 'badAttempt' => 'Unable to log you in. Please check your credentials.', + 'noPassword' => 'Cannot validate a user without a password.', + 'invalidPassword' => 'Unable to log you in. Please check your password.', + 'noToken' => 'Every request must have a bearer token in the {0} header.', + 'badToken' => 'The access token is invalid.', + 'oldToken' => 'The access token has expired.', + 'noUserEntity' => 'User Entity must be provided for password validation.', + 'invalidEmail' => 'Unable to verify the email address matches the email on record.', + 'unableSendEmailToUser' => 'Sorry, there was a problem sending the email. We could not send an email to "{0}".', + 'throttled' => 'Too many requests made from this IP address. You may try again in {0} seconds.', + + 'email' => 'Email Address', + 'username' => 'Username', + 'password' => 'Password', + 'passwordConfirm' => 'Password (again)', + 'haveAccount' => 'Already have an account?', + + // Buttons + 'confirm' => 'Confirm', + 'send' => 'Send', + + // Registration + 'register' => 'Register', + 'registerDisabled' => 'Registration is not currently allowed.', + 'registerSuccess' => 'Welcome aboard!', + + // Login + 'login' => 'Login', + 'needAccount' => 'Need an account?', + 'rememberMe' => 'Remember me?', + 'forgotPassword' => 'Forgot your password?', + 'useMagicLink' => 'Use a Login Link', + 'magicLinkSubject' => 'Your Login Link', + 'magicTokenNotFound' => 'Unable to verify the link.', + 'magicLinkExpired' => 'Sorry, link has expired.', + 'checkYourEmail' => 'Check your email!', + 'magicLinkDetails' => 'We just sent you an email with a Login link inside. It is only valid for {0} minutes.', + 'successLogout' => 'You have successfully logged out.', + + // Passwords + 'errorPasswordLength' => 'Passwords must be at least {0, number} characters long.', + 'suggestPasswordLength' => 'Pass phrases - up to 255 characters long - make more secure passwords that are easy to remember.', + 'errorPasswordCommon' => 'Password must not be a common password.', + 'suggestPasswordCommon' => 'The password was checked against over 65k commonly used passwords or passwords that have been leaked through hacks.', + 'errorPasswordPersonal' => 'Passwords cannot contain re-hashed personal information.', + 'suggestPasswordPersonal' => 'Variations on your email address or username should not be used for passwords.', + 'errorPasswordTooSimilar' => 'Password is too similar to the username.', + 'suggestPasswordTooSimilar' => 'Do not use parts of your username in your password.', + 'errorPasswordPwned' => 'The password {0} has been exposed due to a data breach and has been seen {1, number} times in {2} of compromised passwords.', + 'suggestPasswordPwned' => '{0} should never be used as a password. If you are using it anywhere change it immediately.', + 'errorPasswordEmpty' => 'A Password is required.', + 'passwordChangeSuccess' => 'Password changed successfully', + 'userDoesNotExist' => 'Password was not changed. User does not exist', + 'resetTokenExpired' => 'Sorry. Your reset token has expired.', + + // Email Globals + 'emailInfo' => 'Some information about the person:', + 'emailIpAddress' => 'IP Address:', + 'emailDevice' => 'Device:', + 'emailDate' => 'Date:', + + // 2FA + 'email2FATitle' => 'Two Factor Authentication', + 'confirmEmailAddress' => 'Confirm your email address.', + 'emailEnterCode' => 'Confirm your Email', + 'emailConfirmCode' => 'Enter the 6-digit code we just sent to your email address.', + 'email2FASubject' => 'Your authentication code', + 'email2FAMailBody' => 'Your authentication code is:', + 'invalid2FAToken' => 'The code was incorrect.', + 'need2FA' => 'You must complete a two-factor verification.', + 'needVerification' => 'Check your email to complete account activation.', + + // Activate + 'emailActivateTitle' => 'Email Activation', + 'emailActivateBody' => 'We just sent an email to you with a code to confirm your email address. Copy that code and paste it below.', + 'emailActivateSubject' => 'Your activation code', + 'emailActivateMailBody' => 'Please use the code below to activate your account and start using the site.', + 'invalidActivateToken' => 'The code was incorrect.', + 'needActivate' => 'You must complete your registration by confirming the code sent to your email address.', + + // Groups + 'unknownGroup' => '{0} is not a valid group.', + 'missingTitle' => 'Groups must have a title.', + + // Permissions + 'unknownPermission' => '{0} is not a valid permission.', +]; From ad2b648bc7a232c0c3cb28678f8ab7c538971e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87a=C4=9Fda=C5=9F=20SAYGILI?= Date: Sun, 27 Nov 2022 14:35:10 +0300 Subject: [PATCH 2/4] feat: add Turkish lang file and test class --- src/Language/tr/Auth.php | 140 +++++++++++----------- tests/Language/TurkishTranslationTest.php | 21 ++++ 2 files changed, 91 insertions(+), 70 deletions(-) create mode 100644 tests/Language/TurkishTranslationTest.php diff --git a/src/Language/tr/Auth.php b/src/Language/tr/Auth.php index b20716411..d0afc5317 100644 --- a/src/Language/tr/Auth.php +++ b/src/Language/tr/Auth.php @@ -6,93 +6,93 @@ return [ // Exceptions - 'unknownAuthenticator' => '{0} is not a valid authenticator.', - 'unknownUserProvider' => 'Unable to determine the User Provider to use.', - 'invalidUser' => 'Unable to locate the specified user.', - 'badAttempt' => 'Unable to log you in. Please check your credentials.', - 'noPassword' => 'Cannot validate a user without a password.', - 'invalidPassword' => 'Unable to log you in. Please check your password.', - 'noToken' => 'Every request must have a bearer token in the {0} header.', - 'badToken' => 'The access token is invalid.', - 'oldToken' => 'The access token has expired.', - 'noUserEntity' => 'User Entity must be provided for password validation.', - 'invalidEmail' => 'Unable to verify the email address matches the email on record.', - 'unableSendEmailToUser' => 'Sorry, there was a problem sending the email. We could not send an email to "{0}".', - 'throttled' => 'Too many requests made from this IP address. You may try again in {0} seconds.', + 'unknownAuthenticator' => '{0} geçerli bir kimlik doğrulayıcı değil.', + 'unknownUserProvider' => 'Kullanılacak Kullanıcı Sağlayıcı belirlenemiyor.', + 'invalidUser' => 'Belirtilen kullanıcı bulunamadı.', + 'badAttempt' => 'Oturumunuz açılamıyor. Lütfen kimlik bilgilerinizi kontrol edin.', + 'noPassword' => 'Parola olmadan bir kullanıcı doğrulanamaz.', + 'invalidPassword' => 'Oturumunuz açılamıyor. Lütfen şifrenizi kontrol edin.', + 'noToken' => 'Her istediğin başlığında {0} bearer anahtar belirteci olmalıdır.', + 'badToken' => 'Erişim anahtarı geçersiz.', + 'oldToken' => 'Erişim anahtarının süresi doldu.', + 'noUserEntity' => 'Parola doğrulaması için Kullanıcı Varlığı sağlanmalıdır.', + 'invalidEmail' => 'E-posta adresinin kayıtlı e-posta ile eşleştiği doğrulanamıyor.', + 'unableSendEmailToUser' => 'Üzgünüz, e-posta gönderilirken bir sorun oluştu. "{0}" adresine e-posta gönderemedik.', + 'throttled' => 'Bu IP adresinden çok fazla istek yapıldı. {0} saniye sonra tekrar deneyebilirsiniz.', - 'email' => 'Email Address', - 'username' => 'Username', - 'password' => 'Password', - 'passwordConfirm' => 'Password (again)', - 'haveAccount' => 'Already have an account?', + 'email' => 'E-posta Adresi', + 'username' => 'Kullanıcı Adı', + 'password' => 'Şifre', + 'passwordConfirm' => 'Şifre (tekrar)', + 'haveAccount' => 'Zaten hesabınız var mı?', // Buttons - 'confirm' => 'Confirm', - 'send' => 'Send', + 'confirm' => 'Onayla', + 'send' => 'Gönder', // Registration - 'register' => 'Register', - 'registerDisabled' => 'Registration is not currently allowed.', - 'registerSuccess' => 'Welcome aboard!', + 'register' => 'Kayıt Ol', + 'registerDisabled' => 'Kayıt işlemine şu anda izin verilmiyor.', + 'registerSuccess' => 'Gemiye Hoşgeldiniz!', // Login - 'login' => 'Login', - 'needAccount' => 'Need an account?', - 'rememberMe' => 'Remember me?', - 'forgotPassword' => 'Forgot your password?', - 'useMagicLink' => 'Use a Login Link', - 'magicLinkSubject' => 'Your Login Link', - 'magicTokenNotFound' => 'Unable to verify the link.', - 'magicLinkExpired' => 'Sorry, link has expired.', - 'checkYourEmail' => 'Check your email!', - 'magicLinkDetails' => 'We just sent you an email with a Login link inside. It is only valid for {0} minutes.', - 'successLogout' => 'You have successfully logged out.', + 'login' => 'Giriş', + 'needAccount' => 'Bir hesaba mı ihtiyacınız var?', + 'rememberMe' => 'Beni hatırla?', + 'forgotPassword' => 'Şifrenizi mı unuttunuz?', + 'useMagicLink' => 'Giriş Bağlantısı Kullanın', + 'magicLinkSubject' => 'Giriş Bağlantınız', + 'magicTokenNotFound' => 'Bağlantı doğrulanamıyor.', + 'magicLinkExpired' => 'Üzgünüm, bağlantının süresi doldu.', + 'checkYourEmail' => 'E-postanı kontrol et!', + 'magicLinkDetails' => 'Az önce size içinde bir Giriş bağlantısı olan bir e-posta gönderdik. Bağlantı {0} dakika için geçerlidir.', + 'successLogout' => 'Başarıyla çıkış yaptınız.', // Passwords - 'errorPasswordLength' => 'Passwords must be at least {0, number} characters long.', - 'suggestPasswordLength' => 'Pass phrases - up to 255 characters long - make more secure passwords that are easy to remember.', - 'errorPasswordCommon' => 'Password must not be a common password.', - 'suggestPasswordCommon' => 'The password was checked against over 65k commonly used passwords or passwords that have been leaked through hacks.', - 'errorPasswordPersonal' => 'Passwords cannot contain re-hashed personal information.', - 'suggestPasswordPersonal' => 'Variations on your email address or username should not be used for passwords.', - 'errorPasswordTooSimilar' => 'Password is too similar to the username.', - 'suggestPasswordTooSimilar' => 'Do not use parts of your username in your password.', - 'errorPasswordPwned' => 'The password {0} has been exposed due to a data breach and has been seen {1, number} times in {2} of compromised passwords.', - 'suggestPasswordPwned' => '{0} should never be used as a password. If you are using it anywhere change it immediately.', - 'errorPasswordEmpty' => 'A Password is required.', - 'passwordChangeSuccess' => 'Password changed successfully', - 'userDoesNotExist' => 'Password was not changed. User does not exist', - 'resetTokenExpired' => 'Sorry. Your reset token has expired.', + 'errorPasswordLength' => 'Şifre en az {0, number} karakter uzunluğunda olmalıdır.', + 'suggestPasswordLength' => 'En fazla 255 karakter uzunluğundaki geçiş ifadeleri, hatırlaması kolay, daha güvenli şifreler oluşturur.', + 'errorPasswordCommon' => 'Şifre genel bir şifre olmamalıdır.', + 'suggestPasswordCommon' => 'Şifre, yaygın olarak kullanılan 65 binden fazla şifre veya bilgisayar korsanlığı yoluyla sızdırılmış şifreler açısından kontrol edildi.', + 'errorPasswordPersonal' => 'Parolalar, yeniden oluşturulmuş kişisel bilgileri içeremez.', + 'suggestPasswordPersonal' => 'E-posta adresiniz veya kullanıcı adınızdaki varyasyonlar, şifreler için kullanılmamalıdır.', + 'errorPasswordTooSimilar' => 'Şifre, kullanıcı adınıza çok benziyor.', + 'suggestPasswordTooSimilar' => 'Kullanıcı adınızın bazı kısımlarını şifrenizde kullanmayın.', + 'errorPasswordPwned' => '{0} şifresi, bir veri ihlali nedeniyle açığa çıktı ve güvenliği ihlal edilmiş şifrelerin {2} tanesinde {1, sayı} kez görüldü.', + 'suggestPasswordPwned' => '{0} asla şifre olarak kullanılmamalıdır. Herhangi bir yerde kullanıyorsanız hemen değiştirin.', + 'errorPasswordEmpty' => 'Şifre gerekli.', + 'passwordChangeSuccess' => 'Şifre başarıyla değiştirildi.', + 'userDoesNotExist' => 'Şifre değiştirilmedi. Kullanıcı yok.', + 'resetTokenExpired' => 'Üzgünüz. Sıfırlama anahtarınızın süresi doldu.', // Email Globals - 'emailInfo' => 'Some information about the person:', - 'emailIpAddress' => 'IP Address:', - 'emailDevice' => 'Device:', - 'emailDate' => 'Date:', + 'emailInfo' => 'Kişi hakkında bazı bilgiler:', + 'emailIpAddress' => 'IP Adresi:', + 'emailDevice' => 'Cihaz:', + 'emailDate' => 'Tarih:', // 2FA - 'email2FATitle' => 'Two Factor Authentication', - 'confirmEmailAddress' => 'Confirm your email address.', - 'emailEnterCode' => 'Confirm your Email', - 'emailConfirmCode' => 'Enter the 6-digit code we just sent to your email address.', - 'email2FASubject' => 'Your authentication code', - 'email2FAMailBody' => 'Your authentication code is:', - 'invalid2FAToken' => 'The code was incorrect.', - 'need2FA' => 'You must complete a two-factor verification.', - 'needVerification' => 'Check your email to complete account activation.', + 'email2FATitle' => 'İki Faktörlü Kimlik Doğrulama', + 'confirmEmailAddress' => 'E-Posta adresini onayla.', + 'emailEnterCode' => 'E-posta adresinizi onaylayın.', + 'emailConfirmCode' => 'Az önce e-posta adresinize gönderdiğimiz 6 haneli kodu girin.', + 'email2FASubject' => 'Kimlik doğrulama kodunuz', + 'email2FAMailBody' => 'Kimlik doğrulama kodunuz:', + 'invalid2FAToken' => 'Kod yanlış.', + 'need2FA' => 'İki faktörlü doğrulamayı tamamlamanız gerekir.', + 'needVerification' => 'Hesap aktivasyonunu tamamlamak için e-postanızı kontrol edin.', // Activate - 'emailActivateTitle' => 'Email Activation', - 'emailActivateBody' => 'We just sent an email to you with a code to confirm your email address. Copy that code and paste it below.', - 'emailActivateSubject' => 'Your activation code', - 'emailActivateMailBody' => 'Please use the code below to activate your account and start using the site.', - 'invalidActivateToken' => 'The code was incorrect.', - 'needActivate' => 'You must complete your registration by confirming the code sent to your email address.', + 'emailActivateTitle' => 'E-Posta Aktivasyonu', + 'emailActivateBody' => 'Az önce size e-posta adresinizi doğrulamak için bir kod içeren bir e-posta gönderdik. Bu kodu kopyalayın ve aşağıya yapıştırın.', + 'emailActivateSubject' => 'Aktivasyon kodunuz', + 'emailActivateMailBody' => 'Hesabınızı etkinleştirmek ve siteyi kullanmaya başlamak için lütfen aşağıdaki kodu kullanın.', + 'invalidActivateToken' => 'Kod yanlıştı.', + 'needActivate' => 'E-posta adresinize gönderilen kodu onaylayarak kaydınızı tamamlamanız gerekmektedir.', // Groups - 'unknownGroup' => '{0} is not a valid group.', - 'missingTitle' => 'Groups must have a title.', + 'unknownGroup' => '{0} geçerli bir grup değil.', + 'missingTitle' => 'Grupların bir başlığı olmalıdır.', // Permissions - 'unknownPermission' => '{0} is not a valid permission.', + 'unknownPermission' => '{0} geçerli bir izin değil.', ]; diff --git a/tests/Language/TurkishTranslationTest.php b/tests/Language/TurkishTranslationTest.php new file mode 100644 index 000000000..df5afd3bc --- /dev/null +++ b/tests/Language/TurkishTranslationTest.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Tests\Language; + +/** + * @internal + */ +final class TurkishTranslationTest extends AbstractTranslationTestCase +{ +} From d1165e53dd830d8d33d997ffab78fa44c3de41cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87a=C4=9Fda=C5=9F=20SAYGILI?= Date: Sun, 27 Nov 2022 15:14:29 +0300 Subject: [PATCH 3/4] feat: turkish translation test line --- tests/Language/AbstractTranslationTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Language/AbstractTranslationTestCase.php b/tests/Language/AbstractTranslationTestCase.php index c880f69c4..c9f954a0d 100644 --- a/tests/Language/AbstractTranslationTestCase.php +++ b/tests/Language/AbstractTranslationTestCase.php @@ -72,7 +72,7 @@ abstract class AbstractTranslationTestCase extends TestCase SlovakTranslationTest::class => 'sk', // SwedishTranslationTest::class => 'sv-SE', // ThaiTranslationTest::class => 'th', - // TurkishTranslationTest::class => 'tr', + TurkishTranslationTest::class => 'tr', // UkrainianTranslationTest::class => 'uk', // VietnameseTranslationTest::class => 'vi', // SimplifiedChineseTranslationTest::class => 'zh-CN', From 771ccc804ab3bdda84408e79b87d64b5e2ae23aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87a=C4=9Fda=C5=9F=20SAYGILI?= Date: Sun, 27 Nov 2022 18:59:25 +0300 Subject: [PATCH 4/4] feat: turkish language support suggested change --- src/Language/tr/Auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Language/tr/Auth.php b/src/Language/tr/Auth.php index d0afc5317..e23cf483a 100644 --- a/src/Language/tr/Auth.php +++ b/src/Language/tr/Auth.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace CodeIgniter\Shield\Language\en; +namespace CodeIgniter\Shield\Language\tr; return [ // Exceptions