Metadata
- Source
- SJRK-113
- Type
- Task
- Priority
- Blocker
- Status
- Reopened
- Resolution
- Fixed
- Assignee
- Gregor Moss
- Reporter
- Gregor Moss
- Created
2018-05-31T16:25:05.875-0400 - Updated
2018-07-26T15:25:18.813-0400 - Versions
- N/A
- Fixed Versions
- N/A
- Component
-
- Storytelling Tool UI
Description
We had to make some changes to UIO in order to get it to change language and re-render along with other ui elements without reloading the page, but these features should probably be part of UIO in general. They are also perhaps not the best smelling code.
in storyTelling-page.js, the functions sjrk.storyTelling.page.reloadUioMessages, sjrk.storyTelling.page.sjrk.storyTelling.page.updateUioPanelLanguages and their associated (injected) listeners on the page's uio component, as well as the other configuration of said component.
in UIOMultilingualDemo.js, the entire file. This is based on Alan's work in this repository: https://github.com/waharnum/uio-multilingual
Comments
-
Gregor Moss commented
2018-06-14T15:59:38.350-0400 The user requirement is that the site has multiple languages, and the site author would like to add a panel to UIO so that site users can decide which language they would like to have the site in.
These are the technical details of the work:
- We need a new panel, including an adjuster and an enactor
- Use the LetterSpacing files as an example to follow
- We need a spot to hook into to set the language AND have it reload at that point
- We need to save the user's chosen language (might be automagic)
- We need to check the language when we're loading the page to make sure it's loaded in the preferred language initially. No FOUC
- We need a new panel, including an adjuster and an enactor
-
Gregor Moss commented
2018-06-14T16:12:20.679-0400 Consider the prior art in the First Discovery tool (https://github.com/GPII/first-discovery) and the Preferences Editor (https://docs.fluidproject.org/infusion/development/LocalizationInThePreferencesFramework.html#)
Perhaps @@Cindy Li can weigh in? 🙂
cc @@Michelle D'Souza
-
Cindy Li commented
2018-06-19T11:33:01.116-0400 To re-capture the conversion that Greggor and I had today: yes, it's worthwhile to have a look at the implementation of the language panel in the first discovery tool, which also uses the preferences framework to render the panel and react to the language selection. Some of the code, such as the broadcasting of the selected language, probably can even be reused.
-
Gregor Moss commented
2018-07-17T12:57:41.553-0400 Not actually closed, resolution issue