|
Sweet Home 3D Forum » List all forums » » Forum: Developers » » » Thread: Ant tools for translator: buildLang, cleanLang, rollbackLang » » » » Post: Re: Ant tools for translator: buildLang, cleanLang, rollbackLang |
Print at Dec 22, 2025, 5:01:23 PM |
| Posted by jeffliu at Oct 18, 2012, 12:49:24 AM |
|
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 [email protected] --> <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> ---------------------------------------------------------------- |
|
|
Current timezone is GMT Dec 22, 2025, 5:01:23 PM |