Community
Participate
Working Groups
Build ID: I20080617-2000 Steps To Reproduce: 1. Create file plugin.properties in a plugin which contributes for example a perspective or view. The label of the view or perspective must be translated there with a key, for example "%myLabel". 2. Ensure, that plugin.properties is included in build (see build.properties). 2. Then run and open your RAP application in a internet browser of your choice. 3. Check translation of the label of your view or perspective: Then you will see, that there is still the key (with "%" as prefix). More information: Internationalization of plugin.properties or plugin_<locale>.properties does not work in Rich Ajax Platform applications. I checked the source code of org.eclipse.core.internal.registry.ConfigurationElement: The method getAttribute(String name) does directly call getAttributeAsIs(String name) and does not translate anything.
Thank you. Andreas
Added my new e-mail address to CC.
Did you follow the steps described here: http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.rap.help/help/html/advanced/internationalization.html
Thank you, after adding "Bundle-Localization: plugin" to the manifest, it works for views but not for perspectives. It works not for perspectives, because they are "translatet" at startup without a (locale sensitive) session. Do you solve this issue in future versions of RAP? Thank you, Andreas
(In reply to comment #4) > Thank you, after adding "Bundle-Localization: plugin" to the manifest, it works > for views but not for perspectives. It works not for perspectives, because they > are "translatet" at startup without a (locale sensitive) session. This is new to me. Where do you have this information from? > > Do you solve this issue in future versions of RAP?
I read this information from source code (see snippet below) and confirmed the behaviour during remote debuging. The perspective descriptors are translatet to early, were no user session is available. If no user session is available, then a language can not be determined. Snippet from org.eclipse.core.internal.registry.ConfigurationElement (v1.1, Plugin org.eclipse.rap.equiniox.registry): ================================================================== public String getAttribute(String attrName) { // TODO [fappel]: We avoided translation at startup, since RAP needs // request/session aware translation mechanism. So we are // doing translation now. String symbolicName = getContributor().getName(); String attribute = getAttributeAsIs( attrName ); return RegistryFactory.translate( attribute, symbolicName ); } ================================================================== Quote: "[...] We avoided translation at startup[...]"
Created attachment 115906 [details] screenshot of localized perspective switcher
I can't reproduce this. Perspective labels are translated session aware as the attached screenshot shows. The example is the current version of the RMS demo. The code is available from the sandbox component in CVS.
Can't reproduce. Feel free to re-open if you can provide more information