cannot sort playlist after changing language
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Exaile |
Fix Released
|
High
|
Johannes Sasongko | ||
exaile (Debian) |
Fix Released
|
Unknown
|
Bug Description
This is a bug report from a Debian user:
> After changing my LANG from en_GB.UTF-8 to es_AR.UTF-8, I cannot
> sort my playlist by title or artist. It seems, that the
> translated string (e.g. "titulo" for title and "artista" for
> artist) are used as internal Python dictionary key. I can still
> sort by album - it's the same word in English and Spanish. One
> should probably always use the original English string in the
> internals and only use translated strings for display, right?
>
> Traceback (most recent call last):
> File "/usr/share/
> self.reorder_
> File "/usr/share/
> attr, reverse = self.get_sort_by()
> File "/usr/share/
> return (self.col_
> KeyError: 'Artista'
I can confirm that I get the same kind of error when I localize exaile in french (for example). I can only agree with the bug reporter's diagnosis, which seems to be correct. As for fixing the bug, I don't know what would be the best solution:
1- a redesign of the code so that columns titles are shown localized, but are internally kept as uninternationalized strings (which can be used as keys in the sorting requests). This is probably the best way to solve the problem, but it involves much work.
2- a quick fix could probably be implemented by aliasing the different field names in the SQL requests by their localized versions. This is probably more dirty, but would be much easier to implement.
What do you think?
Related branches
Changed in exaile: | |
status: | Unknown → New |
Changed in exaile: | |
status: | New → Confirmed |
Changed in exaile: | |
status: | Fix Committed → Fix Released |
Changed in exaile (Debian): | |
status: | Confirmed → Fix Released |
I'm working on this, but it won't be in 0.2.11 due to the high risk of (1) me running out of time, or (2) the fix being buggy.
It will also break existing settings unless we have a settings upgrade mechanism, just like we have with the db.