diff --git a/src/wp-includes/feed-atom-comments.php b/src/wp-includes/feed-atom-comments.php
index 9e62f20ad2..cfdae4ac08 100644
--- a/src/wp-includes/feed-atom-comments.php
+++ b/src/wp-includes/feed-atom-comments.php
@@ -43,7 +43,7 @@ do_action( 'rss_tag_pre', 'atom-comments' );
diff --git a/src/wp-includes/feed-atom.php b/src/wp-includes/feed-atom.php
index 09cb7c016e..2c93aba536 100644
--- a/src/wp-includes/feed-atom.php
+++ b/src/wp-includes/feed-atom.php
@@ -32,7 +32,7 @@ do_action( 'rss_tag_pre', 'atom' );
diff --git a/src/wp-includes/feed-rss2-comments.php b/src/wp-includes/feed-rss2-comments.php
index d6ed5ae2b7..d6137bac41 100644
--- a/src/wp-includes/feed-rss2-comments.php
+++ b/src/wp-includes/feed-rss2-comments.php
@@ -49,7 +49,7 @@ do_action( 'rss_tag_pre', 'rss2-comments' );
assertEquals( strtotime( get_lastpostmodified() ), strtotime( $pubdate[0]['content'] ) );
}
+ /**
+ * Test that translated feeds have a valid listed date.
+ * @group 39141
+ */
+ function test_channel_pubdate_element_translated() {
+ $original_locale = $GLOBALS['wp_locale'];
+ /* @var WP_Locale $locale */
+ $locale = clone $GLOBALS['wp_locale'];
+
+ $locale->weekday[2] = 'Tuesday_Translated';
+ $locale->weekday_abbrev[ 'Tuesday_Translated' ] = 'Tue_Translated';
+
+ $GLOBALS['wp_locale'] = $locale;
+
+ $this->go_to( '/?feed=rss2' );
+ $feed = $this->do_rss2();
+
+ // Restore original locale.
+ $GLOBALS['wp_locale'] = $original_locale;
+
+ $xml = xml_to_array( $feed );
+
+ // Verify the date is untranslated.
+ $pubdate = xml_find( $xml, 'rss', 'channel', 'lastBuildDate' );
+ $this->assertNotContains( 'Tue_Translated', $pubdate[0]['content'] );
+ }
+
/**
* @ticket UT32
*/