Make WordPress Core

Changeset 52451


Ignore:
Timestamp:
01/05/2022 09:05:12 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Make first comment URLs translatable.

This allows translators to localize the https://wordpress.org/ and https://gravatar.com/ URLs in the first comment on a new installation.

Follow-up to [2409], [37888], [37921].

Props kebbet, desrosj.
Fixes #54535.

File:
1 edited

Legend:

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

    r52360 r52451  
    273273        $first_comment_author = ! empty( $first_comment_author ) ? $first_comment_author : __( 'A WordPress Commenter' );
    274274        $first_comment_email  = ! empty( $first_comment_email ) ? $first_comment_email : 'wapuu@wordpress.example';
    275         $first_comment_url    = ! empty( $first_comment_url ) ? $first_comment_url : 'https://wordpress.org/';
    276         $first_comment        = ! empty( $first_comment ) ? $first_comment : __(
    277             'Hi, this is a comment.
     275        $first_comment_url    = ! empty( $first_comment_url ) ? $first_comment_url : esc_url( __( 'https://wordpress.org/' ) );
     276        $first_comment        = ! empty( $first_comment ) ? $first_comment : sprintf(
     277            /* translators: %s: Gravatar URL. */
     278            __(
     279                'Hi, this is a comment.
    278280To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
    279 Commenter avatars come from <a href="https://gravatar.com">Gravatar</a>.'
     281Commenter avatars come from <a href="%s">Gravatar</a>.'
     282            ),
     283            esc_url( __( 'https://en.gravatar.com/' ) )
    280284        );
    281285        $wpdb->insert(
Note: See TracChangeset for help on using the changeset viewer.