-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.aux.xml
480 lines (455 loc) · 23.4 KB
/
build.aux.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
<?xml version="1.0" encoding="UTF-8"?>
<project name="aux" default="" basedir=".">
<description>auxiliary targets</description>
<property name="buildfile.aux.loaded" value="true"/>
<!-- * Setup and Update Targets * -->
<target name="genconf" unless="nogenconf"
description="generate use/locale specific user config file">
<property name="genconf.output" value="${config.dir}/user.conf"/>
<notavailableassert file="${genconf.output}"/>
<if>
<istrue value="${genconf.noinput}"/>
<then>
<propertyalias property="default.locale" alias="locale"/>
<property name="genconf.lot.user.name" value="${lot.user.name}"/>
<property name="genconf.lot.user.homepageURL" value="${lot.user.homepageURL}"/>
<property name="genconf.firefox.langpack.guid" value="langpack-${locale}@firefox.l10n.jp"/>
<property name="genconf.thunderbird.langpack.guid" value="langpack-${locale}@thunderbird.l10n.jp"/>
<property name="genconf.fennec.langpack.guid" value="langpack-${locale}@fennec.l10n.jp"/>
</then>
<else>
<echo message="Please answer some quetions to generate your user.conf file."/>
<echo message="If you type enter without any input, default value will be used."/>
</else>
</if>
<!-- ask common user dependent config -->
<input addproperty="locale" defaultvalue="${default.locale}"
message="input your locale code (default: ${default.locale})"/>
<equals arg1="${locale}" arg2="ja" property="genconf.lot.lang" value="japanese" else="english"/>
<input addproperty="genconf.lot.user.name" defaultvalue="${lot.user.name}"
message="input your l10n community name (default: ${lot.user.name})"/>
<input addproperty="genconf.lot.user.homepageURL" defaultvalue="${lot.user.homepageURL}"
message="input your homepage url (default: ${lot.user.homepageURL})"/>
<input addproperty="genconf.firefox.langpack.guid" defaultvalue="langpack-${locale}@firefox.l10n.jp"
message="input your firefox langpack guid (default: langpack-${locale}@firefox.l10n.jp)"/>
<input addproperty="genconf.thunderbird.langpack.guid" defaultvalue="langpack-${locale}@thunderbird.l10n.jp"
message="input your thunderbird langpack guid (default: langpack-${locale}@thunderbird.l10n.jp)"/>
<input addproperty="genconf.fennec.langpack.guid" defaultvalue="langpack-${locale}@fennec.l10n.jp"
message="input your fennec langpack guid (default: langpack-${locale}@fennec.l10n.jp)"/>
<!-- childbrowser specific configs -->
<equals arg1="${genconf.type}" arg2="childbrowser" property="genconf.doreplace.onoff" value="" else="#"/>
<equals arg1="${genconf.type}" arg2="childbrowser" property="genconf.replace.file.6.onoff" value="" else="#"/>
<equals arg1="${genconf.type}" arg2="childbrowser" property="genconf.replace.file.ja.onoff" value="#" else=""/>
<equals arg1="${genconf.type}" arg2="childbrowser" property="genconf.charcheck.deny.onoff" value="" else="#"/>
<equals arg1="${genconf.type}" arg2="childbrowser" property="genconf.nowordcheck.onoff" value="#"/>
<!-- ja locale specific configs -->
<equals arg1="${locale}" arg2="ja" property="genconf.nopluralcheck.onoff" value="#" else=""/>
<equals arg1="${locale}" arg2="ja" property="genconf.nowordcheck.onoff" value="#" else=""/>
<equals arg1="${locale}" arg2="ja" property="genconf.nosuspectedwordcheck.onoff" value="#" else=""/>
<equals arg1="${locale}" arg2="ja" property="genconf.nocharcheck.onoff" value="#" else=""/>
<!-- generate user.conf -->
<copy file="${lot.res.dir}/template/user.conf" tofile="${genconf.output}">
<filterchain><expandproperties/></filterchain>
</copy>
<echo message="${genconf.output} file is generated according to your input."/>
<echo message="You can edit any setting anytime. See the file for more information."/>
</target>
<target name="remove-en-US" depends="load-mainconf" unless="reuse.en-US">
<available property="en-US.dir.exists" file="${en-US.dir}" type="dir"/>
<confirm message="${en-US.dir} ディレクトリを削除してもよろしいですか?(Y/N)" if="en-US.dir.exists"/>
<delete dir="${en-US.dir}"/>
</target>
<target name="download-en-US" depends="load-mainconf"
description="downlaod and expand en-US l10n zip file">
<!-- set properties -->
<isset arg="download.en-US.rev" property="download.en-US.url"
value="${download.en-US.url.dir}/${download.en-US.filename}"
else="${download.en-US.url.dir}/${download.en-US.latestfilename}"/>
<expandproperty name="download.en-US.url"/>
<isset arg="download.en-US.rev" property="download.en-US.dir"
value="${l10n.dir}/en-US-rev${download.en-US.rev}" else="${l10n.dir}/en-US"/>
<expandproperty name="download.en-US.dir"/>
<!-- now download and unzip it -->
<antcall target="remove-en-US">
<param name="en-US.dir" value="${download.en-US.dir}"/>
</antcall>
<mkdir dir="${lot.temp.dir}/download-en-US"/>
<get src="${download.en-US.url}" dest="${lot.temp.dir}/download-en-US/en-US.zip"/>
<unzip src="${lot.temp.dir}/download-en-US/en-US.zip" dest="${download.en-US.dir}">
<globmapper from="en-US/*" to="*"/>
</unzip>
</target>
<target name="newlocale" depends="load-mainconf"
description="copy en-US files to your new locale (start new l10n)">
<propertyalias property="default.locale" alias="locale"/>
<notavailableassert file="${l10n.dir}/${locale}" type="dir"
message="${l10n.dir}/${locale} directory already exists"/>
<copy todir="${l10n.dir}/${locale}" preservelastmodified="true">
<fileset dir="${en-US.dir}"/>
</copy>
</target>
<target name="setupl10n" depends="genconf, get-en-US, clone-locale, clone-src"
description="generate config file and get l10n files for your locale"/>
<target name="setupnewl10n" depends="genconf, get-en-US, newlocale"
description="generate config file and get en-US files for your new locale"/>
<target name="setupchildbrowser">
<antcall>
<target name="genconf"/><target name="get-en-US"/><target name="checkout-src"/>
<param name="genconf.type" value="childbrowser"/>
</antcall>
</target>
<!-- * Work with mozja hg repository * -->
<target name="clone-src" depends="load-mainconf"
description="clone japanese l10n repository from google code">
<hgclone repo="${hg.mozja.repo}" dir="${hg.mozja.dir}"/>
<hgup dir="${hg.mozja.dir}" branch="${hg.mozja.branch}"/>
<echo message="set default-push in ${hg.mozja.dir}/.hg/hgrc file if you want"/>
</target>
<target name="pull-src" depends="load-mainconf"
description="pull japanese l10n repository from google code">
<hgpull dir="${hg.mozja.dir}"/>
<confirm message="${hg.mozja.dir} の未コミット変更は失われます。よろしいですか?(Y/N)"/>
<hgup dir="${hg.mozja.dir}" branch="${hg.mozja.branch}" clean="true"/>
</target>
<!-- * Work with hg.mozilla.org repository * -->
<target name="clone-mozilla" depends="load-mainconf"
description="clone mozilla repository from hg.mozilla.org">
<hgclone repo="${hg.mozilla.repo}" dir="${hg.mozilla.dir}"/>
</target>
<target name="pull-mozilla" depends="load-mainconf"
description="pull mozilla repository from hg.mozilla.org">
<hgpull dir="${hg.mozilla.dir}"/>
<hgup dir="${hg.mozilla.dir}" branch="default" clean="true"/>
</target>
<target name="clone-comm" depends="load-mainconf"
description="clone comm repository from hg.mozilla.org">
<hgclone repo="${hg.comm.repo}" dir="${hg.comm.dir}"/>
</target>
<target name="pull-comm" depends="load-mainconf"
description="pull comm repository from hg.mozilla.org">
<hgpull dir="${hg.comm.dir}"/>
<hgup dir="${hg.comm.dir}" branch="default" clean="true"/>
</target>
<target name="clone-extensions" depends="load-mainconf"
description="clone other repositoris from hg.mozilla.org (inspector, chatzilla)">
<hgclone repo="${hg.inspector.repo}" dir="${hg.inspector.dir}"/>
<hgclone repo="${hg.chatzilla.repo}" dir="${hg.chatzilla.dir}"/>
</target>
<target name="pull-extensions" depends="load-mainconf"
description="pull other repositoris from hg.mozilla.org (inspector, chatzilla)">
<hgpull dir="${hg.inspector.dir}"/>
<hgup dir="${hg.inspector.dir}" branch="default" clean="true"/>
<hgpull dir="${hg.chatzilla.dir}"/>
<hgup dir="${hg.chatzilla.dir}" branch="default" clean="true"/>
</target>
<target name="clone-venkman" depends="load-mainconf"
description="clone venkman from hg.mozilla.org">
<hgclone repo="${hg.venkman.repo}" dir="${hg.venkman.dir}"/>
</target>
<target name="clone-locale" depends="load-mainconf"
description="clone l10n mercurial repository from hg.mozilla.org">
<propertyalias property="default.locale" alias="locale"/>
<hgclone repo="${hg.l10n.repo.base}${locale}" dir="${hg.l10n.dir}/${locale}"/>
<echo message="setting ssh url for default-push of the repository"/>
<replaceregexp file="${hg.l10n.dir}/${locale}/.hg/hgrc"
match="^(\[paths\]\ndefault = http(://.+/${locale})\n)$"
replace="\1default-push = ssh\2${N}"/>
<if>
<equals arg1="${locale}" arg2="ja"/>
<then>
<hgclone repo="${hg.l10n.repo.base}ja-JP-mac" dir="${hg.l10n.dir}/ja-JP-mac"/>
<echo message="setting ssh url for default-push of the repository"/>
<replaceregexp file="${hg.l10n.dir}/ja-JP-mac/.hg/hgrc"
match="^(\[paths\]\ndefault = http(://.+/ja-JP-mac)\n)$"
replace="\1default-push = ssh\2${N}"/>
</then>
</if>
</target>
<target name="pull-locale" depends="load-mainconf"
description="pull l10n mercurial repository from hg.mozilla.org">
<propertyalias property="default.locale" alias="locale"/>
<hgpull dir="${hg.l10n.dir}/${locale}"/>
<hgup dir="${hg.l10n.dir}/${locale}" branch="default" clean="true"/>
<if>
<equals arg1="${locale}" arg2="ja"/>
<then>
<hgpull dir="${hg.l10n.dir}/ja-JP-mac"/>
<hgup dir="${hg.l10n.dir}/ja-JP-mac" branch="default" clean="true"/>
</then>
</if>
</target>
<target name="clone-all" description="clone all hg repogitories except src">
<antcall>
<target name="clone-locale"/><target name="clone-mozilla"/><target name="clone-comm"/><target name="clone-extensions"/>
</antcall>
</target>
<target name="pull-all" description="pull all hg repogitories">
<antcall>
<target name="pull-locale"/><target name="pull-mozilla"/><target name="pull-comm"/><target name="pull-extensions"/>
</antcall>
</target>
<target name="pre-commit-hg" depends="load-mainconf"
description="hg status check before commit">
<property name="locale" value="${default.locale}"/>
<echo message="executing hg status command:${N}hg -R ${hg.l10n.dir}/${locale} status"/>
<hg failonerror="true"><arg line="-R ${hg.l10n.dir}/${locale} status"/></hg>
<echo message="executing hg diff command:${N}hg -R ${hg.l10n.dir}/${locale} diff"/>
<hg failonerror="true"><arg line="-R ${hg.l10n.dir}/${locale} diff"/></hg>
</target>
<!-- * copy locale files from mercurial repository to l10n directory * -->
<macrodef name="hgtol10n">
<attribute name="hgpath"/>
<attribute name="l10npath"/>
<attribute name="hgdir" default="${hg.mozilla.dir}"/>
<attribute name="l10ndir" default="${en-US.dir}"/>
<attribute name="rev" default=""/>
<attribute name="tempdir" default="${lot.temp.dir}/hgtol10n"/>
<attribute name="failonerror" default="true"/>
<sequential>
<if>
<or>
<not><available file="@{l10ndir}/@{l10npath}" type="dir"/></not>
<not><isset property="reuse.en-US"/></not>
</or>
<then><if>
<equals arg1="@{rev}" arg2=""/>
<then>
<copy todir="@{l10ndir}/@{l10npath}" failonerror="false" preservelastmodified="true">
<fileset dir="@{hgdir}/@{hgpath}"/>
</copy>
</then>
<else>
<delete dir="@{tempdir}"/><mkdir dir="@{tempdir}"/>
<echo message="executing hg archive command: hg -R @{hgdir} archive --rev @{rev} --include @{hgdir}/@{hgpath} @{tempdir}"/>
<hg failonerror="@{failonerror}"><arg line="-R @{hgdir} archive --rev @{rev} --include @{hgdir}/@{hgpath} @{tempdir}"/></hg>
<move todir="@{l10ndir}/@{l10npath}" failonerror="false" preservelastmodified="true">
<fileset dir="@{tempdir}/@{hgpath}"/>
</move>
</else>
</if></then>
</if>
</sequential>
</macrodef>
<presetdef name="mozillatol10n">
<hgtol10n hgdir="${hg.mozilla.dir}" rev="${mozillatol10n.rev}"/>
</presetdef>
<presetdef name="commtol10n">
<hgtol10n hgdir="${hg.comm.dir}" rev="${commtol10n.rev}"/>
</presetdef>
<target name="mozilla-to-l10n" depends="remove-en-US"
description="copy en-US locale files from mozilla hg repository to l10n directory">
<property name="mozillatol10n.rev" value=""/>
<echo message="getting en-US locale files from ${hg.mozilla.dir}"/>
<mozillatol10n hgpath="browser/locales/en-US" l10npath="browser"/><!-- only firefox -->
<mozillatol10n hgpath="browser/extensions/webcompat-reporter/locales/en-US" l10npath="browser/extensions/webcompat-reporter"/><!-- only firefox -->
<mozillatol10n hgpath="browser/extensions/onboarding/locales/en-US" l10npath="browser/extensions/onboarding"/><!-- only firefox -->
<mozillatol10n hgpath="devtools/client/locales/en-US" l10npath="devtools/client"/>
<mozillatol10n hgpath="devtools/shared/locales/en-US" l10npath="devtools/shared"/>
<mozillatol10n hgpath="devtools/shim/locales/en-US" l10npath="devtools/shim"/>
<mozillatol10n hgpath="dom/locales/en-US" l10npath="dom"/>
<mozillatol10n hgpath="extensions/spellcheck/locales/en-US" l10npath="extensions/spellcheck"/>
<mozillatol10n hgpath="netwerk/locales/en-US" l10npath="netwerk"/>
<mozillatol10n hgpath="browser/branding/official/locales/en-US" l10npath="browser/branding/official"/><!-- only firefox -->
<mozillatol10n hgpath="security/manager/locales/en-US" l10npath="security/manager"/>
<mozillatol10n hgpath="toolkit/locales/en-US" l10npath="toolkit"/>
<mozillatol10n hgpath="mobile/locales/en-US" l10npath="mobile"/><!-- only fennec -->
<mozillatol10n hgpath="mobile/android/base/locales/en-US" l10npath="mobile/android/base"/><!-- only nativeui fennec -->
<mozillatol10n hgpath="mobile/android/locales/en-US" l10npath="mobile/android"/><!-- only nativeui fennec -->
</target>
<target name="comm-to-l10n" depends="remove-en-US"
description="copy en-US locale files from comm hg repository to l10n directory">
<property name="commtol10n.rev" value=""/>
<echo message="getting en-US locale files from ${hg.comm.dir}"/>
<commtol10n hgpath="chat/locales/en-US" l10npath="chat"/><!-- only thunderbird -->
<commtol10n hgpath="calendar/locales/en-US" l10npath="calendar"/><!-- only thunderbird -->
<commtol10n hgpath="editor/ui/locales/en-US" l10npath="editor/ui"/><!-- thunderbird & seamonkey -->
<commtol10n hgpath="mail/locales/en-US" l10npath="mail"/><!-- only thunderbird -->
<commtol10n hgpath="suite/locales/en-US" l10npath="suite"/><!-- only seamonkey -->
</target>
<target name="other-to-l10n" depends="remove-en-US"
description="copy en-US locale files from other hg repository to l10n directory">
<echo message="getting en-US locale files from other repositories"/>
<hgtol10n hgdir="${hg.inspector.dir}" hgpath="resources/locale/en-US" l10npath="extensions/inspector/chrome"/>
<hgtol10n hgdir="${hg.chatzilla.dir}" hgpath="locales/en-US" l10npath="extensions/irc"/>
<!-- hgtol10n hgdir="${hg.venkman.dir}" hgpath="locales/en-US" l10npath="extensions/venkman"/ -->
</target>
<target name="repo-to-l10n" depends="mozilla-to-l10n, comm-to-l10n, other-to-l10n"
description="copy en-US locale files from hg repository to l10n directory"/>
<target name="en-US-to-l10n" depends="repo-to-l10n"/>
<target name="get-en-US" depends="load-mainconf">
<if>
<and>
<available file="${hg.mozilla.dir}/.hg" type="dir"/>
<available file="${hg.comm.dir}/.hg" type="dir"/>
</and>
<then>
<antcall target="repo-to-l10n"/>
</then>
<else>
<echo message="Clone of mozilla/comm hg repositories are not found.${N}You need clone the repositories now. But it takes long time and require about 1GB disk space. If you want, you can just download zip of en-US files instead."/>
<input addproperty="do.clone-mozilla.now" defaultvalue="no" validargs="yes,no"
message="Do you want to clone repositories now? (recommended: yes, default: no)"/>
<if>
<equals arg1="yes" arg2="${do.clone-mozilla.now}"/>
<then>
<antcall target="clone-mozilla"/>
<antcall target="clone-comm"/>
<antcall target="clone-extensions"/>
<antcall target="repo-to-l10n"/>
</then>
<else><antcall target="download-en-US"/></else>
</if>
</else>
</if>
</target>
<!-- * Routine Work Interface * -->
<!-- check for each applications -->
<macrodef name="commoncheckapp">
<attribute name="app"/>
<sequential>
<antcall target="commoncheck">
<param name="syntaxcheck.includes" value="${l10n.includes.@{app}}"/>
<param name="placeholdercheck.includes" value="${l10n.includes.@{app}}"/>
<param name="pluralcheck.includes" value="${l10n.includes.@{app}}"/>
<param name="errorsummary.output" value="${lot.log.dir}/@{app}/${locale}.${tstamp.yyyyMMddHH}.errorsummary"/>
<param name="syntaxcheck.output" value="${lot.log.dir}/@{app}/${locale}.${tstamp.yyyyMMddHH}.syntaxerror"/>
<param name="placeholdercheck.includes" value="${lot.log.dir}/@{app}/${locale}.${tstamp.yyyyMMddHH}.placeholdererror"/>
<param name="pluralcheck.includes" value="${lot.log.dir}/@{app}/${locale}.${tstamp.yyyyMMddHH}.pluralerror"/>
</antcall>
</sequential>
</macrodef>
<target name="commonchecktk"><commoncheckapp app="toolkit"/></target>
<target name="commoncheckfx"><commoncheckapp app="firefox"/></target>
<target name="commonchecktb"><commoncheckapp app="thunderbird"/></target>
<target name="commoncheckfe"><commoncheckapp app="fennec"/></target>
<target name="commonchecksm"><commoncheckapp app="seamonkey"/></target>
<target name="commoncheck-eachapp" depends="commonchecktk, commoncheckfx, commonchecktb, commoncheckfe, commonchecksm"
description="exec error check suite for l10n files per targetapp"/>
<macrodef name="compareapp">
<attribute name="app"/>
<sequential>
<antcall target="compare">
<param name="compare.includes" value="${l10n.includes.@{app}}"/>
<param name="errorsummary.output" value="${log.dir}/@{app}/${locale}.${tstamp.yyyyMMddHH}.errorsummary"/>
<param name="compare.output" value="${log.dir}/@{app}/${locale}.${tstamp.yyyyMMddHH}.compare"/>
</antcall>
</sequential>
</macrodef>
<target name="comparetk"><compareapp app="common"/></target>
<target name="comparefx"><compareapp app="firefox"/></target>
<target name="comparetb"><compareapp app="thunderbird"/></target>
<target name="comparefe"><compareapp app="fennec"/></target>
<target name="comparesm"><compareapp app="seamonkey"/></target>
<target name="compare-eachapp" depends="comparetk, comparefx, comparetb, comparefe, comparesm"
description="compare l10n files and check new/obsolate files/entities per targetapp"/>
<!-- check for all locales -->
<target name="genconf-alllocale" depends="load-mainconf">
<groovy><![CDATA[
properties.'alllocale.list'.eachMatch(/([a-zA-Z-]+)[\s,]*/) { a,locale ->
ant.antcall(target:'genconf') {
param(name: 'genconf.noinput', value: true)
param(name: 'locale', value: locale)
param(name: 'output', value: "${properties.'alllocale.config.dir'}/user.${locale}.conf")
}
}
]]></groovy>
</target>
<target name="clone-alllocale" depends="load-mainconf">
<groovy><![CDATA[
properties.'alllocale.list'.eachMatch(/([a-zA-Z-]+)[\s,]*/) { a,locale ->
ant.antcall(target:'clone-locale') { param(name: 'locale', value: locale) }
}
]]></groovy>
</target>
<target name="pull-alllocale" depends="load-mainconf">
<groovy><![CDATA[
properties.'alllocale.list'.eachMatch(/([a-zA-Z-]+)[\s,]*/) { a,locale ->
ant.antcall(target:'pull-locale') { param(name: 'locale', value: locale) }
}
]]></groovy>
</target>
<target name="commoncheck-alllocale" depends="load-mainconf">
<groovy><![CDATA[
properties.'alllocale.list'.eachMatch(/([a-zA-Z-]+)[\s,]*/) { a,locale ->
println "error checking $locale locale files..."
// to avoid OutOfMemoryError without ANT_OPTS, folk with java task (not ant/subant)
ant.java(classname: "org.apache.tools.ant.Main", fork: true, clonevm: true) {
arg(line: "commoncheck -Dconfig.user.file='${properties.'alllocale.config.dir'}/user.${locale}.conf' -Dlot.log.dir='log/locales' -Dsyntaxcheck.failonerror=false -Dplaceholdercheck.failonerror=false -Dpluralcheck.failonerror=false")
}
}
]]></groovy>
</target>
<target name="commoncheck-eachapp-alllocale" depends="load-mainconf">
<groovy><![CDATA[
properties.'alllocale.list'.eachMatch(/([a-zA-Z-]+)[\s,]*/) { a,locale ->
println "error checking $locale locale files..."
ant.java(classname: "org.apache.tools.ant.Main", fork: true, clonevm: true) {
arg(line: "commoncheck-eachapp -Dconfig.user.file='${properties.'alllocale.config.dir'}/user.${locale}.conf' -Dlot.log.dir='log/locales' -Dsyntaxcheck.failonerror=false -Dplaceholdercheck.failonerror=false -Dpluralcheck.failonerror=false")
}
}
]]></groovy>
</target>
<target name="compare-alllocale" depends="load-mainconf">
<groovy><![CDATA[
properties.'alllocale.list'.eachMatch(/([a-zA-Z-]+)[\s,]*/) { a,locale ->
println "comparing en-US and $locale locale files..."
// to avoid OutOfMemoryError without ANT_OPTS, folk with java task (not ant/subant)
ant.java(classname: "org.apache.tools.ant.Main", fork: true, clonevm: true) {
arg(line: "compare -Dconfig.user.file='${properties.'alllocale.config.dir'}/user.${locale}.conf' -Dlot.log.dir='log/locales'")
}
}
]]></groovy>
</target>
<target name="compare-eachapp-alllocale" depends="load-mainconf">
<groovy><![CDATA[
properties.'alllocale.list'.eachMatch(/([a-zA-Z-]+)[\s,]*/) { a,locale ->
println "comparing en-US and $locale locale files..."
ant.java(classname: "org.apache.tools.ant.Main", fork: true, clonevm: true) {
arg(line: "compare-eachapp -Dconfig.user.file='${properties.'alllocale.config.dir'}/user.${locale}.conf' -Dlot.log.dir='log/locales'")
}
}
]]></groovy>
</target>
<target name="checksuite-alllocale" depends="commoncheck-alllocale, compare-alllocale"/>
<target name="checksuite-eachapp-alllocale" depends="commoncheck-eachapp-alllocale, compare-eachapp-alllocale"/>
<!-- * escape and unescape * -->
<!-- switching unicode escape from/to utf-8 (only *.properties files are escaped/unescaped and others are just copied by default) -->
<target name="escape" depends="load-mainconf"
description="escape *.properties files and copy other files">
<loadmessage pattern="^vmsg\.escape\."/>
<availableassert file="${escape.fromdir}" type="dir" message="${vmsg.escape.no.fromdir}"/>
<escapeunicode-copy fromdir="${escape.fromdir}" todir="${escape.todir}" encoding="${escape.encoding}"
includes="${escape.includes}" excludes="${escape.excludes}"
escapeincludes="${escape.escapeincludes}" escapeexcludes="${escape.escapeexcludes}"/>
<antcall target="-escape-jar-"/>
<if>
<isset property="escape.jar.file"/>
<then>
<property name="escape.jar.dir" value="${escape.todir}"/>
<zip taskname="JAR Packaging (${escape.jar.file})" destfile="${escape.jar.dir}/${escape.jar.file}" compress="false" update="false">
<zipfileset dir="${escape.todir}/" excludes="${escape.jar.file}"/>
</zip>
</then>
</if>
</target>
<target name="unescape" depends="load-mainconf"
description="unescape *.properties files and copy other files">
<loadmessage pattern="^vmsg\.unescape\."/>
<availableassert file="${unescape.fromdir}" type="dir" message="${vmsg.unescape.no.fromdir}"/>
<if>
<isset property="unescape.jar.file"/>
<then>
<unjar src="${unescape.jar.file}" dest="${unescape.fromdir}"/>
</then>
</if>
<unescapeunicode-copy fromdir="${unescape.fromdir}" todir="${unescape.todir}" encoding="${unescape.encoding}"
includes="${unescape.includes}" excludes="${unescape.excludes}"
unescapeincludes="${unescape.unescapeincludes}" unescapeexcludes="${unescape.unescapeexcludes}"/>
</target>
<!-- * better to have * -->
<target name="imedic"
description="generate IME dictionary for filters">
<!-- 例えば "ウィンドウ" で "@@Window@@" に変換するための辞書を生成 -->
<fail message="not implemented yet..."/>
</target>
</project>