From b5dd4b89ec26783fffbf58b8b2ea4a4cf9110b70 Mon Sep 17 00:00:00 2001 From: Laurent Monin Date: Fri, 12 Apr 2024 19:20:46 +0200 Subject: [PATCH] Remove titles from profiles --- picard/profile.py | 254 +++++++++++++++++++++++----------------------- 1 file changed, 126 insertions(+), 128 deletions(-) diff --git a/picard/profile.py b/picard/profile.py index 5654f2664b4..6d6d20e7c4f 100644 --- a/picard/profile.py +++ b/picard/profile.py @@ -32,7 +32,7 @@ from picard import i18n # noqa: F401,E402 # pylint: disable=unused-import -SettingDesc = namedtuple('SettingDesc', ('name', 'title', 'fields')) +SettingDesc = namedtuple('SettingDesc', ('name', 'fields')) class UserProfileGroups(): @@ -45,15 +45,15 @@ class UserProfileGroups(): SETTINGS_GROUPS['general'] = { 'title': N_("General"), 'settings': [ - SettingDesc('server_host', N_("Server address"), ['server_host']), - SettingDesc('server_port', N_("Port"), ['server_port']), - SettingDesc('analyze_new_files', N_("Automatically scan all new files"), ['analyze_new_files']), - SettingDesc('cluster_new_files', N_("Automatically cluster all new files"), ['cluster_new_files']), - SettingDesc('ignore_file_mbids', N_("Ignore MBIDs when loading new files"), ['ignore_file_mbids']), - SettingDesc('check_for_plugin_updates', N_("Check for plugin updates during startup"), ['check_for_plugin_updates']), - SettingDesc('check_for_updates', N_("Check for program updates during startup"), ['check_for_updates']), - SettingDesc('update_check_days', N_("Days between update checks"), ['update_check_days']), - SettingDesc('update_level', N_("Updates to check"), ['update_level']), + SettingDesc('server_host', ['server_host']), + SettingDesc('server_port', ['server_port']), + SettingDesc('analyze_new_files', ['analyze_new_files']), + SettingDesc('cluster_new_files', ['cluster_new_files']), + SettingDesc('ignore_file_mbids', ['ignore_file_mbids']), + SettingDesc('check_for_plugin_updates', ['check_for_plugin_updates']), + SettingDesc('check_for_updates', ['check_for_updates']), + SettingDesc('update_check_days', ['update_check_days']), + SettingDesc('update_level', ['update_level']), ], } @@ -61,42 +61,42 @@ class UserProfileGroups(): 'title': N_("Metadata"), 'settings': [ # Main Metadata Page - SettingDesc('translate_artist_names', N_("Translate artist names"), ['translate_artist_names']), - SettingDesc('artist_locales', N_("Translation locales"), ['selected_locales']), - SettingDesc('translate_artist_names_script_exception', N_("Translate artist names exception"), ['translate_artist_names_script_exception']), - SettingDesc('script_exceptions', N_("Translation script exceptions"), ['selected_scripts']), - SettingDesc('standardize_artists', N_("Use standardized artist names"), ['standardize_artists']), - SettingDesc('standardize_instruments', N_("Use standardized instrument and vocal credits"), ['standardize_instruments']), - SettingDesc('convert_punctuation', N_("Convert Unicode punctuation characters to ASCII"), ['convert_punctuation']), - SettingDesc('release_ars', N_("Use release relationships"), ['release_ars']), - SettingDesc('track_ars', N_("Use track and release relationships"), ['track_ars']), - SettingDesc('guess_tracknumber_and_title', N_("Guess track number and title from filename if empty"), ['guess_tracknumber_and_title']), - SettingDesc('va_name', N_("Various Artists name"), ['va_name']), - SettingDesc('nat_name', N_("Standalone recordings name"), ['nat_name']), + SettingDesc('translate_artist_names', ['translate_artist_names']), + SettingDesc('artist_locales', ['selected_locales']), + SettingDesc('translate_artist_names_script_exception', ['translate_artist_names_script_exception']), + SettingDesc('script_exceptions', ['selected_scripts']), + SettingDesc('standardize_artists', ['standardize_artists']), + SettingDesc('standardize_instruments', ['standardize_instruments']), + SettingDesc('convert_punctuation', ['convert_punctuation']), + SettingDesc('release_ars', ['release_ars']), + SettingDesc('track_ars', ['track_ars']), + SettingDesc('guess_tracknumber_and_title', ['guess_tracknumber_and_title']), + SettingDesc('va_name', ['va_name']), + SettingDesc('nat_name', ['nat_name']), # Preferred Releases Page - SettingDesc('release_type_scores', N_("Preferred release types"), ['type_group']), - SettingDesc('preferred_release_countries', N_("Preferred release countries"), ['country_group']), - SettingDesc('preferred_release_formats', N_("Preferred medium formats"), ['format_group']), + SettingDesc('release_type_scores', ['type_group']), + SettingDesc('preferred_release_countries', ['country_group']), + SettingDesc('preferred_release_formats', ['format_group']), # Genres Page - SettingDesc('use_genres', N_("Use genres from MusicBrainz"), []), # No highlight specified because the 'use_genres' - # object is a QGroupBox and it highlights all sub - # options, even if the sub options are not selected. - SettingDesc('only_my_genres', N_("Use only my genres"), ['only_my_genres']), - SettingDesc('artists_genres', N_("Use album artist genres"), ['artists_genres']), - SettingDesc('folksonomy_tags', N_("Use folksonomy tags as genre"), ['folksonomy_tags']), - SettingDesc('min_genre_usage', N_("Minimal genre usage"), ['min_genre_usage']), - SettingDesc('max_genres', N_("Maximum number of genres"), ['max_genres']), - SettingDesc('join_genres', N_("Join multiple genres with"), ['join_genres']), - SettingDesc('genres_filter', N_("Genres to include or exclude"), ['genres_filter']), + SettingDesc('use_genres', []), # No highlight specified because the 'use_genres' + # object is a QGroupBox and it highlights all sub + # options, even if the sub options are not selected. + SettingDesc('only_my_genres', ['only_my_genres']), + SettingDesc('artists_genres', ['artists_genres']), + SettingDesc('folksonomy_tags', ['folksonomy_tags']), + SettingDesc('min_genre_usage', ['min_genre_usage']), + SettingDesc('max_genres', ['max_genres']), + SettingDesc('join_genres', ['join_genres']), + SettingDesc('genres_filter', ['genres_filter']), # Ratings Page - SettingDesc('enable_ratings', N_("Enable track ratings"), []), # No highlight specified because the 'enable_ratings' - # object is a QGroupBox and it highlights all sub options, - # even if the sub options are not selected. - SettingDesc('rating_user_email', N_("Email to use when saving ratings"), ['rating_user_email']), - SettingDesc('submit_ratings', N_("Submit ratings to MusicBrainz"), ['submit_ratings']), + SettingDesc('enable_ratings', []), # No highlight specified because the 'enable_ratings' + # object is a QGroupBox and it highlights all sub options, + # even if the sub options are not selected. + SettingDesc('rating_user_email', ['rating_user_email']), + SettingDesc('submit_ratings', ['submit_ratings']), ], } @@ -104,48 +104,48 @@ class UserProfileGroups(): 'title': N_("Tags"), 'settings': [ # Main Tags Page - SettingDesc('dont_write_tags', N_("Don't write tags"), ['write_tags']), - SettingDesc('preserve_timestamps', N_("Preserve timestamps of tagged files"), ['preserve_timestamps']), - SettingDesc('clear_existing_tags', N_("Clear existing tags"), ['clear_existing_tags']), - SettingDesc('preserve_images', N_("Keep embedded images when clearing tags"), ['preserve_images']), - SettingDesc('remove_id3_from_flac', N_("Remove ID3 tags from FLAC files"), ['remove_id3_from_flac']), - SettingDesc('remove_ape_from_mp3', N_("Remove APEv2 tags from MP3 files"), ['remove_ape_from_mp3']), - SettingDesc('fix_missing_seekpoints_flac', N_("Fix missing seekpoints for FLAC files"), ['fix_missing_seekpoints_flac']), - SettingDesc('preserved_tags', N_("Preserved tags list"), ['preserved_tags']), + SettingDesc('dont_write_tags', ['write_tags']), + SettingDesc('preserve_timestamps', ['preserve_timestamps']), + SettingDesc('clear_existing_tags', ['clear_existing_tags']), + SettingDesc('preserve_images', ['preserve_images']), + SettingDesc('remove_id3_from_flac', ['remove_id3_from_flac']), + SettingDesc('remove_ape_from_mp3', ['remove_ape_from_mp3']), + SettingDesc('fix_missing_seekpoints_flac', ['fix_missing_seekpoints_flac']), + SettingDesc('preserved_tags', ['preserved_tags']), # ID3 Tags Page - SettingDesc('write_id3v23', N_("ID3v2 version to write"), ['write_id3v23', 'write_id3v24']), - SettingDesc('id3v2_encoding', N_("ID3v2 text encoding"), ['enc_utf8', 'enc_utf16', 'enc_iso88591']), - SettingDesc('id3v23_join_with', N_("ID3v2.3 join character"), ['id3v23_join_with']), - SettingDesc('itunes_compatible_grouping', N_("Save iTunes compatible grouping and work"), ['itunes_compatible_grouping']), - SettingDesc('write_id3v1', N_("Write ID3v1 tags"), ['write_id3v1']), + SettingDesc('write_id3v23', ['write_id3v23', 'write_id3v24']), + SettingDesc('id3v2_encoding', ['enc_utf8', 'enc_utf16', 'enc_iso88591']), + SettingDesc('id3v23_join_with', ['id3v23_join_with']), + SettingDesc('itunes_compatible_grouping', ['itunes_compatible_grouping']), + SettingDesc('write_id3v1', ['write_id3v1']), # AAC Tags Page - SettingDesc('aac_save_ape', N_("Save APEv2 tags to AAC"), ['aac_save_ape', 'aac_no_tags']), - SettingDesc('remove_ape_from_aac', N_("Remove APEv2 tags from AAC files"), ['remove_ape_from_aac']), + SettingDesc('aac_save_ape', ['aac_save_ape', 'aac_no_tags']), + SettingDesc('remove_ape_from_aac', ['remove_ape_from_aac']), # AC3 Tags Page - SettingDesc('ac3_save_ape', N_("Save APEv2 tags to AC3"), ['ac3_save_ape', 'ac3_no_tags']), - SettingDesc('remove_ape_from_ac3', N_("Remove APEv2 tags from AC3 files"), ['remove_ape_from_ac3']), + SettingDesc('ac3_save_ape', ['ac3_save_ape', 'ac3_no_tags']), + SettingDesc('remove_ape_from_ac3', ['remove_ape_from_ac3']), # WAVE Tags Page - SettingDesc('write_wave_riff_info', N_("Write RIFF INFO tags to WAVE files"), ['write_wave_riff_info']), - SettingDesc('remove_wave_riff_info', N_("Remove existing RIFF INFO tags from WAVE files"), ['remove_wave_riff_info']), - SettingDesc('wave_riff_info_encoding', N_("RIFF INFO text encoding"), ['wave_riff_info_enc_cp1252', 'wave_riff_info_enc_utf8']), + SettingDesc('write_wave_riff_info', ['write_wave_riff_info']), + SettingDesc('remove_wave_riff_info', ['remove_wave_riff_info']), + SettingDesc('wave_riff_info_encoding', ['wave_riff_info_enc_cp1252', 'wave_riff_info_enc_utf8']), ], } SETTINGS_GROUPS['cover'] = { 'title': N_("Cover Art"), 'settings': [ - SettingDesc('save_images_to_tags', N_("Embed cover images into tags"), ['save_images_to_tags']), - SettingDesc('embed_only_one_front_image', N_("Embed only a single front image"), ['cb_embed_front_only']), - SettingDesc('save_images_to_files', N_("Save cover images as separate files"), ['save_images_to_files']), - SettingDesc('cover_image_filename', N_("File name for images"), ['cover_image_filename']), - SettingDesc('save_images_overwrite', N_("Overwrite existing image files"), ['save_images_overwrite']), - SettingDesc('save_only_one_front_image', N_("Save only a single front image as separate file"), ['save_only_one_front_image']), - SettingDesc('image_type_as_filename', N_("Always use the primary image type as the file name for non-front images"), ['image_type_as_filename']), - SettingDesc('ca_providers', N_("Cover art providers"), ['ca_providers_list']), + SettingDesc('save_images_to_tags', ['save_images_to_tags']), + SettingDesc('embed_only_one_front_image', ['cb_embed_front_only']), + SettingDesc('save_images_to_files', ['save_images_to_files']), + SettingDesc('cover_image_filename', ['cover_image_filename']), + SettingDesc('save_images_overwrite', ['save_images_overwrite']), + SettingDesc('save_only_one_front_image', ['save_only_one_front_image']), + SettingDesc('image_type_as_filename', ['image_type_as_filename']), + SettingDesc('ca_providers', ['ca_providers_list']), ], } @@ -153,29 +153,29 @@ class UserProfileGroups(): 'title': N_("File Naming"), 'settings': [ # Main File Naming Page - SettingDesc('move_files', N_("Move files"), ['move_files']), - SettingDesc('move_files_to', N_("Destination directory"), ['move_files_to']), - SettingDesc('move_additional_files', N_("Move additional files"), ['move_additional_files']), - SettingDesc('move_additional_files_pattern', N_("Additional file patterns"), ['move_additional_files_pattern']), - SettingDesc('delete_empty_dirs', N_("Delete empty directories"), ['delete_empty_dirs']), - SettingDesc('rename_files', N_("Rename files"), ['rename_files']), - SettingDesc('selected_file_naming_script_id', N_("Selected file naming script"), ['naming_script_selector']), + SettingDesc('move_files', ['move_files']), + SettingDesc('move_files_to', ['move_files_to']), + SettingDesc('move_additional_files', ['move_additional_files']), + SettingDesc('move_additional_files_pattern', ['move_additional_files_pattern']), + SettingDesc('delete_empty_dirs', ['delete_empty_dirs']), + SettingDesc('rename_files', ['rename_files']), + SettingDesc('selected_file_naming_script_id', ['naming_script_selector']), # File Naming Compatibility Page - SettingDesc('ascii_filenames', N_("Replace non-ASCII characters"), ['ascii_filenames']), - SettingDesc('windows_compatibility', N_("Windows compatibility"), ['windows_compatibility']), - SettingDesc('win_compat_replacements', N_("Replacement characters used for Windows compatibility"), ['win_compat_replacements']), - SettingDesc('windows_long_paths', N_("Windows long path support"), ['windows_long_paths']), - SettingDesc('replace_spaces_with_underscores', N_("Replace spaces with underscores"), ['replace_spaces_with_underscores']), - SettingDesc('replace_dir_separator', N_("Replacement character to use for directory separators"), ['replace_dir_separator']), + SettingDesc('ascii_filenames', ['ascii_filenames']), + SettingDesc('windows_compatibility', ['windows_compatibility']), + SettingDesc('win_compat_replacements', ['win_compat_replacements']), + SettingDesc('windows_long_paths', ['windows_long_paths']), + SettingDesc('replace_spaces_with_underscores', ['replace_spaces_with_underscores']), + SettingDesc('replace_dir_separator', ['replace_dir_separator']), ], } SETTINGS_GROUPS['scripting'] = { 'title': N_("Scripting"), 'settings': [ - SettingDesc('enable_tagger_scripts', N_("Enable tagger scripts"), ['enable_tagger_scripts']), - SettingDesc('list_of_scripts', N_("Tagger scripts"), ['script_list']), + SettingDesc('enable_tagger_scripts', ['enable_tagger_scripts']), + SettingDesc('list_of_scripts', ['script_list']), ], } @@ -183,29 +183,29 @@ class UserProfileGroups(): 'title': N_("User Interface"), 'settings': [ # Main User Interface Page - SettingDesc('toolbar_show_labels', N_("Show text labels under icons"), ['toolbar_show_labels']), - SettingDesc('show_menu_icons', N_("Show icons in menus"), ['show_menu_icons']), - SettingDesc('ui_language', N_("User interface language"), ['ui_language', 'label']), - SettingDesc('ui_theme', N_("User interface color theme"), ['ui_theme', 'label_theme']), - SettingDesc('allow_multi_dirs_selection', N_("Allow selection of multiple directories"), ['allow_multi_dirs_selection']), - SettingDesc('builtin_search', N_("Use builtin search rather than looking in browser"), ['builtin_search']), - SettingDesc('use_adv_search_syntax', N_("Use advanced search syntax"), ['use_adv_search_syntax']), - SettingDesc('show_new_user_dialog', N_("Show a usage warning dialog when Picard starts"), ['new_user_dialog']), - SettingDesc('quit_confirmation', N_("Show a quit confirmation dialog for unsaved changes"), ['quit_confirmation']), - SettingDesc('file_save_warning', N_("Show a confirmation dialog when saving files"), ['file_save_warning']), - SettingDesc('filebrowser_horizontal_autoscroll', N_("Adjust horizontal position in file browser automatically"), ['filebrowser_horizontal_autoscroll']), - SettingDesc('starting_directory', N_("Begin browsing in a specific directory"), ['starting_directory']), - SettingDesc('starting_directory_path', N_("Directory to begin browsing"), ['starting_directory_path']), + SettingDesc('toolbar_show_labels', ['toolbar_show_labels']), + SettingDesc('show_menu_icons', ['show_menu_icons']), + SettingDesc('ui_language', ['ui_language', 'label']), + SettingDesc('ui_theme', ['ui_theme', 'label_theme']), + SettingDesc('allow_multi_dirs_selection', ['allow_multi_dirs_selection']), + SettingDesc('builtin_search', ['builtin_search']), + SettingDesc('use_adv_search_syntax', ['use_adv_search_syntax']), + SettingDesc('show_new_user_dialog', ['new_user_dialog']), + SettingDesc('quit_confirmation', ['quit_confirmation']), + SettingDesc('file_save_warning', ['file_save_warning']), + SettingDesc('filebrowser_horizontal_autoscroll', ['filebrowser_horizontal_autoscroll']), + SettingDesc('starting_directory', ['starting_directory']), + SettingDesc('starting_directory_path', ['starting_directory_path']), # User Interface Colors Page - SettingDesc('interface_colors', N_("Colors to use for light theme"), ['colors']), - SettingDesc('interface_colors_dark', N_("Colors to use for dark theme"), ['colors']), + SettingDesc('interface_colors', ['colors']), + SettingDesc('interface_colors_dark', ['colors']), # User Interface Top Tags Page - SettingDesc('metadatabox_top_tags', N_("Tags to show at the top"), ['top_tags_groupBox']), + SettingDesc('metadatabox_top_tags', ['top_tags_groupBox']), # User Interface Action Toolbar Page - SettingDesc('toolbar_layout', N_("Layout of the tool bar"), ['toolbar_layout_list']), + SettingDesc('toolbar_layout', ['toolbar_layout_list']), ], } @@ -213,46 +213,44 @@ class UserProfileGroups(): 'title': N_("Advanced"), 'settings': [ # Main Advanced Options Page - SettingDesc('ignore_regex', N_("Ignore file paths matching a regular expression"), ['ignore_regex']), - SettingDesc('ignore_hidden_files', N_("Ignore hidden files"), ['ignore_hidden_files']), - SettingDesc('recursively_add_files', N_("Include sub-folders when adding files from folder"), ['recursively_add_files']), + SettingDesc('ignore_regex', ['ignore_regex']), + SettingDesc('ignore_hidden_files', ['ignore_hidden_files']), + SettingDesc('recursively_add_files', ['recursively_add_files']), SettingDesc( 'ignore_track_duration_difference_under', - N_("Ignore track duration difference under x seconds"), ['ignore_track_duration_difference_under', 'label_track_duration_diff'] ), SettingDesc( 'query_limit', - N_("Maximum number of entities to return per MusicBrainz query"), ['query_limit', 'label_query_limit'] ), - SettingDesc('completeness_ignore_videos', N_("Completeness check ignore: Video tracks"), ['completeness_ignore_videos']), - SettingDesc('completeness_ignore_pregap', N_("Completeness check ignore: Pregap tracks"), ['completeness_ignore_pregap']), - SettingDesc('completeness_ignore_data', N_("Completeness check ignore: Data tracks"), ['completeness_ignore_data']), - SettingDesc('completeness_ignore_silence', N_("Completeness check ignore: Silent tracks"), ['completeness_ignore_silence']), - SettingDesc('compare_ignore_tags', N_("Tags to ignore for comparison"), ['groupBox_2']), + SettingDesc('completeness_ignore_videos', ['completeness_ignore_videos']), + SettingDesc('completeness_ignore_pregap', ['completeness_ignore_pregap']), + SettingDesc('completeness_ignore_data', ['completeness_ignore_data']), + SettingDesc('completeness_ignore_silence', ['completeness_ignore_silence']), + SettingDesc('compare_ignore_tags', ['groupBox_2']), # Network Options Page - SettingDesc('use_proxy', N_("Use a web proxy server"), []), # No highlight specified because the 'use_proxy' - # object is a QGroupBox and it highlights all sub - # options, even if the sub options are not selected. - SettingDesc('proxy_type', N_("type of proxy server"), ['proxy_type_socks', 'proxy_type_http']), - SettingDesc('proxy_server_host', N_("Proxy server address"), ['server_host']), - SettingDesc('proxy_server_port', N_("Proxy server port"), ['server_port']), - SettingDesc('proxy_username', N_("Proxy username"), ['username']), - SettingDesc('proxy_password', N_("Proxy password"), ['password']), - SettingDesc('network_transfer_timeout_seconds', N_("Request timeout in seconds"), ['transfer_timeout']), - SettingDesc('network_cache_size_bytes', N_("Network cache size in bytes"), ['network_cache_size']), - SettingDesc('browser_integration', N_("Browser integration"), []), # No highlight specified because the 'browser_integration' - # object is a QGroupBox and it highlights all sub options, - # even if the sub options are not selected. - SettingDesc('browser_integration_port', N_("Default listening port"), ['browser_integration_port']), - SettingDesc('browser_integration_localhost_only', N_("Listen only on localhost"), ['browser_integration_localhost_only']), + SettingDesc('use_proxy', []), # No highlight specified because the 'use_proxy' + # object is a QGroupBox and it highlights all sub + # options, even if the sub options are not selected. + SettingDesc('proxy_type', ['proxy_type_socks', 'proxy_type_http']), + SettingDesc('proxy_server_host', ['server_host']), + SettingDesc('proxy_server_port', ['server_port']), + SettingDesc('proxy_username', ['username']), + SettingDesc('proxy_password', ['password']), + SettingDesc('network_transfer_timeout_seconds', ['transfer_timeout']), + SettingDesc('network_cache_size_bytes', ['network_cache_size']), + SettingDesc('browser_integration', []), # No highlight specified because the 'browser_integration' + # object is a QGroupBox and it highlights all sub options, + # even if the sub options are not selected. + SettingDesc('browser_integration_port', ['browser_integration_port']), + SettingDesc('browser_integration_localhost_only', ['browser_integration_localhost_only']), # Matching Options Page - SettingDesc('file_lookup_threshold', N_("Minimal similarity for file lookups"), ['file_lookup_threshold']), - SettingDesc('cluster_lookup_threshold', N_("Minimal similarity for cluster lookups"), ['cluster_lookup_threshold']), - SettingDesc('track_matching_threshold', N_("Minimal similarity for matching files to tracks"), ['track_matching_threshold']), + SettingDesc('file_lookup_threshold', ['file_lookup_threshold']), + SettingDesc('cluster_lookup_threshold', ['cluster_lookup_threshold']), + SettingDesc('track_matching_threshold', ['track_matching_threshold']), ], }