Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions actions/OBSLiveSplitOneCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, *args, **kwargs):
self.has_configuration = True

self.status_label = Gtk.Label(
label=self.plugin_base.lm.get("actions.base.status.no-connection"),
label=self.plugin_base.locale_manager.get("actions.base.status.no-connection"),
css_classes=["bold", "red"]
)

Expand Down Expand Up @@ -59,28 +59,28 @@ def on_icon_changed(self, event, key, asset):
def get_config_rows(self) -> list:
self.websocket_settings = Adw.PreferencesGroup()
self.websocket_settings.set_title(
self.plugin_base.lm.get("actions.base.websocket-group.title")
self.plugin_base.locale_manager.get("actions.base.websocket-group.title")
)
self.websocket_settings.set_description(
self.plugin_base.lm.get(
self.plugin_base.locale_manager.get(
"actions.base.websocket-group.description"
)
)
self.websocket_settings.set_margin_top(10)
self.websocket_settings.set_margin_bottom(10)

self.ip_entry = Adw.EntryRow(
title=self.plugin_base.lm.get("actions.base.ip.label")
title=self.plugin_base.locale_manager.get("actions.base.ip.label")
)
self.ip_entry.set_show_apply_button(True)
self.websocket_settings.add(self.ip_entry)
self.port_spinner = Adw.SpinRow.new_with_range(0, 65535, 1)
self.port_spinner.set_title(
self.plugin_base.lm.get("actions.base.port.label")
self.plugin_base.locale_manager.get("actions.base.port.label")
)
self.websocket_settings.add(self.port_spinner)
self.password_entry = Adw.PasswordEntryRow(
title=self.plugin_base.lm.get("actions.base.password.label")
title=self.plugin_base.locale_manager.get("actions.base.password.label")
)
self.password_entry.set_show_apply_button(True)
self.websocket_settings.add(self.password_entry)
Expand Down Expand Up @@ -167,13 +167,13 @@ def update_status_label(self) -> None:
def _update_status_label(self):
if self.plugin_base.backend.get_connected():
self.status_label.set_label(
self.plugin_base.lm.get("actions.base.status.connected")
self.plugin_base.locale_manager.get("actions.base.status.connected")
)
self.status_label.remove_css_class("red")
self.status_label.add_css_class("green")
else:
self.status_label.set_label(
self.plugin_base.lm.get("actions.base.status.no-connection")
self.plugin_base.locale_manager.get("actions.base.status.no-connection")
)
self.status_label.remove_css_class("green")
self.status_label.add_css_class("red")
Expand Down
12 changes: 6 additions & 6 deletions actions/SetLayoutPath.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@ def get_icon_name(self) -> str:
def get_config_rows(self) -> list:
self.layout_path_settings = Adw.PreferencesGroup()
self.layout_path_settings.set_title(
self.plugin_base.lm.get(
self.plugin_base.locale_manager.get(
"actions.set-layout-path.preferences-group.title"
)
)
self.layout_path_settings.set_description(
self.plugin_base.lm.get(
self.plugin_base.locale_manager.get(
"actions.set-layout-path.preferences-group.description"
)
)
self.layout_path_settings.set_margin_top(10)
self.layout_path_settings.set_margin_bottom(10)

self.layout_path_entry = Adw.EntryRow(
title=self.plugin_base.lm.get(
title=self.plugin_base.locale_manager.get(
"actions.set-layout-path.path.label"
)
)
self.layout_path_button = Gtk.Button(
label=self.plugin_base.lm.get(
label=self.plugin_base.locale_manager.get(
"actions.set-layout-path.button.label"
)
)
Expand All @@ -50,12 +50,12 @@ def get_config_rows(self) -> list:

self.layout_path_dialog = Gtk.FileDialog()
self.layout_path_dialog.set_title(
self.plugin_base.lm.get(
self.plugin_base.locale_manager.get(
"actions.set-layout-path.dialog.title"
)
)
self.layout_path_dialog.set_accept_label(
self.plugin_base.lm.get(
self.plugin_base.locale_manager.get(
"actions.set-layout-path.dialog.accept.label"
)
)
Expand Down
12 changes: 6 additions & 6 deletions actions/SetSplitsPath.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@ def get_icon_name(self) -> str:
def get_config_rows(self) -> list:
self.splits_path_settings = Adw.PreferencesGroup()
self.splits_path_settings.set_title(
self.plugin_base.lm.get(
self.plugin_base.locale_manager.get(
"actions.set-splits-path.preferences-group.title"
)
)
self.splits_path_settings.set_description(
self.plugin_base.lm.get(
self.plugin_base.locale_manager.get(
"actions.set-splits-path.preferences-group.description"
)
)
self.splits_path_settings.set_margin_top(10)
self.splits_path_settings.set_margin_bottom(10)

self.splits_path_entry = Adw.EntryRow(
title=self.plugin_base.lm.get(
title=self.plugin_base.locale_manager.get(
"actions.set-splits-path.path.label"
)
)
self.splits_path_button = Gtk.Button(
label=self.plugin_base.lm.get(
label=self.plugin_base.locale_manager.get(
"actions.set-splits-path.button.label"
)
)
Expand All @@ -50,12 +50,12 @@ def get_config_rows(self) -> list:

self.splits_path_dialog = Gtk.FileDialog()
self.splits_path_dialog.set_title(
self.plugin_base.lm.get(
self.plugin_base.locale_manager.get(
"actions.set-splits-path.dialog.title"
)
)
self.splits_path_dialog.set_accept_label(
self.plugin_base.lm.get(
self.plugin_base.locale_manager.get(
"actions.set-splits-path.dialog.accept.label"
)
)
Expand Down
6 changes: 3 additions & 3 deletions actions/TimerSourceActionCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ def __init__(self, *args, **kwargs):
def get_config_rows(self) -> list:
self.timer_source_base_settings = Adw.PreferencesGroup()
self.timer_source_base_settings.set_title(
self.plugin_base.lm.get(
self.plugin_base.locale_manager.get(
"actions.timer-source-base.preferences-group.title"
)
)
self.timer_source_base_settings.set_description(
self.plugin_base.lm.get(
self.plugin_base.locale_manager.get(
"actions.timer-source-base.preferences-group.description"
)
)
self.timer_source_base_settings.set_margin_top(10)
self.timer_source_base_settings.set_margin_bottom(10)

self.source_entry = Adw.ComboRow(
title=self.plugin_base.lm.get(
title=self.plugin_base.locale_manager.get(
"actions.timer-source-base.source.label"
)
)
Expand Down
31 changes: 15 additions & 16 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ def __init__(self):
print("Backend launched")

# Setup locales
self.lm = self.locale_manager
self.lm.set_to_os_default()
self.locale_manager.set_to_os_default()

# Register icons with AssetManager
icon_dir = os.path.join(self.PATH, "assets")
Expand All @@ -55,7 +54,7 @@ def __init__(self):

# Register plugin
self.register(
plugin_name = self.lm.get("plugin.name"),
plugin_name = self.locale_manager.get("plugin.name"),
github_repo = "https://github.com/pniedzielski/StreamController-OBSLiveSplitOnePlugin",
plugin_version = "1.2.0",
app_version = "1.5.0-beta"
Expand All @@ -66,7 +65,7 @@ def __init__(self):
plugin_base=self,
action_base=Split,
action_id_suffix="Split",
action_name=self.lm.get("actions.split.name"),
action_name=self.locale_manager.get("actions.split.name"),
icon=self._get_action_icon("split"),
action_support={
Input.Key: ActionInputSupport.SUPPORTED,
Expand All @@ -80,7 +79,7 @@ def __init__(self):
plugin_base=self,
action_base=Skip,
action_id_suffix="Skip",
action_name=self.lm.get("actions.skip.name"),
action_name=self.locale_manager.get("actions.skip.name"),
icon=self._get_action_icon("skip"),
action_support={
Input.Key: ActionInputSupport.SUPPORTED,
Expand All @@ -94,7 +93,7 @@ def __init__(self):
plugin_base=self,
action_base=Undo,
action_id_suffix="Undo",
action_name=self.lm.get("actions.undo.name"),
action_name=self.locale_manager.get("actions.undo.name"),
icon=self._get_action_icon("undo"),
action_support={
Input.Key: ActionInputSupport.SUPPORTED,
Expand All @@ -108,7 +107,7 @@ def __init__(self):
plugin_base=self,
action_base=NextComparison,
action_id_suffix="NextComparison",
action_name=self.lm.get("actions.next-comparison.name"),
action_name=self.locale_manager.get("actions.next-comparison.name"),
icon=self._get_action_icon("next-comparison"),
action_support={
Input.Key: ActionInputSupport.SUPPORTED,
Expand All @@ -122,7 +121,7 @@ def __init__(self):
plugin_base=self,
action_base=PrevComparison,
action_id_suffix="PrevComparison",
action_name=self.lm.get("actions.prev-comparison.name"),
action_name=self.locale_manager.get("actions.prev-comparison.name"),
icon=self._get_action_icon("prev-comparison"),
action_support={
Input.Key: ActionInputSupport.SUPPORTED,
Expand All @@ -136,7 +135,7 @@ def __init__(self):
plugin_base=self,
action_base=ToggleTimingMethod,
action_id_suffix="ToggleTimingMethod",
action_name=self.lm.get("actions.toggle-timing-method.name"),
action_name=self.locale_manager.get("actions.toggle-timing-method.name"),
icon=self._get_action_icon("toggle-timing-method"),
action_support={
Input.Key: ActionInputSupport.SUPPORTED,
Expand All @@ -150,7 +149,7 @@ def __init__(self):
plugin_base=self,
action_base=Reset,
action_id_suffix="Reset",
action_name=self.lm.get("actions.reset.name"),
action_name=self.locale_manager.get("actions.reset.name"),
icon=self._get_action_icon("reset"),
action_support={
Input.Key: ActionInputSupport.SUPPORTED,
Expand All @@ -164,7 +163,7 @@ def __init__(self):
plugin_base=self,
action_base=Pause,
action_id_suffix="Pause",
action_name=self.lm.get("actions.pause.name"),
action_name=self.locale_manager.get("actions.pause.name"),
icon=self._get_action_icon("pause"),
action_support={
Input.Key: ActionInputSupport.SUPPORTED,
Expand All @@ -178,7 +177,7 @@ def __init__(self):
plugin_base=self,
action_base=UndoAllPauses,
action_id_suffix="UndoAllPauses",
action_name=self.lm.get("actions.undo-all-pauses.name"),
action_name=self.locale_manager.get("actions.undo-all-pauses.name"),
icon=self._get_action_icon("undo-all-pauses"),
action_support={
Input.Key: ActionInputSupport.SUPPORTED,
Expand All @@ -192,7 +191,7 @@ def __init__(self):
plugin_base=self,
action_base=Interact,
action_id_suffix="Interact",
action_name=self.lm.get("actions.interact.name"),
action_name=self.locale_manager.get("actions.interact.name"),
icon=self._get_action_icon("interact"),
action_support={
Input.Key: ActionInputSupport.SUPPORTED,
Expand All @@ -206,7 +205,7 @@ def __init__(self):
plugin_base=self,
action_base=SaveSplits,
action_id_suffix="SaveSplits",
action_name=self.lm.get("actions.save-splits.name"),
action_name=self.locale_manager.get("actions.save-splits.name"),
icon=self._get_action_icon("save-splits"),
action_support={
Input.Key: ActionInputSupport.SUPPORTED,
Expand All @@ -220,7 +219,7 @@ def __init__(self):
plugin_base=self,
action_base=SetSplitsPath,
action_id_suffix="SetSplitsPath",
action_name=self.lm.get("actions.set-splits-path.name"),
action_name=self.locale_manager.get("actions.set-splits-path.name"),
icon=self._get_action_icon("set-splits-path"),
action_support={
Input.Key: ActionInputSupport.SUPPORTED,
Expand All @@ -234,7 +233,7 @@ def __init__(self):
plugin_base=self,
action_base=SetLayoutPath,
action_id_suffix="SetLayoutPath",
action_name=self.lm.get("actions.set-layout-path.name"),
action_name=self.locale_manager.get("actions.set-layout-path.name"),
icon=self._get_action_icon("set-layout-path"),
action_support={
Input.Key: ActionInputSupport.SUPPORTED,
Expand Down