I18N: Move the strings for default user roles to wp-includes/capabilities.php, to make the translations available on the front end as well.

Props keraweb, ocean90.
Fixes #37539.

git-svn-id: https://develop.svn.wordpress.org/trunk@44976 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-03-21 22:23:00 +00:00
parent fa0190bcb1
commit 531d83a2f0
2 changed files with 14 additions and 12 deletions

View File

@ -708,18 +708,6 @@ function populate_roles() {
function populate_roles_160() {
// Add roles
// Dummy gettext calls to get strings in the catalog.
/* translators: user role */
_x( 'Administrator', 'User role' );
/* translators: user role */
_x( 'Editor', 'User role' );
/* translators: user role */
_x( 'Author', 'User role' );
/* translators: user role */
_x( 'Contributor', 'User role' );
/* translators: user role */
_x( 'Subscriber', 'User role' );
add_role( 'administrator', 'Administrator' );
add_role( 'editor', 'Editor' );
add_role( 'author', 'Author' );

View File

@ -978,3 +978,17 @@ function wp_maybe_grant_resume_extensions_caps( $allcaps ) {
return $allcaps;
}
return;
// Dummy gettext calls to get strings in the catalog.
/* translators: user role for administrators */
_x( 'Administrator', 'User role' );
/* translators: user role for editors */
_x( 'Editor', 'User role' );
/* translators: user role for authors */
_x( 'Author', 'User role' );
/* translators: user role for contributors */
_x( 'Contributor', 'User role' );
/* translators: user role for subscriber */
_x( 'Subscriber', 'User role' );