Skip to:
Content

BuddyPress.org

Ticket #6368: 6368.bbpress.diff

File 6368.bbpress.diff, 5.3 KB (added by SergeyBiryukov, 10 years ago)
  • bb-admin/posts.php

     
    3838
    3939        switch ( (string) $_GET['message'] ) {
    4040                case 'undeleted':
    41                         bb_admin_notice( sprintf( _n( '<strong>Post undeleted.</strong>', '<strong>%s posts undeleted.</strong>', $message_count ), bb_number_format_i18n( $message_count ) ) );
     41                        if ( 1 == $message_count ) {
     42                                $message = __( '<strong>Post undeleted.</strong>' );
     43                        } else {
     44                                $message = sprintf( _n( '<strong>%s post undeleted.</strong>', '<strong>%s posts undeleted.</strong>', $message_count ), bb_number_format_i18n( $message_count ) );
     45                        }
     46                        bb_admin_notice( $message );
    4247                        break;
    4348                case 'deleted':
    44                         bb_admin_notice( sprintf( _n( '<strong>Post deleted.</strong>', '<strong>%s posts deleted.</strong>', $message_count ), bb_number_format_i18n( $message_count ) ) );
     49                        if ( 1 == $message_count ) {
     50                                $message = __( '<strong>Post deleted.</strong>' );
     51                        } else {
     52                                $message = sprintf( _n( '<strong>%s post deleted.</strong>', '<strong>%s posts deleted.</strong>', $message_count ), bb_number_format_i18n( $message_count ) );
     53                        }
     54                        bb_admin_notice( $message );
    4555                        break;
    4656                case 'spammed':
    47                         bb_admin_notice( sprintf( _n( '<strong>Post spammed.</strong>', '<strong>%s posts spammed.</strong>', $message_count ), bb_number_format_i18n( $message_count ) ) );
     57                        if ( 1 == $message_count ) {
     58                                $message = __( '<strong>Post spammed.</strong>' );
     59                        } else {
     60                                $message = sprintf( _n( '<strong>%s post spammed.</strong>', '<strong>%s posts spammed.</strong>', $message_count ), bb_number_format_i18n( $message_count ) );
     61                        }
     62                        bb_admin_notice( $message );
    4863                        break;
    4964                case 'unspammed-normal':
    50                         bb_admin_notice( sprintf( _n( '<strong>Post removed from spam.</strong> It is now a normal post.', '<strong>%s posts removed from spam.</strong> They are now normal posts.', $message_count ), bb_number_format_i18n( $message_count ) ) );
     65                        if ( 1 == $message_count ) {
     66                                $message = __( '<strong>Post removed from spam.</strong> It is now a normal post.' );
     67                        } else {
     68                                $message = sprintf( _n( '<strong>%s post removed from spam.</strong> It is now a normal post.', '<strong>%s posts removed from spam.</strong> They are now normal posts.', $message_count ), bb_number_format_i18n( $message_count ) );
     69                        }
     70                        bb_admin_notice( $message );
    5171                        break;
    5272                case 'unspammed-deleted':
    53                         bb_admin_notice( sprintf( _n( '<strong>Post removed from spam.</strong> It is now a deleted post.', '<strong>%s posts removed from spam.</strong> They are nowdeleted posts.', $message_count ), bb_number_format_i18n( $message_count ) ) );
     73                        if ( 1 == $message_count ) {
     74                                $message = __( '<strong>Post removed from spam.</strong> It is now a deleted post.' );
     75                        } else {
     76                                $message = sprintf( _n( '<strong>%s post removed from spam.</strong> It is now a deleted post.', '<strong>%s posts removed from spam.</strong> They are now deleted posts.', $message_count ), bb_number_format_i18n( $message_count ) );
     77                        }
     78                        bb_admin_notice( $message );
    5479                        break;
    5580        }
    5681}
  • bb-admin/topics.php

     
    5050
    5151        switch ( (string) $_GET['message'] ) {
    5252                case 'undeleted':
    53                         bb_admin_notice( sprintf( _n( '<strong>Topic undeleted.</strong>', '<strong>%s topics undeleted.</strong>', $message_count ), bb_number_format_i18n( $message_count ) ) );
     53                        if ( 1 == $message_count ) {
     54                                $message = __( '<strong>Topic undeleted.</strong>' );
     55                        } else {
     56                                $message = sprintf( _n( '<strong>%s topic undeleted.</strong>', '<strong>%s topics undeleted.</strong>', $message_count ), bb_number_format_i18n( $message_count ) );
     57                        }
     58                        bb_admin_notice( $message );
    5459                        break;
    5560                case 'deleted':
    56                         bb_admin_notice( sprintf( _n( '<strong>Topic deleted.</strong>', '<strong>%s topics deleted.</strong>', $message_count ), bb_number_format_i18n( $message_count ) ) );
     61                        if ( 1 == $message_count ) {
     62                                $message = __( '<strong>Topic deleted.</strong>' );
     63                        } else {
     64                                $message = sprintf( _n( '<strong>%s topic deleted.</strong>', '<strong>%s topics deleted.</strong>', $message_count ), bb_number_format_i18n( $message_count ) );
     65                        }
     66                        bb_admin_notice( $message );
    5767                        break;
    5868                case 'opened':
    59                         bb_admin_notice( sprintf( _n( '<strong>Topic opened.</strong>', '<strong>%s topics opened.</strong>', $message_count ), bb_number_format_i18n( $message_count ) ) );
     69                        if ( 1 == $message_count ) {
     70                                $message = __( '<strong>Topic opened.</strong>' );
     71                        } else {
     72                                $message = sprintf( _n( '<strong>%s topic opened.</strong>', '<strong>%s topics opened.</strong>', $message_count ), bb_number_format_i18n( $message_count ) );
     73                        }
     74                        bb_admin_notice( $message );
    6075                        break;
    6176                case 'closed':
    62                         bb_admin_notice( sprintf( _n( '<strong>Topic closed.</strong>', '<strong>%s topics closed.</strong>', $message_count ), bb_number_format_i18n( $message_count ) ) );
     77                        if ( 1 == $message_count ) {
     78                                $message = __( '<strong>Topic closed.</strong>' );
     79                        } else {
     80                                $message = sprintf( _n( '<strong>%s topic closed.</strong>', '<strong>%s topics closed.</strong>', $message_count ), bb_number_format_i18n( $message_count ) );
     81                        }
     82                        bb_admin_notice( $message );
    6383                        break;
    6484        }
    6585}