Compare commits

...

14 Commits

Author SHA1 Message Date
kramo
c347d9b0f4 v2.0.6 2023-07-21 09:45:18 +02:00
kramo
9cd4d7048c Don't blacklist Steam mods - #151 2023-07-21 09:39:32 +02:00
kramo
3d17b5a920 Properly capitalize Pylint 2023-07-20 19:15:19 +02:00
kramo
2c67dd23ab Update contributing guidelines 2023-07-20 19:11:24 +02:00
kramo
45d1ddaa7d Add Matrix space to Readme 2023-07-20 11:56:55 +02:00
kramo
be6338cdd4 v2.0.5 2023-07-17 09:59:47 +02:00
kramo
bb7fded0e5 Fix Windows migration 2023-07-17 09:57:09 +02:00
kramo
7d91b84a87 Merge pull request #144 from weblate/weblate-cartridges-cartridges
Translations update from Hosted Weblate
2023-07-17 09:56:09 +02:00
Hosted Weblate
3002cef448 Translated using Weblate (Polish)
Currently translated at 100.0% (121 of 121 strings)

Co-authored-by: Eryk Michalak <gnu.ewm@protonmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/cartridges/cartridges/pl/
Translation: Cartridges/Cartridges
2023-07-16 00:51:44 +02:00
Hosted Weblate
89f6dcad19 Translated using Weblate (Portuguese (Brazil))
Currently translated at 91.7% (111 of 121 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Vítor Fernandes Almado <vfalmado@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/cartridges/cartridges/pt_BR/
Translation: Cartridges/Cartridges
2023-07-16 00:51:44 +02:00
Hosted Weblate
5c62b7ba02 Translated using Weblate (Turkish)
Currently translated at 100.0% (121 of 121 strings)

Co-authored-by: Sabri Ünal <libreajans@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/cartridges/cartridges/tr/
Translation: Cartridges/Cartridges
2023-07-16 00:51:44 +02:00
kramo
a1c5a4bdd8 Mark source names as translatable 2023-07-13 14:51:55 +02:00
kramo
6114f65204 Lowercase itch source name 2023-07-13 14:46:31 +02:00
kramo
5be70bba52 Add extra sources to desktop entry 2023-07-09 14:26:44 +02:00
17 changed files with 106 additions and 119 deletions

View File

@@ -1,7 +1,14 @@
# Contributing
## Code
Fork the repository, make your changes, then create a pull request.
Be sure to follow the [code style](#code-style) of the project.
### Adding a feature
[Create an issue](https://github.com/kra-mo/cartridges/issues/new) or join the [Discord](https://discord.gg/4KSFh3AmQR)/[Matrix](https://matrix.to/#/#cartridges:matrix.org) to discuss it with the maintainers. We will provide additional guidance.
### Fixing a bug
Fork the repository, make your changes, then create a pull request. Be sure to mention the GitHub issue you're fixing if one was already open.
## Translations
### Weblate
@@ -17,7 +24,7 @@ The project can be translated on [Weblate](https://hosted.weblate.org/engage/car
# Building
## GNOME Builder
1. Install [GNOME Builder](https://flathub.org/apps/details/org.gnome.Builder).
1. Install [GNOME Builder](https://flathub.org/apps/org.gnome.Builder).
2. Click "Clone Repository" with `https://github.com/kra-mo/cartridges.git` as the URL.
3. Click on the build button (hammer) at the top.
@@ -33,3 +40,23 @@ cd cartridges
meson setup build
ninja -C build install
```
# Code style
All code is auto-formatted with [Black](https://github.com/psf/black) and linted with [Pylint](https://github.com/pylint-dev/pylint). Imports are sorted by [isort](https://github.com/pycqa/isort).
VSCode extensions are available for all of these and you can set them up with the following `settings.json` configuration:
```json
"python.formatting.provider": "none",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
},
"isort.args":["--profile", "black"],
```
For other code editors, you can install them via `pip` and invoke them via the command line.

View File

@@ -1,4 +1,16 @@
[circle-url]: https://circle.gnome.org
[circle-image]: https://circle.gnome.org/assets/button/badge.svg
[weblate-url]: https://hosted.weblate.org/engage/cartridges/
[weblate-image]: https://hosted.weblate.org/widgets/cartridges/-/cartridges/svg-badge.svg
[discord-url]: https://discord.gg/4KSFh3AmQR
[discord-image]: https://img.shields.io/discord/1088155799299313754?color=%235865F2&label=discord&logo=discord&logoColor=%23FFFFFF&style=for-the-badge
[matrix-url]: https://matrix.to/#/#cartridges:matrix.org
[matrix-image]: https://img.shields.io/matrix/cartridges:matrix.org?label=Matrix&logo=matrix&color=%230dbd8b&style=for-the-badge
[flathub-url]: https://flathub.org/apps/hu.kramo.Cartridges
[flathub-image]: https://img.shields.io/flathub/v/hu.kramo.Cartridges?logo=flathub&style=for-the-badge
[installs-image]: https://img.shields.io/flathub/downloads/hu.kramo.Cartridges?style=for-the-badge
<div align="center">
<img src="data/icons/hicolor/scalable/apps/hu.kramo.Cartridges.svg" width="128" height="128">
@@ -7,24 +19,12 @@
A GTK4 + Libadwaita game launcher
[![GNOME Circle][circle-image]][circle-url]
[![Flathub][flathub-image]][flathub-url]
[![Build status][github-actions-image]][github-actions-url]
[![Translation Status][weblate-image]][weblate-url]
[![Code style][code-style-image]][code-style-url]
[![Discord][discord-image]][discord-url]
[circle-url]: https://circle.gnome.org
[circle-image]: https://circle.gnome.org/assets/button/badge.svg
[github-actions-url]: https://github.com/kra-mo/cartridges
[github-actions-image]: https://github.com/kra-mo/cartridges/actions/workflows/ci.yml/badge.svg
[code-style-url]: https://github.com/psf/black
[code-style-image]: https://img.shields.io/badge/code%20style-black-000000?style=flat
[weblate-url]: https://hosted.weblate.org/engage/cartridges/
[weblate-image]: https://hosted.weblate.org/widgets/cartridges/-/cartridges/svg-badge.svg
[discord-url]: https://discord.gg/4KSFh3AmQR
[discord-image]: https://img.shields.io/discord/1088155799299313754?color=%235865F2&label=discord&logo=discord&logoColor=%23FFFFFF
[flathub-url]: https://flathub.org/apps/hu.kramo.Cartridges
[flathub-image]: https://img.shields.io/flathub/v/hu.kramo.Cartridges
[![Flathub][flathub-image]][flathub-url]
[![Discord][discord-image]][discord-url]
[![Matrix][matrix-image]][matrix-url]
[![Installs][installs-image]][flathub-url]
<img src="data/screenshots/1.png">
</div>
@@ -50,7 +50,7 @@ Cartridges is a simple game launcher written in Python using GTK4 and Libadwaita
- Searching for games on various databases
- Animated covers
For updates and questions, join our [Discord server][discord-url]!
For updates and questions, join our [Discord server][discord-url] (bridged to [Matrix](https://matrix.to/#/#cartridges:matrix.org))!
# Installation

View File

@@ -7,5 +7,5 @@ Icon=@APP_ID@
Terminal=false
Type=Application
Categories=GNOME;GTK;Game;
Keywords=gaming;launcher;steam;lutris;heroic;bottles;itch;
Keywords=gaming;launcher;steam;lutris;heroic;bottles;itch;flatpak;legendary;
StartupNotify=true

View File

@@ -44,11 +44,10 @@
</screenshots>
<content_rating type="oars-1.1" />
<releases>
<release version="2.0.4" date="2023-07-09">
<release version="2.0.6" date="2023-07-21">
<description translatable="no">
<ul>
<li>Fixes an issue with adding new games manually</li>
<li>Translations since 2.0</li>
<li>Fixes an issue with Steam mods not importing properly</li>
</ul>
</description>
</release>

View File

@@ -1,5 +1,5 @@
project('cartridges',
version: '2.0.4',
version: '2.0.6',
meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2', 'werror=false', ],
)

View File

@@ -3,13 +3,14 @@
# This file is distributed under the same license as the Cartridges package.
# Artur Wróblewski <krypalkora1984@gmail.com>, 2023.
# Kshyso <Kshysio@protonmail.com>, 2023.
# Eryk Michalak <gnu.ewm@protonmail.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Cartridges\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-05 14:36+0200\n"
"PO-Revision-Date: 2023-06-10 16:48+0000\n"
"Last-Translator: Kshyso <Kshysio@protonmail.com>\n"
"PO-Revision-Date: 2023-07-14 15:51+0000\n"
"Last-Translator: Eryk Michalak <gnu.ewm@protonmail.com>\n"
"Language-Team: Polish <https://hosted.weblate.org/projects/cartridges/"
"cartridges/pl/>\n"
"Language: pl\n"
@@ -18,7 +19,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 4.18-dev\n"
"X-Generator: Weblate 5.0-dev\n"
#: data/hu.kramo.Cartridges.desktop.in:3
#: data/hu.kramo.Cartridges.metainfo.xml.in:6 data/gtk/window.blp:47
@@ -37,7 +38,7 @@ msgstr "Uruchom wszystkie swoje gry"
#: data/hu.kramo.Cartridges.desktop.in:11
msgid "gaming;launcher;steam;lutris;heroic;bottles;itch;"
msgstr ""
msgstr "gry;gaming;launcher;steam;lutris;heroic;bottles;itch;"
#: data/hu.kramo.Cartridges.metainfo.xml.in:9
msgid ""
@@ -107,7 +108,7 @@ msgstr ""
#: data/gtk/details-window.blp:130
msgid "More Info"
msgstr ""
msgstr "Więcej informacji"
#: data/gtk/game.blp:102 data/gtk/game.blp:121 data/gtk/window.blp:195
msgid "Edit"
@@ -227,30 +228,24 @@ msgstr "Steam"
#: data/gtk/preferences.blp:151 data/gtk/preferences.blp:192
#: data/gtk/preferences.blp:206 data/gtk/preferences.blp:220
#: data/gtk/preferences.blp:234
#, fuzzy
#| msgid "itch Install Location"
msgid "Install Location"
msgstr "Położenie instalacji itch"
msgstr "Lokalizacja instalacji"
#: data/gtk/preferences.blp:106
msgid "Lutris"
msgstr "Lutris"
#: data/gtk/preferences.blp:119
#, fuzzy
#| msgid "Lutris Cache Location"
msgid "Cache Location"
msgstr "Lokalizacja Lutris Cache"
msgstr "Lokalizacja pamięci podręcznej"
#: data/gtk/preferences.blp:128
msgid "Import Steam Games"
msgstr "Importuj gry Steam"
#: data/gtk/preferences.blp:137
#, fuzzy
#| msgid "Import Steam Games"
msgid "Import Flatpak Games"
msgstr "Importuj gry Steam"
msgstr "Importuj gry Flatpak"
#: data/gtk/preferences.blp:147
msgid "Heroic"
@@ -278,17 +273,15 @@ msgstr "itch"
#: data/gtk/preferences.blp:216
msgid "Legendary"
msgstr ""
msgstr "Legendarne"
#: data/gtk/preferences.blp:230
msgid "Flatpak"
msgstr ""
msgstr "Flatpak"
#: data/gtk/preferences.blp:243
#, fuzzy
#| msgid "Game Launcher"
msgid "Import Game Launchers"
msgstr "Launcher Gier"
msgstr "Importuj programy uruchamiające gry"
#: data/gtk/preferences.blp:256
msgid "SteamGridDB"
@@ -521,41 +514,31 @@ msgstr ""
"{} tutaj{}."
#: src/preferences.py:284
#, fuzzy
#| msgid "Installation Not Found"
msgid "Installation Not Found"
msgstr "Nie znaleziono instalacji"
#: src/preferences.py:286
#, fuzzy
#| msgid "Select the {} data directory."
msgid "Select a valid directory."
msgstr "Wybierz {} katalog danych."
msgstr "Wybierz prawidłowy katalog."
#: src/preferences.py:348
msgid "Invalid Directory"
msgstr ""
msgstr "Nieprawidłowy katalog"
#. The variable is the name of the source
#: src/preferences.py:352
#, fuzzy
#| msgid "Select the {} data directory."
msgid "Select the {} cache directory."
msgstr "Wybierz {} katalog danych."
msgstr "Wybierz katalog pamięci podręcznej {}."
#. The variable is the name of the source
#: src/preferences.py:355
#, fuzzy
#| msgid "Select the {} configuration directory."
msgid "Select the {} configuration directory."
msgstr "Wybierz {} katalog konfiguracyjny."
msgstr "Wybierz katalog konfiguracyjny {}."
#. The variable is the name of the source
#: src/preferences.py:358
#, fuzzy
#| msgid "Select the {} data directory."
msgid "Select the {} data directory."
msgstr "Wybierz {} katalog danych."
msgstr "Wybierz katalog z danymi {}."
#: src/preferences.py:364
msgid "Set Location"
@@ -566,14 +549,12 @@ msgid "Dismiss"
msgstr "Odrzucić"
#: src/store/managers/sgdb_manager.py:47
#, fuzzy
#| msgid "Couldn't Connect to SteamGridDB"
msgid "Couldn't Authenticate SteamGridDB"
msgstr "Nie można połączyć się z SteamGridDB"
msgstr "Nie można uwierzytelnić SteamGridDB"
#: src/store/managers/sgdb_manager.py:48
msgid "Verify your API key in preferences"
msgstr ""
msgstr "Zweryfikuj swój klucz API w preferencjach"
#, fuzzy
#~| msgid "Cache Not Found"

View File

@@ -3,13 +3,14 @@
# This file is distributed under the same license as the Cartridges package.
# Henrique Machado <henriquecamposrj@gmail.com>, 2023.
# Vinícius Gama Santos <vinny.stalck@protonmail.com>, 2023.
# Vítor Fernandes Almado <vfalmado@gmail.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Cartridges\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-05 14:36+0200\n"
"PO-Revision-Date: 2023-06-02 15:40+0000\n"
"Last-Translator: Vinícius Gama Santos <vinny.stalck@protonmail.com>\n"
"PO-Revision-Date: 2023-07-11 15:52+0000\n"
"Last-Translator: Vítor Fernandes Almado <vfalmado@gmail.com>\n"
"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
"cartridges/cartridges/pt_BR/>\n"
"Language: pt_BR\n"
@@ -17,7 +18,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.18-dev\n"
"X-Generator: Weblate 5.0-dev\n"
#: data/hu.kramo.Cartridges.desktop.in:3
#: data/hu.kramo.Cartridges.metainfo.xml.in:6 data/gtk/window.blp:47
@@ -277,11 +278,11 @@ msgstr "itch"
#: data/gtk/preferences.blp:216
msgid "Legendary"
msgstr ""
msgstr "Lendário"
#: data/gtk/preferences.blp:230
msgid "Flatpak"
msgstr ""
msgstr "Flatpak"
#: data/gtk/preferences.blp:243
#, fuzzy
@@ -533,7 +534,7 @@ msgstr "Selecione o diretório de dados do(a) {}."
#: src/preferences.py:348
msgid "Invalid Directory"
msgstr ""
msgstr "Diretório inválido"
#. The variable is the name of the source
#: src/preferences.py:352
@@ -572,7 +573,7 @@ msgstr "Não foi possível conectar-se ao SteamGridDB"
#: src/store/managers/sgdb_manager.py:48
msgid "Verify your API key in preferences"
msgstr ""
msgstr "Verifique sua chave API nas preferências"
#, fuzzy
#~| msgid "Cache Not Found"

View File

@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: Cartridges\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-05 14:36+0200\n"
"PO-Revision-Date: 2023-05-26 18:10+0000\n"
"PO-Revision-Date: 2023-07-15 22:51+0000\n"
"Last-Translator: Sabri Ünal <libreajans@gmail.com>\n"
"Language-Team: Turkish <https://hosted.weblate.org/projects/cartridges/"
"cartridges/tr/>\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.18-dev\n"
"X-Generator: Weblate 5.0-dev\n"
#: data/hu.kramo.Cartridges.desktop.in:3
#: data/hu.kramo.Cartridges.metainfo.xml.in:6 data/gtk/window.blp:47
@@ -227,30 +227,24 @@ msgstr "Steam"
#: data/gtk/preferences.blp:151 data/gtk/preferences.blp:192
#: data/gtk/preferences.blp:206 data/gtk/preferences.blp:220
#: data/gtk/preferences.blp:234
#, fuzzy
#| msgid "itch Install Location"
msgid "Install Location"
msgstr "itch Kurulu Konumu"
msgstr "Kurulu Konumu"
#: data/gtk/preferences.blp:106
msgid "Lutris"
msgstr "Lutris"
#: data/gtk/preferences.blp:119
#, fuzzy
#| msgid "Lutris Cache Location"
msgid "Cache Location"
msgstr "Lutris Önbellek Konumu"
msgstr "Önbellek Konumu"
#: data/gtk/preferences.blp:128
msgid "Import Steam Games"
msgstr "Steam Oyunlarını İçe Aktar"
#: data/gtk/preferences.blp:137
#, fuzzy
#| msgid "Import Steam Games"
msgid "Import Flatpak Games"
msgstr "Steam Oyunlarını İçe Aktar"
msgstr "Flatpak Oyunlarını İçe Aktarın"
#: data/gtk/preferences.blp:147
msgid "Heroic"
@@ -278,17 +272,15 @@ msgstr "itch"
#: data/gtk/preferences.blp:216
msgid "Legendary"
msgstr ""
msgstr "Efsanevi"
#: data/gtk/preferences.blp:230
msgid "Flatpak"
msgstr ""
msgstr "Flatpak"
#: data/gtk/preferences.blp:243
#, fuzzy
#| msgid "Game Launcher"
msgid "Import Game Launchers"
msgstr "Oyun Başlatıcı"
msgstr "Oyun Başlatıcıları İçe Aktar"
#: data/gtk/preferences.blp:256
msgid "SteamGridDB"
@@ -521,39 +513,29 @@ msgstr ""
"oluşturabilirsiniz."
#: src/preferences.py:284
#, fuzzy
#| msgid "Installation Not Found"
msgid "Installation Not Found"
msgstr "Kurulum Bulunamadı"
#: src/preferences.py:286
#, fuzzy
#| msgid "Select the {} data directory."
msgid "Select a valid directory."
msgstr "{} veri dizinini seç."
msgstr "Geçerli bir dizin seçin."
#: src/preferences.py:348
msgid "Invalid Directory"
msgstr ""
msgstr "Geçersiz Dizin"
#. The variable is the name of the source
#: src/preferences.py:352
#, fuzzy
#| msgid "Select the {} data directory."
msgid "Select the {} cache directory."
msgstr "{} veri dizinini seç."
msgstr "{} önbellek dizinini seç."
#. The variable is the name of the source
#: src/preferences.py:355
#, fuzzy
#| msgid "Select the {} configuration directory."
msgid "Select the {} configuration directory."
msgstr "{} yapılandırma dizinini seç."
#. The variable is the name of the source
#: src/preferences.py:358
#, fuzzy
#| msgid "Select the {} data directory."
msgid "Select the {} data directory."
msgstr "{} veri dizinini seç."
@@ -566,14 +548,12 @@ msgid "Dismiss"
msgstr "Vazgeç"
#: src/store/managers/sgdb_manager.py:47
#, fuzzy
#| msgid "Couldn't Connect to SteamGridDB"
msgid "Couldn't Authenticate SteamGridDB"
msgstr "SteamGridDBʼye bağlanılamadı"
msgstr "SteamGridDB Kimlik Doğrulaması Yapılamadı"
#: src/store/managers/sgdb_manager.py:48
msgid "Verify your API key in preferences"
msgstr ""
msgstr "Tercihlerde API anahtarınızı doğrulayın"
#, fuzzy
#~| msgid "Cache Not Found"

View File

@@ -83,7 +83,7 @@ class BottlesSourceIterator(SourceIterator):
class BottlesSource(URLExecutableSource):
"""Generic Bottles source"""
name = "Bottles"
name = _("Bottles")
iterator_class = BottlesSourceIterator
url_format = 'bottles:run/"{bottle_name}"/"{game_name}"'
available_on = {"linux"}

View File

@@ -114,7 +114,7 @@ class FlatpakSourceIterator(SourceIterator):
class FlatpakSource(Source):
"""Generic Flatpak source"""
name = "Flatpak"
name = _("Flatpak")
iterator_class = FlatpakSourceIterator
executable_format = "flatpak run {flatpak_id}"
available_on = {"linux"}

View File

@@ -138,7 +138,7 @@ class HeroicSourceIterator(SourceIterator):
class HeroicSource(URLExecutableSource):
"""Generic Heroic Games Launcher source"""
name = "Heroic"
name = _("Heroic")
iterator_class = HeroicSourceIterator
url_format = "heroic://launch/{app_name}"
available_on = {"linux", "win32"}

View File

@@ -79,7 +79,7 @@ class ItchSourceIterator(SourceIterator):
class ItchSource(URLExecutableSource):
name = "Itch"
name = _("itch")
iterator_class = ItchSourceIterator
url_format = "itch://caves/{cave_id}/launch"
available_on = {"linux", "win32"}

View File

@@ -90,7 +90,7 @@ class LegendarySourceIterator(SourceIterator):
class LegendarySource(Source):
name = "Legendary"
name = _("Legendary")
executable_format = "legendary launch {app_name}"
available_on = {"linux"}

View File

@@ -90,7 +90,7 @@ class LutrisSourceIterator(SourceIterator):
class LutrisSource(URLExecutableSource):
"""Generic Lutris source"""
name = "Lutris"
name = _("Lutris")
iterator_class = LutrisSourceIterator
url_format = "lutris:rungameid/{game_id}"
available_on = {"linux"}

View File

@@ -110,7 +110,7 @@ class SteamSourceIterator(SourceIterator):
class SteamSource(URLExecutableSource):
name = "Steam"
name = _("Steam")
available_on = {"linux", "win32"}
iterator_class = SteamSourceIterator
url_format = "steam://rungameid/{game_id}"

View File

@@ -61,9 +61,9 @@ def migrate_files_v1_to_v2():
logging.info("Migrating data dir %s", str(old_data_dir))
# Create the current data dir if needed
if not shared.data_dir.is_dir():
shared.data_dir.mkdir(parents=True)
# Create new directories
shared.games_dir.mkdir(parents=True, exist_ok=True)
shared.covers_dir.mkdir(parents=True, exist_ok=True)
old_game_paths = set(old_games_dir.glob("*.json"))
old_imported_game_paths = set(

View File

@@ -142,8 +142,7 @@ class SteamAPIHelper:
raise SteamGameNotFoundError()
# Handle appid is not a game
game_types = ("game", "demo")
if data["data"]["type"] not in game_types:
if data["data"]["type"] not in {"game", "demo", "mod"}:
logging.debug("Appid %s is not a game", appid)
raise SteamNotAGameError()