FLUID-5878: Create a fluid binding component to help with the localization of the prefs framework

Metadata

Source
FLUID-5878
Type
Task
Priority
Major
Status
Open
Resolution
N/A
Assignee
N/A
Reporter
Cindy Li
Created
2016-03-18T15:44:14.096-0400
Updated
2016-03-21T08:37:18.630-0400
Versions
N/A
Fixed Versions
N/A
Component
  1. Framework
  2. Prefs Framework

Description

To simplify the methods to localize messages used in the prefs framework, especially at the prefsEditorLoader level where the message needs to be applied to the DOM elements using jQuery functions such as text(), html(), attr(), @@Antranig Basman suggests,

1, Create a fluid binding component that binds DOM elements, messages and methods to apply messages. The binding in this case looks like:

bindings: {
"<a-namespace>": {
selector: "<infusion-selector>",
message: "<message-key-from-bundle-file>",
method: "<how-to-apply-message-to-the-selector>" // need more thoughts about how to specify a jQuery method
}
}

The references for this work:

2. Create a sub-component of prefsEditorLoader that receives prefsEditor.json only to, 1. unload the localization task from prefsEditorLoader; 2. continue to make use of "fluid.prefs.msgLookup" if a rendererComponent is needed.

Comments

  • Justin Obara commented 2016-03-21T08:37:18.630-0400

    @@Cindy Li in regards to "// need more thoughts about how to specify a jQuery method" could you just take in an invoker? Another idea would be to use something similar to the approach that invokers and etc use for thisist functions, but you'd still need to sort out the difference between a jQuery method and some other thisist function, because they may have different signatures.