Changeset 58064
- Timestamp:
- 04/30/2024 08:53:51 AM (4 months ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/wp/updates.js
r57714 r58064 2939 2939 wp.updates.adminNotice = wp.template( 'wp-bulk-updates-admin-notice' ); 2940 2940 2941 var successMessage = null; 2942 2943 if ( success ) { 2944 if ( 'plugin' === response.update ) { 2945 successMessage = sprintf( 2946 /* translators: %s: Number of plugins. */ 2947 _n( '%s plugin successfully updated.', '%s plugins successfully updated.', success ), 2948 success 2949 ); 2950 } else { 2951 successMessage = sprintf( 2952 /* translators: %s: Number of themes. */ 2953 _n( '%s theme successfully updated.', '%s themes successfully updated.', success ), 2954 success 2955 ); 2956 } 2957 } 2958 2959 var errorMessage = null; 2960 2961 if ( error ) { 2962 errorMessage = sprintf( 2963 /* translators: %s: Number of failed updates. */ 2964 _n( '%s update failed.', '%s updates failed.', error ), 2965 error 2966 ); 2967 } 2968 2941 2969 wp.updates.addAdminNotice( { 2942 2970 id: 'bulk-action-notice', 2943 2971 className: 'bulk-action-notice', 2944 success es: success,2945 error s: error,2946 errorMessages: errorMessages,2947 type: response.update2972 successMessage: successMessage, 2973 errorMessage: errorMessage, 2974 errorMessages: errorMessages, 2975 type: response.update 2948 2976 } ); 2949 2977 -
trunk/src/wp-admin/includes/update.php
r57644 r58064 924 924 </script> 925 925 <script id="tmpl-wp-bulk-updates-admin-notice" type="text/html"> 926 <div id="{{ data.id }}" class="{{ data.className }} notice <# if ( data.error s) { #>notice-error<# } else { #>notice-success<# } #>">926 <div id="{{ data.id }}" class="{{ data.className }} notice <# if ( data.errorMessage ) { #>notice-error<# } else { #>notice-success<# } #>"> 927 927 <p> 928 <# if ( data.successes ) { #> 929 <# if ( 1 === data.successes ) { #> 930 <# if ( 'plugin' === data.type ) { #> 931 <?php 932 /* translators: %s: Number of plugins. */ 933 printf( __( '%s plugin successfully updated.' ), '{{ data.successes }}' ); 934 ?> 935 <# } else { #> 936 <?php 937 /* translators: %s: Number of themes. */ 938 printf( __( '%s theme successfully updated.' ), '{{ data.successes }}' ); 939 ?> 940 <# } #> 941 <# } else { #> 942 <# if ( 'plugin' === data.type ) { #> 943 <?php 944 /* translators: %s: Number of plugins. */ 945 printf( __( '%s plugins successfully updated.' ), '{{ data.successes }}' ); 946 ?> 947 <# } else { #> 948 <?php 949 /* translators: %s: Number of themes. */ 950 printf( __( '%s themes successfully updated.' ), '{{ data.successes }}' ); 951 ?> 952 <# } #> 953 <# } #> 928 <# if ( data.successMessage ) { #> 929 {{{ data.successMessage }}} 954 930 <# } #> 955 <# if ( data.error s) { #>931 <# if ( data.errorMessage ) { #> 956 932 <button class="button-link bulk-action-errors-collapsed" aria-expanded="false"> 957 <# if ( 1 === data.errors ) { #> 958 <?php 959 /* translators: %s: Number of failed updates. */ 960 printf( __( '%s update failed.' ), '{{ data.errors }}' ); 961 ?> 962 <# } else { #> 963 <?php 964 /* translators: %s: Number of failed updates. */ 965 printf( __( '%s updates failed.' ), '{{ data.errors }}' ); 966 ?> 967 <# } #> 933 {{{ data.errorMessage }}} 968 934 <span class="screen-reader-text"> 969 935 <?php … … 976 942 <# } #> 977 943 </p> 978 <# if ( data.error s ) { #>944 <# if ( data.errorMessages ) { #> 979 945 <ul class="bulk-action-errors hidden"> 980 946 <# _.each( data.errorMessages, function( errorMessage ) { #>
Note: See TracChangeset
for help on using the changeset viewer.