From 1d98a657b27d31d7552c41b3db6905b82a592673 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Wed, 24 Sep 2025 08:50:40 -0400 Subject: [PATCH] i18n: service init asap, avoid spamming the console as some warnings are inevitable due to async loading behavior --- Commons/I18n.qml | 7 ++++--- Commons/Settings.qml | 11 ----------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/Commons/I18n.qml b/Commons/I18n.qml index 23457b3d..d9fe7fee 100644 --- a/Commons/I18n.qml +++ b/Commons/I18n.qml @@ -86,8 +86,7 @@ Singleton { } } - // ------------------------------------------- - function init() { + Component.onCompleted: { Logger.log("I18n", "Service started") scanAvailableLanguages() } @@ -266,7 +265,9 @@ Singleton { interpolations = {} if (!isLoaded) { - Logger.warn("I18n", "Translations not loaded yet") + // if (debug) { + // Logger.warn("I18n", "Translations not loaded yet") + // } return key } diff --git a/Commons/Settings.qml b/Commons/Settings.qml index fd2a1ed1..7e7d1225 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -494,24 +494,13 @@ Singleton { // ----------------------------------------------------- // Kickoff essential services function kickOffServices() { - I18n.init() - - // Ensure our location singleton is created as soon as possible so we start fetching weather asap LocationService.init() - NightLightService.apply() - ColorSchemeService.init() - MatugenService.init() - - // Ensure wallpapers are restored after settings have been loaded WallpaperService.init() - FontService.init() - HooksService.init() - BluetoothService.init() } }