WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/29/2010 01:12:14 PM (9 years ago)
Author:
nbachiyski
Message:

Introduce and use translate_nooped_plural(). Fixes #13996

  • _n_noop() and _nx_noop() now return associative arrays for greater clarity
  • translate_nooped_plural() takes one such associative array and translates it
  • it works on both the result from _n_noop() and from _nx_noop()
  • this breaks backwards compatibility, but I doubt any plugin uses it (I will do a global grep to confirm)
  • translate_nooped_plural() is applied where applicable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/list-table-media.php

    r16061 r16073  
    6868                $class = ' class="current"';
    6969            if ( !empty( $num_posts[$mime_type] ) )
    70                 $type_links[$mime_type] = "<li><a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( _n( $label[2][0], $label[2][1], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>';
     70                $type_links[$mime_type] = "<li><a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>';
    7171        }
    7272        $type_links['detached'] = '<li><a href="upload.php?detached=1"' . ( $detached ? ' class="current"' : '' ) . '>' . sprintf( _nx( 'Unattached <span class="count">(%s)</span>', 'Unattached <span class="count">(%s)</span>', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . '</a>';
Note: See TracChangeset for help on using the changeset viewer.