Chinese Translation

This topic has been viewed 4834 times and has 9 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
protenus
Posts: 6
Joined: Tue Sep 09, 2008 10:48 am

Chinese Translation

Post by protenus »

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]
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Chinese Translation

Post by Puybaret »

Hello,

I suppose you already imported Sweet Home 3D project in Eclipse as noted in file http://sweethome3d.cvs.sourceforge.net/*checkout*/sweethome3d/SweetHome3D/README.TXT?revision=1.9&pathrev=V_1_3_1

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
protenus
Posts: 6
Joined: Tue Sep 09, 2008 10:48 am

Re: Chinese Translation

Post by protenus »

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)


User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Chinese Translation

Post by Puybaret »

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
protenus
Posts: 6
Joined: Tue Sep 09, 2008 10:48 am

Re: Chinese Translation

Post by protenus »

Thanks, It works. I would complete the Chinese translation.


protenus
Posts: 6
Joined: Tue Sep 09, 2008 10:48 am

Re: Chinese Translation

Post by protenus »

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.


User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Chinese Translation

Post by Puybaret »

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
protenus
Posts: 6
Joined: Tue Sep 09, 2008 10:48 am

Re: Chinese Translation

Post by protenus »

Indeed, the message appears in the launch time. my mistake, I didn't notice the same names when translating. I'll try that.


protenus
Posts: 6
Joined: Tue Sep 09, 2008 10:48 am

Re: Chinese Translation

Post by protenus »

The Unrecognizable Code shows again.(Using UTF-8 encoding)


User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Chinese Translation

Post by Puybaret »

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
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest