Added Translations(de)
This commit is contained in:
parent
88e8022b9e
commit
71286a0a07
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,10 +1,11 @@
|
|||
/images/
|
||||
/.idea/
|
||||
/Rare/__pycache__/
|
||||
/CountLines.sh
|
||||
/Scripts/CountLines.sh
|
||||
/Rare/utils/__pycache__/
|
||||
/build/
|
||||
/dist/
|
||||
/Rare.egg-info/
|
||||
/RareBuild.sh
|
||||
/Scripts/RareBuild.sh
|
||||
/venv/
|
||||
Scripts/*
|
|
@ -1,3 +1,4 @@
|
|||
include Rare/Styles/dark.qss
|
||||
include Rare/Styles/RareStyle.css
|
||||
include README.md
|
||||
include README.md
|
||||
include Rare/language/de.qm
|
|
@ -38,9 +38,9 @@ Using the exe-file could cause an error with the stylesheets
|
|||
- In-app Browser to buy games
|
||||
- Settings (Legendary and games)
|
||||
- Sync Cloud Saves
|
||||
- Translations (English and German)
|
||||
|
||||
## Planned
|
||||
- Translations (English and German)
|
||||
- Design (Pretty Stylesheets, Icons, Icon view for installed Games)
|
||||
- Download Progressbar
|
||||
- Offline mode
|
||||
|
|
17
Rare/Main.py
17
Rare/Main.py
|
@ -2,14 +2,16 @@ import logging
|
|||
import os
|
||||
import sys
|
||||
|
||||
from PyQt5.QtCore import QTranslator
|
||||
from PyQt5.QtWidgets import QApplication, QMessageBox
|
||||
from legendary.core import LegendaryCore
|
||||
|
||||
from Rare import style_path
|
||||
from Rare import style_path, lang_path
|
||||
from Rare.MainWindow import MainWindow
|
||||
from Rare.Start.Launch import LaunchDialog
|
||||
from Rare.Start.Login import LoginWindow
|
||||
from Rare.utils import RareConfig
|
||||
from Rare.utils.RareUtils import get_lang
|
||||
|
||||
logging.basicConfig(
|
||||
format='[%(name)s] %(levelname)s: %(message)s',
|
||||
|
@ -21,13 +23,20 @@ core = LegendaryCore()
|
|||
|
||||
def main():
|
||||
app = QApplication(sys.argv)
|
||||
translator = QTranslator()
|
||||
lang = get_lang()
|
||||
if os.path.exists(lang_path + lang + ".qm"):
|
||||
translator.load(lang_path + lang + ".qm")
|
||||
else:
|
||||
logger.info("Your language is not supported")
|
||||
app.installTranslator(translator)
|
||||
|
||||
if RareConfig.THEME == "default" and os.path.exists(style_path):
|
||||
app.setStyleSheet(open(style_path).read())
|
||||
# app.setStyleSheet(open("Styles/RareStyle.css").read())
|
||||
|
||||
logger.info("Try if you are logged in")
|
||||
try:
|
||||
if core.login():
|
||||
|
||||
logger.info("You are logged in")
|
||||
else:
|
||||
logger.error("Login Failed")
|
||||
|
@ -42,7 +51,7 @@ def main():
|
|||
QMessageBox.warning(app, "No Internet", "Connection Error, Failed to login. The offine mode is not implemented")
|
||||
# Start Offline mode
|
||||
launch_dialog = LaunchDialog(core)
|
||||
if RareConfig.THEME == "dark":
|
||||
if RareConfig.THEME == "default":
|
||||
launch_dialog.setStyleSheet(open(style_path).read())
|
||||
launch_dialog.exec_()
|
||||
mainwindow = MainWindow(core)
|
||||
|
|
|
@ -18,16 +18,16 @@ class TabWidget(QTabWidget):
|
|||
def __init__(self, core):
|
||||
super(QWidget, self).__init__()
|
||||
self.game_list = GameListInstalled(core)
|
||||
self.addTab(self.game_list, "Games")
|
||||
self.addTab(self.game_list, self.tr("Games"))
|
||||
self.uninstalled_games = GameListUninstalled(core)
|
||||
self.uninstalled_games.finished.connect(lambda: self.game_list.update_list())
|
||||
self.addTab(self.uninstalled_games, "Install Games")
|
||||
self.uninstalled_games.reload.connect(lambda: self.game_list.update_list())
|
||||
self.addTab(self.uninstalled_games, self.tr("Install Games"))
|
||||
|
||||
self.update_tab = UpdateTab(core)
|
||||
self.addTab(self.update_tab, "Updates")
|
||||
self.addTab(self.update_tab, self.tr("Updates"))
|
||||
|
||||
self.browser = BrowserTab()
|
||||
self.addTab(self.browser, "Store")
|
||||
self.addTab(self.browser, self.tr("Website"))
|
||||
|
||||
self.settings = SettingsTab(core)
|
||||
self.addTab(self.settings, "Settings")
|
||||
self.addTab(self.settings, self.tr("Settings"))
|
|
@ -24,13 +24,13 @@ class LaunchDialog(QDialog):
|
|||
def __init__(self, core: LegendaryCore):
|
||||
super(LaunchDialog, self).__init__()
|
||||
|
||||
self.title = QLabel("<h3>Launching Rare</h3>")
|
||||
self.title = QLabel("<h3>"+self.tr("Launching Rare")+"</h3>")
|
||||
self.thread = LaunchThread(core, self)
|
||||
self.thread.download_progess.connect(self.update_pb)
|
||||
self.thread.action.connect(self.info)
|
||||
self.info_pb = QProgressBar()
|
||||
self.info_pb.setMaximum(len(core.get_game_list()))
|
||||
self.info_text = QLabel("Logging in")
|
||||
self.info_text = QLabel(self.tr("Logging in"))
|
||||
self.layout = QVBoxLayout()
|
||||
|
||||
self.layout.addWidget(self.title)
|
||||
|
|
|
@ -35,8 +35,9 @@ class ImportWidget(QWidget):
|
|||
self.layout = QVBoxLayout()
|
||||
self.core = core
|
||||
|
||||
self.import_text = QLabel("<h2>Import from existing Epic Games Launcher installation</h2>\nYou will get "
|
||||
"logged out there")
|
||||
self.import_text = QLabel(
|
||||
"<h2>" + self.tr("Import from existing Epic Games Launcher installation") + "</h2>\n" + self.tr(
|
||||
"You will get logged out there"))
|
||||
self.import_accept_button = QPushButton("Import")
|
||||
self.import_accept_button.clicked.connect(self.auth)
|
||||
appdata_paths = self.get_appdata_path()
|
||||
|
@ -45,7 +46,7 @@ class ImportWidget(QWidget):
|
|||
|
||||
if len(appdata_paths) == 0:
|
||||
self.path = QLineEdit()
|
||||
self.path.setPlaceholderText("Path to Wineprefix (Not implemented)")
|
||||
self.path.setPlaceholderText(self.tr("Path to Wineprefix"))
|
||||
self.layout.addWidget(self.path)
|
||||
else:
|
||||
self.btn_group = QButtonGroup()
|
||||
|
@ -56,7 +57,7 @@ class ImportWidget(QWidget):
|
|||
|
||||
# for i in appdata_paths:
|
||||
|
||||
self.appdata_path_text = QLabel(f"Appdata path: {self.core.egl.appdata_path}")
|
||||
self.appdata_path_text = QLabel(self.tr("Appdata path: ") + {self.core.egl.appdata_path})
|
||||
|
||||
self.login_text = QLabel("")
|
||||
# self.layout.addWidget(self.btn_group)
|
||||
|
@ -109,7 +110,7 @@ class ImportWidget(QWidget):
|
|||
|
||||
self.import_accept_button.setDisabled(False)
|
||||
logger.warning("Error: No valid session found")
|
||||
self.login_text.setText("Error: No valid session found")
|
||||
self.login_text.setText(self.tr("Error: No valid session found"))
|
||||
|
||||
|
||||
class SystemBrowserWidget(QWidget):
|
||||
|
@ -120,10 +121,10 @@ class SystemBrowserWidget(QWidget):
|
|||
self.core = core
|
||||
self.layout = QVBoxLayout()
|
||||
|
||||
self.text = QLabel("Insert Sid from Browser")
|
||||
self.text = QLabel(self.tr("Insert Sid from Browser"))
|
||||
self.layout.addWidget(self.text)
|
||||
self.input = QLineEdit()
|
||||
self.input.setPlaceholderText("Insert sid from Browser")
|
||||
self.input.setPlaceholderText(self.tr("Insert sid from Browser"))
|
||||
self.layout.addWidget(self.input)
|
||||
|
||||
self.loading_text = QLabel("")
|
||||
|
@ -133,14 +134,14 @@ class SystemBrowserWidget(QWidget):
|
|||
self.back_button.clicked.connect(self.back)
|
||||
self.layout.addWidget(self.back_button)
|
||||
|
||||
self.submit_button = QPushButton("Login")
|
||||
self.submit_button = QPushButton(self.tr("Login"))
|
||||
self.submit_button.clicked.connect(self.login)
|
||||
self.layout.addWidget(self.submit_button)
|
||||
|
||||
self.setLayout(self.layout)
|
||||
|
||||
def login(self):
|
||||
self.loading_text.setText("Loading")
|
||||
self.loading_text.setText(self.tr("Loading..."))
|
||||
token = self.input.text()
|
||||
if token.startswith("{") and token.endswith("}"):
|
||||
token = json.loads(token)['sid']
|
||||
|
@ -167,16 +168,18 @@ class LoginWindow(QDialog):
|
|||
self.setGeometry(0, 0, 200, 300)
|
||||
self.welcome_layout = QVBoxLayout()
|
||||
self.title = QLabel(
|
||||
"<h2>Welcome to Rare the graphical interface for Legendary, an open source Epic Games alternative.</h2>\n<h3>Select one Option to Login</h3>")
|
||||
self.browser_btn = QPushButton("Use built in browser to login")
|
||||
"<h2>" + self.tr(
|
||||
"Welcome to Rare the graphical interface for Legendary, an open source Epic Games alternative.") + "</h2>\n<h3>" + self.tr(
|
||||
"Select an option to Login") + "</h3>")
|
||||
self.browser_btn = QPushButton(self.tr("Use built in browser to login"))
|
||||
self.browser_btn.clicked.connect(self.browser_login)
|
||||
self.browser_btn_normal = QPushButton("Use System browser")
|
||||
self.browser_btn_normal = QPushButton(self.tr("Use System browser"))
|
||||
self.browser_btn_normal.clicked.connect(self.sys_browser_login)
|
||||
self.import_btn = QPushButton("Import from existing Epic Games installation")
|
||||
self.import_btn = QPushButton(self.tr("Import from existing Epic Games installation"))
|
||||
|
||||
self.import_btn.clicked.connect(self.import_login)
|
||||
self.text = QLabel("")
|
||||
self.exit_btn = QPushButton("Exit App")
|
||||
self.exit_btn = QPushButton(self.tr("Exit App"))
|
||||
self.exit_btn.clicked.connect(self.exit_login)
|
||||
|
||||
self.welcome_layout.addWidget(self.title)
|
||||
|
@ -209,7 +212,7 @@ class LoginWindow(QDialog):
|
|||
self.success()
|
||||
else:
|
||||
self.layout.setCurrentIndex(0)
|
||||
self.text.setText("<h4 style='color: red'>Login failed</h4>")
|
||||
self.text.setText("<h4 style='color: red'>"+self.tr("Login failed")+"</h4>")
|
||||
|
||||
def login(self):
|
||||
self.exec_()
|
||||
|
@ -253,4 +256,4 @@ class LoginWindow(QDialog):
|
|||
self.layout.setCurrentIndex(0)
|
||||
logger.warning("Login failed")
|
||||
self.browser.close()
|
||||
self.text.setText("Login Failed")
|
||||
self.text.setText(self.tr("Login Failed"))
|
||||
|
|
|
@ -49,22 +49,21 @@ class GameWidget(QWidget):
|
|||
|
||||
##Layout on the right
|
||||
self.childLayout = QVBoxLayout()
|
||||
|
||||
play_icon = self.style().standardIcon(getattr(QStyle, 'SP_MediaPlay'))
|
||||
settings_icon = self.style().standardIcon(getattr(QStyle, 'SP_DirIcon'))
|
||||
self.title_widget = QLabel(f"<h1>{self.title}</h1>")
|
||||
self.app_name_label = QLabel(self.app_name)
|
||||
self.launch_button = QPushButton(play_icon, "Launch")
|
||||
self.launch_button = QPushButton(play_icon, self.tr("Launch"))
|
||||
self.launch_button.setObjectName("launch_game_button")
|
||||
self.launch_button.setFixedWidth(120)
|
||||
|
||||
self.launch_button.clicked.connect(self.launch)
|
||||
if os.name != "nt":
|
||||
self.wine_rating = QLabel("Wine Rating: " + self.get_rating())
|
||||
self.developer_label = QLabel("Dev: " + self.dev)
|
||||
self.developer_label = QLabel(self.tr("Developer: ") + self.dev)
|
||||
self.version_label = QLabel("Version: " + str(self.version))
|
||||
self.size_label = QLabel(f"Installed size: {round(self.size / (1024 ** 3), 2)} GB")
|
||||
self.settings_button = QPushButton(settings_icon, " Settings (Icon TODO)")
|
||||
self.size_label = QLabel(f"{self.tr('Installed size')}: {round(self.size / (1024 ** 3), 2)} GB")
|
||||
self.settings_button = QPushButton(settings_icon, f" {self.tr('Settings')} (Icon TODO)")
|
||||
self.settings_button.setFixedWidth(200)
|
||||
self.settings_button.clicked.connect(self.settings)
|
||||
|
||||
|
@ -92,7 +91,7 @@ class GameWidget(QWidget):
|
|||
print("Fail")
|
||||
return
|
||||
|
||||
self.proc.finished.connect(self.finished)
|
||||
self.proc.reload.connect(self.finished)
|
||||
self.launch_button.setText("Kill")
|
||||
self.game_running = True
|
||||
|
||||
|
|
|
@ -30,10 +30,10 @@ class GameListInstalled(QScrollArea):
|
|||
|
||||
self.layout = QVBoxLayout()
|
||||
mini_layout = QHBoxLayout()
|
||||
self.update_button = QPushButton("Manually reload Games")
|
||||
self.update_button = QPushButton(self.tr("Manually reload Games"))
|
||||
self.update_button.clicked.connect(self.update_list)
|
||||
mini_layout.addWidget(self.update_button)
|
||||
self.upload_button = QPushButton("Cloud Saves")
|
||||
self.upload_button = QPushButton(self.tr("Cloud Saves"))
|
||||
mini_layout.addWidget(self.upload_button)
|
||||
self.upload_button.clicked.connect(self.sync_saves)
|
||||
self.layout.addLayout(mini_layout)
|
||||
|
@ -47,8 +47,8 @@ class GameListInstalled(QScrollArea):
|
|||
self.layout.addWidget(widget)
|
||||
|
||||
else:
|
||||
not_installed_label = QLabel("No Games are installed. Do you want to import them?")
|
||||
not_installed_button = QPushButton("Import Games")
|
||||
not_installed_label = QLabel(self.tr("No Games are installed. Do you want to import them?"))
|
||||
not_installed_button = QPushButton(self.tr("Import Games"))
|
||||
not_installed_button.clicked.connect(self.import_games_prepare)
|
||||
self.layout.addWidget(not_installed_label)
|
||||
self.layout.addWidget(not_installed_button)
|
||||
|
@ -79,7 +79,7 @@ class GameListInstalled(QScrollArea):
|
|||
for wine_prefix in possible_wineprefixes:
|
||||
imported += self.auto_import_games(f"{wine_prefix}drive_c/Program Files/Epic Games/")
|
||||
if imported > 0:
|
||||
QMessageBox.information(self, "Imported Games", f"Successfully imported {imported} Games")
|
||||
QMessageBox.information(self, "Imported Games", self.tr(f"Successfully imported {imported} Games"))
|
||||
logger.info("Restarting app to import games")
|
||||
else:
|
||||
QMessageBox.information(self, "Imported Games", "No Games were found")
|
||||
|
|
|
@ -7,7 +7,7 @@ from Rare.utils.Dialogs.ImportDialog import ImportDialog
|
|||
|
||||
|
||||
class GameListUninstalled(QScrollArea):
|
||||
finished = pyqtSignal()
|
||||
reload = pyqtSignal()
|
||||
|
||||
def __init__(self, core: LegendaryCore):
|
||||
super(GameListUninstalled, self).__init__()
|
||||
|
@ -20,8 +20,8 @@ class GameListUninstalled(QScrollArea):
|
|||
|
||||
self.filter = QLineEdit()
|
||||
self.filter.textChanged.connect(self.filter_games)
|
||||
self.filter.setPlaceholderText("Filter Games")
|
||||
self.import_button = QPushButton("Import installed Game from Epic Games Store")
|
||||
self.filter.setPlaceholderText(self.tr("Filter Games"))
|
||||
self.import_button = QPushButton(self.tr("Import installed Game from Epic Games Store"))
|
||||
self.import_button.clicked.connect(self.import_game)
|
||||
self.layout.addWidget(self.filter)
|
||||
self.layout.addWidget(self.import_button)
|
||||
|
@ -34,7 +34,7 @@ class GameListUninstalled(QScrollArea):
|
|||
games = sorted(games, key=lambda x: x.app_title)
|
||||
for game in games:
|
||||
game_widget = UninstalledGameWidget(game)
|
||||
game_widget.finished.connect(lambda: self.finished.emit())
|
||||
game_widget.finished.connect(lambda: self.reload.emit())
|
||||
self.layout.addWidget(game_widget)
|
||||
self.widgets_uninstalled.append(game_widget)
|
||||
|
||||
|
@ -51,4 +51,5 @@ class GameListUninstalled(QScrollArea):
|
|||
|
||||
def import_game(self):
|
||||
import_dia = ImportDialog(self.core)
|
||||
import_dia.import_dialog()
|
||||
if import_dia.import_dialog():
|
||||
self.reload.emit()
|
||||
|
|
|
@ -53,7 +53,7 @@ class UninstalledGameWidget(QWidget):
|
|||
self.title_label = QLabel(f"<h2>{self.title}</h2>")
|
||||
self.app_name_label = QLabel(f"App Name: {self.app_name}")
|
||||
self.version_label = QLabel(f"Version: {self.version}")
|
||||
self.install_button = QPushButton("Install")
|
||||
self.install_button = QPushButton(self.tr("Install"))
|
||||
self.install_button.setFixedWidth(120)
|
||||
self.install_button.clicked.connect(self.install)
|
||||
|
||||
|
@ -72,16 +72,15 @@ class UninstalledGameWidget(QWidget):
|
|||
logger.info("install " + self.title)
|
||||
dia = InstallDialog(self.game)
|
||||
data = dia.get_data()
|
||||
print(data)
|
||||
if data != 0:
|
||||
path = data.get("install_path")
|
||||
logger.info(f"install {self.app_name} in path {path}")
|
||||
# TODO
|
||||
self.install_button.setDisabled(True)
|
||||
self.install_button.setText("installing")
|
||||
self.install_button.setText(self.tr("installing"))
|
||||
self.proc = QProcess()
|
||||
self.proc.start("legendary", ["-y", "install", self.app_name, "--base-path", path])
|
||||
self.proc.finished.connect(self.download_finished)
|
||||
self.proc.reload.connect(self.download_finished)
|
||||
|
||||
else:
|
||||
logger.info("Download canceled")
|
||||
|
@ -89,5 +88,5 @@ class UninstalledGameWidget(QWidget):
|
|||
def download_finished(self, code):
|
||||
self.setVisible(False)
|
||||
logger.info(f"Download finished. code: {code}")
|
||||
QMessageBox.information(self, "Download finished", "Download has finished")
|
||||
QMessageBox.information(self, self.tr("Download finished"), self.tr("Download has finished"))
|
||||
self.finished.emit()
|
||||
|
|
|
@ -6,17 +6,17 @@ from PyQt5.QtWidgets import QLineEdit, QPushButton, QLabel, QVBoxLayout, QDialog
|
|||
class InstallDialog(QDialog):
|
||||
def __init__(self, game):
|
||||
super(InstallDialog, self).__init__()
|
||||
self.setWindowTitle("Install Game")
|
||||
self.setWindowTitle(self.tr("Install Game"))
|
||||
self.layout = QVBoxLayout()
|
||||
self.yes = False
|
||||
self.install_path = QLineEdit(f"{os.path.expanduser('~')}/legendary")
|
||||
self.options = QLabel("Some Settings")
|
||||
self.options = QLabel("Some Settings (Comming soon)")
|
||||
# self.layout.addWidget(self.options)
|
||||
|
||||
self.layout.addStretch(1)
|
||||
self.yes_button = QPushButton("Install")
|
||||
self.yes_button = QPushButton(self.tr("Install game ") + game.title)
|
||||
self.yes_button.clicked.connect(self.close)
|
||||
self.cancel_button = QPushButton("cancel")
|
||||
self.cancel_button = QPushButton(self.tr("cancel"))
|
||||
|
||||
self.layout.addWidget(self.options)
|
||||
self.layout.addWidget(self.install_path)
|
||||
|
|
|
@ -17,18 +17,18 @@ class RareSettingsForm(QGroupBox):
|
|||
|
||||
self.rare_form = QFormLayout()
|
||||
self.style_combo_box = QComboBox()
|
||||
self.style_combo_box.addItems(["Light", "Dark"])
|
||||
self.style_combo_box.addItems([self.tr("Light"), self.tr("Dark")])
|
||||
if RareConfig.THEME == "default":
|
||||
self.style_combo_box.setCurrentIndex(1)
|
||||
|
||||
self.rare_form.addRow(QLabel("Style"), self.style_combo_box)
|
||||
|
||||
self.image_dir_edit = PathEdit(RareConfig.IMAGE_DIR, QFileDialog.Directory, "Choose Folder")
|
||||
self.image_dir_edit.setPlaceholderText("Image directory")
|
||||
self.image_dir_edit = PathEdit(RareConfig.IMAGE_DIR, QFileDialog.Directory, self.tr("Choose Folder"))
|
||||
self.image_dir_edit.setPlaceholderText(self.tr("Image directory"))
|
||||
# self.image_dir_edit.setText(RareConfig.IMAGE_DIR)
|
||||
|
||||
self.rare_form.addRow(QLabel("Image Directory"), self.image_dir_edit)
|
||||
self.submit_button = QPushButton("Update Rare Settings")
|
||||
self.rare_form.addRow(QLabel(self.tr("Image Directory")), self.image_dir_edit)
|
||||
self.submit_button = QPushButton(self.tr("Update Rare Settings"))
|
||||
self.submit_button.clicked.connect(self.update_rare_settings)
|
||||
self.rare_form.addRow(self.submit_button)
|
||||
self.setLayout(self.rare_form)
|
||||
|
|
|
@ -21,16 +21,16 @@ class SettingsTab(QScrollArea):
|
|||
self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
# Settings
|
||||
self.layout = QVBoxLayout()
|
||||
self.layout.addWidget(QLabel("<h1>Rare Settings</h1>"))
|
||||
self.logged_in_as = QLabel(f"Logged in as {get_name()}")
|
||||
self.layout.addWidget(QLabel("<h1>"+self.tr("Settings")+"</h1>"))
|
||||
self.logged_in_as = QLabel(self.tr("Logged in as ")+get_name())
|
||||
# self.legendary_form =SettingsForm()
|
||||
|
||||
self.default_settings = SettingsForm("default", default_settings, True)
|
||||
self.default_settings = SettingsForm(self.tr("default"), default_settings, True)
|
||||
self.legendary_form = SettingsForm("Legendary", legendary_settings, False)
|
||||
|
||||
self.rare_form = RareSettingsForm()
|
||||
|
||||
self.logout_button = QPushButton("Logout")
|
||||
self.logout_button = QPushButton(self.tr("Logout"))
|
||||
self.logout_button.clicked.connect(self.update_list)
|
||||
self.layout.addWidget(self.logged_in_as)
|
||||
|
||||
|
@ -42,7 +42,7 @@ class SettingsTab(QScrollArea):
|
|||
self.layout.addWidget(self.logout_button)
|
||||
|
||||
self.info_label = QLabel("<h2>Credits</h2>")
|
||||
self.infotext = QLabel("Developers : Dummerle, CommandMC\nLegendary Dev: Rodney\nLicense: GPL v.3")
|
||||
self.infotext = QLabel(self.tr("Developers : ")+"Dummerle, CommandMC\nLegendary Dev: Rodney\nLicense: GPL v.3")
|
||||
|
||||
self.layout.addWidget(self.info_label)
|
||||
self.layout.addWidget(self.infotext)
|
||||
|
|
|
@ -52,7 +52,7 @@ class UpdateWidget(QWidget):
|
|||
self.core = core
|
||||
self.layout = QVBoxLayout()
|
||||
self.childlayout = QHBoxLayout()
|
||||
self.label = QLabel("Update available for " + self.game.title)
|
||||
self.label = QLabel(self.tr("Update available for ") + self.game.title)
|
||||
self.button = QPushButton("Update")
|
||||
self.button.clicked.connect(self.update_game2)
|
||||
|
||||
|
@ -103,14 +103,14 @@ class UpdateWidget(QWidget):
|
|||
|
||||
def finished(self, text: str):
|
||||
if text == "Fail":
|
||||
QMessageBox.warning(self, "Update Failed", "Update failed")
|
||||
QMessageBox.warning(self, self.tr("Update Failed"), self.tr("Update failed"))
|
||||
else:
|
||||
QMessageBox.information(self, "Update finished", f"Update finished in {time} ")
|
||||
self.setVisible(False)
|
||||
self.installed.emit()
|
||||
QMessageBox.information(self, self.tr("Update finished"), self.tr("Update finished in ") + str(time))
|
||||
self.setVisible(False)
|
||||
self.installed.emit()
|
||||
|
||||
def start(self):
|
||||
self.button.setText("Cancel")
|
||||
self.button.setText(self.tr("Cancel"))
|
||||
self.updating = True
|
||||
|
||||
def get_update_info(self):
|
||||
|
@ -143,7 +143,7 @@ class UpdateTab(QWidget):
|
|||
widget.installed.connect(lambda: self.__init__(self.core))
|
||||
self.layout.addWidget(widget)
|
||||
if len(update_games) == 0:
|
||||
self.layout.addWidget(QLabel("No updates available"))
|
||||
self.layout.addWidget(QLabel(self.tr("No updates available")))
|
||||
self.layout.addStretch(1)
|
||||
self.setLayout(self.layout)
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import os
|
||||
__version__ = "0.1.5"
|
||||
style_path = os.path.join(os.path.dirname(__file__), "Styles/dark.qss")
|
||||
lang_path = os.path.join(os.path.dirname(__file__), "languages/")
|
||||
|
|
|
@ -32,8 +32,7 @@ class PathEdit(QWidget):
|
|||
self.info_text = infotext
|
||||
self.layout = QHBoxLayout()
|
||||
self.text_edit = QLineEdit(text)
|
||||
self.setObjectName("text_edit")
|
||||
self.path_select = QPushButton("Select Path")
|
||||
self.path_select = QPushButton(self.tr("Select Path"))
|
||||
self.path_select.clicked.connect(self.set_path)
|
||||
self.layout.addWidget(self.text_edit)
|
||||
self.layout.addWidget(self.path_select)
|
||||
|
@ -46,7 +45,7 @@ class PathEdit(QWidget):
|
|||
return self.text_edit.text()
|
||||
|
||||
def set_path(self):
|
||||
dlg = QFileDialog(self, "Choose Path", os.path.expanduser("~/"))
|
||||
dlg = QFileDialog(self, self.tr("Choose Path"), os.path.expanduser("~/"))
|
||||
dlg.setFileMode(self.type_of_file)
|
||||
if self.filter:
|
||||
dlg.setFilter(self.filter)
|
||||
|
|
|
@ -42,23 +42,23 @@ class SettingsForm(QGroupBox):
|
|||
|
||||
else:
|
||||
self.table = QTableWidget(0, 2)
|
||||
self.table.setHorizontalHeaderLabels(["Variable", "Value"])
|
||||
self.table.setHorizontalHeaderLabels(["Variable", self.tr("Value")])
|
||||
self.table.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.table.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
|
||||
self.table.setMaximumSize(self._getQTableWidgetSize())
|
||||
self.form.addRow(QLabel("Environment Variables"), self.table)
|
||||
self.form.addRow(QLabel(self.tr("Environment Variables")), self.table)
|
||||
|
||||
self.add_button = QPushButton("Add Variable")
|
||||
self.add_button = QPushButton(self.tr("Add Variable"))
|
||||
self.add_button.clicked.connect(self.add_variable)
|
||||
|
||||
self.delete_button = QPushButton("Delete Variable")
|
||||
self.delete_button = QPushButton(self.tr("Delete Variable"))
|
||||
self.delete_button.clicked.connect(lambda: self.table.removeRow(self.table.currentRow()))
|
||||
|
||||
self.form.addRow(self.add_button)
|
||||
self.form.addRow(self.delete_button)
|
||||
|
||||
self.update_button = QPushButton("Update Settings")
|
||||
self.update_button = QPushButton(self.tr("Update Settings"))
|
||||
self.update_button.clicked.connect(self.update_config)
|
||||
self.form.addRow(self.update_button)
|
||||
|
||||
|
@ -89,16 +89,16 @@ class SettingsForm(QGroupBox):
|
|||
|
||||
if type_of_input == "QLineEdit":
|
||||
field = QLineEdit(self.config[self.app_name][lgd_name])
|
||||
field.setPlaceholderText("Default")
|
||||
field.setPlaceholderText(self.tr("Default"))
|
||||
if "only_int" in flags:
|
||||
field.setValidator(QIntValidator())
|
||||
if "path" in flags:
|
||||
if lgd_name == "wine_prefix":
|
||||
field = PathEdit(text=self.config[self.app_name][lgd_name], type_of_file=QFileDialog.DirectoryOnly,
|
||||
infotext="Select Wine Prefix")
|
||||
infotext=self.tr("Select Wine Prefix"))
|
||||
if lgd_name == "install_dir":
|
||||
field = PathEdit(text=self.config[self.app_name][lgd_name], type_of_file=QFileDialog.DirectoryOnly,
|
||||
infotext="Select Default installation directory")
|
||||
infotext=self.tr("Select Default installation directory"))
|
||||
elif type_of_input == "QComboBox":
|
||||
combo_list = []
|
||||
if "binary" in flags:
|
||||
|
@ -192,7 +192,7 @@ class SettingsForm(QGroupBox):
|
|||
break
|
||||
else:
|
||||
logger.error("No Proton found")
|
||||
QMessageBox.Warning("Error", "No Proton was found")
|
||||
QMessageBox.Warning("Error", self.tr("No Proton version was found"))
|
||||
return
|
||||
field.setText(os.path.join(protonpath, "proton") + " run")
|
||||
elif lgd_name == "no_wine":
|
||||
|
|
BIN
Rare/languages/de.qm
Normal file
BIN
Rare/languages/de.qm
Normal file
Binary file not shown.
559
Rare/languages/de.ts
Normal file
559
Rare/languages/de.ts
Normal file
|
@ -0,0 +1,559 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="de_DE" sourcelanguage="en">
|
||||
<context>
|
||||
<name>GameListInstalled</name>
|
||||
<message>
|
||||
<location filename="../Tabs/GamesInstalled/InstalledList.py" line="33"/>
|
||||
<source>Manually reload Games</source>
|
||||
<translation>Spiele manuell neu laden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/GamesInstalled/InstalledList.py" line="36"/>
|
||||
<source>Cloud Saves</source>
|
||||
<translation>Cloud Speicher</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/GamesInstalled/InstalledList.py" line="50"/>
|
||||
<source>No Games are installed. Do you want to import them?</source>
|
||||
<translation>Keine Spiele sind installiert. Willst du sie importieren?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/GamesInstalled/InstalledList.py" line="51"/>
|
||||
<source>Import Games</source>
|
||||
<translation>Spiele importieren</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>GameListUninstalled</name>
|
||||
<message>
|
||||
<location filename="../Tabs/GamesUninstalled/GameListUninstalled.py" line="23"/>
|
||||
<source>Filter Games</source>
|
||||
<translation>Spiele suchen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/GamesUninstalled/GameListUninstalled.py" line="24"/>
|
||||
<source>Import installed Game from Epic Games Store</source>
|
||||
<translation>Installiertes Spiel aus dem Epic Games Store importieren</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>GameWidget</name>
|
||||
<message>
|
||||
<location filename="../Tabs/GamesInstalled/GameWidget.py" line="56"/>
|
||||
<source>Launch</source>
|
||||
<translation>Spielen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/GamesInstalled/GameWidget.py" line="63"/>
|
||||
<source>Developer: </source>
|
||||
<translation>Entwickler: </translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImportDialog</name>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/ImportDialog.py" line="18"/>
|
||||
<source>Select Path</source>
|
||||
<translation>Wähle Dateipfad</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/ImportDialog.py" line="21"/>
|
||||
<source>Import</source>
|
||||
<translation>Importieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/ImportDialog.py" line="37"/>
|
||||
<source>Failed to import Game</source>
|
||||
<translation>Spiel konnte nicht importiert werden</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImportWidget</name>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="38"/>
|
||||
<source>Import from existing Epic Games Launcher installation</source>
|
||||
<translation>Aus einer bestehenden Epic Games Launcher Installation importieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="38"/>
|
||||
<source>You will get logged out there</source>
|
||||
<translation>Du wirst dort ausgeloggt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="49"/>
|
||||
<source>Path to Wineprefix</source>
|
||||
<translation>Pfad zum Wine Prefix</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="60"/>
|
||||
<source>Appdata path: </source>
|
||||
<translation>Appdata Pfad: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="113"/>
|
||||
<source>Error: No valid session found</source>
|
||||
<translation>Fehler: Keine Session gefunden</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InstallDialog</name>
|
||||
<message>
|
||||
<location filename="../Tabs/GamesUninstalled/InstallDialog.py" line="9"/>
|
||||
<source>Install Game</source>
|
||||
<translation>Spiel installieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/GamesUninstalled/InstallDialog.py" line="17"/>
|
||||
<source>Install game </source>
|
||||
<translation>Spiel installieren </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/GamesUninstalled/InstallDialog.py" line="19"/>
|
||||
<source>cancel</source>
|
||||
<translation>Beenden</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LaunchDialog</name>
|
||||
<message>
|
||||
<location filename="../Start/Launch.py" line="27"/>
|
||||
<source>Launching Rare</source>
|
||||
<translation>Starte Rare</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Start/Launch.py" line="33"/>
|
||||
<source>Logging in</source>
|
||||
<translation>Einloggen...</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LoginWindow</name>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="170"/>
|
||||
<source>Welcome to Rare the graphical interface for Legendary, an open source Epic Games alternative.</source>
|
||||
<translation>Willkommen zu Rare, eine grafische Oberfläche für Legendary, eine open source alternative zum Epic Games Launcher.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="170"/>
|
||||
<source>Select an option to Login</source>
|
||||
<translation>Wähle eine Möglichkeit zum Einloggen aus</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="174"/>
|
||||
<source>Use built in browser to login</source>
|
||||
<translation>Den eingebauten Browser benutzen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="176"/>
|
||||
<source>Use System browser</source>
|
||||
<translation>Den Systembrowser benutzen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="178"/>
|
||||
<source>Import from existing Epic Games installation</source>
|
||||
<translation>Aus einer existierenden Installation importieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="182"/>
|
||||
<source>Exit App</source>
|
||||
<translation>App verlassen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="215"/>
|
||||
<source>Login failed</source>
|
||||
<translation>Login fehlgeschlagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="259"/>
|
||||
<source>Login Failed</source>
|
||||
<translation>Login fehlgeschlagen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PathEdit</name>
|
||||
<message>
|
||||
<location filename="../ext/QtExtensions.py" line="35"/>
|
||||
<source>Select Path</source>
|
||||
<translation>Wähle Pfad aus</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ext/QtExtensions.py" line="48"/>
|
||||
<source>Choose Path</source>
|
||||
<translation>Wähle Pfad aus</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PathInputDialog</name>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/PathInputDialog.py" line="20"/>
|
||||
<source>Select directory</source>
|
||||
<translation>Wähle Ordner aus</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RareSettingsForm</name>
|
||||
<message>
|
||||
<location filename="../Tabs/Settings/RareSettingsForm.py" line="20"/>
|
||||
<source>Light</source>
|
||||
<translation>Hell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/Settings/RareSettingsForm.py" line="20"/>
|
||||
<source>Dark</source>
|
||||
<translation>Dunkel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/Settings/RareSettingsForm.py" line="26"/>
|
||||
<source>Choose Folder</source>
|
||||
<translation>Wähle Ordner aus</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/Settings/RareSettingsForm.py" line="27"/>
|
||||
<source>Image directory</source>
|
||||
<translation>Bilder Ordner</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/Settings/RareSettingsForm.py" line="30"/>
|
||||
<source>Image Directory</source>
|
||||
<translation>Bilder Ordner</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/Settings/RareSettingsForm.py" line="31"/>
|
||||
<source>Update Rare Settings</source>
|
||||
<translation>Rare Einstellungen speichern</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsForm</name>
|
||||
<message>
|
||||
<location filename="../ext/SettingsForm.py" line="45"/>
|
||||
<source>Value</source>
|
||||
<translation>Wert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ext/SettingsForm.py" line="50"/>
|
||||
<source>Environment Variables</source>
|
||||
<translation>Umbebungsvariablen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ext/SettingsForm.py" line="52"/>
|
||||
<source>Add Variable</source>
|
||||
<translation>Variable hinzufügen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ext/SettingsForm.py" line="55"/>
|
||||
<source>Delete Variable</source>
|
||||
<translation>Variable löschen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ext/SettingsForm.py" line="61"/>
|
||||
<source>Update Settings</source>
|
||||
<translation>Einstellungen speichern</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ext/SettingsForm.py" line="93"/>
|
||||
<source>Default</source>
|
||||
<translation>Standard</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ext/SettingsForm.py" line="98"/>
|
||||
<source>Select Wine Prefix</source>
|
||||
<translation>Wähle Wine Prefix aus</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ext/SettingsForm.py" line="101"/>
|
||||
<source>Select Default installation directory</source>
|
||||
<translation>Wähle den Standardordner für Installationen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ext/SettingsForm.py" line="196"/>
|
||||
<source>No Proton version was found</source>
|
||||
<translation>Keine Proton Version wurde gefunden</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTab</name>
|
||||
<message>
|
||||
<location filename="../Tabs/Settings/SettingsTab.py" line="24"/>
|
||||
<source>Settings</source>
|
||||
<translation>Einstellungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/Settings/SettingsTab.py" line="25"/>
|
||||
<source>Logged in as </source>
|
||||
<translation>Eingeloggt als </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/Settings/SettingsTab.py" line="28"/>
|
||||
<source>default</source>
|
||||
<translation>Standard</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/Settings/SettingsTab.py" line="33"/>
|
||||
<source>Logout</source>
|
||||
<translation>Ausloggen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/Settings/SettingsTab.py" line="45"/>
|
||||
<source>Developers : </source>
|
||||
<translation>Entwickler: </translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SyncSavesDialog</name>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncSavesDialog.py" line="64"/>
|
||||
<source>Cloud Saves</source>
|
||||
<translation>Cloud Speicher</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncSavesDialog.py" line="64"/>
|
||||
<source>Found Saves for folowing Games</source>
|
||||
<translation>Es wurden Speicherstände für folgende Spiele gefunden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncSavesDialog.py" line="66"/>
|
||||
<source>Sync all games</source>
|
||||
<translation>Alle Spiele synchronisieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncSavesDialog.py" line="76"/>
|
||||
<source>No Games Found</source>
|
||||
<translation>Keine Spiele gefunden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncSavesDialog.py" line="76"/>
|
||||
<source>Your games don't support cloud save</source>
|
||||
<translation>Deine Spiele unterstützen keine Cloud Speicherstände</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncSavesDialog.py" line="101"/>
|
||||
<source>Found no savepath</source>
|
||||
<translation>Kein Speicherort gefunden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncSavesDialog.py" line="101"/>
|
||||
<source>No save path was found. Please select path or skip</source>
|
||||
<translation>Kein Speicherort wurde gefunden. Wähle einen Order aus oder überspringe</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SyncWidget</name>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="54"/>
|
||||
<source>Path not found</source>
|
||||
<translation>Pfad wurde nicht gefunden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="68"/>
|
||||
<source>Local Save date: </source>
|
||||
<translation>Lokales Speicherdatum: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="70"/>
|
||||
<source>No Local Save files</source>
|
||||
<translation>Keine Lokalen Speicherdateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="72"/>
|
||||
<source>Cloud save date: </source>
|
||||
<translation>Speicherdatum in der Cloud: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="74"/>
|
||||
<source>No Cloud saves</source>
|
||||
<translation>Keine Spielstände in der Cloud</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="78"/>
|
||||
<source>Game is up to date</source>
|
||||
<translation>Spielstand ist aktuell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="79"/>
|
||||
<source>Upload anyway</source>
|
||||
<translation>Trotzdem hochladen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="80"/>
|
||||
<source>Download anyway</source>
|
||||
<translation>Trotzdem runterladen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="82"/>
|
||||
<source>Cloud save is newer</source>
|
||||
<translation>Cloudspeicher ist aktueller</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="83"/>
|
||||
<source>Download Cloud saves</source>
|
||||
<translation>Cloudspeicherstand herunterladen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="87"/>
|
||||
<source>Upload Saves</source>
|
||||
<translation>Speicherstand hochladen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="98"/>
|
||||
<source>Local save is newer</source>
|
||||
<translation>Lokaler Speicherstand ist neuer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="99"/>
|
||||
<source>Upload saves</source>
|
||||
<translation>Speicherstand hochladen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="103"/>
|
||||
<source>Download saves</source>
|
||||
<translation>Speicherstand herunterladen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="124"/>
|
||||
<source>Change path</source>
|
||||
<translation>Path ändern</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="137"/>
|
||||
<source>Uploading...</source>
|
||||
<translation>Lade hoch...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="145"/>
|
||||
<source>Upload finished</source>
|
||||
<translation>Hochladen beendet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="153"/>
|
||||
<source>Downloading...</source>
|
||||
<translation>Herunterladen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../utils/Dialogs/SyncSaves/SyncWidget.py" line="159"/>
|
||||
<source>Download finished</source>
|
||||
<translation>Download beendet</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SystemBrowserWidget</name>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="124"/>
|
||||
<source>Insert Sid from Browser</source>
|
||||
<translation>Gebe die SID aus dem Browser ein</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="127"/>
|
||||
<source>Insert sid from Browser</source>
|
||||
<translation>Gebe die SID aus dem Browser ein</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="137"/>
|
||||
<source>Login</source>
|
||||
<translation>Einloggen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Start/Login.py" line="144"/>
|
||||
<source>Loading...</source>
|
||||
<translation>Laden...</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TabWidget</name>
|
||||
<message>
|
||||
<location filename="../MainWindow.py" line="21"/>
|
||||
<source>Games</source>
|
||||
<translation>Spiele</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../MainWindow.py" line="24"/>
|
||||
<source>Install Games</source>
|
||||
<translation>Spiele installieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../MainWindow.py" line="27"/>
|
||||
<source>Updates</source>
|
||||
<translation>Updates</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../MainWindow.py" line="30"/>
|
||||
<source>Store</source>
|
||||
<translation type="obsolete">Webseite</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../MainWindow.py" line="33"/>
|
||||
<source>Settings</source>
|
||||
<translation>Einstellungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../MainWindow.py" line="30"/>
|
||||
<source>Website</source>
|
||||
<translation>Webseite</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UninstalledGameWidget</name>
|
||||
<message>
|
||||
<location filename="../Tabs/GamesUninstalled/GameWidget.py" line="56"/>
|
||||
<source>Install</source>
|
||||
<translation>Installieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/GamesUninstalled/GameWidget.py" line="80"/>
|
||||
<source>installing</source>
|
||||
<translation>Installiert gerade</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/GamesUninstalled/GameWidget.py" line="91"/>
|
||||
<source>Download finished</source>
|
||||
<translation>Download beenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/GamesUninstalled/GameWidget.py" line="91"/>
|
||||
<source>Download has finished</source>
|
||||
<translation>Download wurde beendet. Spiel wurde installiert</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UpdateTab</name>
|
||||
<message>
|
||||
<location filename="../Tabs/Update.py" line="146"/>
|
||||
<source>No updates available</source>
|
||||
<translation>Keine Updates verfügbar</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UpdateWidget</name>
|
||||
<message>
|
||||
<location filename="../Tabs/Update.py" line="55"/>
|
||||
<source>Update available for </source>
|
||||
<translation>Updates verfügbar für </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/Update.py" line="106"/>
|
||||
<source>Update Failed</source>
|
||||
<translation>Update fehlgeschlagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/Update.py" line="106"/>
|
||||
<source>Update failed</source>
|
||||
<translation>Update fehlgeschlagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/Update.py" line="108"/>
|
||||
<source>Update finished</source>
|
||||
<translation>Update beendet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/Update.py" line="108"/>
|
||||
<source>Update finished in </source>
|
||||
<translation>Update heruntergeladen in </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Tabs/Update.py" line="113"/>
|
||||
<source>Cancel</source>
|
||||
<translation>Stoppe Update</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -13,11 +13,12 @@ logger = getLogger("ImportDialog")
|
|||
class ImportDialog(QDialog):
|
||||
def __init__(self, core: LegendaryCore):
|
||||
super(ImportDialog, self).__init__()
|
||||
self.imported = False
|
||||
self.core = core
|
||||
self.title_text = QLabel("Select Path")
|
||||
self.title_text = QLabel(self.tr("Select Path"))
|
||||
self.path_field = QLineEdit()
|
||||
self.info_text = QLabel("")
|
||||
self.import_button = QPushButton("Import")
|
||||
self.import_button = QPushButton(self.tr("Import"))
|
||||
self.import_button.clicked.connect(self.button_click)
|
||||
|
||||
self.layout = QVBoxLayout()
|
||||
|
@ -30,10 +31,10 @@ class ImportDialog(QDialog):
|
|||
|
||||
def button_click(self):
|
||||
if self.import_game():
|
||||
QMessageBox.about(self, "Info", "Please restart App to reload installed Games")
|
||||
self.imported = True
|
||||
self.close()
|
||||
else:
|
||||
self.info_text.setText("Failed to import Game")
|
||||
self.info_text.setText(self.tr("Failed to import Game"))
|
||||
|
||||
def import_game(self):
|
||||
path = self.path_field.text()
|
||||
|
@ -58,3 +59,4 @@ class ImportDialog(QDialog):
|
|||
|
||||
def import_dialog(self):
|
||||
self.exec_()
|
||||
return self.imported
|
|
@ -16,7 +16,7 @@ class PathInputDialog(QDialog):
|
|||
self.info_label = CustomQLabel(text)
|
||||
self.info_label.setWordWrap(True)
|
||||
|
||||
self.input = PathEdit("Select directory", QFileDialog.DirectoryOnly, )
|
||||
self.input = PathEdit(self.tr("Select directory"), QFileDialog.DirectoryOnly)
|
||||
|
||||
self.layout = QVBoxLayout()
|
||||
self.layout.addWidget(self.info_label)
|
||||
|
|
|
@ -61,8 +61,9 @@ class SyncSavesDialog(QDialog):
|
|||
self.start_thread.disconnect()
|
||||
QObjectCleanupHandler().add(self.layout())
|
||||
self.main_layout = QVBoxLayout()
|
||||
self.title = CustomQLabel("<h1>Cloud Saves</h1>\nFound Saves for folowing Games")
|
||||
self.sync_all_button = QPushButton("Sync all games")
|
||||
self.title = CustomQLabel(
|
||||
f"<h1>" + self.tr("Cloud Saves") + "</h1>\n" + self.tr("Found Saves for folowing Games"))
|
||||
self.sync_all_button = QPushButton(self.tr("Sync all games"))
|
||||
self.sync_all_button.clicked.connect(self.sync_all)
|
||||
self.main_layout.addWidget(self.title)
|
||||
self.main_layout.addWidget(self.sync_all_button)
|
||||
|
@ -72,7 +73,7 @@ class SyncSavesDialog(QDialog):
|
|||
latest_save[i.app_name] = i
|
||||
logger.info(f'Got {len(latest_save)} remote save game(s)')
|
||||
if len(latest_save) == 0:
|
||||
QMessageBox.information("No Games Found", "Your games don't support cloud save")
|
||||
QMessageBox.information(self.tr("No Games Found"), self.tr("Your games don't support cloud save"))
|
||||
self.close()
|
||||
return
|
||||
self.widgets = []
|
||||
|
@ -97,8 +98,8 @@ class SyncSavesDialog(QDialog):
|
|||
save_path = self.core.get_save_path(w.igame.app_name)
|
||||
if '%' in save_path or '{' in save_path:
|
||||
self.logger.info("Could not find save_path")
|
||||
save_path = PathInputDialog("Found no savepath",
|
||||
"No save path was found. Please select path or skip")
|
||||
save_path = PathInputDialog(self.tr("Found no savepath"),
|
||||
self.tr("No save path was found. Please select path or skip"))
|
||||
if save_path == "":
|
||||
continue
|
||||
else:
|
||||
|
|
|
@ -41,12 +41,7 @@ class SyncWidget(QWidget):
|
|||
def __init__(self, igame: InstalledGame, save, core: LegendaryCore):
|
||||
super(SyncWidget, self).__init__()
|
||||
self.layout = QVBoxLayout()
|
||||
self.setObjectName("syncwidget")
|
||||
self.setStyleSheet("""
|
||||
QWidget#syncwidget{
|
||||
border: 2px solid white;
|
||||
}
|
||||
""")
|
||||
|
||||
self.core = core
|
||||
self.save = save
|
||||
self.logger = getLogger("Sync " + igame.app_name)
|
||||
|
@ -56,8 +51,8 @@ class SyncWidget(QWidget):
|
|||
if not igame.save_path:
|
||||
save_path = self.core.get_save_path(igame.app_name)
|
||||
if '%' in save_path or '{' in save_path:
|
||||
status = "PathNotFound"
|
||||
self.logger.info("Could not find save_path")
|
||||
status = self.tr("Path not found")
|
||||
self.logger.info("Could not find save path")
|
||||
else:
|
||||
igame.save_path = save_path
|
||||
|
||||
|
@ -70,26 +65,26 @@ class SyncWidget(QWidget):
|
|||
return
|
||||
game_title = CustomQLabel(f"<h2>{igame.title}</h2>")
|
||||
if dt_local:
|
||||
local_save_date = CustomQLabel(f"Local Save date: {dt_local.strftime('%Y-%m-%d %H:%M:%S')}")
|
||||
local_save_date = CustomQLabel(self.tr("Local Save date: ")+str(dt_local.strftime('%Y-%m-%d %H:%M:%S')))
|
||||
else:
|
||||
local_save_date = CustomQLabel("No Local Save files")
|
||||
local_save_date = CustomQLabel(self.tr("No Local Save files"))
|
||||
if dt_remote:
|
||||
cloud_save_date = CustomQLabel(f"Cloud save date: {dt_remote.strftime('%Y-%m-%d %H:%M:%S')}")
|
||||
cloud_save_date = CustomQLabel(self.tr("Cloud save date: ")+str(dt_remote.strftime('%Y-%m-%d %H:%M:%S')))
|
||||
else:
|
||||
cloud_save_date = CustomQLabel(f"No Cloud saves")
|
||||
cloud_save_date = CustomQLabel(self.tr("No Cloud saves"))
|
||||
|
||||
if self.res == SaveGameStatus.SAME_AGE:
|
||||
self.logger.info(f'Save game for "{igame.title}" is up to date')
|
||||
status = "Game is up to date"
|
||||
self.upload_button = QPushButton("Upload anyway")
|
||||
self.download_button = QPushButton("Download anyway")
|
||||
status = self.tr("Game is up to date")
|
||||
self.upload_button = QPushButton(self.tr("Upload anyway"))
|
||||
self.download_button = QPushButton(self.tr("Download anyway"))
|
||||
if self.res == SaveGameStatus.REMOTE_NEWER:
|
||||
status = "Cloud save is newer"
|
||||
self.download_button = QPushButton("Download Cloud saves")
|
||||
status = self.tr("Cloud save is newer")
|
||||
self.download_button = QPushButton(self.tr("Download Cloud saves"))
|
||||
self.download_button.setStyleSheet("""
|
||||
QPushButton{ background-color: lime}
|
||||
""")
|
||||
self.upload_button = QPushButton("Upload Saves")
|
||||
self.upload_button = QPushButton(self.tr("Upload Saves"))
|
||||
self.logger.info(f'Cloud save for "{igame.title}" is newer:')
|
||||
self.logger.info(f'- Cloud save date: {dt_remote.strftime("%Y-%m-%d %H:%M:%S")}')
|
||||
if dt_local:
|
||||
|
@ -100,12 +95,12 @@ class SyncWidget(QWidget):
|
|||
self.upload_button.setToolTip("No local save")
|
||||
|
||||
elif self.res == SaveGameStatus.LOCAL_NEWER:
|
||||
status = "Local save is newer"
|
||||
self.upload_button = QPushButton("Upload saves")
|
||||
status = self.tr("Local save is newer")
|
||||
self.upload_button = QPushButton(self.tr("Upload saves"))
|
||||
self.upload_button.setStyleSheet("""
|
||||
QPushButton{ background-color: lime}
|
||||
""")
|
||||
self.download_button = QPushButton("Download saves")
|
||||
self.download_button = QPushButton(self.tr("Download saves"))
|
||||
self.logger.info(f'Local save for "{igame.title}" is newer')
|
||||
if dt_remote:
|
||||
self.logger.info(f'- Cloud save date: {dt_remote.strftime("%Y-%m-%d %H:%M:%S")}')
|
||||
|
@ -126,7 +121,7 @@ class SyncWidget(QWidget):
|
|||
|
||||
save_path_layout = QHBoxLayout()
|
||||
self.save_path_text = CustomQLabel(igame.save_path)
|
||||
self.change_save_path = QPushButton("Change path")
|
||||
self.change_save_path = QPushButton(self.tr("Change path"))
|
||||
save_path_layout.addWidget(self.save_path_text)
|
||||
save_path_layout.addWidget(self.change_save_path)
|
||||
self.layout.addWidget(self.info_text)
|
||||
|
@ -139,7 +134,7 @@ class SyncWidget(QWidget):
|
|||
|
||||
def upload(self):
|
||||
self.logger.info("Uploading Saves for game " + self.igame.title)
|
||||
self.info_text.setText("Uploading...")
|
||||
self.info_text.setText(self.tr("Uploading..."))
|
||||
self.upload_button.setDisabled(True)
|
||||
self.download_button.setDisabled(True)
|
||||
thr = _UploadThread(self.igame.app_name, self.save, self.igame.save_path, self.core)
|
||||
|
@ -147,7 +142,7 @@ class SyncWidget(QWidget):
|
|||
thr.start()
|
||||
|
||||
def uploaded(self):
|
||||
self.info_text.setText("Upload finished")
|
||||
self.info_text.setText(self.tr("Upload finished"))
|
||||
|
||||
def download(self):
|
||||
if not os.path.exists(self.igame.save_path):
|
||||
|
@ -155,13 +150,13 @@ class SyncWidget(QWidget):
|
|||
self.upload_button.setDisabled(True)
|
||||
self.download_button.setDisabled(True)
|
||||
self.logger.info("Downloading Saves for game " + self.igame.title)
|
||||
self.info_text.setText("Downloading...")
|
||||
self.info_text.setText(self.tr("Downloading..."))
|
||||
thr = _DownloadThread(self.igame.app_name, self.save, self.igame.save_path, self.core)
|
||||
thr.finished.connect(self.downloaded)
|
||||
thr.start()
|
||||
|
||||
def downloaded(self):
|
||||
self.info_text.setText("Download finished")
|
||||
self.info_text.setText(self.tr("Download finished"))
|
||||
self.upload_button.setDisabled(True)
|
||||
self.download_button.setDisabled(True)
|
||||
self.download_button.setStyleSheet("QPushButton{background-color: black}")
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
import json
|
||||
import locale
|
||||
import os
|
||||
import sys
|
||||
from logging import getLogger
|
||||
|
||||
import requests
|
||||
from PIL import Image
|
||||
from PyQt5.QtCore import pyqtSignal
|
||||
from PyQt5.QtCore import pyqtSignal, QLocale
|
||||
from legendary.core import LegendaryCore
|
||||
|
||||
from Rare.utils import legendaryConfig
|
||||
from Rare.utils.RareConfig import IMAGE_DIR
|
||||
|
||||
logger = getLogger("Utils")
|
||||
|
@ -80,3 +81,11 @@ def download_images(signal: pyqtSignal, core: LegendaryCore):
|
|||
logger.warning(f"File {IMAGE_DIR}/{game.app_name}/DieselGameBoxTall.png dowsn't exist")
|
||||
signal.emit(i)
|
||||
|
||||
|
||||
def get_lang():
|
||||
if "locale" in legendaryConfig.get_config()["Legendary"]:
|
||||
logger.info("Found locale in Legendary config: " + legendaryConfig.get_config()["Legendary"]["locale"])
|
||||
return legendaryConfig.get_config()["Legendary"]["locale"].split("-")[0]
|
||||
else:
|
||||
logger.info("Found locale in Legendary config: " + QLocale.system().name())
|
||||
return locale.getdefaultlocale()
|
||||
|
|
|
@ -13,7 +13,6 @@ legendary_settings = [
|
|||
("Default install dir", "QLineEdit", "install_dir", ["path"]),
|
||||
("Max Memory", "QLineEdit", "max_memory", ["only_int"]),
|
||||
("EGL Sync", "QComboBox", "egl_sync", ["binary"]),
|
||||
("No Wine", "QComboBox", "no_wine", ["binary"])
|
||||
]
|
||||
|
||||
game_settings = default_settings + [
|
||||
|
|
Loading…
Reference in a new issue