Make WordPress Core


Ignore:
Timestamp:
11/26/2023 04:41:34 PM (2 years ago)
Author:
swissspidy
Message:

I18N: Improve translator comments for strings containing date formats.

Adds translator comments where absent and changes code style so that
comments are attached to the right strings during string extraction.

Props NekoJonez.
Fixes #59947

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-form-advanced.php

    r56600 r57136  
    650650        $last_user = get_userdata( get_post_meta( $post->ID, '_edit_last', true ) );
    651651        if ( $last_user ) {
    652             /* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time. */
    653             printf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
     652            printf(
     653                /* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time. */
     654                __( 'Last edited by %1$s on %2$s at %3$s' ),
     655                esc_html( $last_user->display_name ),
     656                mysql2date( __( 'F j, Y' ), $post->post_modified ),
     657                mysql2date( __( 'g:i a' ), $post->post_modified )
     658            );
    654659        } else {
    655             /* translators: 1: Post edited date, 2: Post edited time. */
    656             printf( __( 'Last edited on %1$s at %2$s' ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
     660            printf(
     661                /* translators: 1: Post edited date, 2: Post edited time. */
     662                __( 'Last edited on %1$s at %2$s' ),
     663                mysql2date( __( 'F j, Y' ), $post->post_modified ),
     664                mysql2date( __( 'g:i a' ), $post->post_modified )
     665            );
    657666        }
    658667        echo '</span>';
Note: See TracChangeset for help on using the changeset viewer.