Fails to scan Music folder for non-English locales

Bug #1198909 reported by David Planella
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Music App
Fix Released
Wishlist
Unassigned

Bug Description

Looking at the MisicTracks.qml file, I understand the folder to scan for music is set as follows:

                Settings.setSetting("currentfolder", folderModel.homePath() + "/Music")

While this might work on the phone, it will fail on the desktop for anyone not using Ubuntu in English. The Music folder is part of the XDG translatable folders spec, so it will have a different name for each different locale.

As an example, I use Ubuntu in Catalan, so my music folder is called /home/dpm/Música, which is what the system created for me upon language selection during installation, and I haven't got a /home/dpm/Music folder.

I suspect on the phone, the path names of the user's folders will not be localized (as they're not visible on the phone), so I'll set the bug as wishlist for now.

We'll probably have to tackle this issue on the desktop when the app is convergent, but for now, we're tightly focused on phone.

David Planella (dpm)
description: updated
Changed in music-app:
status: New → Confirmed
Revision history for this message
David Planella (dpm) wrote :

Marking it as low for now, as the current focus is to get the app running on the phone, but we'll need to address this bug as part of the convergency story when running on the desktop (and when locales are properly supported on the phone)

Changed in music-app:
importance: Undecided → Low
David Planella (dpm)
tags: added: media-scanner
Revision history for this message
Jonathan D'Orleans (jonathan.dorleans) wrote :

Hey guys, I'd like to help by solving some bugs... I started by trying to solve this one.

So I found at music-app.qml (line 112):
    Settings.setSetting("currentfolder", folderModel.homePath() + "/Music")

Then I changed it for this:
    Settings.setSetting("currentfolder", folderModel.path)

and at FolderListModel.path (line 493):
    path: homePath() + "/" + i18n.tr("Music")

Everything still working for English (en), however it does not for another languages.
I've tried to use qsTr("Music") instead, but the problem persist.

It seems i18n is not working or activated yet.

Revision history for this message
David Planella (dpm) wrote :

Thanks a lot Jonathan!

I'd suggest you to start with another bug, which might be easier to resolve. The translation of the Music's folder path's name is not done through the regular i18n mechanisms, but through a specification called XDG. I suspect on the phone, the path names of the user's folders will not be localized (as they're not visible on the phone), so I'll set the bug as wishlist for now.

We'll probably have to tackle this issue on the desktop when the app is convergent, but for now, we're tightly focused on phone.

Changed in music-app:
status: Confirmed → Triaged
importance: Low → Wishlist
description: updated
Revision history for this message
Daniel Holm (danielholm) wrote :

Closing since we now depend on mediascanner and I have a lot of non-english chars in my music, which work now.

Changed in music-app:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.