From 5b16eb19a8e73639713ecd4fcafdde065ad141c8 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Fri, 14 Dec 2018 05:58:52 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@44171 git-svn-id: http://core.svn.wordpress.org/trunk@44001 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/script-loader.php | 16 ++++++++++------ wp-includes/version.php | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 48e671b731..6435c46553 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -402,16 +402,20 @@ function wp_default_packages_inline_scripts( &$scripts ) { 'meridiem' => (object) $wp_locale->meridiem, 'relative' => array( /* translators: %s: duration */ - 'future' => __( '%s from now', 'default' ), + 'future' => __( '%s from now' ), /* translators: %s: duration */ - 'past' => __( '%s ago', 'default' ), + 'past' => __( '%s ago' ), ), ), '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' ), + /* translators: Time format, see https://secure.php.net/date */ + 'time' => get_option( 'time_format', __( 'g:i a' ) ), + /* translators: Date format, see https://secure.php.net/date */ + 'date' => get_option( 'date_format', __( 'F j, Y' ) ), + /* translators: Date/Time format, see https://secure.php.net/date */ + 'datetime' => __( 'F j, Y g:i a' ), + /* translators: Abbreviated date/time format, see https://secure.php.net/date */ + 'datetimeAbbreviated' => __( 'M j, Y g:i a' ), ), 'timezone' => array( 'offset' => get_option( 'gmt_offset', 0 ), diff --git a/wp-includes/version.php b/wp-includes/version.php index 025e46c749..eef1745cdb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-alpha-44170'; +$wp_version = '5.1-alpha-44171'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.