Changeset 10686
- Timestamp:
- 02/17/2021 04:58:29 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-fixer/wporg-gp-translation-fixer.php
r10685 r10686 65 65 case 'placeholders': 66 66 // Try replacing unicode percent signs with a ascii percent sign. 67 $translation = preg_replace( '!(﹪|%)((\d+\$(?:\d+)?)?[bcdefgosux EFGX])!', '%$2', $translation );67 $translation = preg_replace( '!(﹪|%)((\d+\$(?:\d+)?)?[bcdefgosux])!i', '%$2', $translation ); 68 68 69 69 // Try replacing spaced translation type with no spaces `% 1 $ s` (Machine translated text) 70 70 $translation = preg_replace_callback( 71 '!%\s?(\d+\s?\$(?:\d+)?)?\s?[bcdefgosux EFGX]!',71 '!%\s?(\d+\s?\$(?:\d+)?)?\s?[bcdefgosux]!i', 72 72 function( $m ) { 73 73 return str_replace( ' ', '', $m[0] ); 74 }, 75 $translation 76 ); 77 78 // Check case of format specifer. EFGX can be both upper or lower case. 79 $translation = preg_replace_callback( 80 '!%(\d+\$(?:\d+)?)?([bcdosu])!i', 81 function( $m ) { 82 return '%' . $m[1] . strtolower( $m[2] ); 74 83 }, 75 84 $translation
Note: See TracChangeset
for help on using the changeset viewer.