viewMethod (Icons/List) is handled as translated string, which makes all files invisible between language changes

Bug #1462700 reported by Alexey Dokuchaev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu File Manager App
New
Undecided
Unassigned

Bug Description

viewMethod property of filemanager.qml is stored as either i18n.tr("Icons") or i18n.tr("List") instead of e.g. 0 or 1, which is very fragile logic; saved settings should never depend on user's locale. As a result, changing system language will render all your files and directories invisible, because, in FolderListPage.qml, both "visible: viewMethod === i18n.tr("Icons")" and "visible: viewMethod === i18n.tr("List")" checks will now return false. Users would have to reselect "View As" to see their files again, every time they change system language.

In ViewPopover.qml, "selectedIndex: values.indexOf(viewMethod)" is bogus even on the readability level: selectedIndex should naturally be just indexOf(viewMethod), without the "values." prefix.

Tags: i18n
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.