Community
Participate
Working Groups
Steps: 1. open java perspective 2. create a new class 3. add a new field int i to the class 4. right click on the new added field i, select source->generate getter and setter 5. click ok on generate getter and setter window 6. check the code to see what is generated. If you conpare the result from zh_TW locale to other locales, you will notice that for other locales, what is generated is: getI (); and setI(int i); But in zh_TW locale, the getI() becames "Chinese get CHAR"I(); and the setI(int i) changed into "Chinese set CHAR"I(int i); Due to fact that some internal labels are translated, the getI and setI are changed into particular characters. This bug was first introduced as PMR43977. The following file has key lines that should not be translated. There should be a comment or something to mark that the following lines are not to be translated. In the file codegenerationmessages.properties at eclipse\plugins\org.eclipse.jdt.ui_2.0.2 \jdt_jar\org\eclipse\jdt\internal\corext\codemanipulation NameProposer.getterPrefix=get NameProposer.queryPrefix=is NameProposer.setterPrefix=set
This problem was logged against translation of 2.0.2. However, after analysing the problem, we realized that strings which should not be externalized for translation had been put into file codegenerationmessages.properties of directory eclipse\plugins\org.eclipse.jdt.ui_2.0.2 \jdt_jar\org\eclipse\jdt\internal\corext\codemanipulation Please ensure that the 3 keywords are being removed from the .properties file for eclipse 2.1 so that the translation centers will not make a mistake of translating them. NameProposer.getterPrefix=get NameProposer.queryPrefix=is NameProposer.setterPrefix=set
If we remove this from the properties file JDT/UI will always suggest setter and getters of the form: setValue, getValue. If the field identifier is not written in English but in German you will get setWert and getWert which is funny as well.
The NamePropser class is no longer in use in JDT/UI. Removed keys form JDT/UI land. Moving to JDT/Core since they are now doing name proposing.
David - pls verify that these strings are indeed externalized.
Actually, these Strings should NOT be externalized as per original request.
Currently these Strings are not externalized. Closing.