Debug builds should Assert if a FTL (fluent) file is loaded but only a small percentage of the strings are referenced

NEW
Unassigned

Status

()

enhancement
P3
normal
a year ago
4 months ago

People

(Reporter: jaws, Unassigned)

Tracking

(Blocks 1 bug)

57 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

As we are working on porting the Firefox preferences to using Fluent, we may end up with a single Fluent file with over 900 strings. We want to make sure that other parts of the Preferences UI (subdialogs) do not load this Fluent file just to reference one or two strings. In this case, shared strings should be placed in a shared FTL file that the subdialog and the larger Preferences UI could load.

To help prevent this situation, after a Fluent file is loaded, we could wait some amount of time (perhaps after a couple idle callbacks or more) while keeping track of which strings are referenced. If less than 5% of the FTL strings are referenced we could throw a debug assertion.
Blocks: 1415730
Component: Localization → Internationalization
Blocks: 1394885
No longer blocks: 1415730
You need to log in before you can comment on or make changes to this bug.