Localization test (#331)

* Localization test

* More translations

* More translations

* Setup the tooling and validation for the localization

* More translations

* Docs
This commit is contained in:
Brahim Hadriche authored and GitHub committed 2024-03-17 22:22:53 -04:00
1 parent 403ed94e97
commit 7d9817994c
36 files changed
+789 -51

No files matched your search

@@ -5,6 +5,7 @@ import "pkg:/source/AsyncTask/AsyncTask.bs"
import "pkg:/source/AsyncTask/Tasks.bs"
import "pkg:/source/utils/DisposableObserve.bs"
import "pkg:/source/utils/FocusManagement.bs"
import "pkg:/source/utils/Locale.bs"
import "pkg:/source/utils/Logging.bs"
import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/utils/Types.bs"
@@ -38,7 +39,7 @@ function OnNodeready()
SetNavigation(m.rowList, "up", m.subscribeButton)
SetNavigation(m.subscribeButton, "down", m.rowList)
m.subscribeButton.text = "Subscribe"
m.subscribeButton.text = Tr(Locale.Subscribe)
DisposableObserveFieldScoped(m.subscribeButton, "buttonSelected", FuncName(OnSubscribeButtonSelected))
SetSubscribeButtonVisibility()
@@ -234,7 +235,7 @@ function GetContextMenuOptionsForItem(video as object) as object
if StringUtils.IsNullOrEmpty(m.top.authorId)
return []
end if
options = m.bookmarks@.GetMenuForChannel(m.top.content)
options = m.bookmarksService@.GetMenuForChannel(m.top.content)
options.Append(GetSortingContextMenuOptionsForItem(video))
return options
end function
@@ -299,9 +300,9 @@ end function
function OnSubscriptionChanged()
isSubbed = IsSubscribed()
if isSubbed
m.subscribeButton.text = "Unsubscribe"
m.subscribeButton.text = Tr(Locale.Unsubscribe)
else
m.subscribeButton.text = "Subscribe"
m.subscribeButton.text = Tr(Locale.Subscribe)
end if
end function
@@ -4,7 +4,7 @@
<field id="authorId" type="string" onChange="OnAuthorIdChange" />
<field id="appController" type="node" bind="/AppController" />
<field id="invidious" type="node" bind="/Invidious" />
<field id="bookmarks" type="node" bind="/Bookmarks" />
<field id="bookmarksService" type="node" bind="/BookmarksService" />
<function name="ShowSortDialog" />
</interface>
<children>