locale for web app (#334)

* locale for web app

* more translations

* Rename profiles service to avoid locale conflict

* More translation work

* Lint fix

---------

Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
Brahim Hadricheandgithub-action linter authored and GitHub committed 2024-03-22 17:43:03 -04:00
1 parent 019fde1e67
commit 42dadec020
54 files changed
+538 -151

No files matched your search

@@ -102,17 +102,17 @@ class LoungeApi
response = request.Await()
if not response.IsSuccess()
error = `Failed to get screen id. Please restart playlet to use the cast function.\n${response.ErrorMessage()}`
error = Tr(Locale.Dialogs.LoungeFailedToGetScreenId) + `\n${response.ErrorMessage()}`
LogError(error)
DialogUtils.ShowDialog(error, "Lounge service setup error")
DialogUtils.ShowDialog(error, Tr(Locale.Dialogs.LoungeServiceSetupError))
return invalid
end if
id = response.Text()
if not IsString(id)
error = `Failed to get screen id. Please restart playlet to use the cast function.\nNot a valid screen id: ${id}`
error = Tr(Locale.Dialogs.LoungeFailedToGetScreenId) + `\n` = Tr(Locale.Dialogs.LoungeNotAValidScreenId).Replace("%1", `${id}`)
LogError(error)
DialogUtils.ShowDialog(error, "Lounge service setup error")
DialogUtils.ShowDialog(error, Tr(Locale.Dialogs.LoungeServiceSetupError))
return invalid
end if
@@ -132,18 +132,18 @@ class LoungeApi
response = request.Await()
if not response.IsSuccess()
error = `Failed to get lounge token. Please restart playlet to use the cast function.\n${response.ErrorMessage()}`
error = Tr(Locale.Dialogs.LoungeFailedToGetLoungeToken) + `\n${response.ErrorMessage()}`
LogError(error)
DialogUtils.ShowDialog(error, "Lounge service setup error")
DialogUtils.ShowDialog(error, Tr(Locale.Dialogs.LoungeServiceSetupError))
return invalid
end if
json = response.Json()
screens = json.screens
if not IsArray(screens) or screens.Count() <> 1
error = `Failed to get lounge token. Please restart playlet to use the cast function.\nInvalid response: ${json}`
error = Tr(Locale.Dialogs.LoungeFailedToGetLoungeToken) + `\n` + Tr(Locale.Dialogs.LoungeInvalidResponse).Replace("%1", `${json}`)
LogError(error)
DialogUtils.ShowDialog(error, "Lounge service setup error")
DialogUtils.ShowDialog(error, Tr(Locale.Dialogs.LoungeServiceSetupError))
return invalid
end if
@@ -178,9 +178,9 @@ class LoungeApi
response = request.Await()
if not response.IsSuccess()
error = `Failed to get session data. Please restart playlet to use the cast function.\n${response.ErrorMessage()}`
error = Tr(Locale.Dialogs.LoungeFailedToGetSessionData) + `\n${response.ErrorMessage()}`
LogError(error)
DialogUtils.ShowDialog(error, "Lounge service setup error")
DialogUtils.ShowDialog(error, Tr(Locale.Dialogs.LoungeServiceSetupError))
return false
end if