From fd2a644a2442591d117ec066333fd0d545868030 Mon Sep 17 00:00:00 2001 From: msquare Date: Fri, 3 Apr 2020 10:40:23 +0200 Subject: [PATCH] #723: i8n date formats on news page --- includes/pages/admin_news.php | 2 +- includes/pages/user_news.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/pages/admin_news.php b/includes/pages/admin_news.php index 19d3c7ed..b96aaedb 100644 --- a/includes/pages/admin_news.php +++ b/includes/pages/admin_news.php @@ -40,7 +40,7 @@ function admin_news() $html .= form( [ - form_info(__('Date'), $news->created_at->format('Y-m-d H:i')), + form_info(__('Date'), $news->created_at->format(__('Y-m-d H:i'))), form_info(__('Author'), User_Nick_render($user_source)), form_text('eBetreff', __('Subject'), $news->title), form_textarea('eText', __('Message'), $news->text), diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php index 53d3bd90..f196f22f 100644 --- a/includes/pages/user_news.php +++ b/includes/pages/user_news.php @@ -105,7 +105,7 @@ function display_news(News $news): string ) . ''; } - $html .= ' ' . $news->created_at->format('Y-m-d H:i') . ' '; + $html .= ' ' . $news->created_at->format(__('Y-m-d H:i')) . ' '; $html .= User_Nick_render($news->user); if (current_page() != 'news_comments') { @@ -154,7 +154,7 @@ function user_news_comments() $html .= '
'; $html .= '
' . nl2br(htmlspecialchars($comment->text)) . '
'; $html .= ''; $html .= '
';