... based on actual knowledge of how characters are used in practice.
low quotation mark -> normal quotation mark rather than comma
oi should be gha -> gh rather than oi
ideographic punctuation, multiplication / division and middle dot are not punctuation
... whose local knowledge of how characters are actually used identified
more appropriate characters to map to.
soft hyphen -> nothing (since it is invisible)
multiplication -> x rather than * (visually closer)
remove duplicate oe
for punctuation, normalization (merging similar looking characters into
the most common one), accents, and full conversion to ascii.
Functions and tests moved into separate files.
Although more comprehensive, the code should run faster because it
eliminates several loops (inc. a loop with two unicodedata references).
This is intended to form the basis of future PRs to:
a. Clean up (simplify) the file naming code
b. Provide script function(s) for cleaning individual tags / file name
parts
c. Add support for translation / transliteration plugins (which I think
make more sense than being included in Picard itself).
d. Support for converting Tags to ISO-8859-1 rather than ascii (since
that is what is supported by ID3 at least)
e. Possible additional options for allowing / preventing normalization,
possible reorganisation of options to centralise all encoding settings
onto one page rather than metadata, tags and file naming pages at
present (to be discussed).
"%s cover art" (ie. "front cover art") is working in english, but not as well in other
languages, especially when type isn't even translated (for now).
Replaced with "cover art of type '%s'", which is slightly better when it comes to i18n.
This fix is twofold:
1. Fixes the bug where the clustering does not select an artist name when there are some artist names appearing only once and those are at the end of the tracklist.
2. Use album artist tag, if present in the files.
Having this patch clusters will only have "Various Artists" set when there is either no artist set or all tracks are by different artists.
We had a space-separated list of name,value tuples ("Album 0.5 Other 0.4"),
and two helper functions to load and save data in the correct format
(`load_release_type_scores` and `save_release_type_scores`).
Since option is converted to recently-introduced ListOption, data is now saved
as a list of tuples, eventually converted to dict when needed.
It simplifies code, and also prevents an issue if it comes we have a release group type
with a space in its name.
An upgrade hook was added to handle this change on Picard upgrade.
Since contexts are used in attributes.pot, and python gettext do not yet
support contexts, a minor hack is used to make it work, this workaround
is used in django and babel, see ugettext_ctxt().
It retrieves and parses attributes.pot and countries.pot files
from transifex to extract various constants needed in Picard.
It helps to keep those in sync with MusicBrainz website.
It then generates:
- picard/attributes.py containing cover art types, medium formats, and release group types
- picard/countries.py containing countries
`update_constants` command replaces `update_countries`
Recordings don't support sub-second time precision, so the
track.metadata.length used for the two Add...AsRelease classes will
cause an error on /recording/create's "length" field.
track.metadata["~length"] contains the time converted to mm:ss format
and will not cause the error on /recording/create, so this commit
changes AddFileAsRecording to use that.