mirror of
https://github.com/ModOrganizer2/modorganizer-basic_games.git
synced 2026-07-27 14:07:29 -07:00
Add translations.
This commit is contained in:
+1
-1
@@ -7,4 +7,4 @@ find_package(mo2-cmake CONFIG REQUIRED)
|
||||
mo2_configure_extension()
|
||||
|
||||
add_custom_target(basic_games ALL)
|
||||
mo2_configure_python(basic_games MODULE TRANSLATIONS OFF)
|
||||
mo2_configure_python(basic_games MODULE TRANSLATIONS ON)
|
||||
|
||||
@@ -6,7 +6,7 @@ from pathlib import Path
|
||||
from typing import Callable, Generic, TypeVar
|
||||
|
||||
import mobase
|
||||
from PyQt6.QtCore import QDir, QFileInfo, QStandardPaths
|
||||
from PyQt6.QtCore import QCoreApplication, QDir, QFileInfo, QStandardPaths
|
||||
from PyQt6.QtGui import QIcon
|
||||
|
||||
from .basic_features.basic_save_game_info import (
|
||||
@@ -253,7 +253,7 @@ class BasicGameMappings:
|
||||
game,
|
||||
"Description",
|
||||
"description",
|
||||
lambda g: "Adds basic support for game {}.".format(g.gameName()),
|
||||
lambda g: game.tr("Adds basic support for game {}.").format(g.gameName()),
|
||||
)
|
||||
self.gameName = BasicGameMapping(game, "GameName", "gameName")
|
||||
self.gameShortName = BasicGameMapping(game, "GameShortName", "gameShortName")
|
||||
@@ -424,6 +424,10 @@ class BasicGame(mobase.IPluginGame):
|
||||
def is_eadesktop(self) -> bool:
|
||||
return self._mappings.eaDesktopContentId.has_value()
|
||||
|
||||
# Qt translation
|
||||
def tr(self, value: str) -> str:
|
||||
return QCoreApplication.translate("BasicGame", value)
|
||||
|
||||
# IPlugin interface:
|
||||
|
||||
def init(self, organizer: mobase.IOrganizer) -> bool:
|
||||
|
||||
@@ -397,7 +397,8 @@ class Cyberpunk2077Game(BasicGame):
|
||||
return [
|
||||
mobase.PluginSetting(
|
||||
"skipStartScreen",
|
||||
(
|
||||
self.tr("Skip start screen"),
|
||||
self.tr(
|
||||
'Skips the "Breaching..." start screen on game launch'
|
||||
" (can also skip loading of GOG rewards)"
|
||||
),
|
||||
@@ -405,7 +406,8 @@ class Cyberpunk2077Game(BasicGame):
|
||||
),
|
||||
mobase.PluginSetting(
|
||||
"enforce_archive_load_order",
|
||||
(
|
||||
self.tr("Enforce archive load order"),
|
||||
self.tr(
|
||||
"Enforce the current load order via"
|
||||
" <code>archive/pc/mod/modlist.txt</code>"
|
||||
),
|
||||
@@ -413,7 +415,8 @@ class Cyberpunk2077Game(BasicGame):
|
||||
),
|
||||
mobase.PluginSetting(
|
||||
"reverse_archive_load_order",
|
||||
(
|
||||
self.tr("Reverse archive load order"),
|
||||
self.tr(
|
||||
"Reverse MOs load order in"
|
||||
" <code>archive/pc/mod/modlist.txt</code>"
|
||||
" (first loaded mod wins = last one / highest prio in MO)"
|
||||
@@ -422,12 +425,14 @@ class Cyberpunk2077Game(BasicGame):
|
||||
),
|
||||
mobase.PluginSetting(
|
||||
"enforce_redmod_load_order",
|
||||
"Enforce the current load order on redmod deployment",
|
||||
self.tr("Enforce RedMod load order"),
|
||||
self.tr("Enforce the current load order on redmod deployment"),
|
||||
True,
|
||||
),
|
||||
mobase.PluginSetting(
|
||||
"reverse_redmod_load_order",
|
||||
(
|
||||
self.tr("Reverse RedMod load order"),
|
||||
self.tr(
|
||||
"Reverse MOs load order on redmod deployment"
|
||||
" (first loaded mod wins = last one / highest prio in MO)"
|
||||
),
|
||||
@@ -435,12 +440,14 @@ class Cyberpunk2077Game(BasicGame):
|
||||
),
|
||||
mobase.PluginSetting(
|
||||
"auto_deploy_redmod",
|
||||
"Deploy redmod before game launch if necessary",
|
||||
self.tr("Auto deploy RedMod"),
|
||||
self.tr("Deploy redmod before game launch if necessary"),
|
||||
True,
|
||||
),
|
||||
mobase.PluginSetting(
|
||||
"clear_cache_after_game_update",
|
||||
(
|
||||
self.tr("Clear cache after game update"),
|
||||
self.tr(
|
||||
'Clears "overwrite/r6/cache/*" if the original game files changed'
|
||||
" (after update)"
|
||||
),
|
||||
@@ -448,7 +455,10 @@ class Cyberpunk2077Game(BasicGame):
|
||||
),
|
||||
mobase.PluginSetting(
|
||||
"configure_RootBuilder",
|
||||
"Configures RootBuilder for Cyberpunk if installed and enabled",
|
||||
self.tr("Configure RootBuilder"),
|
||||
self.tr(
|
||||
"Configures RootBuilder for Cyberpunk if installed and enabled"
|
||||
),
|
||||
True,
|
||||
),
|
||||
]
|
||||
|
||||
@@ -159,7 +159,8 @@ class SubnauticaGame(BasicGame, mobase.IPluginFileMapper):
|
||||
return [
|
||||
mobase.PluginSetting(
|
||||
"use_qmods",
|
||||
(
|
||||
self.tr("Use QMods"),
|
||||
self.tr(
|
||||
"Install */.dll mods in legacy QMods folder,"
|
||||
" instead of BepInEx/plugins (default)."
|
||||
),
|
||||
|
||||
@@ -385,11 +385,15 @@ class ValheimGame(BasicGame):
|
||||
settings.extend(
|
||||
[
|
||||
mobase.PluginSetting(
|
||||
"sync_overwrite", "Sync overwrite with mods", True
|
||||
"sync_overwrite",
|
||||
self.tr("Synchronize overwrite"),
|
||||
self.tr("Synchronize overwrite with mods"),
|
||||
True,
|
||||
),
|
||||
mobase.PluginSetting(
|
||||
"search_overwrite_file_content",
|
||||
"Search content of files in overwrite for matching mod",
|
||||
self.tr("Search overwrite file content"),
|
||||
self.tr("Search content of files in overwrite for matching mod"),
|
||||
True,
|
||||
),
|
||||
]
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>BasicGameMappings</name>
|
||||
<message>
|
||||
<location filename="basic_games\basic_game.py" line="256" />
|
||||
<source>Adds basic support for game {}.</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Cyberpunk2077Game</name>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="400" />
|
||||
<source>Skip start screen</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="401" />
|
||||
<source>Skips the "Breaching..." start screen on game launch (can also skip loading of GOG rewards)</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="409" />
|
||||
<source>Enforce archive load order</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="410" />
|
||||
<source>Enforce the current load order via <code>archive/pc/mod/modlist.txt</code></source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="418" />
|
||||
<source>Reverse archive load order</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="419" />
|
||||
<source>Reverse MOs load order in <code>archive/pc/mod/modlist.txt</code> (first loaded mod wins = last one / highest prio in MO)</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="428" />
|
||||
<source>Enforce RedMod load order</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="429" />
|
||||
<source>Enforce the current load order on redmod deployment</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="434" />
|
||||
<source>Reverse RedMod load order</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="435" />
|
||||
<source>Reverse MOs load order on redmod deployment (first loaded mod wins = last one / highest prio in MO)</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="443" />
|
||||
<source>Auto deploy RedMod</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="444" />
|
||||
<source>Deploy redmod before game launch if necessary</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="449" />
|
||||
<source>Clear cache after game update</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="450" />
|
||||
<source>Clears "overwrite/r6/cache/*" if the original game files changed (after update)</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="458" />
|
||||
<source>Configure RootBuilder</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_cyberpunk2077.py" line="459" />
|
||||
<source>Configures RootBuilder for Cyberpunk if installed and enabled</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SubnauticaGame</name>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_subnautica.py" line="162" />
|
||||
<source>Use QMods</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_subnautica.py" line="163" />
|
||||
<source>Install */.dll mods in legacy QMods folder, instead of BepInEx/plugins (default).</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ValheimGame</name>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_valheim.py" line="389" />
|
||||
<source>Synchronize overwrite</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_valheim.py" line="390" />
|
||||
<source>Synchronize overwrite with mods</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_valheim.py" line="395" />
|
||||
<source>Search overwrite file content</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
<message>
|
||||
<location filename="basic_games\games\game_valheim.py" line="396" />
|
||||
<source>Search content of files in overwrite for matching mod</source>
|
||||
<translation type="unfinished" />
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
Reference in New Issue
Block a user