Localize the texts used by "table of contents" component in prefs framework
Activity
Justin ObaraJune 22, 2021 at 6:56 PM
Appears to have been address with work on
Cindy LiDecember 4, 2014 at 4:14 PM
Other than only enabling the message file loading and string resolving into uiEnhancer, the decision is to introduce both template and message loading and resolving features.
The technical plan is to wrap all async loading components that are templateLoader and messageLoader into a wrapper component "fluid.prefs.resourceManager". This new component will be used as a grade for:
1. "fluid.prefs.prefsEditorLoader", to restore the component structure that prefsEditorLoader currently has;
2. "fluid.pageEnhancer", so that messages and templates defined for enactors can be loaded and are accessible by all enactors that are bound onto uiEnhancer.
I've started working on it in this branch: https://github.com/cindyli/infusion/tree/FLUID-5568
This branch has the new wrapper component "fluid.prefs.resourceManager" created and supplied as a grade to "fluid.prefs.prefsEditorLoader". The grade version of the preferences framework is back working. Next steps are:
1. Bring the schema version of the prefs framework back working
2. Add the new resourceManager into pageEnhancer for both grade and schema versions
In this branch, working demos are all the grade version of prefs framework:
examples/framework/preferences/usingGrades/
tests/manual-tests/framework/preferences/fullPage/
All other prefs framework demos and examples are still broken.
The current preferences framework has two parts: uiEnhancer that applied users' preferences onto the page, and prefsEditor to render the panels where users set their preferences.
prefsEditor has a messageLoader subcomponent that loads in all message files, based on which prefsEditor creates a messageResolver that is accessed by all panels for text localization. However, this messageResolver is not accessible by uiEnhancer. Due to this, the "table of contents" component, an enactor hooked up into uiEnhancer to add table of contents onto the page, is not able to localize its texts.
In general, we need to provide a mechanism for all enactors that attached on uiEnhancer to be able to localize their texts.