Metadata
- Source
- FLUID-6197
- Type
- Improvement
- Priority
- Major
- Status
- Closed
- Resolution
- Won't Fix
- Assignee
- Alan Harnum
- Reporter
- Alan Harnum
- Created
2017-09-19T09:51:13.851-0400 - Updated
2024-07-22T09:02:34.856-0400 - Versions
- N/A
- Fixed Versions
- N/A
- Component
-
- Tech. Documentation
Description
The documentation at http://docs.fluidproject.org/infusion/development/LocalizationInThePreferencesFramework.html#specifying-a-localization is either incorrect or unclear - when implementing https://github.com/waharnum/uio-multilingual/blob/master/demos/src/js/UIOMultilingualDemo.js#L41 the obvious syntax as described did not appear to work, and it was necessary to address the messageLoader subcomponent directly.
At minimum, the documentation needs to be clarified, and it needs to be investigated as to whether this is in fact working as described - the 'settings' object described is constructed by an expander at https://github.com/fluid-project/infusion/blob/0ca2eac0a06731f99588399c9abd3e9d29732235/src/framework/preferences/js/PrefsEditor.js#L35, and it is unclear where or how the locale should be configured.
At a more fundamental level, it seems assymetrical to set the defaultLocale on the component options directly (https://github.com/fluid-project/infusion/blob/0ca2eac0a06731f99588399c9abd3e9d29732235/src/framework/preferences/js/PrefsEditor.js#L33) but require a more complicated mechanism for setting the locale - however, I may lack history or context for this decision.
Comments
-
Alan Harnum commented
2018-07-19T11:22:03.741-0400 Further investigating this as part of FLUID-6299 - notably, here is where setting the locale is actually tested: https://github.com/fluid-project/infusion/blob/master/tests/framework-tests/preferences/js/PrefsEditorTests.js#L733-L745 - via a distributeOptions block to set it on the initialModel member.
Recent changes to the Preferences Framework removed the settings object being generated by the expander and changed the expected point of the locale setting from "{prefsEditorLoader}.settings.locale" to {prefsEditorLoader}.settings.preferences.locale" (in https://github.com/fluid-project/infusion/commit/1a466e1f9188b23ccf8da90c249cafab953b7865#diff-4b9c9b993efab504ef58b9664e518698L68)
The documentation is out of date with this change but I'm also not sure the documentation would ever actually work as described, given the tests use a different method to setting the locale.
-
Alan Harnum commented
2018-07-19T11:58:36.282-0400 For current purposes before FLUID-6299 goes in, we should simply correct the documentation to the current state of the codebase.\
-
Gregor Moss commented
2018-07-31T16:38:40.130-0400 Closing this per discussion on PR at https://github.com/fluid-project/infusion-docs/pull/139
We'll open a separate issue that is the INVERSION of this issue - to make the code work like the docs specifies.