Make WordPress Core

Changeset 44976


Ignore:
Timestamp:
03/21/2019 10:23:00 PM (6 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/schema.php

    r44912 r44976  
    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' );
  • trunk/src/wp-includes/capabilities.php

    r44973 r44976  
    979979    return $allcaps;
    980980}
     981
     982return;
     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' );
Note: See TracChangeset for help on using the changeset viewer.