From e987874204d1dbee6369fe2a4c134cf850579f7b Mon Sep 17 00:00:00 2001 From: Martin Brennan Date: Mon, 6 Jan 2025 14:59:21 +1000 Subject: [PATCH] FIX: Dashboard last checked date was always English (#30569) The `problemsTimestamp` on the admin dashboard was always forcing the "en" locale for some reason, we can remove the locale entirely because we already set the locale for moment.js using I18n on the server-side. c.f. https://meta.discourse.org/t/last-check-date-not-localized-in-admin-dashboard/345483 --- .../javascripts/admin/addon/controllers/admin-dashboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/admin/addon/controllers/admin-dashboard.js b/app/assets/javascripts/admin/addon/controllers/admin-dashboard.js index 8f60607eba4..1d77fe281e4 100644 --- a/app/assets/javascripts/admin/addon/controllers/admin-dashboard.js +++ b/app/assets/javascripts/admin/addon/controllers/admin-dashboard.js @@ -102,7 +102,7 @@ export default class AdminDashboardController extends Controller { @discourseComputed("problemsFetchedAt") problemsTimestamp(problemsFetchedAt) { - return moment(problemsFetchedAt).locale("en").format("LLL"); + return moment(problemsFetchedAt).format("LLL"); } @action