diff --git a/README.md b/README.md index aa5f634..dacdf9e 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ - [X] Исправить частичное применение тем на лету - [X] Исправить наложение подписей скриншотов при первом перелистывании в полноэкранном режиме - [ ] Добавить поддержку GOG (?) -- [ ] Определиться с названием (PortProtonQt или PortProtonQT или вообще третий вариант) +- [X] Определиться с названием (PortProtonQt или PortProtonQT или вообще третий вариант) - [ ] Добавить данные с HowLongToBeat на страницу с деталями игры (?) - [ ] Добавить виброотдачу на геймпаде при запуске игры (?) diff --git a/dev-scripts/l10n.py b/dev-scripts/l10n.py index 4acbb5b..6a9ff5c 100755 --- a/dev-scripts/l10n.py +++ b/dev-scripts/l10n.py @@ -106,7 +106,7 @@ def compile_locales() -> None: def extract_strings() -> None: input_dir = (Path(__file__).parent.parent / "portprotonqt").resolve() CommandLineInterface().run([ - "pybabel", "extract", "--project=PortProtonQT", + "pybabel", "extract", "--project=PortProtonQt", f"--version={_get_version()}", "--strip-comment-tag", "--no-location", @@ -231,7 +231,7 @@ def main(args) -> int: return 0 if __name__ == "__main__": - parser = argparse.ArgumentParser(prog="l10n", description="Localization utility for PortProtonQT.") + parser = argparse.ArgumentParser(prog="l10n", description="Localization utility for PortProtonQt.") parser.add_argument("--create-new", nargs='+', type=str, default=False, help="Create .po for new locales") parser.add_argument("--update-all", action='store_true', help="Extract/update locales and update README coverage") parser.add_argument("--spellcheck", action='store_true', help="Run spellcheck on POT and PO files") diff --git a/portprotonqt/cli.py b/portprotonqt/cli.py index ed7d096..f781dfc 100644 --- a/portprotonqt/cli.py +++ b/portprotonqt/cli.py @@ -7,7 +7,7 @@ def parse_args(): """ Парсит аргументы командной строки. """ - parser = argparse.ArgumentParser(description="PortProtonQT CLI") + parser = argparse.ArgumentParser(description="PortProtonQt CLI") parser.add_argument( "--fullscreen", action="store_true", diff --git a/portprotonqt/config_utils.py b/portprotonqt/config_utils.py index 3c9ca86..cf40558 100644 --- a/portprotonqt/config_utils.py +++ b/portprotonqt/config_utils.py @@ -10,7 +10,7 @@ _portproton_location = None # Пути к конфигурационным файлам CONFIG_FILE = os.path.join( os.getenv("XDG_CONFIG_HOME", os.path.join(os.path.expanduser("~"), ".config")), - "PortProtonQT.conf" + "PortProtonQt.conf" ) PORTPROTON_CONFIG_FILE = os.path.join( @@ -21,7 +21,7 @@ PORTPROTON_CONFIG_FILE = os.path.join( # Пути к папкам с темами xdg_data_home = os.getenv("XDG_DATA_HOME", os.path.join(os.path.expanduser("~"), ".local", "share")) THEMES_DIRS = [ - os.path.join(xdg_data_home, "PortProtonQT", "themes"), + os.path.join(xdg_data_home, "PortProtonQt", "themes"), os.path.join(os.path.dirname(os.path.abspath(__file__)), "themes") ] @@ -472,14 +472,14 @@ def reset_config(): def clear_cache(): """ - Очищает кэш PortProtonQT, удаляя папку кэша. + Очищает кэш PortProtonQt, удаляя папку кэша. """ xdg_cache_home = os.getenv("XDG_CACHE_HOME", os.path.join(os.path.expanduser("~"), ".cache")) - cache_dir = os.path.join(xdg_cache_home, "PortProtonQT") + cache_dir = os.path.join(xdg_cache_home, "PortProtonQt") if os.path.exists(cache_dir): try: shutil.rmtree(cache_dir) - logger.info("Кэш PortProtonQT удалён: %s", cache_dir) + logger.info("Кэш PortProtonQt удалён: %s", cache_dir) except Exception as e: logger.error("Ошибка при удалении кэша: %s", e) diff --git a/portprotonqt/context_menu_manager.py b/portprotonqt/context_menu_manager.py index ad853c5..4e5772b 100644 --- a/portprotonqt/context_menu_manager.py +++ b/portprotonqt/context_menu_manager.py @@ -12,7 +12,7 @@ from portprotonqt.steam_api import is_game_in_steam, add_to_steam, remove_from_s from portprotonqt.dialogs import AddGameDialog class ContextMenuManager: - """Manages context menu actions for game management in PortProtonQT.""" + """Manages context menu actions for game management in PortProtonQt.""" def __init__(self, parent, portproton_location, theme, load_games_callback, update_game_grid_callback): """ @@ -258,7 +258,7 @@ class ContextMenuManager: "XDG_DATA_HOME", os.path.join(os.path.expanduser("~"), ".local", "share") ) - custom_folder = os.path.join(xdg_data_home, "PortProtonQT", "custom_data", exe_name) + custom_folder = os.path.join(xdg_data_home, "PortProtonQt", "custom_data", exe_name) if os.path.exists(custom_folder): try: shutil.rmtree(custom_folder) @@ -417,7 +417,7 @@ class ContextMenuManager: "XDG_DATA_HOME", os.path.join(os.path.expanduser("~"), ".local", "share") ) - custom_folder = os.path.join(xdg_data_home, "PortProtonQT", "custom_data", exe_name) + custom_folder = os.path.join(xdg_data_home, "PortProtonQt", "custom_data", exe_name) os.makedirs(custom_folder, exist_ok=True) ext = os.path.splitext(new_cover_path)[1].lower() diff --git a/portprotonqt/downloader.py b/portprotonqt/downloader.py index 8118b39..0e8e610 100644 --- a/portprotonqt/downloader.py +++ b/portprotonqt/downloader.py @@ -303,7 +303,7 @@ class Downloader(QObject): local_path = os.path.join( os.getenv("XDG_CACHE_HOME", os.path.join(os.path.expanduser("~"), ".cache")), - "PortProtonQT", "legendary_cache", "legendary" + "PortProtonQt", "legendary_cache", "legendary" ) logger.info(f"Downloading legendary binary version {version} from {binary_url} to {local_path}") diff --git a/portprotonqt/egs_api.py b/portprotonqt/egs_api.py index a80a295..8f12c3f 100644 --- a/portprotonqt/egs_api.py +++ b/portprotonqt/egs_api.py @@ -22,7 +22,7 @@ def get_cache_dir() -> Path: "XDG_CACHE_HOME", os.path.join(os.path.expanduser("~"), ".cache") ) - cache_dir = Path(xdg_cache_home) / "PortProtonQT" + cache_dir = Path(xdg_cache_home) / "PortProtonQt" cache_dir.mkdir(parents=True, exist_ok=True) return cache_dir @@ -36,7 +36,7 @@ def get_egs_game_description_async( Asynchronously fetches the game description from the Epic Games Store API. Prioritizes GraphQL API with namespace for slug and description. Falls back to legacy API if GraphQL provides a slug but no description. - Caches results in ~/.cache/PortProtonQT/egs_app_{app_name}.json. + Caches results in ~/.cache/PortProtonQt/egs_app_{app_name}.json. Handles DNS resolution failures gracefully. """ cache_dir = get_cache_dir() @@ -423,7 +423,7 @@ def _continue_loading_egs_games(legendary_path: str, callback: Callable[[list[tu except Exception as e: logger.warning("Error processing metadata for %s: %s", app_name, str(e)) - image_folder = os.path.join(os.getenv("XDG_CACHE_HOME", os.path.join(os.path.expanduser("~"), ".cache")), "PortProtonQT", "images") + image_folder = os.path.join(os.getenv("XDG_CACHE_HOME", os.path.join(os.path.expanduser("~"), ".cache")), "PortProtonQt", "images") local_path = os.path.join(image_folder, f"{app_name}.jpg") if cover_url else "" def on_description_fetched(api_description: str): diff --git a/portprotonqt/image_utils.py b/portprotonqt/image_utils.py index 0c2dda5..922f23f 100644 --- a/portprotonqt/image_utils.py +++ b/portprotonqt/image_utils.py @@ -35,10 +35,9 @@ def load_pixmap_async(cover: str, width: int, height: int, callback: Callable[[Q y = (scaled.height() - height) // 2 cropped = scaled.copy(x, y, width, height) callback(cropped) - # Removed: pixmap = None (unnecessary, causes type error) xdg_cache_home = os.getenv("XDG_CACHE_HOME", os.path.join(os.path.expanduser("~"), ".cache")) - image_folder = os.path.join(xdg_cache_home, "PortProtonQT", "images") + image_folder = os.path.join(xdg_cache_home, "PortProtonQt", "images") os.makedirs(image_folder, exist_ok=True) if cover and cover.startswith("https://steamcdn-a.akamaihd.net/steam/apps/"): diff --git a/portprotonqt/locales/de_DE/LC_MESSAGES/messages.mo b/portprotonqt/locales/de_DE/LC_MESSAGES/messages.mo index f5b8824..c07c511 100644 Binary files a/portprotonqt/locales/de_DE/LC_MESSAGES/messages.mo and b/portprotonqt/locales/de_DE/LC_MESSAGES/messages.mo differ diff --git a/portprotonqt/locales/de_DE/LC_MESSAGES/messages.po b/portprotonqt/locales/de_DE/LC_MESSAGES/messages.po index 16abdbe..b4d17ec 100644 --- a/portprotonqt/locales/de_DE/LC_MESSAGES/messages.po +++ b/portprotonqt/locales/de_DE/LC_MESSAGES/messages.po @@ -1,6 +1,6 @@ -# German (Germany) translations for PortProtonQT. +# German (Germany) translations for PortProtonQt. # Copyright (C) 2025 boria138 -# This file is distributed under the same license as the PortProtonQT +# This file is distributed under the same license as the PortProtonQt # project. # FIRST AUTHOR , 2025. # @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2025-06-08 22:55+0500\n" +"POT-Creation-Date: 2025-06-09 09:53+0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: de_DE\n" diff --git a/portprotonqt/locales/es_ES/LC_MESSAGES/messages.mo b/portprotonqt/locales/es_ES/LC_MESSAGES/messages.mo index 7407abf..4321219 100644 Binary files a/portprotonqt/locales/es_ES/LC_MESSAGES/messages.mo and b/portprotonqt/locales/es_ES/LC_MESSAGES/messages.mo differ diff --git a/portprotonqt/locales/es_ES/LC_MESSAGES/messages.po b/portprotonqt/locales/es_ES/LC_MESSAGES/messages.po index 482a778..6f0217d 100644 --- a/portprotonqt/locales/es_ES/LC_MESSAGES/messages.po +++ b/portprotonqt/locales/es_ES/LC_MESSAGES/messages.po @@ -1,6 +1,6 @@ -# Spanish (Spain) translations for PortProtonQT. +# Spanish (Spain) translations for PortProtonQt. # Copyright (C) 2025 boria138 -# This file is distributed under the same license as the PortProtonQT +# This file is distributed under the same license as the PortProtonQt # project. # FIRST AUTHOR , 2025. # @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2025-06-08 22:55+0500\n" +"POT-Creation-Date: 2025-06-09 09:53+0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: es_ES\n" diff --git a/portprotonqt/locales/messages.pot b/portprotonqt/locales/messages.pot index 85236e1..9e57c3a 100644 --- a/portprotonqt/locales/messages.pot +++ b/portprotonqt/locales/messages.pot @@ -1,15 +1,15 @@ -# Translations template for PortProtonQT. +# Translations template for PortProtonQt. # Copyright (C) 2025 boria138 -# This file is distributed under the same license as the PortProtonQT +# This file is distributed under the same license as the PortProtonQt # project. # FIRST AUTHOR , 2025. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: PortProtonQT 0.1.1\n" +"Project-Id-Version: PortProtonQt 0.1.1\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2025-06-08 22:55+0500\n" +"POT-Creation-Date: 2025-06-09 09:53+0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/portprotonqt/locales/ru_RU/LC_MESSAGES/messages.mo b/portprotonqt/locales/ru_RU/LC_MESSAGES/messages.mo index e5a07da..e77f989 100644 Binary files a/portprotonqt/locales/ru_RU/LC_MESSAGES/messages.mo and b/portprotonqt/locales/ru_RU/LC_MESSAGES/messages.mo differ diff --git a/portprotonqt/locales/ru_RU/LC_MESSAGES/messages.po b/portprotonqt/locales/ru_RU/LC_MESSAGES/messages.po index ca200aa..6e85830 100644 --- a/portprotonqt/locales/ru_RU/LC_MESSAGES/messages.po +++ b/portprotonqt/locales/ru_RU/LC_MESSAGES/messages.po @@ -1,6 +1,6 @@ -# Russian (Russia) translations for PortProtonQT. +# Russian (Russia) translations for PortProtonQt. # Copyright (C) 2025 boria138 -# This file is distributed under the same license as the PortProtonQT +# This file is distributed under the same license as the PortProtonQt # project. # FIRST AUTHOR , 2025. # @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2025-06-08 22:55+0500\n" -"PO-Revision-Date: 2025-06-08 22:55+0500\n" -"Last-Translator: \n" +"POT-Creation-Date: 2025-06-09 09:53+0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" "Language: ru_RU\n" "Language-Team: ru_RU \n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " diff --git a/portprotonqt/main_window.py b/portprotonqt/main_window.py index 2153923..9660140 100644 --- a/portprotonqt/main_window.py +++ b/portprotonqt/main_window.py @@ -44,7 +44,7 @@ from datetime import datetime logger = get_logger(__name__) class MainWindow(QMainWindow): - """Main window of PortProtonQT.""" + """Main window of PortProtonQt.""" settings_saved = Signal() games_loaded = Signal(list) update_progress = Signal(int) # Signal to update progress bar @@ -73,10 +73,10 @@ class MainWindow(QMainWindow): self.settingsDebounceTimer.timeout.connect(self.applySettingsDelayed) read_time_config() - # Set LEGENDARY_CONFIG_PATH to ~/.cache/PortProtonQT/legendary + # Set LEGENDARY_CONFIG_PATH to ~/.cache/PortProtonQt/legendary_cache self.legendary_config_path = os.path.join( os.getenv("XDG_CACHE_HOME", os.path.join(os.path.expanduser("~"), ".cache")), - "PortProtonQT", "legendary_cache" + "PortProtonQt", "legendary_cache" ) os.makedirs(self.legendary_config_path, exist_ok=True) os.environ["LEGENDARY_CONFIG_PATH"] = self.legendary_config_path @@ -98,7 +98,7 @@ class MainWindow(QMainWindow): if not self.theme: self.theme = default_styles self.card_width = read_card_size() - self.setWindowTitle("PortProtonQT") + self.setWindowTitle("PortProtonQt") self.setMinimumSize(800, 600) self.games = [] @@ -384,7 +384,7 @@ class MainWindow(QMainWindow): builtin_custom_folder = os.path.join(repo_root, "portprotonqt", "custom_data") xdg_data_home = os.getenv("XDG_DATA_HOME", os.path.join(os.path.expanduser("~"), ".local", "share")) - user_custom_folder = os.path.join(xdg_data_home, "PortProtonQT", "custom_data") + user_custom_folder = os.path.join(xdg_data_home, "PortProtonQt", "custom_data") os.makedirs(user_custom_folder, exist_ok=True) builtin_cover = "" @@ -780,7 +780,7 @@ class MainWindow(QMainWindow): os.path.join(os.path.expanduser("~"), ".local", "share")) custom_folder = os.path.join( xdg_data_home, - "PortProtonQT", + "PortProtonQt", "custom_data", exe_name ) @@ -1228,7 +1228,7 @@ class MainWindow(QMainWindow): self.statusBar().showMessage(_("Theme '{0}' applied successfully").format(selected_theme), 3000) xdg_data_home = os.getenv("XDG_DATA_HOME", os.path.join(os.path.expanduser("~"), ".local", "share")) - state_file = os.path.join(xdg_data_home, "PortProtonQT", "state.txt") + state_file = os.path.join(xdg_data_home, "PortProtonQt", "state.txt") os.makedirs(os.path.dirname(state_file), exist_ok=True) with open(state_file, "w", encoding="utf-8") as f: f.write("theme_tab\n") @@ -1251,7 +1251,7 @@ class MainWindow(QMainWindow): def restore_state(self): """Восстанавливает состояние приложения после перезапуска.""" xdg_cache_home = os.getenv("XDG_CACHE_HOME", os.path.join(os.path.expanduser("~"), ".cache")) - state_file = os.path.join(xdg_cache_home, "PortProtonQT", "state.txt") + state_file = os.path.join(xdg_cache_home, "PortProtonQt", "state.txt") if os.path.exists(state_file): with open(state_file, encoding="utf-8") as f: state = f.read().strip() diff --git a/portprotonqt/steam_api.py b/portprotonqt/steam_api.py index 514ba73..fed091e 100644 --- a/portprotonqt/steam_api.py +++ b/portprotonqt/steam_api.py @@ -49,7 +49,7 @@ def decode_text(text: str) -> str: def get_cache_dir(): """Возвращает путь к каталогу кэша, создаёт его при необходимости.""" xdg_cache_home = os.getenv("XDG_CACHE_HOME", os.path.join(os.path.expanduser("~"), ".cache")) - cache_dir = os.path.join(xdg_cache_home, "PortProtonQT") + cache_dir = os.path.join(xdg_cache_home, "PortProtonQt") os.makedirs(cache_dir, exist_ok=True) return cache_dir diff --git a/portprotonqt/theme_manager.py b/portprotonqt/theme_manager.py index 0686e7d..428b069 100644 --- a/portprotonqt/theme_manager.py +++ b/portprotonqt/theme_manager.py @@ -11,7 +11,7 @@ logger = get_logger(__name__) # Папка, где располагаются все дополнительные темы xdg_data_home = os.getenv("XDG_DATA_HOME", os.path.join(os.path.expanduser("~"), ".local", "share")) THEMES_DIRS = [ - os.path.join(xdg_data_home, "PortProtonQT", "themes"), + os.path.join(xdg_data_home, "PortProtonQt", "themes"), os.path.join(os.path.dirname(os.path.abspath(__file__)), "themes") ] diff --git a/portprotonqt/themes/standart-light/metainfo.ini b/portprotonqt/themes/standart-light/metainfo.ini index 1b5282d..e899572 100644 --- a/portprotonqt/themes/standart-light/metainfo.ini +++ b/portprotonqt/themes/standart-light/metainfo.ini @@ -1,5 +1,5 @@ [Metainfo] author = BlackSnaker author_link = -description = Стандартная тема PortProtonQT (светлый вариант) +description = Стандартная тема PortProtonQt (светлый вариант) name = Light diff --git a/portprotonqt/themes/standart/metainfo.ini b/portprotonqt/themes/standart/metainfo.ini index 3814979..78b9340 100644 --- a/portprotonqt/themes/standart/metainfo.ini +++ b/portprotonqt/themes/standart/metainfo.ini @@ -1,5 +1,5 @@ [Metainfo] author = Dervart author_link = -description = Стандартная тема PortProtonQT (тёмный вариант) +description = Стандартная тема PortProtonQt (тёмный вариант) name = Clean Dark diff --git a/portprotonqt/time_utils.py b/portprotonqt/time_utils.py index 71fc463..5829d89 100644 --- a/portprotonqt/time_utils.py +++ b/portprotonqt/time_utils.py @@ -10,7 +10,7 @@ logger = get_logger(__name__) def get_cache_file_path(): """Возвращает путь к файлу кеша portproton_last_launch.""" cache_home = os.getenv("XDG_CACHE_HOME", os.path.join(os.path.expanduser("~"), ".cache")) - return os.path.join(cache_home, "PortProtonQT", "last_launch") + return os.path.join(cache_home, "PortProtonQt", "last_launch") def save_last_launch(exe_name, launch_time): """