[
https://issues.apache.org/jira/browse/SHINDIG-1523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Igor Belakovskiy updated SHINDIG-1523:
--------------------------------------
Description:
Allow the localization of feature parameters. This allows us to provide
parameters that can be localized when the gadget definition is processed. In
the example below, __MSG_mytest__ will get replaced with "Search" from the
bundle. The localized XML inside the CDATA can then be consumed by the
container.
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Hello" description="Message ">
<Locale messages="messages.xml"/>
<Require feature="dynamic-height" />
<Require feature="setprefs" />
<Optional feature="opensearch">
<Param name="opensearch-description"><![CDATA[<OpenSearchDescription
xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>__MSG_mytest__</ShortName>
<Description>Realtime Twitter Search</Description>
<Url type="application/atom+xml" method="get"
template="http://search.twitter.com/search.atom?q={searchTerms}"/>
<Image width="16" height="16">http://search.twitter.com/favicon.png</Image>
<InputEncoding>UTF-8</InputEncoding>
<SearchForm>http://search.twitter.com/</SearchForm>
</OpenSearchDescription>]]></Param>
</Optional>
</ModulePrefs>
<Content type="url" href="http://www.example.com/search/index.html" />
</Module>
<?xml version="1.0" encoding="UTF-8"?>
<messagebundle>
<msg name="mytest">
Search
</msg>
</messagebundle>
was:
Allow the addition of arbitrary XML inside of the feature param tags. This
allows the feature to specify complex objects as parameters that can be
returned as JSON as part of the gadget metadata, and be used by the common
container.
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Sample VOIP">
<Optional feature="actions">
<Param name="action-contributions">
<action id="org.samplevoip.callbyperson" dataObject="opensocial.Person"
label="Call using VOIP Phone" view="DialByPerson"
icon="http://ww.samplervoip.org/phone.gif"/>
<action id="org.samplervoip.navLink" path="container/navigationLinks"
label="Phone" />
</Param>
</Optional>
</ModulePrefs>
<Content type="html"><![CDATA[
<h2>Test</h2>
]]></Content>
</Module>
JSON Representation of above parameters.
{"params":{"action-contributions":[
{"action":{"label":"Call using
VOIP
Phone","view":"DialByPerson","icon":"http://ww.samplervoip.org/phone.gif","dataObject":"opensocial.Person","id":"org.samplevoip.callbyperson"}},
{"action":{"label":"Phone","path":"container/navigationLinks","id":"org.samplervoip.navLink"}}
]}
Summary: allow localizable params in feature specification (was: allow
declarative parameters in feature specification)
> allow localizable params in feature specification
> -------------------------------------------------
>
> Key: SHINDIG-1523
> URL: https://issues.apache.org/jira/browse/SHINDIG-1523
> Project: Shindig
> Issue Type: Improvement
> Components: Java
> Affects Versions: 2.0.0, 2.0.2, 3.0.0
> Environment: All
> Reporter: Igor Belakovskiy
> Labels: Enhancement, Feature
> Fix For: 2.0.0, 2.0.2, 3.0.0
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Allow the localization of feature parameters. This allows us to provide
> parameters that can be localized when the gadget definition is processed. In
> the example below, __MSG_mytest__ will get replaced with "Search" from the
> bundle. The localized XML inside the CDATA can then be consumed by the
> container.
> <?xml version="1.0" encoding="UTF-8" ?>
> <Module>
> <ModulePrefs title="Hello" description="Message ">
> <Locale messages="messages.xml"/>
>
> <Require feature="dynamic-height" />
> <Require feature="setprefs" />
> <Optional feature="opensearch">
> <Param name="opensearch-description"><![CDATA[<OpenSearchDescription
> xmlns="http://a9.com/-/spec/opensearch/1.1/">
> <ShortName>__MSG_mytest__</ShortName>
> <Description>Realtime Twitter Search</Description>
> <Url type="application/atom+xml" method="get"
> template="http://search.twitter.com/search.atom?q={searchTerms}"/>
> <Image width="16" height="16">http://search.twitter.com/favicon.png</Image>
> <InputEncoding>UTF-8</InputEncoding>
> <SearchForm>http://search.twitter.com/</SearchForm>
> </OpenSearchDescription>]]></Param>
> </Optional>
> </ModulePrefs>
> <Content type="url" href="http://www.example.com/search/index.html" />
> </Module>
> <?xml version="1.0" encoding="UTF-8"?>
> <messagebundle>
> <msg name="mytest">
> Search
> </msg>
> </messagebundle>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira