This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Easier I18N of NBM apps | ||
---|---|---|---|
Product: | apisupport | Reporter: | puce <puce> |
Component: | Harness | Assignee: | Jaroslav Tulach <jtulach> |
Status: | RESOLVED WONTFIX | ||
Severity: | blocker | CC: | jyoungman, kfrank |
Priority: | P2 | Keywords: | I18N |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | 133901 | ||
Bug Blocks: |
Description
puce
2009-01-19 09:30:01 UTC
As noted in http://www.netbeans.org/issues/show_bug.cgi?id=133901 also the update_tracking/*.xml files need to reference the localized jars. There should be an easier and pluggable support to create these entries. Also localizing branded resources (eg. splash screen, window title, etc.) should be easier, without needing to duplicate the branding-token in file names (eg. enhancing the branding-directory concept). Here is a work around I used to localize the splash screen. 1. Brand your application in the first language - Splash screen image - Bundle.properties (if other than english you can find more key to translate in the core.jar (org/netbeans/core/startup/Bundle.properties) This way you can translate any text such as the "Loading module..." in the splash screen 2. Build you app, you should find a file under build\cluster\core\locale\ called code_${branding.token}.jar 3.Copy this file else where 4. In your project.properties file change the banding token to something else in my case ${app.name}_fr 5. Do step 1 and 2 again but for the other language 6. How do we tell out RCP to switch branding depending on the machine's locale? We need to create a new main class that will add a parameter in this case --branding <desired branding token>. 7. In that main class call then real org.netbeans.core.startup.Main.main(args) Zip Distribution 8. Build a zip distro and make sure you copy all the needed file in ${youproject}\core\locale\ - Your 2 branding jar files and you jar file containing the new MainClass 9. Modify the conf file located in the etc folder: ${youproject}.conf default_options="-J-Dnetbeans.mainclass=your.packace.MainClass" VoilĂ , you will get a fully localized splash screen all withing the same RCP app. To change the branding token for each supported locale and write a custom Main class for such a basic and common thing as localization is really very impractical. (If there is a better way please point to/ provide the documentation.) -> changing priority to P2 If i18N packs could also be deployed for maven RCP build that would be great. Hmm, there aren't many issues for apisupport and platform with more than 9 votes: http://netbeans.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=apisupport&product=platform&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=NEW&bug_status=STARTED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailqa_contact2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=votes&type0-0-0=greaterthan&value0-0-0=9 I wonder how much the votes influence the prioritization... I would like to be able to switch locale (for the entire RCP platform) on the fly as different users login to my application. Failing this, an easier way to generate a zip distribution with all the main menu options etc in my selected language. I can easily take care of localizing my own code. Please do not change the Version field to a later value. It may only be changed to an earlier value, if found to be reproducible earlier than previously noted. (In reply to comment #7) > I would like to be able to switch locale (for the entire RCP platform) on the > fly as different users login to my application. Sorry, this will probably never be supported. Too many labels are preloaded. > an easier way to > generate a zip distribution with all the main menu options etc in my selected > language You do not need a special distribution; just pass the --locale option. (In reply to comment #0) > I think there should be a more convenient way to get the localized platform > jars. This all comes down to bug #133901. > a Locale Extension Archive Module project template [...], which would aid the > developer in building pluggable locale support of custom modules. http://wiki.netbeans.org/DevFaqMavenL10N shows how to do this for Maven-based projects; could be an archetype. Slightly trickier for Ant-based projects since you need to both customize extra.module.files and add a target to build.xml using <branding>. I don't plan to work on this feature, but I am ready to review and possibly accept a patch, if it is donated. Meanwhile marking won'tfix. |