Skip to content

Commit 531d83a

Browse files
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
1 parent fa0190b commit 531d83a

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

src/wp-admin/includes/schema.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -708,18 +708,6 @@ function populate_roles() {
708708
function populate_roles_160() {
709709
// Add roles
710710

711-
// Dummy gettext calls to get strings in the catalog.
712-
/* translators: user role */
713-
_x( 'Administrator', 'User role' );
714-
/* translators: user role */
715-
_x( 'Editor', 'User role' );
716-
/* translators: user role */
717-
_x( 'Author', 'User role' );
718-
/* translators: user role */
719-
_x( 'Contributor', 'User role' );
720-
/* translators: user role */
721-
_x( 'Subscriber', 'User role' );
722-
723711
add_role( 'administrator', 'Administrator' );
724712
add_role( 'editor', 'Editor' );
725713
add_role( 'author', 'Author' );

src/wp-includes/capabilities.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,3 +978,17 @@ function wp_maybe_grant_resume_extensions_caps( $allcaps ) {
978978

979979
return $allcaps;
980980
}
981+
982+
return;
983+
984+
// Dummy gettext calls to get strings in the catalog.
985+
/* translators: user role for administrators */
986+
_x( 'Administrator', 'User role' );
987+
/* translators: user role for editors */
988+
_x( 'Editor', 'User role' );
989+
/* translators: user role for authors */
990+
_x( 'Author', 'User role' );
991+
/* translators: user role for contributors */
992+
_x( 'Contributor', 'User role' );
993+
/* translators: user role for subscriber */
994+
_x( 'Subscriber', 'User role' );

0 commit comments

Comments
 (0)