[wp-meta] [Making WordPress.org] #1444: Unexpected translations on plugin changelog pages

Making WordPress.org noreply at wordpress.org
Fri Jan 8 19:29:07 UTC 2016


#1444: Unexpected translations on plugin changelog pages
-----------------------------+------------------------------
  Reporter:  SergeyBiryukov  |      Owner:
      Type:  defect          |     Status:  new
  Priority:  normal          |  Component:  Plugin Directory
Resolution:                  |   Keywords:
-----------------------------+------------------------------

Comment (by Cybr):

 As promised, the regex to match all PHP and JavaScript comments, which are
 therefore safe to translate:


 {{{
 $regex = "(\#|(\/)?(\*|\/)[^\r\n])(.+?(?=\*\/)|.*)(\*\/)?/igm";

 // Explained:
 $regex = "
 (              // Group 1
 \#             // 1: Grab #
 |(\/)?(\*|\/)  // 1: Or, if a slash is found: /* or //
 [^\r\n]        // 1: Grab everything including line breaks
 )              // End group 1
 (              // Group 2
 .+?(?=\*\/)    // 2: Grab everything, until */ on same line
 |.*            // 2: Or continue to new line
 )              // End group 2
 (\*\/)?        // Group 3: Find final */ if new line
 "/igm;
 }}}

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/1444#comment:2>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list