Ticket #7897: arabic-comma.diff
File arabic-comma.diff, 3.5 KB (added by , 15 years ago) |
---|
-
wp-includes/script-loader.php
81 81 'enterURL' => __('Enter the URL'), 82 82 'enterImageURL' => __('Enter the URL of the image'), 83 83 'enterImageDescription' => __('Enter a description of the image'), 84 'l10n_print_after' => 'try{convertEntities(quicktagsL10n);}catch(e){};' 84 'l10n_print_after' => 'try{convertEntities(quicktagsL10n);}catch(e){};', 85 'comma' => __(',') 85 86 ) ); 86 87 87 88 $scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' ); -
wp-admin/admin-ajax.php
56 56 else 57 57 die('0'); 58 58 59 if ( false !== strpos( $s, ',' ) ) { 60 $s = explode( ',', $s ); 59 $comma = __(','); 60 if ( false !== strpos( $s, $comma ) ) { 61 $s = explode( $comma, $s ); 61 62 $s = $s[count( $s ) - 1]; 62 63 } 63 64 $s = trim( $s ); -
wp-admin/js/post.dev.js
10 10 } 11 11 12 12 function new_tag_remove_tag() { 13 var id = jQuery( this ).attr( 'id' ), num = id.split('-check-num-')[1], taxbox = jQuery(this).parents('.tagsdiv'), current_tags = taxbox.find( '.the-tags' ).val().split(','), new_tags = []; 13 var c = quicktagsL10n.comma; 14 var id = jQuery( this ).attr( 'id' ), num = id.split('-check-num-')[1], taxbox = jQuery(this).parents('.tagsdiv'), current_tags = taxbox.find( '.the-tags' ).val().split(c), new_tags = []; 14 15 delete current_tags[num]; 15 16 16 17 jQuery.each( current_tags, function(key, val) { … … 20 21 } 21 22 }); 22 23 23 taxbox.find('.the-tags').val( new_tags.join(',').replace(/\s*,+\s*/, ',').replace(/,+/, ',').replace(/,+\s+,+/, ',').replace(/,+\s*$/, '').replace(/^\s*,+/, ''));24 taxbox.find('.the-tags').val(eval("new_tags.join(quicktagsL10n.comma).replace(/\s+,+\s*/g, ',').replace(/,+/g, ',').replace(/,+\s+,+/g, ',').replace(/,+\s*$/g, '').replace(/^\s*,+/g, '')".replace(/','/g, "'"+c+"'").replace(/,[^ ]/g, c))); 24 25 25 26 tag_update_quickclicks(taxbox); 26 27 return false; … … 30 31 if ( jQuery(taxbox).find('.the-tags').length == 0 ) 31 32 return; 32 33 33 var current_tags = jQuery(taxbox).find('.the-tags').val().split( ',');34 var current_tags = jQuery(taxbox).find('.the-tags').val().split(quicktagsL10n.comma); 34 35 jQuery(taxbox).find('.tagchecklist').empty(); 35 36 shown = false; 36 37 … … 52 53 function tag_flush_to_text(id, a) { 53 54 a = a || false; 54 55 var taxbox, text, tags, newtags; 56 var c = quicktagsL10n.comma; 55 57 56 58 taxbox = jQuery('#'+id); 57 59 text = a ? jQuery(a).text() : taxbox.find('input.newtag').val(); … … 61 63 return false; 62 64 63 65 tags = taxbox.find('.the-tags').val(); 64 newtags = tags ? tags + ','+ text : text;66 newtags = tags ? tags + c + text : text; 65 67 66 68 // massage 67 newtags = newtags.replace(/\s+,+\s*/g, ',').replace(/,+/g, ',').replace(/,+\s+,+/g, ',').replace(/,+\s*$/g, '').replace(/^\s*,+/g, '');68 newtags = array_unique_noempty(newtags.split( ',')).join(',');69 newtags = eval("newtags.replace(/\s+,+\s*/g, ',').replace(/,+/g, ',').replace(/,+\s+,+/g, ',').replace(/,+\s*$/g, '').replace(/^\s*,+/g, '')".replace(/','/g, "'"+c+"'").replace(/,[^ ]/g, c)); 70 newtags = array_unique_noempty(newtags.split(c)).join(c); 69 71 taxbox.find('.the-tags').val(newtags); 70 72 tag_update_quickclicks(taxbox); 71 73