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:
1 parent
019fde1e67
commit
42dadec020
54 files changed
+538
-151
No files matched your search
@@ -13,9 +13,9 @@ function OnNodeReady()
|
||||
SetNavigation(invalid, "back", m.navBar)
|
||||
SetNavigation(invalid, "left", m.navBar)
|
||||
|
||||
m.profileRowList.content = m.profiles.content
|
||||
m.profileRowList.content = m.profilesService.content
|
||||
m.profileRowList.observeFieldScoped("rowItemSelected", FuncName(OnRowItemSelected))
|
||||
m.profiles.observeFieldScoped("currentProfile", FuncName(OnCurrentProfileChanged))
|
||||
m.profilesService.observeFieldScoped("currentProfile", FuncName(OnCurrentProfileChanged))
|
||||
end function
|
||||
|
||||
function OnFocusChange() as void
|
||||
@@ -47,7 +47,7 @@ function OnRowItemSelected() as void
|
||||
end function
|
||||
|
||||
function OnCurrentProfileChanged() as void
|
||||
currentProfile = m.profiles.currentProfile
|
||||
currentProfile = m.profilesService.currentProfile
|
||||
if currentProfile = invalid
|
||||
return
|
||||
end if
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<component name="ProfileScreen" extends="Group" includes="AutoBind,Focus">
|
||||
<interface>
|
||||
<field id="navBar" type="node" bind="/NavBar" />
|
||||
<field id="profiles" type="node" bind="/Profiles" />
|
||||
<field id="profilesService" type="node" bind="/ProfilesService" />
|
||||
<field id="appController" type="node" bind="/AppController" />
|
||||
</interface>
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ function OnSearchContentReady() as void
|
||||
m.rowlist.UnobserveFieldScoped("someContentReady")
|
||||
|
||||
if not m.rowlist.someContentReady
|
||||
DialogUtils.ShowDialog("We didn't find any results for your search. Please try again with a different query or different filters.", "No results found")
|
||||
DialogUtils.ShowDialog(Tr(Locale.Dialogs.NoResultsFoundMessage), Tr(Locale.Dialogs.NoResultsFound))
|
||||
m.rowlist.feeds = invalid
|
||||
m.rowlist.focusable = false
|
||||
HideLoadingScreen()
|
||||
|
||||
+2
-2
@@ -121,8 +121,8 @@ function OnInvidiousPublicInstancesTaskResults(output as object) as void
|
||||
error = ErrorUtils.Format(error)
|
||||
LogError(output.error)
|
||||
|
||||
message = `Failed to load Invidious public instances\n${error}`
|
||||
DialogUtils.ShowDialog(message, "Invidious public instances load error", true)
|
||||
message = Tr(Locale.Dialogs.FailedToLoadInvidiousPublicInstances) + `\n${error}`
|
||||
DialogUtils.ShowDialog(message, Tr(Locale.Dialogs.InvidiousPublicInstancesLoadError), true)
|
||||
|
||||
m.failedLabel.visible = true
|
||||
m.refreshButton.visible = true
|
||||
|
||||
Reference in new issue
Block a user