mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
i18n: service init asap, avoid spamming the console as some warnings are inevitable due to async loading behavior
This commit is contained in:
+4
-3
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user