← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

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

 

Public bug reported:

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.

** Affects: ubuntu-filemanager-app
     Importance: Undecided
         Status: New


** Tags: i18n

-- 
You received this bug notification because you are a member of Ubuntu
File Manager Developers, which is subscribed to Ubuntu File Manager App.
Matching subscriptions: File Manager App Bugmail
https://bugs.launchpad.net/bugs/1462700

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

Status in File Manager application for Ubuntu devices:
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1462700/+subscriptions


Follow ups

References