commit b5d8783db1ee855f71cc6ddf9fe1a6694ccec71a Author: HOG Date: Wed Sep 2 16:57:25 2015 +0300 Edited #7 according to сcomment #9. diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php index 0bcfad9..a43f39a 100644 --- a/core/modules/user/src/AccountForm.php +++ b/core/modules/user/src/AccountForm.php @@ -144,11 +144,11 @@ public function form(array $form, FormStateInterface $form_state) { $request_new = $this->l($this->t('Reset your password'), new Url('user.pass', array(), array('attributes' => array('title' => $this->t('Send password reset instructions via e-mail.')))) ); - $current_pass_description = $this->t('Required if you want to change the %mail or %pass below. !request_new.', + $current_pass_description = $this->t('Required if you want to change the %mail or %pass below. @request_new.', array( '%mail' => $protected_values['mail'], '%pass' => $protected_values['pass'], - '!request_new' => $request_new, + '@request_new' => $request_new, ) ); } diff --git a/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php b/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php index 57f5ced..958e83b 100644 --- a/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php +++ b/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php @@ -34,7 +34,7 @@ class UserMailRequired extends Constraint implements ConstraintValidatorInterfac * * @var string */ - public $message = '!name field is required.'; + public $message = '@name field is required.'; /** * @var \Symfony\Component\Validator\ExecutionContextInterface diff --git a/core/modules/user/user.module b/core/modules/user/user.module index 55473bb..8dde13d 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -54,19 +54,19 @@ function user_help($route_name, RouteMatchInterface $route_match) { case 'help.page.user': $output = ''; $output .= '

' . t('About') . '

'; - $output .= '

' . t('The User module allows users to register, log in, and log out. It also allows users with proper permissions to manage user roles and permissions. For more information, see the online documentation for the User module.', array('!user_docs' => 'https://www.drupal.org/documentation/modules/user')) . '

'; + $output .= '

' . t('The User module allows users to register, log in, and log out. It also allows users with proper permissions to manage user roles and permissions. For more information, see the online documentation for the User module.', ['@user_docs' => 'https://www.drupal.org/documentation/modules/user']) . '

