From ca709ccc03a8cad2750a7a3e73801f9d06819420 Mon Sep 17 00:00:00 2001 From: DoDa Date: Thu, 1 May 2025 16:56:36 +0200 Subject: [PATCH] Updated feed translations Enable dynamic loading of notification files (notifications.{lang}.json) based on the selected admin language. Improves multilingual consistency for notifications and ensures the feed updates correctly when switching languages in the admin panel. --- classes/plugin/Admin.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/plugin/Admin.php b/classes/plugin/Admin.php index df1c73588..1cd4fe44f 100644 --- a/classes/plugin/Admin.php +++ b/classes/plugin/Admin.php @@ -1717,7 +1717,9 @@ public function getNotifications($force = false) $timeout = $this->grav['config']->get('system.session.timeout', 1800); if ($force || !$last_checked || empty($notifications) || (time() - $last_checked > $timeout)) { - $body = Response::get('https://getgrav.org/notifications.json?' . time()); + $notificationsUrl = 'https://raw.githubusercontent.com/doda-agency/grav/refs/heads/doda/feed/notifications.' .($this->language ?: $this->grav['language']->getLanguage()) .'.json?' . time(); + $body = Response::get($notificationsUrl); +// $body = Response::get('https://getgrav.org/notifications.json?' . time()); // $body = Response::get('http://localhost/notifications.json?' . time()); $notifications = json_decode($body, true);