Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 452790

Summary: i18n message service: Add optional API to support one service entry per language.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 5.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description libing wang CLA 2014-11-22 13:56:14 EST
We need to add an optional service, namingly "orion.i18n.message.perlanguage".
This will not affect the current "orion.i18n.message" service.

As for the current "orion.i18n.message" service, each language already has 24 message bundles and this number is still increasing.
That says if you only install the plugin for one language, the plugin will create 24 service entries. It will be multipled by the number of language plugins you want to install. 

By making an additional "orion.i18n.message.perlanguage" service contract, we will only need one service entry per language.
The i18n Orion core does not have to look up all the message bundle i nthe service entries. It will just ask the the locale of the new service. The service will look up the proper bundle for you.

The new service is just another option. It does not break the existing  "orion.i18n.message" service contract.
Comment 2 libing wang CLA 2014-11-24 11:55:50 EST
Pushed a better fix with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=452c6d501402624add1bc6d9e2442d95e9cb5f0c.

1. We do not want the additional service "orion.i18n.message.perlanguage". We will still use "orion.i18n.message" for per language plugin.

2. The per language plugin will use the optional API getBundleNames to surface all the bundle names.

3. The fix will allow both perlanguage plugin and any other individual message bundle services.