[wp-trac] [WordPress Trac] #59893: Add a translation section in the Site Health report

WordPress Trac noreply at wordpress.org
Thu Mar 14 15:34:47 UTC 2024


#59893: Add a translation section in the Site Health report
-------------------------------------+------------------------------
 Reporter:  sebastienserre           |       Owner:  (none)
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Site Health              |     Version:  trunk
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch 2nd-opinion  |     Focuses:
-------------------------------------+------------------------------

Comment (by sebastienserre):

 In fact, I was thinking about something simpler (that looks like what we
 have in the ùpdate-core.php`

 Something like this (POC) :
 ```
 add_filter( 'debug_information', 'wp_add_translations' );
 function wp_add_translations( $debug_infos ) {
         $updates                = wp_get_translation_updates();
         $translations_available = __( 'No' );
         if ( ! empty( $updates ) ) {
                 $translations_available = __( 'Yes' );
         }
         $debug_infos['wp-translations'] = array(
                 'label'  => __( 'Translations' ),
                 'fields' => array(
                         'translations' => array(
                                 'label' => __( 'Translations available' ),
                                 'value' => $translations_available,
                         ),
                 )
         );

         return $debug_infos;
 }
 ```

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59893#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list