Localize loading messages

This commit is contained in:
Brahim Hadriche committed 2024-03-23 17:14:55 -04:00
1 parent 615439650e
commit 3b622f65f3
3 files changed
+22 -1

No files matched your search

@@ -11,5 +11,10 @@ function HideLoadingScreen()
end function
function CopyLoadingMessagesToCache()
CopyFile("libpkg:/config/loading-messages.json5", "cachefs:/loading_messages_v1.json")
deviceInfo = CreateObject("roDeviceInfo")
currentLocale = deviceInfo.GetCurrentLocale()
if not CopyFile(`libpkg:/locale/${currentLocale}/loading-messages.json5`, "cachefs:/loading_messages_v1.json")
CopyFile(`libpkg:/locale/en_US/loading-messages.json5`, "cachefs:/loading_messages_v1.json")
end if
end function