Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add downloads column for ConsoleUI #4063

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ConsoleUI/ModListScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ public ModListScreen(GameInstanceManager mgr, RepositoryDataManager repoData, Re
Width = 20,
Renderer = m => registry.LatestCompatibleGameVersion(game.KnownVersions, m.identifier)?.ToString() ?? "",
Comparer = (a, b) => registry.LatestCompatibleGameVersion(game.KnownVersions, a.identifier).CompareTo(registry.LatestCompatibleGameVersion(game.KnownVersions, b.identifier))
}, new ConsoleListBoxColumn<CkanModule>() {
Header = Properties.Resources.ModListDownloadsHeader,
Width = 12,
Renderer = m => repoData.GetDownloadCount(registry.Repositories.Values, m.identifier)
?.ToString()
?? "",
Comparer = (a, b) => (repoData.GetDownloadCount(registry.Repositories.Values, a.identifier) ?? 0)
.CompareTo(repoData.GetDownloadCount(registry.Repositories.Values, b.identifier) ?? 0),
}
},
1, 0, ListSortDirection.Descending,
Expand Down
3 changes: 3 additions & 0 deletions ConsoleUI/Properties/Resources.fr-FR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@ Si vous le retirez, CKAN ne pourra pas le réinstaller.</value>
<data name="ModListMaxGameVersionHeader" xml:space="preserve">
<value>Version de jeu max</value>
</data>
<data name="ModListDownloadsHeader" xml:space="preserve">
<value>Nombre de téléchargements</value>
</data>
<data name="ModListSearchFocusedGhostText" xml:space="preserve">
<value>&lt;Taper pour faire une recherche&gt;</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions ConsoleUI/Properties/Resources.it-IT.resx
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@ Se la disinstalli, CKAN non sarà in grado di reinstallarla.</value>
<data name="ModListMaxGameVersionHeader" xml:space="preserve">
<value>Versione massima del gioco</value>
</data>
<data name="ModListDownloadsHeader" xml:space="preserve">
<value>Download</value>
</data>
<data name="ModListSearchFocusedGhostText" xml:space="preserve">
<value>&lt;Digita per cercare&gt;</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions ConsoleUI/Properties/Resources.pl-PL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@ Jeśli go odinstalujesz, CKAN nie będzie mógł go ponownie zainstalować.</val
<data name="ModListMaxGameVersionHeader" xml:space="preserve">
<value>Maksymalna wersja gry</value>
</data>
<data name="ModListDownloadsHeader" xml:space="preserve">
<value>Ilość pobrań</value>
</data>
<data name="ModListSearchFocusedGhostText" xml:space="preserve">
<value>&lt;Wyszukaj&gt;</value>
</data>
Expand Down
1 change: 1 addition & 0 deletions ConsoleUI/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ If you uninstall it, CKAN will not be able to re-install it.</value></data>
<data name="ModListNameHeader" xml:space="preserve"><value>Name</value></data>
<data name="ModListVersionHeader" xml:space="preserve"><value>Version</value></data>
<data name="ModListMaxGameVersionHeader" xml:space="preserve"><value>Max game version</value></data>
<data name="ModListDownloadsHeader" xml:space="preserve"><value>Downloads</value></data>
<data name="ModListSearchFocusedGhostText" xml:space="preserve"><value>&lt;Type to search&gt;</value></data>
<data name="ModListSearchUnfocusedGhostText" xml:space="preserve"><value>&lt;Ctrl+F to search&gt;</value></data>
<data name="ModListCount" xml:space="preserve"><value>{0} mods</value></data>
Expand Down
3 changes: 3 additions & 0 deletions ConsoleUI/Properties/Resources.ru-RU.resx
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@
<data name="ModListMaxGameVersionHeader" xml:space="preserve">
<value>Макс.вер.</value>
</data>
<data name="ModListDownloadsHeader" xml:space="preserve">
<value>Загрузки</value>
</data>
<data name="ModListSearchFocusedGhostText" xml:space="preserve">
<value>&lt;Введите текст для поиска...&gt;</value>
</data>
Expand Down
Loading