From 10d2992253eae283dd1a5d0f9f11c1dafccd93a2 Mon Sep 17 00:00:00 2001 From: Laurent Monin Date: Sun, 21 Apr 2024 23:47:32 +0200 Subject: [PATCH] import _ -> import gettext as _ --- picard/album.py | 2 +- picard/browser/addrelease.py | 2 +- picard/cluster.py | 2 +- picard/config_upgrade.py | 2 +- picard/const/scripts.py | 2 +- picard/coverart/providers/caa.py | 2 +- picard/coverart/utils.py | 2 +- picard/file.py | 2 +- picard/oauth.py | 2 +- picard/pluginmanager.py | 2 +- picard/releasegroup.py | 2 +- picard/script/__init__.py | 2 +- picard/script/functions.py | 2 +- picard/script/serializer.py | 2 +- picard/tagger.py | 2 +- picard/track.py | 2 +- picard/ui/aboutdialog.py | 2 +- picard/ui/caa_types_selector.py | 2 +- picard/ui/cdlookup.py | 2 +- picard/ui/collectionmenu.py | 2 +- picard/ui/colors.py | 2 +- picard/ui/coverartbox.py | 2 +- picard/ui/edittagdialog.py | 2 +- picard/ui/filebrowser.py | 2 +- picard/ui/infodialog.py | 2 +- picard/ui/infostatus.py | 2 +- picard/ui/itemviews.py | 2 +- picard/ui/logview.py | 2 +- picard/ui/mainwindow.py | 2 +- picard/ui/metadatabox.py | 2 +- picard/ui/newuserdialog.py | 2 +- picard/ui/options/__init__.py | 2 +- picard/ui/options/cover.py | 2 +- picard/ui/options/dialog.py | 2 +- picard/ui/options/fingerprinting.py | 2 +- picard/ui/options/general.py | 2 +- picard/ui/options/genres.py | 2 +- picard/ui/options/interface.py | 2 +- picard/ui/options/interface_colors.py | 2 +- picard/ui/options/interface_toolbar.py | 2 +- picard/ui/options/maintenance.py | 2 +- picard/ui/options/metadata.py | 2 +- picard/ui/options/plugins.py | 2 +- picard/ui/options/profiles.py | 2 +- picard/ui/options/releases.py | 2 +- picard/ui/options/renaming.py | 2 +- picard/ui/options/renaming_compat.py | 2 +- picard/ui/options/scripting.py | 2 +- picard/ui/passworddialog.py | 2 +- picard/ui/playertoolbar.py | 2 +- picard/ui/pluginupdatedialog.py | 2 +- picard/ui/savewarningdialog.py | 2 +- picard/ui/scripteditor.py | 2 +- picard/ui/searchdialog/__init__.py | 2 +- picard/ui/searchdialog/album.py | 2 +- picard/ui/searchdialog/artist.py | 2 +- picard/ui/searchdialog/track.py | 2 +- picard/ui/tagsfromfilenames.py | 2 +- picard/ui/ui_aboutdialog.py | 2 +- picard/ui/ui_cdlookup.py | 2 +- picard/ui/ui_edittagdialog.py | 2 +- picard/ui/ui_exception_script_selector.py | 2 +- picard/ui/ui_infodialog.py | 2 +- picard/ui/ui_infostatus.py | 2 +- picard/ui/ui_multi_locale_selector.py | 2 +- picard/ui/ui_options.py | 2 +- picard/ui/ui_options_advanced.py | 2 +- picard/ui/ui_options_attached_profiles.py | 2 +- picard/ui/ui_options_cdlookup.py | 2 +- picard/ui/ui_options_cdlookup_select.py | 2 +- picard/ui/ui_options_cover.py | 2 +- picard/ui/ui_options_fingerprinting.py | 2 +- picard/ui/ui_options_general.py | 2 +- picard/ui/ui_options_genres.py | 2 +- picard/ui/ui_options_interface.py | 2 +- picard/ui/ui_options_interface_colors.py | 2 +- picard/ui/ui_options_interface_toolbar.py | 2 +- picard/ui/ui_options_interface_top_tags.py | 2 +- picard/ui/ui_options_maintenance.py | 2 +- picard/ui/ui_options_matching.py | 2 +- picard/ui/ui_options_metadata.py | 2 +- picard/ui/ui_options_network.py | 2 +- picard/ui/ui_options_plugins.py | 2 +- picard/ui/ui_options_profiles.py | 2 +- picard/ui/ui_options_ratings.py | 2 +- picard/ui/ui_options_releases.py | 2 +- picard/ui/ui_options_renaming.py | 2 +- picard/ui/ui_options_renaming_compat.py | 2 +- picard/ui/ui_options_script.py | 2 +- picard/ui/ui_options_tags.py | 2 +- picard/ui/ui_options_tags_compatibility_aac.py | 2 +- picard/ui/ui_options_tags_compatibility_ac3.py | 2 +- picard/ui/ui_options_tags_compatibility_id3.py | 2 +- picard/ui/ui_options_tags_compatibility_wave.py | 2 +- picard/ui/ui_passworddialog.py | 2 +- picard/ui/ui_provider_options_caa.py | 2 +- picard/ui/ui_provider_options_local.py | 2 +- picard/ui/ui_scripteditor.py | 2 +- picard/ui/ui_scripteditor_details.py | 2 +- picard/ui/ui_scripting_documentation_dialog.py | 2 +- picard/ui/ui_tagsfromfilenames.py | 2 +- picard/ui/ui_widget_taglisteditor.py | 2 +- picard/ui/ui_win_compat_dialog.py | 2 +- picard/ui/util.py | 2 +- picard/ui/widgets/profilelistwidget.py | 2 +- picard/ui/widgets/scriptdocumentation.py | 2 +- picard/ui/widgets/scriptlistwidget.py | 2 +- picard/ui/widgets/scripttextedit.py | 2 +- picard/ui/widgets/tristatesortheaderview.py | 2 +- picard/util/__init__.py | 2 +- picard/util/bytes2human.py | 2 +- picard/util/checkupdate.py | 2 +- picard/util/tags.py | 2 +- picard/util/time.py | 2 +- picard/util/versions.py | 2 +- picard/util/webbrowser2.py | 2 +- setup.py | 2 +- test/test_i18n.py | 2 +- test/test_utils.py | 2 +- 119 files changed, 119 insertions(+), 119 deletions(-) diff --git a/picard/album.py b/picard/album.py index 8421fa4961..e8a5a60c28 100644 --- a/picard/album.py +++ b/picard/album.py @@ -61,7 +61,7 @@ from picard.file import File from picard.i18n import ( N_, - _, + gettext as _, ) from picard.mbjson import ( medium_to_metadata, diff --git a/picard/browser/addrelease.py b/picard/browser/addrelease.py index c33728d214..690f921e77 100644 --- a/picard/browser/addrelease.py +++ b/picard/browser/addrelease.py @@ -28,7 +28,7 @@ from PyQt6.QtCore import QCoreApplication from picard import log -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.util import format_time from picard.util.mbserver import build_submission_url from picard.util.webbrowser2 import open diff --git a/picard/cluster.py b/picard/cluster.py index b3e1c3fdab..b4eccae5f6 100644 --- a/picard/cluster.py +++ b/picard/cluster.py @@ -48,7 +48,7 @@ from picard.file import File from picard.i18n import ( N_, - _, + gettext as _, ) from picard.metadata import ( Metadata, diff --git a/picard/config_upgrade.py b/picard/config_upgrade.py index 8337a9a59e..1dfbf92378 100644 --- a/picard/config_upgrade.py +++ b/picard/config_upgrade.py @@ -53,7 +53,7 @@ ) from picard.const.sys import IS_FROZEN from picard.i18n import ( - _, + gettext as _, gettext_constants, ) from picard.util import unique_numbered_title diff --git a/picard/const/scripts.py b/picard/const/scripts.py index 359b63292d..00fb6c3696 100644 --- a/picard/const/scripts.py +++ b/picard/const/scripts.py @@ -22,7 +22,7 @@ from picard.i18n import ( N_, - _, + gettext as _, ) diff --git a/picard/coverart/providers/caa.py b/picard/coverart/providers/caa.py index d32b8466e9..810c3a6207 100644 --- a/picard/coverart/providers/caa.py +++ b/picard/coverart/providers/caa.py @@ -61,7 +61,7 @@ ) from picard.i18n import ( N_, - _, + gettext as _, ) from picard.webservice import ratecontrol diff --git a/picard/coverart/utils.py b/picard/coverart/utils.py index c6a08027f1..eb8cd61271 100644 --- a/picard/coverart/utils.py +++ b/picard/coverart/utils.py @@ -27,7 +27,7 @@ from picard.const import MB_ATTRIBUTES from picard.i18n import ( N_, - _, + gettext as _, pgettext_attributes, ) diff --git a/picard/file.py b/picard/file.py index 5739158c91..d0bd33fad1 100644 --- a/picard/file.py +++ b/picard/file.py @@ -73,7 +73,7 @@ ) from picard.i18n import ( N_, - _, + gettext as _, ) from picard.metadata import ( Metadata, diff --git a/picard/oauth.py b/picard/oauth.py index d9f1a80d1e..444f918f88 100644 --- a/picard/oauth.py +++ b/picard/oauth.py @@ -36,7 +36,7 @@ MUSICBRAINZ_OAUTH_CLIENT_ID, MUSICBRAINZ_OAUTH_CLIENT_SECRET, ) -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.util import ( build_qurl, load_json, diff --git a/picard/pluginmanager.py b/picard/pluginmanager.py index 05ab484218..ee9ea0e608 100644 --- a/picard/pluginmanager.py +++ b/picard/pluginmanager.py @@ -46,7 +46,7 @@ from picard.const.sys import IS_FROZEN from picard.i18n import ( N_, - _, + gettext as _, ) from picard.plugin import ( _PLUGIN_MODULE_PREFIX, diff --git a/picard/releasegroup.py b/picard/releasegroup.py index 07be7f1ddd..d78b8058f7 100644 --- a/picard/releasegroup.py +++ b/picard/releasegroup.py @@ -34,7 +34,7 @@ from picard.dataobj import DataObject from picard.i18n import ( N_, - _, + gettext as _, pgettext_attributes, ) from picard.mbjson import ( diff --git a/picard/script/__init__.py b/picard/script/__init__.py index 7a6cd75bb5..b33c731f8f 100644 --- a/picard/script/__init__.py +++ b/picard/script/__init__.py @@ -43,7 +43,7 @@ ) from picard.i18n import ( N_, - _, + gettext as _, ) from picard.script.functions import ( # noqa: F401 # pylint: disable=unused-import register_script_function, diff --git a/picard/script/functions.py b/picard/script/functions.py index 0a1c52c003..f656e8feb6 100644 --- a/picard/script/functions.py +++ b/picard/script/functions.py @@ -47,7 +47,7 @@ from picard.const.countries import RELEASE_COUNTRIES from picard.i18n import ( N_, - _, + gettext as _, gettext_countries, ) from picard.metadata import MULTI_VALUED_JOINER diff --git a/picard/script/serializer.py b/picard/script/serializer.py index 2e81d9762f..e3cc7bab9e 100644 --- a/picard/script/serializer.py +++ b/picard/script/serializer.py @@ -45,7 +45,7 @@ ) from picard.i18n import ( N_, - _, + gettext as _, ) from picard.util import make_filename_from_title diff --git a/picard/tagger.py b/picard/tagger.py index 326328fc08..2dbd98df46 100644 --- a/picard/tagger.py +++ b/picard/tagger.py @@ -112,7 +112,7 @@ from picard.formats import open_ as open_file from picard.i18n import ( N_, - _, + gettext as _, setup_gettext, ) from picard.pluginmanager import ( diff --git a/picard/track.py b/picard/track.py index 0e3c6bcd88..837c4ae2b8 100644 --- a/picard/track.py +++ b/picard/track.py @@ -60,7 +60,7 @@ run_file_post_addition_to_track_processors, run_file_post_removal_from_track_processors, ) -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.mbjson import recording_to_metadata from picard.metadata import ( Metadata, diff --git a/picard/ui/aboutdialog.py b/picard/ui/aboutdialog.py index fbbe802779..444d796297 100644 --- a/picard/ui/aboutdialog.py +++ b/picard/ui/aboutdialog.py @@ -31,7 +31,7 @@ from picard.const import PICARD_URLS from picard.formats import supported_extensions -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.util import versions from picard.ui import ( diff --git a/picard/ui/caa_types_selector.py b/picard/ui/caa_types_selector.py index b1c860a679..6f613b1c7f 100644 --- a/picard/ui/caa_types_selector.py +++ b/picard/ui/caa_types_selector.py @@ -39,7 +39,7 @@ from picard.i18n import ( N_, - _, + gettext as _, ) from picard.ui import PicardDialog diff --git a/picard/ui/cdlookup.py b/picard/ui/cdlookup.py index b14061c134..beae54def8 100644 --- a/picard/ui/cdlookup.py +++ b/picard/ui/cdlookup.py @@ -37,7 +37,7 @@ Option, get_config, ) -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.mbjson import ( artist_credit_from_node, label_info_from_node, diff --git a/picard/ui/collectionmenu.py b/picard/ui/collectionmenu.py index b59ebf0cb7..d7d25448f6 100644 --- a/picard/ui/collectionmenu.py +++ b/picard/ui/collectionmenu.py @@ -34,7 +34,7 @@ user_collections, ) from picard.i18n import ( - _, + gettext as _, ngettext, ) from picard.util import strxfrm diff --git a/picard/ui/colors.py b/picard/ui/colors.py index de6184f9c2..1f0cfeba71 100644 --- a/picard/ui/colors.py +++ b/picard/ui/colors.py @@ -27,7 +27,7 @@ from picard.config import get_config from picard.i18n import ( N_, - _, + gettext as _, ) from picard.ui.theme import theme diff --git a/picard/ui/coverartbox.py b/picard/ui/coverartbox.py index 70a9e30451..863e37bc4d 100644 --- a/picard/ui/coverartbox.py +++ b/picard/ui/coverartbox.py @@ -55,7 +55,7 @@ CoverArtImageIOError, ) from picard.file import File -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.track import Track from picard.util import ( imageinfo, diff --git a/picard/ui/edittagdialog.py b/picard/ui/edittagdialog.py index 5e0531211f..767d79f955 100644 --- a/picard/ui/edittagdialog.py +++ b/picard/ui/edittagdialog.py @@ -39,7 +39,7 @@ RELEASE_STATUS, ) from picard.const.countries import RELEASE_COUNTRIES -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.util.tags import TAG_NAMES from picard.ui import PicardDialog diff --git a/picard/ui/filebrowser.py b/picard/ui/filebrowser.py index 27ec6abc2f..f16d6107b1 100644 --- a/picard/ui/filebrowser.py +++ b/picard/ui/filebrowser.py @@ -46,7 +46,7 @@ ) from picard.const.sys import IS_MACOS from picard.formats import supported_formats -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.util import find_existing_path diff --git a/picard/ui/infodialog.py b/picard/ui/infodialog.py index 2be3c720a4..67d1ca98d4 100644 --- a/picard/ui/infodialog.py +++ b/picard/ui/infodialog.py @@ -48,7 +48,7 @@ from picard.coverart.image import CoverArtImageIOError from picard.file import File from picard.i18n import ( - _, + gettext as _, ngettext, ) from picard.track import Track diff --git a/picard/ui/infostatus.py b/picard/ui/infostatus.py index fdba9c49ec..ba8f3d6b8c 100644 --- a/picard/ui/infostatus.py +++ b/picard/ui/infostatus.py @@ -30,7 +30,7 @@ QtWidgets, ) -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.util import icontheme from picard.util.time import get_timestamp diff --git a/picard/ui/itemviews.py b/picard/ui/itemviews.py index 3cabb7f136..ae63b103e1 100644 --- a/picard/ui/itemviews.py +++ b/picard/ui/itemviews.py @@ -77,7 +77,7 @@ ) from picard.i18n import ( N_, - _, + gettext as _, ) from picard.plugin import ExtensionPoint from picard.track import ( diff --git a/picard/ui/logview.py b/picard/ui/logview.py index 67226b131b..91a52f12b1 100644 --- a/picard/ui/logview.py +++ b/picard/ui/logview.py @@ -44,7 +44,7 @@ get_config, ) from picard.debug_opts import DebugOpt -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.util import ( reconnect, wildcards_to_regex_pattern, diff --git a/picard/ui/mainwindow.py b/picard/ui/mainwindow.py index 64f72e0224..88e240d3a6 100644 --- a/picard/ui/mainwindow.py +++ b/picard/ui/mainwindow.py @@ -86,7 +86,7 @@ from picard.formats import supported_formats from picard.i18n import ( N_, - _, + gettext as _, ngettext, ) from picard.plugin import ExtensionPoint diff --git a/picard/ui/metadatabox.py b/picard/ui/metadatabox.py index 0b416d0541..51120bf130 100644 --- a/picard/ui/metadatabox.py +++ b/picard/ui/metadatabox.py @@ -53,7 +53,7 @@ ) from picard.file import File from picard.i18n import ( - _, + gettext as _, ngettext, ) from picard.metadata import MULTI_VALUED_JOINER diff --git a/picard/ui/newuserdialog.py b/picard/ui/newuserdialog.py index 073de61c9f..2d832785f7 100644 --- a/picard/ui/newuserdialog.py +++ b/picard/ui/newuserdialog.py @@ -27,7 +27,7 @@ ) from picard.const import PICARD_URLS -from picard.i18n import _ +from picard.i18n import gettext as _ class NewUserDialog(): diff --git a/picard/ui/options/__init__.py b/picard/ui/options/__init__.py index 43c806c4cd..f9e8ff7265 100644 --- a/picard/ui/options/__init__.py +++ b/picard/ui/options/__init__.py @@ -29,7 +29,7 @@ from picard import log from picard.config import get_config -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.plugin import ExtensionPoint diff --git a/picard/ui/options/cover.py b/picard/ui/options/cover.py index a4806ace0e..ec89a28a56 100644 --- a/picard/ui/options/cover.py +++ b/picard/ui/options/cover.py @@ -37,7 +37,7 @@ from picard.coverart.providers import cover_art_providers from picard.i18n import ( N_, - _, + gettext as _, ) from picard.ui.checkbox_list_item import CheckboxListItem diff --git a/picard/ui/options/dialog.py b/picard/ui/options/dialog.py index 6ace11ce1b..b2b9bb7ba2 100644 --- a/picard/ui/options/dialog.py +++ b/picard/ui/options/dialog.py @@ -48,7 +48,7 @@ ) from picard.i18n import ( N_, - _, + gettext as _, ) from picard.profile import UserProfileGroups from picard.util import restore_method diff --git a/picard/ui/options/fingerprinting.py b/picard/ui/options/fingerprinting.py index 39886ab080..29f0da6c95 100644 --- a/picard/ui/options/fingerprinting.py +++ b/picard/ui/options/fingerprinting.py @@ -42,7 +42,7 @@ from picard.const import DEFAULT_FPCALC_THREADS from picard.i18n import ( N_, - _, + gettext as _, ) from picard.util import webbrowser2 diff --git a/picard/ui/options/general.py b/picard/ui/options/general.py index 446ca04a27..f1bcdf4eac 100644 --- a/picard/ui/options/general.py +++ b/picard/ui/options/general.py @@ -43,7 +43,7 @@ ) from picard.i18n import ( N_, - _, + gettext as _, gettext_constants, ) from picard.util.mbserver import is_official_server diff --git a/picard/ui/options/genres.py b/picard/ui/options/genres.py index 81bed888fe..a2b8183651 100644 --- a/picard/ui/options/genres.py +++ b/picard/ui/options/genres.py @@ -36,7 +36,7 @@ ) from picard.i18n import ( N_, - _, + gettext as _, ) from picard.track import TagGenreFilter diff --git a/picard/ui/options/interface.py b/picard/ui/options/interface.py index e8a586bb88..d9c23f47c2 100644 --- a/picard/ui/options/interface.py +++ b/picard/ui/options/interface.py @@ -46,7 +46,7 @@ from picard.const.sys import IS_MACOS from picard.i18n import ( N_, - _, + gettext as _, gettext_constants, ) from picard.util import strxfrm diff --git a/picard/ui/options/interface_colors.py b/picard/ui/options/interface_colors.py index 2360f15f7d..d5e9745b47 100644 --- a/picard/ui/options/interface_colors.py +++ b/picard/ui/options/interface_colors.py @@ -32,7 +32,7 @@ from picard.const.sys import IS_MACOS from picard.i18n import ( N_, - _, + gettext as _, ) from picard.ui.colors import ( diff --git a/picard/ui/options/interface_toolbar.py b/picard/ui/options/interface_toolbar.py index 1bd841a245..082a984320 100644 --- a/picard/ui/options/interface_toolbar.py +++ b/picard/ui/options/interface_toolbar.py @@ -42,7 +42,7 @@ ) from picard.i18n import ( N_, - _, + gettext as _, ) from picard.util import icontheme diff --git a/picard/ui/options/maintenance.py b/picard/ui/options/maintenance.py index 162be31721..3986ffafb5 100644 --- a/picard/ui/options/maintenance.py +++ b/picard/ui/options/maintenance.py @@ -39,7 +39,7 @@ from picard.config_upgrade import upgrade_config from picard.i18n import ( N_, - _, + gettext as _, ) from picard.util import open_local_path diff --git a/picard/ui/options/metadata.py b/picard/ui/options/metadata.py index b63f195c4e..78090a7fa9 100644 --- a/picard/ui/options/metadata.py +++ b/picard/ui/options/metadata.py @@ -46,7 +46,7 @@ ) from picard.i18n import ( N_, - _, + gettext as _, gettext_constants, ) diff --git a/picard/ui/options/plugins.py b/picard/ui/options/plugins.py index 568dbd79ce..537599f252 100644 --- a/picard/ui/options/plugins.py +++ b/picard/ui/options/plugins.py @@ -56,7 +56,7 @@ ) from picard.i18n import ( N_, - _, + gettext as _, ) from picard.util import ( icontheme, diff --git a/picard/ui/options/profiles.py b/picard/ui/options/profiles.py index e7400fc4ce..63bc7d78f5 100644 --- a/picard/ui/options/profiles.py +++ b/picard/ui/options/profiles.py @@ -41,7 +41,7 @@ from picard.const import DEFAULT_COPY_TEXT from picard.i18n import ( N_, - _, + gettext as _, gettext_constants, ) from picard.profile import UserProfileGroups diff --git a/picard/ui/options/releases.py b/picard/ui/options/releases.py index df2149f045..4de2b24034 100644 --- a/picard/ui/options/releases.py +++ b/picard/ui/options/releases.py @@ -45,7 +45,7 @@ from picard.const.sys import IS_WIN from picard.i18n import ( N_, - _, + gettext as _, gettext_countries, pgettext_attributes, ) diff --git a/picard/ui/options/renaming.py b/picard/ui/options/renaming.py index 5058ed3208..d4688b1322 100644 --- a/picard/ui/options/renaming.py +++ b/picard/ui/options/renaming.py @@ -46,7 +46,7 @@ ) from picard.i18n import ( N_, - _, + gettext as _, ) from picard.script import ScriptParser diff --git a/picard/ui/options/renaming_compat.py b/picard/ui/options/renaming_compat.py index 87801d0064..b4c3a851e7 100644 --- a/picard/ui/options/renaming_compat.py +++ b/picard/ui/options/renaming_compat.py @@ -50,7 +50,7 @@ from picard.const.sys import IS_WIN from picard.i18n import ( N_, - _, + gettext as _, ) from picard.util import system_supports_long_paths diff --git a/picard/ui/options/scripting.py b/picard/ui/options/scripting.py index f30b8920cb..08cf393810 100644 --- a/picard/ui/options/scripting.py +++ b/picard/ui/options/scripting.py @@ -42,7 +42,7 @@ from picard.const.sys import IS_MACOS from picard.i18n import ( N_, - _, + gettext as _, ) from picard.script import ScriptParser from picard.script.serializer import ( diff --git a/picard/ui/passworddialog.py b/picard/ui/passworddialog.py index ec3eb03a75..9f019fa040 100644 --- a/picard/ui/passworddialog.py +++ b/picard/ui/passworddialog.py @@ -27,7 +27,7 @@ from picard.config import get_config -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.ui import PicardDialog from picard.ui.ui_passworddialog import Ui_PasswordDialog diff --git a/picard/ui/playertoolbar.py b/picard/ui/playertoolbar.py index c72ed477ad..d8df2af6b1 100644 --- a/picard/ui/playertoolbar.py +++ b/picard/ui/playertoolbar.py @@ -36,7 +36,7 @@ from picard.const.sys import IS_MACOS from picard.i18n import ( N_, - _, + gettext as _, ) from picard.util import ( format_time, diff --git a/picard/ui/pluginupdatedialog.py b/picard/ui/pluginupdatedialog.py index f4a7cafb91..6f871f3c1b 100644 --- a/picard/ui/pluginupdatedialog.py +++ b/picard/ui/pluginupdatedialog.py @@ -28,7 +28,7 @@ ) from picard.i18n import ( - _, + gettext as _, ngettext, ) diff --git a/picard/ui/savewarningdialog.py b/picard/ui/savewarningdialog.py index 60fa9e04d6..eb5a616bca 100644 --- a/picard/ui/savewarningdialog.py +++ b/picard/ui/savewarningdialog.py @@ -28,7 +28,7 @@ from picard.config import get_config from picard.i18n import ( - _, + gettext as _, ngettext, ) diff --git a/picard/ui/scripteditor.py b/picard/ui/scripteditor.py index 89ed1cf60e..a5834a95a7 100644 --- a/picard/ui/scripteditor.py +++ b/picard/ui/scripteditor.py @@ -51,7 +51,7 @@ from picard.file import File from picard.i18n import ( N_, - _, + gettext as _, gettext_constants, ) from picard.metadata import Metadata diff --git a/picard/ui/searchdialog/__init__.py b/picard/ui/searchdialog/__init__.py index a70916cd57..7c478c2a3f 100644 --- a/picard/ui/searchdialog/__init__.py +++ b/picard/ui/searchdialog/__init__.py @@ -32,7 +32,7 @@ ) from picard.config import get_config -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.util import ( icontheme, restore_method, diff --git a/picard/ui/searchdialog/album.py b/picard/ui/searchdialog/album.py index 06108fd146..a899c66e47 100644 --- a/picard/ui/searchdialog/album.py +++ b/picard/ui/searchdialog/album.py @@ -36,7 +36,7 @@ get_config, ) from picard.const import CAA_URL -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.mbjson import ( countries_from_node, media_formats_from_node, diff --git a/picard/ui/searchdialog/artist.py b/picard/ui/searchdialog/artist.py index b1a3f4ca0c..84e652b8ab 100644 --- a/picard/ui/searchdialog/artist.py +++ b/picard/ui/searchdialog/artist.py @@ -27,7 +27,7 @@ Option, get_config, ) -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.mbjson import artist_to_metadata from picard.metadata import Metadata diff --git a/picard/ui/searchdialog/track.py b/picard/ui/searchdialog/track.py index 602004e486..cea1d2d77c 100644 --- a/picard/ui/searchdialog/track.py +++ b/picard/ui/searchdialog/track.py @@ -29,7 +29,7 @@ get_config, ) from picard.file import FILE_COMPARISON_WEIGHTS -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.mbjson import ( countries_from_node, recording_to_metadata, diff --git a/picard/ui/tagsfromfilenames.py b/picard/ui/tagsfromfilenames.py index da727b3365..220cf05ff0 100644 --- a/picard/ui/tagsfromfilenames.py +++ b/picard/ui/tagsfromfilenames.py @@ -36,7 +36,7 @@ TextOption, get_config, ) -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.script.parser import normalize_tagname from picard.util.tags import display_tag_name diff --git a/picard/ui/ui_aboutdialog.py b/picard/ui/ui_aboutdialog.py index 0cb512062f..d770af22e2 100644 --- a/picard/ui/ui_aboutdialog.py +++ b/picard/ui/ui_aboutdialog.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_cdlookup.py b/picard/ui/ui_cdlookup.py index a97ce35b97..8ebe57e064 100644 --- a/picard/ui/ui_cdlookup.py +++ b/picard/ui/ui_cdlookup.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_edittagdialog.py b/picard/ui/ui_edittagdialog.py index 14dd606fe7..eed8722149 100644 --- a/picard/ui/ui_edittagdialog.py +++ b/picard/ui/ui_edittagdialog.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_exception_script_selector.py b/picard/ui/ui_exception_script_selector.py index 50a9d6df5a..28c278d93a 100644 --- a/picard/ui/ui_exception_script_selector.py +++ b/picard/ui/ui_exception_script_selector.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_infodialog.py b/picard/ui/ui_infodialog.py index 86b9c8c4e4..e4a462de45 100644 --- a/picard/ui/ui_infodialog.py +++ b/picard/ui/ui_infodialog.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_infostatus.py b/picard/ui/ui_infostatus.py index 70519b0a35..ab2ce22ae7 100644 --- a/picard/ui/ui_infostatus.py +++ b/picard/ui/ui_infostatus.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_multi_locale_selector.py b/picard/ui/ui_multi_locale_selector.py index f971218169..83f87a64b0 100644 --- a/picard/ui/ui_multi_locale_selector.py +++ b/picard/ui/ui_multi_locale_selector.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options.py b/picard/ui/ui_options.py index 2a4cbab8b3..d9fc95b7ea 100644 --- a/picard/ui/ui_options.py +++ b/picard/ui/ui_options.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_advanced.py b/picard/ui/ui_options_advanced.py index 695c2b94ca..b85c67e1b9 100644 --- a/picard/ui/ui_options_advanced.py +++ b/picard/ui/ui_options_advanced.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_attached_profiles.py b/picard/ui/ui_options_attached_profiles.py index fda8e0b9e6..221c1a490b 100644 --- a/picard/ui/ui_options_attached_profiles.py +++ b/picard/ui/ui_options_attached_profiles.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_cdlookup.py b/picard/ui/ui_options_cdlookup.py index da021b3545..20fd5814d1 100644 --- a/picard/ui/ui_options_cdlookup.py +++ b/picard/ui/ui_options_cdlookup.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_cdlookup_select.py b/picard/ui/ui_options_cdlookup_select.py index 4a74e34381..c2b8cb9d7e 100644 --- a/picard/ui/ui_options_cdlookup_select.py +++ b/picard/ui/ui_options_cdlookup_select.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_cover.py b/picard/ui/ui_options_cover.py index 09b2d71e9b..2e25ecd5fc 100644 --- a/picard/ui/ui_options_cover.py +++ b/picard/ui/ui_options_cover.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_fingerprinting.py b/picard/ui/ui_options_fingerprinting.py index 0525959cad..9ae0ed53f8 100644 --- a/picard/ui/ui_options_fingerprinting.py +++ b/picard/ui/ui_options_fingerprinting.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_general.py b/picard/ui/ui_options_general.py index eb4aba6d83..5eec821978 100644 --- a/picard/ui/ui_options_general.py +++ b/picard/ui/ui_options_general.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_genres.py b/picard/ui/ui_options_genres.py index a24741f5e0..8f2badda68 100644 --- a/picard/ui/ui_options_genres.py +++ b/picard/ui/ui_options_genres.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_interface.py b/picard/ui/ui_options_interface.py index 3d4a077d84..49c59014ee 100644 --- a/picard/ui/ui_options_interface.py +++ b/picard/ui/ui_options_interface.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_interface_colors.py b/picard/ui/ui_options_interface_colors.py index dd45202a0a..5ce3e9ec94 100644 --- a/picard/ui/ui_options_interface_colors.py +++ b/picard/ui/ui_options_interface_colors.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_interface_toolbar.py b/picard/ui/ui_options_interface_toolbar.py index 7259328f7f..1f818f2fc9 100644 --- a/picard/ui/ui_options_interface_toolbar.py +++ b/picard/ui/ui_options_interface_toolbar.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_interface_top_tags.py b/picard/ui/ui_options_interface_top_tags.py index 8d248f55c8..1521a6a49a 100644 --- a/picard/ui/ui_options_interface_top_tags.py +++ b/picard/ui/ui_options_interface_top_tags.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_maintenance.py b/picard/ui/ui_options_maintenance.py index 6bfab728f6..3c5f5e71d6 100644 --- a/picard/ui/ui_options_maintenance.py +++ b/picard/ui/ui_options_maintenance.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_matching.py b/picard/ui/ui_options_matching.py index 756ff7db53..1141ac6e65 100644 --- a/picard/ui/ui_options_matching.py +++ b/picard/ui/ui_options_matching.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_metadata.py b/picard/ui/ui_options_metadata.py index 442739ac7d..feba096dd0 100644 --- a/picard/ui/ui_options_metadata.py +++ b/picard/ui/ui_options_metadata.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_network.py b/picard/ui/ui_options_network.py index 7b7b2cd9aa..befd1a777e 100644 --- a/picard/ui/ui_options_network.py +++ b/picard/ui/ui_options_network.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_plugins.py b/picard/ui/ui_options_plugins.py index 0c6e0aa303..6ecf847b2f 100644 --- a/picard/ui/ui_options_plugins.py +++ b/picard/ui/ui_options_plugins.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_profiles.py b/picard/ui/ui_options_profiles.py index e6c2b26735..42f3385f6a 100644 --- a/picard/ui/ui_options_profiles.py +++ b/picard/ui/ui_options_profiles.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_ratings.py b/picard/ui/ui_options_ratings.py index 559f312c80..192d60aee5 100644 --- a/picard/ui/ui_options_ratings.py +++ b/picard/ui/ui_options_ratings.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_releases.py b/picard/ui/ui_options_releases.py index 5d3ab4bf9d..aaa3d20cb8 100644 --- a/picard/ui/ui_options_releases.py +++ b/picard/ui/ui_options_releases.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_renaming.py b/picard/ui/ui_options_renaming.py index 98d64d84c0..57094e2ee9 100644 --- a/picard/ui/ui_options_renaming.py +++ b/picard/ui/ui_options_renaming.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_renaming_compat.py b/picard/ui/ui_options_renaming_compat.py index 42f3e84134..d592b05bc4 100644 --- a/picard/ui/ui_options_renaming_compat.py +++ b/picard/ui/ui_options_renaming_compat.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_script.py b/picard/ui/ui_options_script.py index cf3fb08e76..c85525a302 100644 --- a/picard/ui/ui_options_script.py +++ b/picard/ui/ui_options_script.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_tags.py b/picard/ui/ui_options_tags.py index 56cb7e46c3..2b1cc1e44e 100644 --- a/picard/ui/ui_options_tags.py +++ b/picard/ui/ui_options_tags.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_tags_compatibility_aac.py b/picard/ui/ui_options_tags_compatibility_aac.py index ae3a6efd2a..32d2ed4270 100644 --- a/picard/ui/ui_options_tags_compatibility_aac.py +++ b/picard/ui/ui_options_tags_compatibility_aac.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_tags_compatibility_ac3.py b/picard/ui/ui_options_tags_compatibility_ac3.py index 7d8035a473..ddee75df79 100644 --- a/picard/ui/ui_options_tags_compatibility_ac3.py +++ b/picard/ui/ui_options_tags_compatibility_ac3.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_tags_compatibility_id3.py b/picard/ui/ui_options_tags_compatibility_id3.py index 2f34b20ad3..3ec9b55258 100644 --- a/picard/ui/ui_options_tags_compatibility_id3.py +++ b/picard/ui/ui_options_tags_compatibility_id3.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_options_tags_compatibility_wave.py b/picard/ui/ui_options_tags_compatibility_wave.py index ef1d8c6bd0..4b484936a0 100644 --- a/picard/ui/ui_options_tags_compatibility_wave.py +++ b/picard/ui/ui_options_tags_compatibility_wave.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_passworddialog.py b/picard/ui/ui_passworddialog.py index f9f606f97c..d3423a66ea 100644 --- a/picard/ui/ui_passworddialog.py +++ b/picard/ui/ui_passworddialog.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_provider_options_caa.py b/picard/ui/ui_provider_options_caa.py index 65b27c012b..beeeb9a604 100644 --- a/picard/ui/ui_provider_options_caa.py +++ b/picard/ui/ui_provider_options_caa.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_provider_options_local.py b/picard/ui/ui_provider_options_local.py index bd06fa9576..065252a7b4 100644 --- a/picard/ui/ui_provider_options_local.py +++ b/picard/ui/ui_provider_options_local.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_scripteditor.py b/picard/ui/ui_scripteditor.py index e18d621c37..5b2aba08d1 100644 --- a/picard/ui/ui_scripteditor.py +++ b/picard/ui/ui_scripteditor.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_scripteditor_details.py b/picard/ui/ui_scripteditor_details.py index 7fda2553b8..2540682d61 100644 --- a/picard/ui/ui_scripteditor_details.py +++ b/picard/ui/ui_scripteditor_details.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_scripting_documentation_dialog.py b/picard/ui/ui_scripting_documentation_dialog.py index 9b95932233..782300c0fc 100644 --- a/picard/ui/ui_scripting_documentation_dialog.py +++ b/picard/ui/ui_scripting_documentation_dialog.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_tagsfromfilenames.py b/picard/ui/ui_tagsfromfilenames.py index 91e21ccee5..e6ba5f1a1c 100644 --- a/picard/ui/ui_tagsfromfilenames.py +++ b/picard/ui/ui_tagsfromfilenames.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_widget_taglisteditor.py b/picard/ui/ui_widget_taglisteditor.py index 5597d79cc8..f604389eeb 100644 --- a/picard/ui/ui_widget_taglisteditor.py +++ b/picard/ui/ui_widget_taglisteditor.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/ui_win_compat_dialog.py b/picard/ui/ui_win_compat_dialog.py index 1c60925c91..6c22c53d00 100644 --- a/picard/ui/ui_win_compat_dialog.py +++ b/picard/ui/ui_win_compat_dialog.py @@ -5,7 +5,7 @@ # Automatically generated - do not edit. # Use `python setup.py build_ui` to update it. -from picard.i18n import _ +from picard.i18n import gettext as _ from PyQt6 import QtCore, QtGui, QtWidgets diff --git a/picard/ui/util.py b/picard/ui/util.py index fcc58361fd..9bd5a4d7ef 100644 --- a/picard/ui/util.py +++ b/picard/ui/util.py @@ -40,7 +40,7 @@ ) from picard.i18n import ( N_, - _, + gettext as _, ) from picard.util import find_existing_path diff --git a/picard/ui/widgets/profilelistwidget.py b/picard/ui/widgets/profilelistwidget.py index bec41bd4c8..635924896f 100644 --- a/picard/ui/widgets/profilelistwidget.py +++ b/picard/ui/widgets/profilelistwidget.py @@ -32,7 +32,7 @@ from picard.const import DEFAULT_PROFILE_NAME from picard.i18n import ( - _, + gettext as _, gettext_constants, ) from picard.util import unique_numbered_title diff --git a/picard/ui/widgets/scriptdocumentation.py b/picard/ui/widgets/scriptdocumentation.py index 2b6560366a..25be0e596d 100644 --- a/picard/ui/widgets/scriptdocumentation.py +++ b/picard/ui/widgets/scriptdocumentation.py @@ -27,7 +27,7 @@ ) from picard.const import PICARD_URLS -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.script import script_function_documentation_all from picard.ui import FONT_FAMILY_MONOSPACE diff --git a/picard/ui/widgets/scriptlistwidget.py b/picard/ui/widgets/scriptlistwidget.py index de9c07076b..adaf253182 100644 --- a/picard/ui/widgets/scriptlistwidget.py +++ b/picard/ui/widgets/scriptlistwidget.py @@ -32,7 +32,7 @@ from picard.const import DEFAULT_SCRIPT_NAME from picard.i18n import ( - _, + gettext as _, gettext_constants, ) from picard.util import unique_numbered_title diff --git a/picard/ui/widgets/scripttextedit.py b/picard/ui/widgets/scripttextedit.py index d5d4667504..ee6960de0d 100644 --- a/picard/ui/widgets/scripttextedit.py +++ b/picard/ui/widgets/scripttextedit.py @@ -48,7 +48,7 @@ get_config, ) from picard.const.sys import IS_MACOS -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.script import ( ScriptFunctionDocError, script_function_documentation, diff --git a/picard/ui/widgets/tristatesortheaderview.py b/picard/ui/widgets/tristatesortheaderview.py index 16c2005353..b65321fc51 100644 --- a/picard/ui/widgets/tristatesortheaderview.py +++ b/picard/ui/widgets/tristatesortheaderview.py @@ -25,7 +25,7 @@ QtWidgets, ) -from picard.i18n import _ +from picard.i18n import gettext as _ class TristateSortHeaderView(QtWidgets.QHeaderView): diff --git a/picard/util/__init__.py b/picard/util/__init__.py index 22290f7d02..94cc2d2abb 100644 --- a/picard/util/__init__.py +++ b/picard/util/__init__.py @@ -83,7 +83,7 @@ IS_WIN, ) from picard.i18n import ( - _, + gettext as _, gettext_constants, ) diff --git a/picard/util/bytes2human.py b/picard/util/bytes2human.py index 2e67ceb647..31a7b9f75b 100644 --- a/picard/util/bytes2human.py +++ b/picard/util/bytes2human.py @@ -34,7 +34,7 @@ from picard.i18n import ( N_, - _, + gettext as _, ) diff --git a/picard/util/checkupdate.py b/picard/util/checkupdate.py index 33408bfa53..7890cc1a61 100644 --- a/picard/util/checkupdate.py +++ b/picard/util/checkupdate.py @@ -37,7 +37,7 @@ ) from picard.i18n import ( N_, - _, + gettext as _, gettext_constants, ) from picard.util import webbrowser2 diff --git a/picard/util/tags.py b/picard/util/tags.py index 47bcbc9915..64bd8d17b0 100644 --- a/picard/util/tags.py +++ b/picard/util/tags.py @@ -33,7 +33,7 @@ from picard.i18n import ( N_, - _, + gettext as _, ) diff --git a/picard/util/time.py b/picard/util/time.py index 5a13a7a6ff..891ae25c86 100644 --- a/picard/util/time.py +++ b/picard/util/time.py @@ -23,7 +23,7 @@ from collections import namedtuple -from picard.i18n import _ +from picard.i18n import gettext as _ SECS_IN_DAY = 86400 diff --git a/picard/util/versions.py b/picard/util/versions.py index 7ea27a9657..55e568cd6d 100644 --- a/picard/util/versions.py +++ b/picard/util/versions.py @@ -37,7 +37,7 @@ from picard.disc import discid_version from picard.i18n import ( N_, - _, + gettext as _, ) from picard.util.astrcmp import astrcmp_implementation diff --git a/picard/util/webbrowser2.py b/picard/util/webbrowser2.py index fa661b497d..0b3f74aa28 100644 --- a/picard/util/webbrowser2.py +++ b/picard/util/webbrowser2.py @@ -34,7 +34,7 @@ from PyQt6 import QtWidgets from picard.const import PICARD_URLS -from picard.i18n import _ +from picard.i18n import gettext as _ def open(url): diff --git a/setup.py b/setup.py index ce66c6c025..7e7e7b37c7 100644 --- a/setup.py +++ b/setup.py @@ -385,7 +385,7 @@ def compile_ui(uifile, pyfile): rc = re.compile(r'\n# WARNING.*?(?=\n\n)', re.MULTILINE | re.DOTALL) comment = ("\n# Automatically generated - do not edit.\n" "# Use `python setup.py %s` to update it.\n\n" - "from picard.i18n import _" + "from picard.i18n import gettext as _" % _get_option_name(self)) for r in list(_translate_re): source = r.sub(r'_(\1)', source) diff --git a/test/test_i18n.py b/test/test_i18n.py index a864f588fe..2d4f03c3f8 100644 --- a/test/test_i18n.py +++ b/test/test_i18n.py @@ -32,9 +32,9 @@ from picard.i18n import ( N_, - _, _try_encodings, _try_locales, + gettext as _, gettext_constants, gettext_countries, ngettext, diff --git a/test/test_utils.py b/test/test_utils.py index f4e425fac8..019726936a 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -54,7 +54,7 @@ IS_MACOS, IS_WIN, ) -from picard.i18n import _ +from picard.i18n import gettext as _ from picard.util import ( IgnoreUpdatesContext, album_artist_from_path,