| 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
|---|
| 2 | <!--
|
|---|
| 3 | ATTENTION : dépendance Lib_Res et Lib_Java
|
|---|
| 4 | -->
|
|---|
| 5 |
|
|---|
| 6 | <!--
|
|---|
| 7 | * LICENCE[[
|
|---|
| 8 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1/CeCILL 2.O
|
|---|
| 9 | *
|
|---|
| 10 | * The contents of this file are subject to the Mozilla Public License Version
|
|---|
| 11 | * 1.1 (the "License"); you may not use this file except in compliance with
|
|---|
| 12 | * the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
|
|---|
| 13 | *
|
|---|
| 14 | * Software distributed under the License is distributed on an "AS IS" basis,
|
|---|
| 15 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|---|
| 16 | * for the specific language governing rights and limitations under the
|
|---|
| 17 | * License.
|
|---|
| 18 | *
|
|---|
| 19 | * The Original Code is kelis.fr code.
|
|---|
| 20 | *
|
|---|
| 21 | * The Initial Developer of the Original Code is
|
|---|
| 22 | * antoine.pourchez@kelis.fr
|
|---|
| 23 | *
|
|---|
| 24 | * Portions created by the Initial Developer are Copyright (C) 2008
|
|---|
| 25 | * the Initial Developer. All Rights Reserved.
|
|---|
| 26 | *
|
|---|
| 27 | * Contributor(s):
|
|---|
| 28 | *
|
|---|
| 29 | *
|
|---|
| 30 | * Alternatively, the contents of this file may be used under the terms of
|
|---|
| 31 | * either of the GNU General Public License Version 2 or later (the "GPL"),
|
|---|
| 32 | * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|---|
| 33 | * or the CeCILL Licence Version 2.0 (http://www.cecill.info/licences.en.html),
|
|---|
| 34 | * in which case the provisions of the GPL, the LGPL or the CeCILL are applicable
|
|---|
| 35 | * instead of those above. If you wish to allow use of your version of this file
|
|---|
| 36 | * only under the terms of either the GPL or the LGPL, and not to allow others
|
|---|
| 37 | * to use your version of this file under the terms of the MPL, indicate your
|
|---|
| 38 | * decision by deleting the provisions above and replace them with the notice
|
|---|
| 39 | * and other provisions required by the GPL or the LGPL. If you do not delete
|
|---|
| 40 | * the provisions above, a recipient may use your version of this file under
|
|---|
| 41 | * the terms of any one of the MPL, the GPL, the LGPL or the CeCILL.
|
|---|
| 42 | * ]]LICENCE
|
|---|
| 43 | -->
|
|---|
| 44 |
|
|---|
| 45 | <project name="Bui_Localization" default="All" basedir=".">
|
|---|
| 46 | <!-- antcontrib -->
|
|---|
| 47 | <property name="wspdir" location="${basedir}/.."/>
|
|---|
| 48 |
|
|---|
| 49 | <taskdef resource="net/sf/antcontrib/antcontrib.properties">
|
|---|
| 50 | <classpath>
|
|---|
| 51 | <pathelement location="${wspdir}/Lib_Java/ant/ant-contrib.jar"/>
|
|---|
| 52 | </classpath>
|
|---|
| 53 | </taskdef>
|
|---|
| 54 |
|
|---|
| 55 | <!-- SCENARIi8n -->
|
|---|
| 56 | <taskdef name="i8n" classname="com.scenari.i8n.ant.ScI8nTask">
|
|---|
| 57 | <classpath>
|
|---|
| 58 | <pathelement location="${wspdir}/Lib_Res/sc/sci8n.jar"/><!-- path="C:\scenari_dev3\sources\Jav_I8N\bin" -->
|
|---|
| 59 | </classpath>
|
|---|
| 60 | </taskdef>
|
|---|
| 61 |
|
|---|
| 62 | <property name="localization.locales.scenariCore" value="SCENARIcore"/>
|
|---|
| 63 | <property name="localization.locales.modeling" value="modeling"/>
|
|---|
| 64 | <property name="localization.locales.framework" value="framework"/>
|
|---|
| 65 | <property name="localization.locale.dirName" value="locale"/>
|
|---|
| 66 |
|
|---|
| 67 | <!-- Langue SCENARI intégrée : copie auto du résultat dans Wsp_* -->
|
|---|
| 68 | <property name="localization(sclanguage)" value="false"/>
|
|---|
| 69 | <!--**
|
|---|
| 70 | *
|
|---|
| 71 | **-->
|
|---|
| 72 |
|
|---|
| 73 | <target name="main.init" description="">
|
|---|
| 74 | <!-- Properties à redéclarer dans les builds par OS -->
|
|---|
| 75 | <property name="tmp.dir" value="${basedir}/tmp"/>
|
|---|
| 76 | <tstamp><format property="timestamp" pattern="d_MMMM_yyyy" locale="fr"/></tstamp>
|
|---|
| 77 |
|
|---|
| 78 | <!-- Initialisation -->
|
|---|
| 79 | <mkdir dir="${tmp.dir}"/> |
|---|
| 80 |
|
|---|
| 81 | <!-- Création du XLIFF SCENARIcore -->
|
|---|
| 82 | <mkdir dir="${basedir}/${localization(target)}/${localization.locale.dirName}/${localization.locales.scenariCore}"/>
|
|---|
| 83 | <i8n xliffExportFile="${basedir}/${localization(target)}/${localization.locale.dirName}/${localization.locales.scenariCore}/${localization.locales.scenariCore}.xlf">
|
|---|
| 84 | <sourceFiles>
|
|---|
| 85 | <dirset dir="${wspdir}" includes="Xul_*/chrome/content/*"/>
|
|---|
| 86 | <dirset dir="${wspdir}" includes="Xul_*/components"/>
|
|---|
| 87 | </sourceFiles>
|
|---|
| 88 | <xliff>
|
|---|
| 89 | <fileset dir="${basedir}/${localization(target)}/${localization.locale.dirName}/${localization.locales.scenariCore}" includes="${localization.locales.scenariCore}.xlf"/>
|
|---|
| 90 | </xliff>
|
|---|
| 91 | </i8n>
|
|---|
| 92 |
|
|---|
| 93 | <!-- Création du XLIFF modeling -->
|
|---|
| 94 | <mkdir dir="${basedir}/${localization(target)}/${localization.locale.dirName}/${localization.locales.modeling}"/>
|
|---|
| 95 | <if>
|
|---|
| 96 | <equals arg1="${localization(sclanguage)}" arg2="true"/>
|
|---|
| 97 | <then>
|
|---|
| 98 | <ant target="wsp.l10n">
|
|---|
| 99 | <property name="p.project.dir" location="${wspdir}/Wsp_Modeling"/>
|
|---|
| 100 | <property name="p.xlf.dir" location="${wspdir}/Wsp_Modeling/spaces/gen/locale/${localization(target)}"/>
|
|---|
| 101 | <property name="p.xlf.name" value="sc_sm.xlf"/>
|
|---|
| 102 | </ant>
|
|---|
| 103 | <ant target="wsp.l10n">
|
|---|
| 104 | <property name="p.project.dir" location="${wspdir}/Wsp_ModelingAssmnt"/>
|
|---|
| 105 | <property name="p.xlf.dir" location="${wspdir}/Wsp_ModelingAssmnt/spaces/gen/locale/${localization(target)}"/>
|
|---|
| 106 | <property name="p.xlf.name" value="sc_sma.xlf"/>
|
|---|
| 107 | </ant>
|
|---|
| 108 | <ant target="wsp.l10n">
|
|---|
| 109 | <property name="p.project.dir" location="${wspdir}/Wsp_ModelingSound"/>
|
|---|
| 110 | <property name="p.xlf.dir" location="${wspdir}/Wsp_ModelingSound/spaces/gen/locale/${localization(target)}"/>
|
|---|
| 111 | <property name="p.xlf.name" value="sc_sms.xlf"/>
|
|---|
| 112 | </ant>
|
|---|
| 113 | </then>
|
|---|
| 114 | <else>
|
|---|
| 115 | <ant target="wsp.l10n">
|
|---|
| 116 | <property name="p.project.dir" location="${wspdir}/Wsp_Modeling"/>
|
|---|
| 117 | <property name="p.xlf.dir" location="${basedir}/${localization(target)}/${localization.locale.dirName}/${localization.locales.modeling}"/>
|
|---|
| 118 | <property name="p.xlf.name" value="sc_sm.xlf"/>
|
|---|
| 119 | </ant>
|
|---|
| 120 | <ant target="wsp.l10n">
|
|---|
| 121 | <property name="p.project.dir" location="${wspdir}/Wsp_ModelingAssmnt"/>
|
|---|
| 122 | <property name="p.xlf.dir" location="${basedir}/${localization(target)}/${localization.locale.dirName}/${localization.locales.modeling}"/>
|
|---|
| 123 | <property name="p.xlf.name" value="sc_sma.xlf"/>
|
|---|
| 124 | </ant>
|
|---|
| 125 | <ant target="wsp.l10n">
|
|---|
| 126 | <property name="p.project.dir" location="${wspdir}/Wsp_ModelingSound"/>
|
|---|
| 127 | <property name="p.xlf.dir" location="${basedir}/${localization(target)}/${localization.locale.dirName}/${localization.locales.modeling}"/>
|
|---|
| 128 | <property name="p.xlf.name" value="sc_sms.xlf"/>
|
|---|
| 129 | </ant>
|
|---|
| 130 | </else>
|
|---|
| 131 | </if>
|
|---|
| 132 |
|
|---|
| 133 | <!-- Création du XLIFF framework -->
|
|---|
| 134 | <mkdir dir="${basedir}/${localization(target)}/${localization.locale.dirName}/${localization.locales.framework}"/>
|
|---|
| 135 | <i8n sourceFile="${wspdir}/Lib_XulRunner/win/chrome/en-US.jar" xliffExportFile="${basedir}/${localization(target)}/${localization.locale.dirName}/${localization.locales.framework}/${localization.locales.framework}.xulrunner.xlf"
|
|---|
| 136 | localizePropertiesUtf8Format="true"
|
|---|
| 137 | localizeDtdEntitiesFormat="true"
|
|---|
| 138 | uriResolverRegexp="\/en-US.jar\/([\/.]*)"
|
|---|
| 139 | uriResolverReplacement="sc-SC/$1">
|
|---|
| 140 | <xliff>
|
|---|
| 141 | <fileset dir="${basedir}/${localization(target)}/${localization.locale.dirName}/${localization.locales.framework}" includes="${localization.locales.framework}.xulrunner.xlf"/>
|
|---|
| 142 | </xliff>
|
|---|
| 143 | </i8n>
|
|---|
| 144 |
|
|---|
| 145 | <!-- Création du XLIFF du modèle modeling Wsp_ --> |
|---|
| 146 | <!-- TODO -->
|
|---|
| 147 |
|
|---|
| 148 | <!-- # cleanUp des langues natives -->
|
|---|
| 149 | <echo message="# cleanUp ... ${basedir}"/>
|
|---|
| 150 | <delete>
|
|---|
| 151 | <fileset dir="${basedir}" includes="fr-FR/locale/modeling/* fr-FR/locale/SCENARIcore/* en-US/locale/framework/*"/>
|
|---|
| 152 | </delete>
|
|---|
| 153 |
|
|---|
| 154 | <!-- suppression du répertoire temporaire -->
|
|---|
| 155 | <delete dir="${tmp.dir}"/>
|
|---|
| 156 | </target>
|
|---|
| 157 |
|
|---|
| 158 | <!-- Run principal -->
|
|---|
| 159 | <target name="All">
|
|---|
| 160 | <echo message="Aucune langue n'est spécifiée. Veuillez lancer le build.xml des sous projets." level="error"/>
|
|---|
| 161 | </target>
|
|---|
| 162 |
|
|---|
| 163 | <!-- Création des xlf des Wsp_modeling* -->
|
|---|
| 164 | <target name="wsp.l10n">
|
|---|
| 165 | <echo> l10n : ${p.project.dir} </echo>
|
|---|
| 166 | <i8n xliffExportFile="${p.xlf.dir}/${p.xlf.name}"
|
|---|
| 167 | xliffExportUseUriParam="true"
|
|---|
| 168 | step="dic">
|
|---|
| 169 | <sourceFiles>
|
|---|
| 170 | <dirset dir="${p.project.dir}/spaces/gen" excludes="locale"/>
|
|---|
| 171 | </sourceFiles>
|
|---|
| 172 | <xliff>
|
|---|
| 173 | <fileset dir="${p.xlf.dir}" includes="${p.xlf.name}"/>
|
|---|
| 174 | </xliff>
|
|---|
| 175 | </i8n>
|
|---|
| 176 | </target>
|
|---|
| 177 |
|
|---|
| 178 | </project>
|
|---|