[wp-trac] [WordPress Trac] #47003: i18n: Merge similar translation strings in new user registration screen

WordPress Trac noreply at wordpress.org
Sat Jun 27 23:25:58 UTC 2020


#47003: i18n: Merge similar translation strings in new user registration screen
-------------------------------------+-------------------------------------
 Reporter:  ramiy                    |       Owner:  SergeyBiryukov
     Type:  defect (bug)             |      Status:  reviewing
 Priority:  normal                   |   Milestone:  5.5
Component:  Users                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-screenshots has-     |     Focuses:  administration,
  patch needs-testing                |  multisite
-------------------------------------+-------------------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:17 garrett-eclipse]:
 > Replying to [comment:15 SergeyBiryukov]:
 > > Looks like this merges a Multisite-specific username limitation string
 with single site strings, which might not be accurate. See #17904 for more
 details.
 > Reviewing the ticket it's currently still open and what's in core seems
 to be the regex for `/[^a-z0-9]/`. Should we move forward with these
 consistent strings for now and flag on the multisite ticket that once
 those changes are in place the error message should be updated to reflect
 that?

 I meant that this particular string only applies to Multisite (as is):
 > Usernames can only contain lowercase letters (a-z) and numbers (0-9).

 Usernames on single site don't have the same restriction. As seen in
 `sanitize_user()`:
 {{{
 // If strict, reduce to ASCII for max portability.
 if ( $strict ) {
         $username = preg_replace( '|[^a-z0-9 _.\-@]|i', '', $username );
 }
 }}}
 This allows for uppercase characters, spaces, underscores, dots, hyphens,
 and the `@` sign.

 So the patch is inaccurate as is, we cannot merge all three strings. We
 should be able to merge at least two, though.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47003#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list