Split locale enum, add duplicate values validation
This commit is contained in:
1 parent
7d9817994c
commit
48993dd9f5
7 files changed
+88
-55
No files matched your search
@@ -39,7 +39,7 @@ function OnNodeready()
|
||||
SetNavigation(m.rowList, "up", m.subscribeButton)
|
||||
SetNavigation(m.subscribeButton, "down", m.rowList)
|
||||
|
||||
m.subscribeButton.text = Tr(Locale.Subscribe)
|
||||
m.subscribeButton.text = Tr(Locale.Buttons.Subscribe)
|
||||
DisposableObserveFieldScoped(m.subscribeButton, "buttonSelected", FuncName(OnSubscribeButtonSelected))
|
||||
|
||||
SetSubscribeButtonVisibility()
|
||||
@@ -300,9 +300,9 @@ end function
|
||||
function OnSubscriptionChanged()
|
||||
isSubbed = IsSubscribed()
|
||||
if isSubbed
|
||||
m.subscribeButton.text = Tr(Locale.Unsubscribe)
|
||||
m.subscribeButton.text = Tr(Locale.Buttons.Unsubscribe)
|
||||
else
|
||||
m.subscribeButton.text = Tr(Locale.Subscribe)
|
||||
m.subscribeButton.text = Tr(Locale.Buttons.Subscribe)
|
||||
end if
|
||||
end function
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ function Init()
|
||||
m.top.observeFieldScoped("buttonSelected", FuncName(Close))
|
||||
|
||||
scanLabel = m.top.findNode("scanLabel")
|
||||
scanLabel.text = Tr(Locale.ScanTheQrCode)
|
||||
scanLabel.text = Tr(Locale.LoginDialog.ScanTheQrCode)
|
||||
end function
|
||||
|
||||
function OnNodeReady()
|
||||
@@ -21,7 +21,7 @@ function OnNodeReady()
|
||||
if isValidAddress
|
||||
m.top.url = `${address}/invidious/login`
|
||||
else
|
||||
m.urlLabel.text = Tr(Locale.IpAddressNotAvailable)
|
||||
m.urlLabel.text = Tr(Locale.LoginDialog.IpAddressNotAvailable)
|
||||
end if
|
||||
|
||||
m.invidious.observeFieldScoped("authToken", FuncName(OnAuthTokenChange))
|
||||
|
||||
@@ -144,10 +144,10 @@ function UpdateActivateButton() as void
|
||||
if m.activateButton.hasFocus()
|
||||
NodeSetFocus(m.logoutButton, true)
|
||||
end if
|
||||
m.activateButton.text = Tr(Locale.InUse)
|
||||
m.activateButton.text = Tr(Locale.Buttons.InUse)
|
||||
m.activateButton.disabled = true
|
||||
else
|
||||
m.activateButton.text = Tr(Locale.Activate)
|
||||
m.activateButton.text = Tr(Locale.Buttons.Activate)
|
||||
m.activateButton.disabled = false
|
||||
end if
|
||||
end function
|
||||
+1
-1
@@ -17,7 +17,7 @@ function OnContentSet() as void
|
||||
' bs:disable-next-line LINT3023
|
||||
m.top.circlePosterInnerBlendColor = "#FFFFFFFF"
|
||||
m.top.letter = ""
|
||||
m.top.username = Tr(Locale.Login)
|
||||
m.top.username = Tr(Locale.Buttons.Login)
|
||||
m.top.serverUrl = ""
|
||||
m.top.crownVisible = false
|
||||
return
|
||||
|
||||
@@ -197,9 +197,9 @@ function OnFiltersChange()
|
||||
end if
|
||||
end for
|
||||
if filterCount > 0
|
||||
m.filtersButton.text = `${Tr(Locale.Filters)} (${filterCount})`
|
||||
m.filtersButton.text = `${Tr(Locale.Buttons.Filters)} (${filterCount})`
|
||||
else
|
||||
m.filtersButton.text = Tr(Locale.Filters)
|
||||
m.filtersButton.text = Tr(Locale.Buttons.Filters)
|
||||
end if
|
||||
end function
|
||||
|
||||
@@ -210,7 +210,7 @@ function Search(text as string)
|
||||
|
||||
feedSource = {
|
||||
"id": `inv_search_${CryptoUtils.GetMd5(text)}`
|
||||
"title": `${Tr(Locale.Search)} - ${text}`
|
||||
"title": `${Tr(Locale.NavBar.Search)} - ${text}`
|
||||
"apiType": "Invidious"
|
||||
"endpoint": "search"
|
||||
"queryParams": {
|
||||
@@ -232,7 +232,7 @@ function Search(text as string)
|
||||
end for
|
||||
|
||||
m.rowList.feeds = [{
|
||||
"title": `${Tr(Locale.Search)} - ${text}`
|
||||
"title": `${Tr(Locale.NavBar.Search)} - ${text}`
|
||||
"feedSources": [feedSource]
|
||||
}]
|
||||
end function
|
||||
|
||||
Reference in new issue
Block a user