Recently, I'm trying to translate Sweet home 3D into chinese and I have translated the HomePane.properties until now. Anybody tell me how to add it into src for I want to build it in eclipse myself. BTW, any further translation work to do?
[Note: this thread was started on sourceforge.net forums]
The chinese version of HomePane.properties file should be placed in the same directory and named HomePane_zh.properties. Default languages is always English in Sweet Home 3D to ensure Ok, Cancel... and other default labels shown in dialogs are also in English. To be able to choose Chinese language in Preferences dialog, edit com.eteks.sweethome3d.model.UserPreferences class and add "zh" in SUPPORTED_LANGUAGES field (I know this solution is far from perfect and it will probably evolve in the future ;-).
To complete the translation, you should also translate all the properties files found in Sweet Home 3D directories (translate only name# and category# properties found in furniture catalog files of src/com/eteks/sweethome3d/io directory). Finally, you should also translate the help files found in src/com/eteks/sweethome3d/swing/resources/help/en in a directory named src/com/eteks/sweethome3d/swing/resources/help/zh .
Don't hesitate to ask more questions if needed.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
I did do that, but it show the Unrecognizable Code when I execute. Is there any encoding setting should I modify?(my HomePan_zh.properties saved with utf-8)
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Chinese Translation
You must transform the encoding of HomePane_zh.properties file with native2ascii JDK tool. Rename it HomePane_zh.utf8.properties and then execute the following command : native2ascii -encoding UTF-8 HomePane_zh.utf8.properties HomePane_zh.properties
To transform it the other way add the -reverse flag : native2ascii -encoding UTF-8 -reverse HomePane_zh.properties HomePane_zh.utf8.properties
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
I have a problem with the category and name, I've translated the #category and #name in the io directory. when i add them in the src, it can't pass the compiling with the error of "already in category" in TexturesCategory.java 93 line. BTW, I transformed the encoding of those files in UTF-8.
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Chinese Translation
This message appears when you launch Sweet Home 3D, not when you compile it. ;-)
This error happens if you use the same name for two texture in the same category. Please name the second texture differently (append a " 2" to it for example).
Keep going you're on the good way.
Do you foresee to translate help files too ?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Chinese Translation
You may have added some UTF-8 signs in a property file. Try to guess which file caused problems from the stack trace or run native2ascii a second time on all files.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator