WIP: PICARD-3113: Expand translation to album and track names #2744
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP: needs testing
Summary
Problem
Currently, Picard only supports translating artist names to user-preferred locales. Users who want localized album and track titles must manually edit metadata or rely on external tools. This limits the usefulness of MusicBrainz's alias data for non-artist entities.
Solution
Core Changes:
mbjson.py
into small, testable helper functions_find_localized_alias_name()
to select aliases for non-artist entities (albums, tracks)release_to_metadata()
to apply album title translation from release aliasesrecording_to_metadata()
to apply track title translation from recording aliasesConfiguration:
translate_album_names
andtranslate_track_titles
boolean settingsUI Updates:
Testing:
test_mbjson_translations.py
covering helper functions and translation behaviorconftest.py
to provide defaulting config fixture for all tests, preventing KeyError with new settingsAction
Additional actions required:
Documentation should be updated to describe the new album and track title translation options and how they interact with locale preferences and script exceptions.