From 99ffdc16838d258c241701751c8128b087f7c961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Wrede?= Date: Thu, 10 Oct 2019 18:47:58 +0200 Subject: [PATCH] Block dir API: Change time difference string. (#17535) --- lib/class-wp-rest-block-directory-controller.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/class-wp-rest-block-directory-controller.php b/lib/class-wp-rest-block-directory-controller.php index f8c1d1d71bea5..7360fa9d2533f 100644 --- a/lib/class-wp-rest-block-directory-controller.php +++ b/lib/class-wp-rest-block-directory-controller.php @@ -300,7 +300,11 @@ private static function parse_block_metadata( $plugin ) { $block->assets[] = 'https://plugins.svn.wordpress.org/' . $plugin['slug'] . $asset; } - $block->humanized_updated = human_time_diff( strtotime( $plugin['last_updated'] ), current_time( 'timestamp' ) ) . __( ' ago', 'gutenberg' ); + $block->humanized_updated = sprintf( + /* translators: %s: Human-readable time difference. */ + __( '%s ago', 'gutenberg' ), + human_time_diff( strtotime( $plugin['last_updated'] ), current_time( 'timestamp' ) ) + ); return $block; }