From 66ded8cc2239e4ba0779e72fd724eb3807a7fd8d Mon Sep 17 00:00:00 2001 From: resurtm Date: Wed, 11 Jan 2017 22:46:21 +0600 Subject: [PATCH 1/2] testing translation --- lib/User/resources/i18n/message.php | 46 +++--- lib/User/resources/i18n/ru/usuario.php | 199 +++++++++++++++++++++++++ 2 files changed, 222 insertions(+), 23 deletions(-) create mode 100644 lib/User/resources/i18n/ru/usuario.php diff --git a/lib/User/resources/i18n/message.php b/lib/User/resources/i18n/message.php index 57bd346..d87a049 100644 --- a/lib/User/resources/i18n/message.php +++ b/lib/User/resources/i18n/message.php @@ -13,30 +13,30 @@ return [ 'sourcePath' => __DIR__ . '/../../../User', 'messagePath' => __DIR__, 'languages' => [ - 'ca', - 'da', - 'de', - 'de-DU', - 'es', - 'fa-IR', - 'fi', - 'fr', - 'hr', - 'hu', - 'it', - 'kk', - 'lt', - 'nl', - 'pl', - 'pt-BR', - 'pt-PT', - 'ro', +// 'ca', +// 'da', +// 'de', +// 'de-DU', +// 'es', +// 'fa-IR', +// 'fi', +// 'fr', +// 'hr', +// 'hu', +// 'it', +// 'kk', +// 'lt', +// 'nl', +// 'pl', +// 'pt-BR', +// 'pt-PT', +// 'ro', 'ru', - 'th', - 'tr_TR', - 'uk', - 'vi', - 'zh-CN', +// 'th', +// 'tr_TR', +// 'uk', +// 'vi', +// 'zh-CN', ], 'translator' => 'Yii::t', 'sort' => false, diff --git a/lib/User/resources/i18n/ru/usuario.php b/lib/User/resources/i18n/ru/usuario.php new file mode 100644 index 0000000..ce221eb --- /dev/null +++ b/lib/User/resources/i18n/ru/usuario.php @@ -0,0 +1,199 @@ + '(неустановлено)', + 'A confirmation message has been sent to your new email address' => '', + 'A message has been sent to your email address. ' => '', + 'A new confirmation link has been sent' => '', + 'A password will be generated automatically if not provided' => '', + 'Account' => 'Аккаунт', + 'Account confirmation' => 'Подтверждение аккаунта', + 'Account details' => 'Детали аккаунта', + 'Account details have been updated' => '', + 'Account settings' => 'Настройки аккаунта', + 'Already registered? Sign in!' => '', + 'An email has been sent with instructions for resetting your password' => '', + 'An error occurred processing your request' => '', + 'Are you sure you want to block this user?' => '', + 'Are you sure you want to confirm this user?' => '', + 'Are you sure you want to delete this user?' => '', + 'Are you sure you want to unblock this user?' => '', + 'Are you sure? Deleted user can not be restored' => '', + 'Are you sure? There is no going back' => '', + 'Assignments' => '', + 'Assignments have been updated' => '', + 'Auth item with such name already exists' => '', + 'Authorization item successfully created.' => '', + 'Authorization item successfully removed.' => '', + 'Authorization item successfully updated.' => '', + 'Awesome, almost there. ' => '', + 'Bio' => '', + 'Block' => '', + 'Block status' => '', + 'Blocked at {0, date, MMMM dd, YYYY HH:mm}' => '', + 'Change your avatar at Gravatar.com' => '', + 'Children' => '', + 'Class "{0}" does not exist' => '', + 'Complete password reset on {0}' => '', + 'Confirm' => '', + 'Confirm account on {0}' => '', + 'Confirm email change on {0}' => '', + 'Confirmation' => '', + 'Confirmation status' => '', + 'Confirmation time' => '', + 'Confirmed' => '', + 'Confirmed at {0, date, MMMM dd, YYYY HH:mm}' => '', + 'Connect' => '', + 'Continue' => '', + 'Create' => '', + 'Create a user account' => '', + 'Create new permission' => '', + 'Create new role' => '', + 'Credentials will be sent to the user by email' => '', + 'Current password' => '', + 'Current password is not valid' => '', + 'Delete' => '', + 'Delete account' => '', + 'Description' => '', + 'Didn\'t receive confirmation message?' => '', + 'Disconnect' => '', + 'Don\'t have an account? Sign up!' => '', + 'Email' => '', + 'Email (public)' => '', + 'Error occurred while changing password' => '', + 'Error occurred while confirming user' => '', + 'Error occurred while deleting user' => '', + 'Finish' => '', + 'Forgot password?' => '', + 'Gravatar email' => '', + 'Hello' => '', + 'If you already registered, sign in and connect this account on settings page' => '', + 'If you cannot click the link, please try pasting the text into your browser' => '', + 'If you did not make this request you can ignore this email' => '', + 'In order to complete your registration, please click the link below' => '', + 'In order to complete your request, please click the link below' => '', + 'In order to finish your registration, we need you to enter following fields' => '', + 'Information' => '', + 'Invalid login or password' => '', + 'Invalid or expired link' => '', + 'Invalid value' => '', + 'It will be deleted forever' => '', + 'Items' => '', + 'Joined on {0, date}' => '', + 'Location' => '', + 'Login' => '', + 'Logout' => '', + 'Manage users' => '', + 'Name' => '', + 'Networks' => '', + 'New email' => '', + 'New password' => '', + 'New permission' => '', + 'New role' => '', + 'New user' => '', + 'Not blocked' => '', + 'Not found' => '', + 'Once you delete your account, there is no going back' => '', + 'Password' => '', + 'Password has been changed' => '', + 'Permissions' => '', + 'Please be certain' => '', + 'Please click the link below to complete your password reset' => '', + 'Please fix following errors:' => '', + 'Profile' => '', + 'Profile details' => '', + 'Profile details have been updated' => '', + 'Profile settings' => '', + 'Recover your password' => '', + 'Recovery link is invalid or expired. Please try requesting a new one.' => '', + 'Recovery message sent' => '', + 'Registration IP' => '', + 'Registration ip' => '', + 'Registration on this website is disabled' => '', + 'Registration time' => '', + 'Remember me next time' => '', + 'Request new confirmation message' => '', + 'Reset your password' => '', + 'Roles' => '', + 'Rule' => '', + 'Rule class can not be instantiated' => '', + 'Rule class must extend "yii +bacRule"' => '', + 'Rule name' => '', + 'Save' => '', + 'Sign in' => '', + 'Sign up' => '', + 'Something went wrong' => '', + 'Thank you for signing up on {0}' => '', + 'Thank you, registration is now complete.' => '', + 'The confirmation link is invalid or expired. Please try requesting a new one.' => '', + 'There is neither role nor permission with name "{0}"' => '', + 'This account has already been connected to another user' => '', + 'This email address has already been taken' => '', + 'This username has already been taken' => '', + 'Time zone' => '', + 'Time zone is not valid' => '', + 'Unable to confirm user. Please, try again.' => '', + 'Unable to create an account.' => '', + 'Unable to create authorization item.' => '', + 'Unable to delete user. Please, try again later.' => '', + 'Unable to remove authorization item.' => '', + 'Unable to send confirmation link' => '', + 'Unable to update authorization item.' => '', + 'Unable to update block status.' => '', + 'Unblock' => '', + 'Unconfirmed' => '', + 'Update' => 'Обновить', + 'Update assignments' => '', + 'Update permission' => '', + 'Update role' => 'Обновить роли', + 'Update user account' => '', + 'User block status has been updated.' => '', + 'User has been confirmed' => '', + 'User has been created' => '', + 'User has been deleted' => '', + 'User is not found' => 'Пользователь не найден', + 'Username' => 'Имя пользователя', + 'Users' => 'Пользователи', + 'VKontakte' => 'ВКонтакте', + 'We couldn\'t re-send the mail to confirm your address. ' => '', + 'We have generated a password for you' => '', + 'We have received a request to change the email address for your account on {0}' => '', + 'We have received a request to reset the password for your account on {0}' => '', + 'We have sent confirmation links to both old and new email addresses. ' => '', + 'Website' => '', + 'Welcome to {0}' => '', + 'Yandex' => 'Яндекс', + 'You can assign multiple roles or permissions to user by using the form below' => '', + 'You can connect multiple accounts to be able to log in using them' => '', + 'You cannot remove your own account' => '', + 'You need to confirm your email address' => '', + 'Your account details have been updated' => '', + 'Your account has been blocked' => '', + 'Your account has been blocked.' => '', + 'Your account has been completely deleted' => '', + 'Your account has been connected' => '', + 'Your account has been created' => '', + 'Your account has been created and a message with further instructions has been sent to your email' => '', + 'Your account on {0} has been created' => '', + 'Your confirmation token is invalid or expired' => '', + 'Your email address has been changed' => 'Ваш почтовый адрес был обновлён', + 'Your profile has been updated' => 'Ваш профиль был обновлён', + '{0, date, MMMM dd, YYYY HH:mm}' => '', +]; From e221e723f09dd5b2ed7b30268181ba99ad753a47 Mon Sep 17 00:00:00 2001 From: resurtm Date: Thu, 12 Jan 2017 00:48:25 +0600 Subject: [PATCH 2/2] cs wip --- .php_cs.dist | 21 +++++++++++++++++++ lib/User/resources/views/admin/_account.php | 7 +++---- .../resources/views/admin/_assignments.php | 8 +++---- 3 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 .php_cs.dist diff --git a/.php_cs.dist b/.php_cs.dist new file mode 100644 index 0000000..0a0f02f --- /dev/null +++ b/.php_cs.dist @@ -0,0 +1,21 @@ +exclude([ + '.github', + 'docs', + 'temp', + 'tests', + 'vendor', + ]) + ->in(__DIR__); + +return PhpCsFixer\Config::create() + ->setRules([ + '@PSR1' => true, + '@PSR2' => true, + '@Symfony' => true, + 'concat_space' => ['spacing' => 'one'], + 'phpdoc_no_alias_tag' => [], + ]) + ->setFinder($finder); diff --git a/lib/User/resources/views/admin/_account.php b/lib/User/resources/views/admin/_account.php index d82c1bc..0d456db 100644 --- a/lib/User/resources/views/admin/_account.php +++ b/lib/User/resources/views/admin/_account.php @@ -12,10 +12,9 @@ use yii\bootstrap\ActiveForm; use yii\helpers\Html; -/* - * @var yii\web\View $this - * @var \Da\User\Model\User $user - */ +/* @var yii\web\View $this */ +/* @var Da\User\Model\User $user */ + ?> beginContent('@Da/User/resources/views/admin/update.php', ['user' => $user]) ?> diff --git a/lib/User/resources/views/admin/_assignments.php b/lib/User/resources/views/admin/_assignments.php index b1b0231..4bf779b 100644 --- a/lib/User/resources/views/admin/_assignments.php +++ b/lib/User/resources/views/admin/_assignments.php @@ -11,11 +11,9 @@ use Da\User\Widget\AssignmentsWidget; -/* - * @var yii\web\View $this - * @var \Da\User\Model\User $user - * @var string[] $params - */ +/* @var yii\web\View $this */ +/* @var Da\User\Model\User $user */ +/* @var string[] $params */ ?>