1 |
d2a8c3fd
|
Marc NICOLAS
|
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
|
|
<project name="fr.cnes.sitools.i18n" default="i18n_test_labels"
|
3 |
|
|
basedir="." xmlns:ac="antlib:net.sf.antcontrib">
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
<target name="i18n_test_labels">
|
7 |
|
|
|
8 |
|
|
<patternset id="filestotest">
|
9 |
|
|
|
10 |
|
|
</patternset>
|
11 |
|
|
|
12 |
|
|
|
13 |
|
|
<property file="../client-public/res/i18n/en/gui.properties"
|
14 |
|
|
prefix="i18n" />
|
15 |
|
|
<ac:propertyselector property="my.propertyList"
|
16 |
|
|
match="i18n.([^\=]*)" select="\1" />
|
17 |
|
|
<ac:sortlist property="propertyList" value="${my.propertyList}"
|
18 |
|
|
delimiter="," />
|
19 |
|
|
<echo file="i18n_result.txt" message="Liste des labels non utilises :${line.separator}" />
|
20 |
|
|
<ac:for list="${propertyList}" param="label">
|
21 |
|
|
<ac:sequential>
|
22 |
|
|
<antcall target="check_label">
|
23 |
|
|
<param name="label" value="@{label}"/>
|
24 |
|
|
</antcall>
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
</ac:sequential>
|
28 |
|
|
</ac:for>
|
29 |
|
|
|
30 |
|
|
</target>
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
<target name="check_label">
|
34 |
|
|
<condition property="contain">
|
35 |
|
|
<resourcecount when="greater" count="0">
|
36 |
|
|
<fileset dir="..">
|
37 |
|
|
<contains text="${label}" casesensitive="yes" />
|
38 |
|
|
<include name="**/*.js" />
|
39 |
|
|
<include name="**/*.java" />
|
40 |
|
|
</fileset>
|
41 |
|
|
</resourcecount>
|
42 |
|
|
</condition>
|
43 |
|
|
<ac:if>
|
44 |
|
|
<isfalse value="${contain}" />
|
45 |
|
|
<ac:then>
|
46 |
|
|
<echo append="true" file="i18n_result.txt" message="${label}:${line.separator}"/>
|
47 |
|
|
</ac:then>
|
48 |
|
|
</ac:if>
|
49 |
|
|
</target>
|
50 |
|
|
|
51 |
|
|
</project> |