From 4c09ec31f43f9168bcb301cc6680440fa47d8082 Mon Sep 17 00:00:00 2001 From: actionless Date: Sat, 18 Dec 2021 07:46:41 +0100 Subject: [PATCH] style: s/_/translate/g;s/_n/translate_many/g --- oomox_plugin.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/oomox_plugin.py b/oomox_plugin.py index dbb7271..c5ffb21 100644 --- a/oomox_plugin.py +++ b/oomox_plugin.py @@ -5,7 +5,7 @@ from oomox_gui.export_common import FileBasedExportDialog, ExportConfig from oomox_gui.plugin_api import OomoxExportPlugin -from oomox_gui.i18n import _ +from oomox_gui.i18n import translate PLUGIN_DIR = os.path.dirname(os.path.realpath(__file__)) @@ -57,7 +57,7 @@ def _init_radios(self): self.font_radio_default = \ Gtk.RadioButton.new_with_mnemonic_from_widget( None, - _("Don't change _default font") + translate("Don't change _default font") ) self.font_radio_default.connect( "toggled", self.on_font_radio_toggled, VALUE_FONT_DEFAULT @@ -67,7 +67,7 @@ def _init_radios(self): self.font_radio_normalize = \ Gtk.RadioButton.new_with_mnemonic_from_widget( self.font_radio_default, - _("_Normalize font weight") + translate("_Normalize font weight") ) self.font_radio_normalize.connect( "toggled", self.on_font_radio_toggled, VALUE_FONT_NORMALIZE @@ -76,7 +76,7 @@ def _init_radios(self): self.font_radio_custom = Gtk.RadioButton.new_with_mnemonic_from_widget( self.font_radio_default, - _("Use custom _font:") + translate("Use custom _font:") ) self.font_radio_custom.connect( "toggled", self.on_font_radio_toggled, VALUE_FONT_CUSTOM @@ -97,7 +97,7 @@ def _init_radios(self): def __init__(self, transient_for, colorscheme, theme_name): super().__init__( transient_for=transient_for, - headline=_("Spotify Options"), + headline=translate("Spotify Options"), colorscheme=colorscheme, theme_name=theme_name ) @@ -112,7 +112,7 @@ def __init__(self, transient_for, colorscheme, theme_name): ) export_options_headline = Gtk.Label() - export_options_headline.set_markup('' + _("Font Options") + '') + export_options_headline.set_markup('' + translate("Font Options") + '') export_options_headline.set_justify(Gtk.Justification.LEFT) export_options_headline.set_alignment(0.0, 0.0) self.options_box.add(export_options_headline) @@ -120,7 +120,7 @@ def __init__(self, transient_for, colorscheme, theme_name): self._init_radios() hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) - spotify_path_label = Gtk.Label(label=_('Spotify _path:'), + spotify_path_label = Gtk.Label(label=translate('Spotify _path:'), use_underline=True) self.spotify_path_entry = Gtk.Entry(text=self.export_config[OPTION_SPOTIFY_PATH]) spotify_path_label.set_mnemonic_widget(self.spotify_path_entry) @@ -139,30 +139,30 @@ class Plugin(OomoxExportPlugin): name = 'spotify' display_name = 'Oomoxify' - export_text = _("Apply Spotif_y Theme…") + export_text = translate("Apply Spotif_y Theme…") export_dialog = SpotifyExportDialog theme_model_extra = [ { 'type': 'separator', - 'display_name': _('Spotify') + 'display_name': translate('Spotify') }, { 'key': 'SPOTIFY_PROTO_BG', 'type': 'color', 'fallback_key': 'HDR_BG', - 'display_name': _('Background'), + 'display_name': translate('Background'), }, { 'key': 'SPOTIFY_PROTO_FG', 'type': 'color', 'fallback_key': 'HDR_FG', - 'display_name': _('Foreground'), + 'display_name': translate('Foreground'), }, { 'key': 'SPOTIFY_PROTO_SEL', 'type': 'color', 'fallback_key': 'SEL_BG', - 'display_name': _('Accent Color'), + 'display_name': translate('Accent Color'), }, ]