Provide uniform translation for both GObject / Glade strings (initialized by module locale) and Python gettext strings to prevent a mix of languages in UI strings. If a locale is provided with sonata but not generated for the C library, Python strings will be translated, but strings in Glade dialogs will not be translated. So if the initial locale.setlocale call fails, don't point Python gettext to the .mo files -- this way all strings will be left untranslated.
Merge branch 'kurisuke/fix-progress-bar2'
Check for whitespace only strings before split() to avoid IndexError. Also add test cases for these values. This fixes update of the playback progress bar for songs with empty track / disc values.
locale.bindtextdomain() is an interface to the eponymous libc function, which is GNU gettext specific and may not be provided on some systems (e.g. OSX). See: https://docs.python.org/3/library/locale.html#access-to-message-catalogs
Berlios completely shutdown its services in March 2014 without much notice. The mailing lists hosted there are lost, as well as the website. The new website is now at http://www.nongnu.org/sonata/ The new mailing list is at http://lists.nongnu.org/mailman/listinfo/sonata-users
It doesn't work on OSX (per #67) and even so, the documentation says it should not be used unless in specific cases, which we are not considering in Sonata. For more information, see https://docs.python.org/3/library/locale.html#access-to-message-catalogs
At the moment, there's no need for all of this, so I prefer to keep things simple.
* use a defaultdict instead of manually checking for existing values * use automatically processed "track" attribute, instead of manually converting a track value into an integer * removed unused "sortalbumbytrack" parameter * removed not so usefull temporary variables and function calls
…ong ids to move the songs, instead of ranges.