[ 
https://issues.apache.org/jira/browse/FELIX-2206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12847383#action_12847383
 ] 

Valentin Valchev commented on FELIX-2206:
-----------------------------------------

Well, your patch works for both - bundles & services printer. Mine - for 
service only, and will require many more changes to make it work for bundles. 

So I guess a complete solution is better  than partial and yes - this is 
important issue, that must be fixed before webconsole 3.0.0 is released.


> Localization causes a problem in Configuration Printers
> -------------------------------------------------------
>
>                 Key: FELIX-2206
>                 URL: https://issues.apache.org/jira/browse/FELIX-2206
>             Project: Felix
>          Issue Type: Bug
>          Components: Web Console
>            Reporter: Valentin Valchev
>             Fix For: webconsole-3.0.0
>
>         Attachments: FELIX-2206-fmeschbe.patch, services_config_printer.patch
>
>
> When Configuration Status is opened, the Bundles and Services tabs are 
> rendered respectively as 'bundles.pluginTitle' and 'services.pluginTitle'.
> Unfortunately, the  ConfigurationRender cannot access the 
> ResourceBundleManager which is required to translate the titles.
> So there are few possibilities:
> 1. A dirty hack, when OsgiManager creates the ConfigurationRender calls a 
> method, to *set* the resourceBundleManager.
> 2. Make resource bundle manager accessible to all plugins as a request 
> parameter. This will also require to make the ResourceBundleManager class 
> public... or define the following interface in the public API:
> interface ResourceBundleManager {
>  public ResourceBundle getResourceBundle( final Bundle provider, final Locale 
> locale )
> }
> 3. Refactor the Bundles & Services plugins, and change the title to 
> respectively %Bundles and %Services. This is another dirty hack but the 
> titles will be shown correctly.
> 4. Refactor the Bundles & Services plugins and extract the configuration 
> printer code in a separate class. In this case no localization will be 
> supported for these printers - just like other ones. I want to remind again, 
> that we choose that no localization is required for Configuration Status as 
> the provided information is more for diagnostics and is better to remain 
> not-localized.
> So what do you think. Which variant is better? I personally vote for 4. We 
> can make some method static and package private, so they can be reused by 
> both - plugins & printers can reduce the duplicate code to minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to