1111
1212import webbrowser
1313from pathlib import Path
14+ from typing import NamedTuple
1415
1516from PyQt6 .QtCore import Qt , pyqtSignal
1617from PyQt6 .QtGui import QPixmap
2425
2526from src .ui .utils .font_helper import FontHelper
2627from src .ui .widgets .base_dialog import BaseDialog
27- from src .utils .i18n import t
28+ from src .utils .i18n import get_language , t
2829from src .version import __app_name__ , __version__ , __release_date__ , __author__ , __license__
2930
3031__all__ = ["AboutDialog" ]
3132
3233# -- Hardcoded project metadata (NOT i18n — intentional) --------------------
34+ # These are curated by SwitchBros, not pulled from i18n files.
3335
3436_GITHUB_URL = "https://github.com/Switch-Bros/SteamLibraryManager"
3537
36- _DESCRIPTION = (
37- "The ultimate Steam library organizer for Linux.\n "
38- "Manage thousands of games with smart collections,\n "
39- "auto-categorization, and cloud sync."
38+
39+ class AboutTexts (NamedTuple ):
40+ """Curated About dialog texts — controlled by SwitchBros, not i18n."""
41+
42+ description : str
43+ credits : str
44+ built_with : str
45+
46+
47+ _ABOUT_EN = AboutTexts (
48+ description = (
49+ "The ultimate Steam library organizer for Linux.\n "
50+ "Manage thousands of games with smart collections,\n "
51+ "auto-categorization, and cloud sync."
52+ ),
53+ credits = "Contributors will be listed here." ,
54+ built_with = "Built with Python, PyQt6 & 💛🖤💛" ,
4055)
4156
42- _CREDITS = "Contributors will be listed here."
57+ _ABOUT_DE = AboutTexts (
58+ description = (
59+ "Der ultimative Steam-Bibliotheksmanager für Linux.\n "
60+ "Verwalte tausende Spiele mit smarten Kollektionen,\n "
61+ "Auto-Kategorisierung und Cloud-Sync."
62+ ),
63+ credits = "Mitwirkende werden hier aufgeführt." ,
64+ built_with = "Erstellt mit Python, PyQt6 & 💛🖤💛" ,
65+ )
66+
67+
68+ def _get_about_texts () -> AboutTexts :
69+ """Returns curated About texts — DE or EN (fallback)."""
70+ if get_language () == "de" :
71+ return _ABOUT_DE
72+ return _ABOUT_EN
4373
44- _BUILT_WITH = "Built with Python, PyQt6 & 💛🖤💛"
4574
4675# -- Colors -----------------------------------------------------------------
4776
@@ -186,7 +215,8 @@ def _build_info_column(self) -> QVBoxLayout:
186215 col .addSpacing (8 )
187216
188217 # Description
189- desc_label = QLabel (_DESCRIPTION )
218+ about = _get_about_texts ()
219+ desc_label = QLabel (about .description )
190220 desc_label .setWordWrap (True )
191221 desc_label .setStyleSheet ("font-size: 13px;" )
192222 col .addWidget (desc_label )
@@ -199,7 +229,7 @@ def _build_info_column(self) -> QVBoxLayout:
199229 credits_header .setFont (FontHelper .get_font (11 , FontHelper .BOLD ))
200230 col .addWidget (credits_header )
201231
202- credits_text = QLabel (_CREDITS )
232+ credits_text = QLabel (about . credits )
203233 credits_text .setStyleSheet (f"color: { _TEXT_MUTED } ; font-size: 12px;" )
204234 credits_text .setWordWrap (True )
205235 col .addWidget (credits_text )
@@ -220,7 +250,7 @@ def _build_info_column(self) -> QVBoxLayout:
220250 col .addStretch ()
221251
222252 # Built-with tagline
223- built_label = QLabel (_BUILT_WITH )
253+ built_label = QLabel (about . built_with )
224254 built_label .setStyleSheet (f"color: { _TEXT_MUTED } ; font-size: 11px;" )
225255 built_label .setAlignment (Qt .AlignmentFlag .AlignRight )
226256 col .addWidget (built_label )
0 commit comments