'; $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating and managing users') . '
'; - $output .= '
' . t('Through the People administration page you can add and cancel user accounts and assign users to roles. By editing one particular user you can change their username, email address, password, and information in other fields.', array('!people' => \Drupal::url('entity.user.collection'))) . '
'; + $output .= '
' . t('Through the People administration page you can add and cancel user accounts and assign users to roles. By editing one particular user you can change their username, email address, password, and information in other fields.', ['@people' => \Drupal::url('entity.user.collection')]) . '
'; $output .= '
' . t('Configuring user roles') . '
'; - $output .= '
' . t('Roles are used to group and classify users; each user can be assigned one or more roles. Typically there are two pre-defined roles: Anonymous user (users that are not logged in), and Authenticated user (users that are registered and logged in). Depending on how your site was set up, an Administrator role may also be available: users with this role will automatically be assigned any new permissions whenever a module is enabled. You can create additional roles on the Roles administration page.', array('!roles' => \Drupal::url('entity.user_role.collection'))) . '
'; + $output .= '
' . t('Roles are used to group and classify users; each user can be assigned one or more roles. Typically there are two pre-defined roles: Anonymous user (users that are not logged in), and Authenticated user (users that are registered and logged in). Depending on how your site was set up, an Administrator role may also be available: users with this role will automatically be assigned any new permissions whenever a module is enabled. You can create additional roles on the Roles administration page.', ['@roles' => \Drupal::url('entity.user_role.collection')]) . '
'; $output .= '
' . t('Setting permissions') . '
'; - $output .= '
' . t('After creating roles, you can set permissions for each role on the Permissions page. Granting a permission allows users who have been assigned a particular role to perform an action on the site, such as viewing content, editing or creating a particular type of content, administering settings for a particular module, or using a particular function of the site (such as search).', array('!permissions_user' => \Drupal::url('user.admin_permissions'))) . '
'; + $output .= '
' . t('After creating roles, you can set permissions for each role on the Permissions page. Granting a permission allows users who have been assigned a particular role to perform an action on the site, such as viewing content, editing or creating a particular type of content, administering settings for a particular module, or using a particular function of the site (such as search).', array('@permissions_user' => \Drupal::url('user.admin_permissions'))) . '
'; $output .= '
' . t('Managing account settings') . '
'; - $output .= '
' . t('The Account settings page allows you to manage settings for the displayed name of the Anonymous user role, personal contact forms, user registration settings, and account cancellation settings. On this page you can also manage settings for account personalization, and adapt the text for the email messages that users receive when they register or request a password recovery. You may also set which role is automatically assigned new permissions whenever a module is enabled (the Administrator role).', array('!accounts' => \Drupal::url('entity.user.admin_form'))) . '
'; + $output .= '
' . t('The Account settings page allows you to manage settings for the displayed name of the Anonymous user role, personal contact forms, user registration settings, and account cancellation settings. On this page you can also manage settings for account personalization, and adapt the text for the email messages that users receive when they register or request a password recovery. You may also set which role is automatically assigned new permissions whenever a module is enabled (the Administrator role).', ['@accounts' => \Drupal::url('entity.user.admin_form')]) . '
'; $output .= '
' . t('Managing user account fields') . '
'; - $output .= '
' . t('Because User accounts are an entity type, you can extend them by adding fields through the Manage fields tab on the Account settings page. By adding fields for e.g., a picture, a biography, or address, you can a create a custom profile for the users of the website. For background information on entities and fields, see the Field module help page.', array('!field_help'=>(\Drupal::moduleHandler()->moduleExists('field')) ? \Drupal::url('help.page', array('name' => 'field')) : '#', '!accounts' => \Drupal::url('entity.user.admin_form'))) . '
'; + $output .= '
' . t('Because User accounts are an entity type, you can extend them by adding fields through the Manage fields tab on the Account settings page. By adding fields for e.g., a picture, a biography, or address, you can a create a custom profile for the users of the website. For background information on entities and fields, see the Field module help page.', ['@field_help'=>(\Drupal::moduleHandler()->moduleExists('field')) ? \Drupal::url('help.page', ['name' => 'field']) : '#', '@accounts' => \Drupal::url('entity.user.admin_form')]) . '
'; $output .= '
'; return $output; @@ -74,10 +74,10 @@ function user_help($route_name, RouteMatchInterface $route_match) { return '

' . t("This web page allows administrators to register new users. Users' email addresses and usernames must be unique.") . '

'; case 'user.admin_permissions': - return '

' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the Roles page to create a role.) Any permissions granted to the Authenticated user role will be given to any user who is logged in to your site. From the Account settings page, you can make any role into an Administrator role for the site, meaning that role will be granted all new permissions automatically. You should be careful to ensure that only trusted users are given this access and level of control of your site.', array('!role' => \Drupal::url('entity.user_role.collection'), '!settings' => \Drupal::url('entity.user.admin_form'))) . '

'; + return '

' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the Roles page to create a role.) Any permissions granted to the Authenticated user role will be given to any user who is logged in to your site. From the Account settings page, you can make any role into an Administrator role for the site, meaning that role will be granted all new permissions automatically. You should be careful to ensure that only trusted users are given this access and level of control of your site.', ['@role' => \Drupal::url('entity.user_role.collection'), '@settings' => \Drupal::url('entity.user.admin_form')]) . '

'; case 'entity.user_role.collection': - return '

' . t('A role defines a group of users that have certain privileges. These privileges are defined on the Permissions page. Here, you can define the names and the display sort order of the roles on your site. It is recommended to order roles from least permissive (for example, Anonymous user) to most permissive (for example, Administrator user). Users who are not logged in have the Anonymous user role. Users who are logged in have the Authenticated user role, plus any other roles granted to their user account.', array('!permissions' => \Drupal::url('user.admin_permissions'))) . '

'; + return '

' . t('A role defines a group of users that have certain privileges. These privileges are defined on the Permissions page. Here, you can define the names and the display sort order of the roles on your site. It is recommended to order roles from least permissive (for example, Anonymous user) to most permissive (for example, Administrator user). Users who are not logged in have the Anonymous user role. Users who are logged in have the Authenticated user role, plus any other roles granted to their user account.', ['@permissions' => \Drupal::url('user.admin_permissions')]) . '

'; case 'entity.user.field_ui_fields': return '

' . t('This form lets administrators add and edit fields for storing user data.') . '

';