[
https://issues.apache.org/jira/browse/FELIX-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800649#action_12800649
]
Felix Meschberger commented on FELIX-1051:
------------------------------------------
I have been thinking about the localization a bit and here is my proposal:
* Localization is based on Java ResourceBundle (actually PropertyResourceBundle)
* The web console loads the PropertyResourceBundles itself to be able to
control caching
* The localization base file is set using the Bundle-Localization header
* The localization key is used as the value if a resource bundle does not have
a translation
* The web console wraps the response with a filtering writer which applies
localization
* The actual ResourceBundle used for the filter is a combination of the web
console localization ResourceBundles and the plugin provider bundle
localization. The key resolution just looks in the plugin bundle's own resource
bundle, then in the web console resource bundle and finally falls back to using
the key if no translation can be found.
* The output may contain localization strings of the form ${key} which are
replaced by the translation (or key if there is non)
* The "${" sequence may be escaped with "\${", "\" is escaped with "\\"
Example:
1. The web console has localizations in OSGI-INF/l10n/webconsole and provides
the webconsole.properties file
2. A bundle provides bulgarian translations of the web console
--> the bundle attaches as a fragment to the web console
--> the bundle has a OSGI-INF/l10n/webconsole_bg.properties file
3. A plugin bundle provides localization for its own bundles and defines the
Bundle-Localization header providing a default file.
4. A plugin generates localizable output
--> This is a ${localizable} string
> Localize the web console
> ------------------------
>
> Key: FELIX-1051
> URL: https://issues.apache.org/jira/browse/FELIX-1051
> Project: Felix
> Issue Type: Improvement
> Components: Web Console
> Affects Versions: webconsole-1.2.8
> Reporter: Carsten Ziegeler
>
> We should think about localizing the web console.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.