Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 2
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 4142 times and has 1 reply Next Thread
jeffliu
Newbie



Taiwan (R.O.C.)
Joined: Oct 17, 2012
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
Ant tools for translator: buildLang, cleanLang, rollbackLang

Dear all translators.,

For personal convenience, I built 3 ant tasks: buildLang, cleanLang, and rollbackLang.

If that usefull to you, I would be very happy.

You can copy & paste code below to build.xml in the project.
After that , you can type : ant -projecthelp for usage.

Enjoy it !!!

jeff, juain farn, liu @Taiwan, Taipei

any suggestion, please contact me: jeffliu@gisbim.com

-----------------------------------------------------------------
<!-- buildLang, cleanLang, rollbackLang are three usefull ant tolls for translator,
you can use buildLang to build the language sh3L file for your language,
and clean all languages with cleanLang,
when you made something wrong and sweetHome 3D not works, you can rollback from previous tranlating works.
Enjoy it !!!
jeff, juain farn liu at Taiwan jeffliu@gisbim.com
-->

<target name="buildLang" description="usage: ant buildLang -Dlang=zh_CN">
<!-- usage: ant buildLang -Dlang=zh_CN -->
<!-- this task will create a directory lang/en_US,
and copy all property file with *_zh_CN.properties to the directory
-->

<echo message="starting to build ${lang} language, please waiting..."/>
<mkdir dir="lang/${lang}"/>
<copy todir="lang/${lang}">
<fileset dir="src">
<include name="**/*_${lang}.properties"/>
</fileset>
</copy>
<mkdir dir="lang/${lang}/com/eteks/sweethome3d/viewcontroller/resources/help/${lang}"/>
<copy todir="lang/${lang}/com/eteks/sweethome3d/viewcontroller/resources/help/${lang}">
<fileset dir="src/com/eteks/sweethome3d/viewcontroller/resources/help/${lang}">
<include name="**/*.*"/>
</fileset>
</copy>


<jar destfile="lang/sweetHomeLanguage_${lang}_${version}.sh3L"
basedir="lang/${lang}"
includes="**/*.properties"
/>

<echo message="${lang} language is build, enjoy it !!"/>
</target>

<target name="cleanLang" description="usage: ant cleanLang">
<echo message="starting to clean all languages, please waiting..."/>
<delete dir="lang"/>
<echo message=" all languages are clean"/>
</target>

<target name="rollbackLang" description="usage: ant rollbackLang -Dlang=zh_CN">
<echo message="starting to rollback languages ${lang}, please waiting..."/>
<copy todir="src">
<fileset dir="lang/${lang}">
<include name="**/*_${lang}.properties"/>
</fileset>
</copy>
<copy todir="src/com/eteks/sweethome3d/viewcontroller/resources/help/${lang}">
<fileset dir="lang/${lang}/com/eteks/sweethome3d/viewcontroller/resources/help/${lang}">
<include name="**/*.*"/>
</fileset>
</copy>

<echo message="${lang} language is rollback, enjoy it !!"/>
</target>
---------------------------------------------------------------------
[Oct 17, 2012, 11:18:48 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
jeffliu
Newbie



Taiwan (R.O.C.)
Joined: Oct 17, 2012
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
Re: Ant tools for translator: buildLang, cleanLang, rollbackLang

2012/10/18 updated by jeff
---------------------------------------------------------------
<!-- buildLang, cleanLang, rollbackLang are three usefull ant tolls for translator,
you can use buildLang to build the language sh3L file for your language,
and clean all languages with cleanLang,
when you made something wrong and sweetHome 3D not works, you can
rollback from previous tranlating works.

Enjoy it !!!

jeff, juain farn liu at Taiwan jeffliu@gisbim.com
-->

<target name="buildLang" description="usage: ant buildLang -Dlang=en_TW">
<!-- usage: ant buildLang -Dlang=en_TW -->
<!-- this task will
1. create a directory lang/zh_TW,
2. copy all property file with *_en_TW.properties to the directory,
3. copy localized resource in com/eteks/sweethome3d/viewcontroller/help/zh_TW
-->

<echo message="starting to build ${lang} language, please waiting..."/>
<mkdir dir="lang/${lang}"/>
<copy todir="lang/${lang}">
<fileset dir="src">
<include name="**/*_${lang}.properties"/>
</fileset>
</copy>
<mkdir dir="lang/${lang}/com/eteks/sweethome3d/viewcontroller/resources/help/${lang}"/>
<copy todir="lang/${lang}/com/eteks/sweethome3d/viewcontroller/resources/help/${lang}">
<fileset dir="src/com/eteks/sweethome3d/viewcontroller/resources/help/${lang}">
<include name="**/*.*"/>
</fileset>
</copy>


<jar destfile="lang/sweetHomeLanguage_${lang}_${version}.sh3L"
basedir="lang/${lang}"
includes="**/*.*"
/>
<tstamp>
<format property="DateSign" pattern="MMddHH"/>
</tstamp>
<jar destfile="lang/sweetHomeLanguage_${lang}_${version}_${DateSign}.sh3L"
basedir="lang/${lang}"
includes="**/*.*"
/>

<echo message="${lang} language is build, enjoy it !!"/>
</target>

<target name="cleanLang" description="usage: ant cleanLang">
<echo message="starting to clean all languages, please waiting..."/>
<delete dir="lang"/>
<echo message=" all languages are clean"/>
</target>

<target name="rollbackLang" description="usage: ant rollbackLang -Dlang=zh_TW">
<echo message="starting to rollback languages ${lang}, please waiting..."/>
<copy todir="src">
<fileset dir="lang/${lang}">
<include name="**/*_${lang}.properties"/>
</fileset>
</copy>
<copy todir="src/com/eteks/sweethome3d/viewcontroller/resources/help/${lang}">
<fileset dir="lang/${lang}/com/eteks/sweethome3d/viewcontroller/resources/help/${lang}">
<include name="**/*.*"/>
</fileset>
</copy>

<echo message="${lang} language is rollback, enjoy it !!"/>
</target>
----------------------------------------------------------------
[Oct 18, 2012, 12:49:24 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved