From aa7d30fbc70eb389eacfd10b417227bfbd6e3ebb Mon Sep 17 00:00:00 2001 From: Jignesh Bhavani Date: Wed, 5 Aug 2026 15:30:11 +0530 Subject: [PATCH] I18N: Read the correct revision date key from .l10n.php files. wp_get_l10n_php_file_data() looked for `po-revision-date`, which no generated file uses. The de_CH test fixture had the same wrong key. Props bejignesh. Fixes #65809. --- src/wp-includes/l10n.php | 2 +- tests/phpunit/data/languages/de_CH.l10n.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/l10n.php b/src/wp-includes/l10n.php index 2f27c2180037a..460c26c66a9de 100644 --- a/src/wp-includes/l10n.php +++ b/src/wp-includes/l10n.php @@ -1684,7 +1684,7 @@ function wp_get_l10n_php_file_data( $php_file ) { unset( $data['messages'] ); $headers = array( 'POT-Creation-Date' => 'pot-creation-date', - 'PO-Revision-Date' => 'po-revision-date', + 'PO-Revision-Date' => 'translation-revision-date', 'Project-Id-Version' => 'project-id-version', 'X-Generator' => 'x-generator', ); diff --git a/tests/phpunit/data/languages/de_CH.l10n.php b/tests/phpunit/data/languages/de_CH.l10n.php index 1e5285fdf457f..4575dc50a0a32 100644 --- a/tests/phpunit/data/languages/de_CH.l10n.php +++ b/tests/phpunit/data/languages/de_CH.l10n.php @@ -1,2 +1,2 @@ '2024-01-31 19:08:22+0000','mime-version'=>'1.0','content-type'=>'text/plain; charset=UTF-8','content-transfer-encoding'=>'8bit','plural-forms'=>'nplurals=2; plural=n != 1;','x-generator'=>'GlotPress/4.0.0-beta.2','language'=>'de','project-id-version'=>'WordPress - 6.4.x - Development','messages'=>['html_lang_attribute'=>'de-CH','text directionltr'=>'ltr','number_format_decimal_point'=>',','number_format_thousands_sep'=>'.','Update %s now'=>'Jetzt %s aktualisieren','[%1$s] Confirm Action: %2$s'=>'[%1$s] Aktion bestätigen: %2$s','[%s] Erasure Request Fulfilled'=>'[%s] Löschauftrag ausgeführt','[%s] Personal Data Export'=>'[%s] Export personenbezogener Daten']]; +return ['translation-revision-date'=>'2024-01-31 19:08:22+0000','mime-version'=>'1.0','content-type'=>'text/plain; charset=UTF-8','content-transfer-encoding'=>'8bit','plural-forms'=>'nplurals=2; plural=n != 1;','x-generator'=>'GlotPress/4.0.0-beta.2','language'=>'de','project-id-version'=>'WordPress - 6.4.x - Development','messages'=>['html_lang_attribute'=>'de-CH','text directionltr'=>'ltr','number_format_decimal_point'=>',','number_format_thousands_sep'=>'.','Update %s now'=>'Jetzt %s aktualisieren','[%1$s] Confirm Action: %2$s'=>'[%1$s] Aktion bestätigen: %2$s','[%s] Erasure Request Fulfilled'=>'[%s] Löschauftrag ausgeführt','[%s] Personal Data Export'=>'[%s] Export personenbezogener Daten']];