[
https://issues.apache.org/jira/browse/WOOKIE-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784752#action_12784752
]
Scott Wilson commented on WOOKIE-67:
------------------------------------
W3C Widgets supports two types of localization - folder-based and element-based.
1. At element level we have:
- name
- description
- license
Each of these elements can have multiple values with an xml:lang attribute.
These are all implemented in the Manifest Model using the ILocalizedEntity
interface. The WidgetManifestModel has accessors for these properties that take
a locale parameter.
However only License currently has a localized Bean implementation; name and
description are held as singular properties with no language accessors.
2. At Folder level we have:
- content
- icon
Icons are represented in the correct fashion as a list of localized elements
that are persisted as localized WidgetIcon beans, and the algorithm mostly
handles this correctly (see WOOKIE-58). However these are not accessed in a
localized way, e.g. no "getIconForWidget(String locale)" method is implemented.
Content (start files) are not implemented as localized elements, and there is
only a single property for the "url" of the widget rather than a list of start
file objects with a "getStartFileForWidget(String locale)" method.
In addition there is the possible issue of having to rewrite content to take
advantage of in-widget folder-based localization, however this could pose a
more significant challenge.
These are the actions needed to support per-instance or per-user-agent
localization:
1. Implement Name, Description, StartFile as localized Beans with localized
accessor methods from Widget
2. Implement localized access method for Icon
3. Implement locale parameter to requests
> Implement localization of widgets on per-instance basis
> -------------------------------------------------------
>
> Key: WOOKIE-67
> URL: https://issues.apache.org/jira/browse/WOOKIE-67
> Project: Wookie
> Issue Type: Task
> Components: Configuration, Server, Wookie REST API
> Reporter: Scott Wilson
> Priority: Critical
> Fix For: 0.8.1
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> While the W3C Widgets specification supports localization we haven't
> implemented the hooks for this within Wookie. In particular, we need to
> consider whether to support locales on a per instance basis - e.g. to allow
> the container to set preferred locale when requesting a widget instance by
> adding a "locale" optional parameter in the REST API.
> This would require a rethink of the Widget object model; currently the
> WidgetManifestModel supports multiple localized values and has
> getLocal<Property>(locale) methods, but these are compressed into singular
> properties when a Widget object is created from it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.