Changeset 6679

Show
Ignore:
Timestamp:
01/29/08 17:17:13 (5 months ago)
Author:
ryan
Message:

Widget i18n from nbachiyski. see #5583

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/includes/widgets.php

    r6650 r6679  
    178178 
    179179            <div class="widget-control"<?php if ( 'edit' == $display ) echo ' style="display: block;"'; ?>> 
     180                <div class="widget-control-actions"> 
     181 
     182                    <?php if ( $control && 'edit' != $display ) : ?> 
     183 
     184                    <a class="widget-action widget-control-save edit alignleft" href="#save:<?php echo $id_format; ?>"><?php _e('Save'); ?></a> 
     185 
     186                    <?php endif; ?> 
     187 
     188                    <a class="widget-action widget-control-remove delete alignright" href="<?php echo add_query_arg( array( 'remove' => $id_format, 'key' => $key ), wp_nonce_url( null, "remove-widget_$widget[id]" ) ); ?>"><?php _e('Remove'); ?></a> 
     189                    <br class="clear" /> 
    180190 
    181191                <?php 
  • trunk/wp-admin/js/widgets.js

    r6571 r6679  
    22    $('.noscript-action').remove(); 
    33 
    4     // TODO: i18n 
    5     var addText  = 'Add'; 
    6     var editText = 'Edit'; 
    7     var cancText = 'Cancel'; 
    84    var increment = 1; 
    95 
     
    1713                if ( width > 250 ) 
    1814                    li.animate( { marginLeft: 0 } ); 
    19                 t.siblings('h4').children('a').text( editText ); 
     15                t.siblings('h4').children('a').text( widgetsL10n.edit ); 
    2016            } else { 
    2117                t.animate( { height: 'show' } ); 
    2218                if ( width > 250 ) 
    2319                    li.animate( { marginLeft: ( width - 250 ) * -1 } ); 
    24                 t.siblings('h4').children('a').text( cancText ); 
     20                t.siblings('h4').children('a').text( widgetsL10n.cancel ); 
    2521            } 
    2622        } ).end(); 
     
    5551            newLi.html( newLi.html().replace( /%i%/g, i ) ); 
    5652        } else { 
    57             $(this).text( editText ).unbind().click( editClick ); 
     53            $(this).text( widgetsL10n.edit ).unbind().click( editClick ); 
    5854            // save form content in textarea so we don't have any conflicting HTML ids 
    5955            oldLi.html( '<textarea>' + oldLi.html() + '</textarea>' ); 
     
    9288            var t = $('#widget-list ul#widget-control-info-' + w + ' textarea'); 
    9389            t.parent().html( t.text() ).parents('li.widget-list-item:first').children( 'h4' ).children('a.widget-action') 
    94                 .show().text( addText ).unbind().click( addClick ); 
     90                .show().text( widgetsL10n.add ).unbind().click( addClick ); 
    9591            var n = parseInt( $('#widget-count').text(), 10 ) - 1; 
    9692            $('#widget-count').text( n.toString() )