Update translations
This commit is contained in:
@@ -126,7 +126,7 @@ class CartridgesApplication(Adw.Application):
|
||||
license_type=Gtk.License.GPL_3_0,
|
||||
issue_url="https://github.com/kra-mo/cartridges/issues/new",
|
||||
website="https://github.com/kra-mo/cartridges",
|
||||
# Translators: Replace this with your name for it to show up in the about window.
|
||||
# Translators: Replace this with your name for it to show up in the about window
|
||||
translator_credits=_("translator_credits"),
|
||||
)
|
||||
about.present()
|
||||
@@ -135,7 +135,7 @@ class CartridgesApplication(Adw.Application):
|
||||
PreferencesWindow(self.win).present()
|
||||
|
||||
def on_steam_import_action(self, _widget, _callback=None):
|
||||
# Handle the updating of games inside of the module because the function is async.
|
||||
# Handle the updating of games inside of the module because the function is async
|
||||
steam_parser(self.win, self.on_steam_import_action)
|
||||
|
||||
def on_heroic_import_action(self, _widget, _callback=None):
|
||||
@@ -190,8 +190,8 @@ class CartridgesApplication(Adw.Application):
|
||||
if self.win.stack.get_visible_child() == self.win.overview:
|
||||
self.win.on_go_back_action(None, None)
|
||||
|
||||
# Create toast for undoing the remove action
|
||||
toast = Adw.Toast.new(self.win.games[game_id].name + " " + (_("removed")))
|
||||
# The variable is the title of the game
|
||||
toast = Adw.Toast.new(_(f"{self.win.games[game_id].name} removed"))
|
||||
toast.set_button_label(_("Undo"))
|
||||
toast.connect("button-clicked", self.win.on_undo_remove_action, game_id)
|
||||
toast.set_priority(Adw.ToastPriority.HIGH)
|
||||
|
||||
@@ -152,10 +152,7 @@ def bottles_parser(parent_widget, action):
|
||||
create_dialog(
|
||||
parent_widget,
|
||||
_("Bottles Games Imported"),
|
||||
_("Successfully imported")
|
||||
+ " "
|
||||
+ str(len(bottles_games))
|
||||
+ " "
|
||||
+ _("games."),
|
||||
# The variable is the number of games
|
||||
_(f"Successfully imported {str(len(bottles_games))} games."),
|
||||
)
|
||||
return bottles_games
|
||||
|
||||
@@ -108,12 +108,26 @@ def create_details_window(parent_widget, game_id=None):
|
||||
css_classes=["flat", "circular"],
|
||||
)
|
||||
|
||||
exec_info_text = 'To launch the executable "program", use the command:\n\n<tt>"/path/to/program"</tt>\n\nTo open the file "file.txt" with the default application, use:\n\n<tt>xdg-open "/path/to/file.txt"</tt>\n\nIf the path contains spaces, make sure to wrap it in double quotes!'
|
||||
file_name = _("file.txt")
|
||||
# As in software
|
||||
exe_name = _("program")
|
||||
|
||||
exec_info_text_win = 'To launch the executable "program.exe", use the command:\n\n<tt>"C:\\path\\to\\program.exe"</tt>\n\nTo open the file "file.txt" with the default application, use:\n\n<tt>start "C:\\path\\to\\file.txt"</tt>\n\nIf the path contains spaces, make sure to wrap it in double quotes!'
|
||||
if os.name == "nt":
|
||||
exe_name += ".exe"
|
||||
exe_path = _(f"C:\\path\\to\\{exe_name}")
|
||||
file_path = _(f"C:\\path\\to\\{file_name}")
|
||||
command = "start"
|
||||
else:
|
||||
exe_path = _(f"/path/to/{exe_name}")
|
||||
file_path = _(f"/path/to/{file_name}")
|
||||
command = "xdg-open"
|
||||
|
||||
exec_info_text = _(
|
||||
f'To launch the executable "{exe_name}", use the command:\n\n<tt>"{exe_path}"</tt>\n\nTo open the file "{file_name}" with the default application, use:\n\n<tt>{command} "{file_path}"</tt>\n\nIf the path contains spaces, make sure to wrap it in double quotes!'
|
||||
)
|
||||
|
||||
exec_info_label = Gtk.Label(
|
||||
label=exec_info_text_win if os.name == "nt" else exec_info_text,
|
||||
label=exec_info_text,
|
||||
use_markup=True,
|
||||
wrap=True,
|
||||
max_width_chars=30,
|
||||
|
||||
@@ -251,10 +251,7 @@ def heroic_parser(parent_widget, action):
|
||||
create_dialog(
|
||||
parent_widget,
|
||||
_("Heroic Games Imported"),
|
||||
_("Successfully imported")
|
||||
+ " "
|
||||
+ str(len(heroic_games))
|
||||
+ " "
|
||||
+ _("games."),
|
||||
# The variable is the number of games
|
||||
_(f"Successfully imported {str(len(heroic_games))} games."),
|
||||
)
|
||||
return heroic_games
|
||||
|
||||
@@ -167,11 +167,8 @@ def get_games_async(parent_widget, appmanifests, steam_dir, import_dialog):
|
||||
create_dialog(
|
||||
parent_widget,
|
||||
_("Steam Games Imported"),
|
||||
_("Successfully imported")
|
||||
+ " "
|
||||
+ str(games_no)
|
||||
+ " "
|
||||
+ _("games."),
|
||||
# The variable is the number of games
|
||||
_(f"Successfully imported {str(games_no)} games."),
|
||||
)
|
||||
|
||||
for appmanifest in appmanifests:
|
||||
@@ -248,7 +245,7 @@ def steam_parser(parent_widget, action):
|
||||
steam_dir = os.path.expanduser(schema.get_string("steam-location"))
|
||||
|
||||
import_statuspage = Adw.StatusPage(
|
||||
title=_("Importing Games..."),
|
||||
title=_("Importing Games…"),
|
||||
description=_("Talking to Steam"),
|
||||
)
|
||||
|
||||
|
||||
@@ -260,12 +260,17 @@ class CartridgesWindow(Adw.ApplicationWindow):
|
||||
self.overview_title.set_label(current_game.name)
|
||||
self.overview_header_bar_title.set_title(current_game.name)
|
||||
self.overview_added.set_label(
|
||||
_("Added:") + " " + self.get_time(current_game.added)
|
||||
# The variable is the date when the game was added
|
||||
_(f"Added: {self.get_time(current_game.added)}")
|
||||
)
|
||||
last_played_date = (
|
||||
self.get_time(current_game.last_played)
|
||||
if current_game.last_played != 0
|
||||
else _("Never")
|
||||
)
|
||||
self.overview_last_played.set_label(
|
||||
_("Last played:") + " " + self.get_time(current_game.last_played)
|
||||
if current_game.last_played != 0
|
||||
else _("Last played: Never")
|
||||
# The variable is the date when the game was last played
|
||||
_(f"Last played: {last_played_date}")
|
||||
)
|
||||
|
||||
def a_z_sort(self, child1, child2):
|
||||
|
||||
Reference in New Issue
Block a user