JDK-6476613 : Javadoc an enum under simplified chinese locale causes warning
  • Type: Bug
  • Component: globalization
  • Sub-Component: translation
  • Affected Version: 6,8
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2006-09-29
  • Updated: 2013-11-05
  • Resolved: 2013-10-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b110Resolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
mustang b99

ADDITIONAL OS VERSION INFORMATION :
Linux localhost.localdomain 2.6.9-11.19WS

A DESCRIPTION OF THE PROBLEM :
javadoc an enum under simplified chinese locale. This problem can be reproduced by any java source files. The Warning message is:
@XX is an unknown tag. ( the message was in chinese.)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
javadoc any enum under simplified chinese locale.
This is the command of javadoc:
javadoc -protected -sourcepath "C:\FOP Wrapper\src" -encoding GB18030
-source 1.5 -d "C:\FOP Wrapper\javadoc" -charset GB18030 -docencoding
GB18030 "C:\FOP Wrapper\src\com\panda\report\common\CELLTYPE.java"

The "@return" tag in the resource file(doclets_zh_CN.properties) was translated into Chinese which I think should be remained English.....

in the j2se/src/share/classes/com/sun/tools/doclets/internal/tookit/resource/doclets_zh_CN.properties english version:
doclet.enum_values_doc=
...
...
@return an array containing the constants of this enum type,in \n...
chinese version:
@XXXXXXXXXXXXXXXXXXXXXXXXX(chinese characters)
even the "@return" was translated!

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
CELLTYPE.java

public enum CELLTYPE {
    NORMAL(0),
    PAGENO(1),
    PAGECOUNT(2),
    ;

    private final int value;

    CELLTYPE(int value) {
        this.value = value;
    }

    @Override
    public String toString() {
        switch (value) {
        case 0:
            return "0";
        case 1:
            return "1";
        case 2:
            return "2";
        }
        return "";
    }
}
---------- END SOURCE ----------

Comments
Closing as it's a dup.
05-11-2013

Fixed in jdk8 b110 as part of JDK-8025215. If the fix is needed in earlier releases, sustaining team will need to port the fix back. Thank you.
04-10-2013

Verified that the problem do not occur on jdk8 b110 build.
04-10-2013

doclet.properties file was updated to facilitate better translation. changeset: 1962:a76dc1b4c299 user: jjg date: Tue Aug 20 14:46:54 2013 -0700 summary: 8020663: Restructure some properties to facilitate better translation The resource file will be sent to translation team for update today 9/4. We need to verify the updated files when ready.
05-09-2013

EVALUATION the vendor overtranslated the content in the latest message synchronization. In 6.0update and 7.0, I'll update the message doclet.enum_values_doc through ULA according to the correct way provided in the description.
30-09-2006

EVALUATION We will fix it after java se 6, maybe update 1 or java se 7.
29-09-2006

EVALUATION The description section contains a correct diagnosis: javadoc tags such as "@return" must remain untranslated.
29-09-2006