Make WordPress Core


Ignore:
Timestamp:
10/11/2022 10:03:16 AM (4 years ago)
Author:
audrasjb
Message:

I18N: Revert [54469].

This changeset reverts [54469] as there is currently no support for parsing JS i18n functions in PHP files which means the strings won't be translatable.

Props ocean90.
Unprops audrasjb.
See #37287.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/update.php

    r54469 r54473  
    886886                        <p>
    887887                                <# if ( data.successes ) { #>
    888                                         <# if ( 'plugin' === data.type ) { #>
    889                                                 {{ wp.i18n.sprintf( wp.i18n._n( '%s plugin successfully updated.', '%s plugins successfully updated.', data.successes ), data.successes ) }}
     888                                        <# if ( 1 === data.successes ) { #>
     889                                                <# if ( 'plugin' === data.type ) { #>
     890                                                        <?php
     891                                                        /* translators: %s: Number of plugins. */
     892                                                        printf( __( '%s plugin successfully updated.' ), '{{ data.successes }}' );
     893                                                        ?>
     894                                                <# } else { #>
     895                                                        <?php
     896                                                        /* translators: %s: Number of themes. */
     897                                                        printf( __( '%s theme successfully updated.' ), '{{ data.successes }}' );
     898                                                        ?>
     899                                                <# } #>
    890900                                        <# } else { #>
    891                                                 {{ wp.i18n.sprintf( wp.i18n._n( '%s theme successfully updated.', '%s themes successfully updated.', data.successes ), data.successes ) }}
     901                                                <# if ( 'plugin' === data.type ) { #>
     902                                                        <?php
     903                                                        /* translators: %s: Number of plugins. */
     904                                                        printf( __( '%s plugins successfully updated.' ), '{{ data.successes }}' );
     905                                                        ?>
     906                                                <# } else { #>
     907                                                        <?php
     908                                                        /* translators: %s: Number of themes. */
     909                                                        printf( __( '%s themes successfully updated.' ), '{{ data.successes }}' );
     910                                                        ?>
     911                                                <# } #>
    892912                                        <# } #>
    893913                                <# } #>
    894914                                <# if ( data.errors ) { #>
    895915                                        <button class="button-link bulk-action-errors-collapsed" aria-expanded="false">
    896                                                 {{ wp.i18n.sprintf( wp.i18n._n( '%s update failed.', '%s updates failed.' , data.errors ), data.errors ) }}
     916                                                <# if ( 1 === data.errors ) { #>
     917                                                        <?php
     918                                                        /* translators: %s: Number of failed updates. */
     919                                                        printf( __( '%s update failed.' ), '{{ data.errors }}' );
     920                                                        ?>
     921                                                <# } else { #>
     922                                                        <?php
     923                                                        /* translators: %s: Number of failed updates. */
     924                                                        printf( __( '%s updates failed.' ), '{{ data.errors }}' );
     925                                                        ?>
     926                                                <# } #>
    897927                                                <span class="screen-reader-text"><?php _e( 'Show more details' ); ?></span>
    898928                                                <span class="toggle-indicator" aria-hidden="true"></span>
Note: See TracChangeset for help on using the changeset viewer.