Open Bug 1523122 Opened 6 years ago Updated 2 years ago

File Picker should use string id's from .ftl files

Categories

(Toolkit :: XUL Widgets, defect, P3)

defect

Tracking

()

People

(Reporter: nautilus, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Steps to reproduce:

File picker takes string arguments which now are loaded synchronously. It should instead get string id's to pull the strings from a .ftl file

Blocks: 1517493
Status: UNCONFIRMED → NEW
Ever confirmed: true

Chris, can you elaborate a bit on which filepicker APIs you mean, maybe with links to searchfox etc., and where you ran into this as an issue?

Flags: needinfo?(freychr3)

The file picker is called from here:
https://searchfox.org/mozilla-central/rev/78cd247b5d7a08832f87d786541d3e2204842e8e/browser/base/content/pageinfo/pageInfo.js#624-648

let titleText = gBundle.getString("mediaSelectFolder");

is being changed to

let titleText = await document.l10n.formatValue("media-select-folder");

Which is just a temporary measure because the fp.init() call requires the title string which requires the use of format value. Jaws thinks it would be best if a Fluent Id could be passed in instead but I am not 100% sure how the Fluent file is loaded and if the file picker could read from it.

I think this is the init function being called:
https://searchfox.org/mozilla-central/source/widget/nsIFilePicker.idl#71

Flags: needinfo?(freychr3)
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.