mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
I18N: Improve translator comments.
* Add missing translator comments. * Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments. Includes minor code layout fixes. Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders! Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov. Fixes #44360. git-svn-id: https://develop.svn.wordpress.org/trunk@45926 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -961,11 +961,40 @@ function update_core( $from, $to ) {
|
||||
}
|
||||
|
||||
if ( ! $mysql_compat && ! $php_compat ) {
|
||||
return new WP_Error( 'php_mysql_not_compatible', sprintf( __( 'The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ) . $php_update_message );
|
||||
return new WP_Error(
|
||||
'php_mysql_not_compatible',
|
||||
sprintf(
|
||||
/* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Minimum required MySQL version number, 4: Current PHP version number, 5: Current MySQL version number */
|
||||
__( 'The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ),
|
||||
$wp_version,
|
||||
$required_php_version,
|
||||
$required_mysql_version,
|
||||
$php_version,
|
||||
$mysql_version
|
||||
) . $php_update_message
|
||||
);
|
||||
} elseif ( ! $php_compat ) {
|
||||
return new WP_Error( 'php_not_compatible', sprintf( __( 'The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version ) . $php_update_message );
|
||||
return new WP_Error(
|
||||
'php_not_compatible',
|
||||
sprintf(
|
||||
/* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
|
||||
__( 'The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.' ),
|
||||
$wp_version,
|
||||
$required_php_version,
|
||||
$php_version
|
||||
) . $php_update_message
|
||||
);
|
||||
} elseif ( ! $mysql_compat ) {
|
||||
return new WP_Error( 'mysql_not_compatible', sprintf( __( 'The update cannot be installed because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version ) );
|
||||
return new WP_Error(
|
||||
'mysql_not_compatible',
|
||||
sprintf(
|
||||
/* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */
|
||||
__( 'The update cannot be installed because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.' ),
|
||||
$wp_version,
|
||||
$required_mysql_version,
|
||||
$mysql_version
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/** This filter is documented in wp-admin/includes/update-core.php */
|
||||
@@ -1354,8 +1383,22 @@ function _redirect_to_about_wordpress( $new_version ) {
|
||||
show_message( __( 'WordPress updated successfully' ) );
|
||||
|
||||
// self_admin_url() won't exist when upgrading from <= 3.0, so relative URLs are intentional.
|
||||
show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%2$s">here</a>.' ), $new_version, 'about.php?updated' ) . '</span>' );
|
||||
show_message( '<span class="hide-if-js">' . sprintf( __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), $new_version, 'about.php?updated' ) . '</span>' );
|
||||
show_message(
|
||||
'<span class="hide-if-no-js">' . sprintf(
|
||||
/* translators: 1: WordPress version, 2: URL to About screen */
|
||||
__( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%2$s">here</a>.' ),
|
||||
$new_version,
|
||||
'about.php?updated'
|
||||
) . '</span>'
|
||||
);
|
||||
show_message(
|
||||
'<span class="hide-if-js">' . sprintf(
|
||||
/* translators: 1: WordPress version, 2: URL to About screen */
|
||||
__( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ),
|
||||
$new_version,
|
||||
'about.php?updated'
|
||||
) . '</span>'
|
||||
);
|
||||
echo '</div>';
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
||||
Reference in New Issue
Block a user