Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1523

allow localizable params in feature specification

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0, 2.0.2, 2.5.0-beta1
    • 2.5.0
    • Java
    • All

    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.

      Sample gadget definition:

      <?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>

      Sample message bundle:
      <?xml version="1.0" encoding="UTF-8"?>
      <messagebundle>
      <msg name="mytest">
      Search
      </msg>
      </messagebundle>

      Attachments

        1. paramloc.txt
          4 kB
          Igor Belakovskiy

        Activity

          People

            Unassigned Unassigned
            ibelakov Igor Belakovskiy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: