Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#45191 closed defect (bug) (fixed)

Remove the 'default' textdomain on __() translation functions introduced into script-loader.php for 5.0

Reported by: garrett-eclipse's profile garrett-eclipse Owned by: pento's profile pento
Milestone: 5.0 Priority: normal
Severity: normal Version: 5.0
Component: I18N Keywords: has-patch
Focuses: coding-standards Cc:

Description

Found in the 5.0 branch in the /wp-includes/script-loader.php is the use of 'default' as the textdomain for the () translation functions;
https://core.trac.wordpress.org/browser/branches/5.0/src/wp-includes/script-loader.php#L405-414

<?php
                                                        'future' => __( '%s from now', 'default' ),
                                                        /* translators: %s: duration */
                                                        'past'   => __( '%s ago', 'default' ),
                                                ),
                                        ),
                                        'formats'  => array(
                                                'time'                => get_option( 'time_format', __( 'g:i a', 'default' ) ),
                                                'date'                => get_option( 'date_format', __( 'F j, Y', 'default' ) ),
                                                'datetime'            => __( 'F j, Y g:i a', 'default' ),
                                                'datetimeAbbreviated' => __( 'M j, Y g:i a', 'default' ),

These should be removed as unnecessary.

Attachments (1)

45191.patch (1.3 KB) - added by mukesh27 6 years ago.
Working Patch.

Download all attachments as: .zip

Change History (6)

@mukesh27
6 years ago

Working Patch.

#1 @mukesh27
6 years ago

  • Keywords has-patch added

#2 @garrett-eclipse
6 years ago

Thanks @mukesh27

#3 @SergeyBiryukov
6 years ago

  • Milestone changed from Awaiting Review to 5.0

Related: #45162

#4 @pento
6 years ago

  • Owner set to pento
  • Resolution set to fixed
  • Status changed from new to closed

In 43831:

Script Loader: Add translator comments and remove textdomains.

The inline script for wp-date incorrectly included a textdomain, and lacked translator comments.

Props mukesh27.
Fixes #45191, #45162.

#5 @pento
6 years ago

In 44171:

Script Loader: Add translator comments and remove textdomains.

The inline script for wp-date incorrectly included a textdomain, and lacked translator comments.

Merges [43831] from the 5.0 branch to trunk.

Props mukesh27.
Fixes #45191, #45162.

Note: See TracTickets for help on using tickets.