After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 581987 - Incorrect Smart Playlist templates in localized Banshee
Incorrect Smart Playlist templates in localized Banshee
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: Smart Playlists
git master
Other All
: Normal critical
: 1.5.0
Assigned To: Gabriel Burt
Gabriel Burt
: 552009 584663 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-05-09 13:38 UTC by Matthias Puech
Modified: 2009-06-04 14:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of the "recently added" smart playlist in french (44.81 KB, image/png)
2009-05-09 15:08 UTC, Bertrand Lorentz
  Details
Fixed time span queries (3.19 KB, patch)
2009-05-10 02:00 UTC, Alexander Kojevnikov
needs-work Details | Review
Fixed user searches (7.42 KB, patch)
2009-05-11 00:19 UTC, Alexander Kojevnikov
committed Details | Review

Description Matthias Puech 2009-05-09 13:38:19 UTC
Please describe the problem:
When I run Banshee in French, Some predefined smart playlists have incorrect search criteria. For example Recently added has criterion "Album contains 'added<1 week ago'", instead of "Date added less than 1 week ago".
I'm running the official Ubuntu Jaunty packet

Steps to reproduce:
1. Set your locale to French
2. Launch Banshee without a database (I guess)
3. Select 'Properties' for the playlist "Récemment Ajoutés"

Actual results:
The search criterion is all messed up, so the playlist remains empty even if you add new tracks

Expected results:
The criterion should be set up right, so that the playlist would be useful

Does this happen every time?
Yes

Other information:
Comment 1 Bertrand Lorentz 2009-05-09 15:05:09 UTC
This is also happening on git master.
Comment 2 Bertrand Lorentz 2009-05-09 15:08:24 UTC
Created attachment 134309 [details]
Screenshot of the "recently added" smart playlist in french

Here's what I get with fr_FR locale, after selecting the "Recently added" predefined playlist and clicking on the "Open in editor" button.
Comment 3 Alexander Kojevnikov 2009-05-10 02:00:08 UTC
Created attachment 134344 [details] [review]
Fixed time span queries

It looks like (Relative)?TimeSpanQueryValue.FactorString() methods should not localise the strings they return.

This patch fixes the problem, I tested it in fr_FR, nl_NL and en_AU locales.
Comment 4 Alexander Kojevnikov 2009-05-10 02:09:40 UTC
Changing severity to Critical because the bug crashes Banshee in nl_NL locale. Steps to reproduce:

1. Delete the database
2. Switch to nl_NL
3. Start Banshee
4. Right click "Recentelijk toegevoegd" (recently added) and select "Slimme speellijst bewerken" (edit smart playlist)

The patch above fixes the crash.
Comment 5 Alexander Kojevnikov 2009-05-10 02:18:41 UTC
*** Bug 552009 has been marked as a duplicate of this bug. ***
Comment 6 Bertrand Lorentz 2009-05-10 10:33:21 UTC
Alex, the patch fixes the problem, but it breaks searches :
For example, in fr_FR, typing temps<"1 heure" in the search box doesn't work anymore. Typing temps<"1 hour" still works.

Looks like the FactorString method is also used to parse user queries, which can be in the current language.
Comment 7 Alexander Kojevnikov 2009-05-10 11:09:33 UTC
Good catch Bertrand, I will fix this tomorrow...
Comment 8 Alexander Kojevnikov 2009-05-11 00:19:39 UTC
Created attachment 134370 [details] [review]
Fixed user searches

This patch changes TimeSpanQueryValue.ParseUserQuery() to use both localised and invariant English terms.
Comment 9 Bertrand Lorentz 2009-05-11 20:26:42 UTC
With this patch, the original issue is fixed, and searches work.

Thanks Alex, please commit to master.
Comment 10 Alexander Kojevnikov 2009-05-11 22:49:00 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 11 Alexander Kojevnikov 2009-06-04 14:06:44 UTC
*** Bug 584663 has been marked as a duplicate of this bug. ***