WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 15 months ago

#37640 new enhancement

Add WPLANG to `.maintenance`

Reported by: tmatsuur Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.0
Component: Upgrade/Install Keywords:
Focuses: Cc:
PR Number:

Description

Currently, maintenance display is English.
This will be WPLANG definition is deprecated in version 4.0 or later, I think that it is due to the fact that now is not the translation information of each language is loaded at the time of the maintenance display.

I think the problem can be solved by adding a WPLANG defined in .maintenance that is created at the time of maintenance.

*Currently(/wp-admin/includes/update-core.php : line936)

$maintenance_string = '<?php $upgrading = ' . time() . '; ?>';

*Change

$language = get_option( 'WPLANG' );
if ( $language ) {
	$maintenance_string = '<?php $upgrading = ' . time() . '; if ( !defined( \'WPLANG\' ) ) define( \'WPLANG\', \''. $language .'\' ); ?>';
} else {
	$maintenance_string = '<?php $upgrading = ' . time() . '; ?>';
}

Please consider this matter.

Change History (3)

#1 @ocean90
3 years ago

  • Type changed from feature request to enhancement
  • Version changed from 4.5.3 to 4.0

Related: #30049

#2 follow-up: @soulseekah
15 months ago

As you mentioned, WPLANG is deprecated. Its definition might trigger a deprecated notice in the logs. Using it, even from core code is no longer recommended.

Maybe WPLANG should be UNdeprecated?

#3 in reply to: ↑ 2 @tmatsuur
15 months ago

Replying to soulseekah:

As you mentioned, WPLANG is deprecated. Its definition might trigger a deprecated notice in the logs. Using it, even from core code is no longer recommended.

Maybe WPLANG should be UNdeprecated?

Thank you for comment.

WPLANG should be deprecated.
Present status Maintenance message is correctly displayed, please close this topic.

Note: See TracTickets for help on using tickets.