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.
Execute testcase, we could find the difference locale msg. If no change in options(, English msgs are shown at output-window. If we selected "Internal" for "Executor for tests" property, we could see Japanese msgs. We think results should be localized on any type of "Executer for tests". Executor for tests: External - shown in English. <--- is this correct? Internal - shown in Japanese. Debugger - shown in English. <--- is this correct? Steps: 1. Create testcase code files. (tools->JUnit test->Create tests) 2. Change "Executor for tests" at Options->Testing-> JUnit Module setting->Expert. we can select 3 type of executor. ( External, Internal, Debugger ) 3. Execute testcase without changes. (tools->JUnit test->Execute tests) 4. Watch output-window.
Created attachment 10009 [details] snapshot when selected "External"
Created attachment 10010 [details] snapshot when selected "External".
Created attachment 10011 [details] snapshot when selected "Internal".
Created attachment 10012 [details] snapshot when selected "Debugger".
There is a problem, that by default only non-localized junit-testrunner.jar is mounted. So we need to also somehow mount junit-testrunner_zh_CN.jar The mounting is done via JUnit's layer.xml (more exactly in org/netbeans/modules/junit/resources/Mount-java-JUnit-testrunner.xml and/or org/netbeans/modules/junit/resources/layer.xml), so we might need to provide some localization to these files. I'll check possible ways with core developers and let you know.
Actually, one more question - what is your locale setting of your tests run via external execution? Is it exactly the same as for the ones running via internal execeution? I actually saw similar problem, but this was caused by the fact IDE was run with the -locale cs:CZ switch, but the operating system used different locale as a default (en_US). In this case tests running via internal execution run in the same locale as the IDE was running (i.e. cs_CZ), but when using external execution, the system default locale was used (i.e. en_US).
Changed the summary to indicate the issue is with need to mount the localized junit-testrunner.jar to be able to see localized messages. ken.frank@sun.com
Could be probably solved as suggested in this mailing list thread: <http://www.netbeans.org/servlets/BrowseList?listName=nbdev&by=thread&from=14879> Also there is already a submitted RFE for this: <http://www.netbeans.org/issues/show_bug.cgi?id=28005>
Will try to fix it for the next release of IDE.
marking as P2 since this (and related rfe) is needed by l10n releases for next release, or hopefully first nevada patch. This issue is part of their top list of i18n bugs that they have analyzed that have customer impact thus marking as P2. (rfe 28005 also marked as p2) ken.frank@sun.com
The bug is now partially fixed in the trunk. The current state is that localized messages are displayed with external execution (which is the default) but not with internal and debugging execution.
I guess the problem with internal execution is that it does not try to load the localized .jar (with localized messages). This is due to the fact that library "junit-testrunner.jar" is loaded by a different classloader (org.openide.execution.NbClassLoader) than module JUnit (org.netbeans.core.modules.Module$OneModuleClassLoader). It seems that the only special functionality of NbClassLoader over a standard URLClassLoader is that it is able to load classes from filesystems mounted in the IDE. But it does not try to load resource bundles from localized .jar files. Since the localized .jar is not mounted in the IDE repository, it is ignored.
The problem with internal execution is now fixed - localized messages are displayed. So the only problem is with debugger execution now. I fixed it by using a custom classloader which looks for resource bundles in all appropriate localized .jar files.
I lowered the priority since the problem persists only for debugger execution.
Fixed in the trunk. A new JUnit Results window has been added to NetBeans 5.0. The window's content is localizable, except the individual test failure descriptions. Feel free to reopen this bug if you still see the I18N problem. Note: There are no "executors" since NetBeans 4.0.
verified in nb5.0 fcs.