Dialog Designer Localization Package Developers Guide: May 14, 2010 Issue Number: 1.0
Dialog Designer Localization Package Developers Guide: May 14, 2010 Issue Number: 1.0
Developers Guide
License
1. INTRODUCTION............................................................................................................................................. 1
REQUIREMENTS ........................................................................................................................................................ 1
2. ECLIPSE PROJECT SETUP .......................................................................................................................... 2
LINGUISTIC CONSIDERATIONS ................................................................................................................................... 2
CREATING A NEW PROJECT ....................................................................................................................................... 2
3. PROJECT STRUCTURE................................................................................................................................. 5
AUDIO FILES ............................................................................................................................................................. 6
PROMPT METAFILE .................................................................................................................................................... 8
LOCALIZATION LOGIC ............................................................................................................................................ 10
4. DEVELOPING THE LANGUAGE PACKAGE.......................................................................................... 12
FORMATLOCALE AND PROMPT METADATA ............................................................................................................ 12
LOCALIZATION FORMATS ....................................................................................................................................... 13
WRITING THE FORMATLOCALE CLASS .................................................................................................................... 17
5. PACKAGING THE LOCALIZATION BUNDLE FOR DIALOG DESIGNER ...................................... 18
6. LINGUISTIC DEVELOPMENT AND OTHER PRACTICES.................................................................. 20
GRAMMAR DEVELOPMENT AND PHRASES’ IDENTIFICATION .................................................................................... 20
VOCALIST AND STUDIO SELECTION ......................................................................................................................... 21
TESTING OF THE LOCALIZATION BUNDLE ................................................................................................................ 21
APPENDIX A: TEMPLATE FOR RECORDING GUIDELINES ...................................................................... 23
APPENDIX B: SAMPLE ANT SCRIPT FOR PACKAGING A LOCALIZATION BUNDLE. ...................... 25
-i-
1. Introduction
This guide is meant to assist a developer who is creating a new localization package
or modifying an existing package. It documents the steps to setting up an Eclipse
environment for Java development, the project structure for each localization
package, the logic involved in writing the localization class, how to deploy and test
the package and general best practices for creation of a new localization bundle.
Requirements
The list of required software is:
1
2.Eclipse Project Setup
Linguistic considerations
Prior to developing the Java code for the localization bundle, it may be worthwhile to
become familiar with some of the linguistic considerations. (See Linguistic
development and other practices).
To create a new Java project, use the new project wizard to create the project:
2
The name of the project is not too important. By default Avaya developed
localization projects are named: com.avaya.sce.<language code> where the
language code is the two letter ISO language code followed by the two letter ISO
country code. For example, en-us, es-es, etc.
As long as the localization bundle contents are in the correct format, then Dialog
Designer will be able to import and work with the localization packages.
When creating the project, make sure that the “Create separate source and output
folders” option is selected. This will create separate directories for the source code
and the compiled .class files and will keep the project organized.
The runtime framework classes for the localization packages are required to be on
the classpath for the project. From a Dialog Designer project, copy the “scert-
<version>.jar” file into the project and add to the classpath. The interfaces used by
the localization bundles should never change so you should not have to worry about
updating the build path with updated JAR files very often.
3
4
3.Project Structure
Eclipse by default will create a few project files that are part of every Java project.
In addition to the default project files, localization package projects contain the
following files and directories:
Directory Contents
audio/ The audio files (8bit 8kHz mono wav files).
5
Audio files
The audio directory contains the set of audio files that are required to localize
application data in all supported formats. Each file is pre-recorded audio that speaks
all or a portion of a localizable value, for example “one”, “fifteen”, “Monday”, “2004”,
“January”, etc. The audio file must be one of the supported audio formats as
specified by the VoiceXML specification (see:
http://www.w3.org/TR/voicexml20/#dmlAAudioFormats). Dialog Designer requires
the file to be an 8 kHz 8-bit mono WAV file.
There is no naming convention to the audio files—often these files take a numeric
name that makes it easy to perform calculations to determine the audio clip for the
data. For example “one” could correspond to 1.wav, “two” to 2.wav, etc., which
means a string of digits “397” could map to the audio files 3.wav, 9.wav and 7.wav.
For consistency, all audio files should use numerical names with zero padding (i.e.
0003.wav, 0025.wav, etc.).
Documentation
The docs directory contains the documentation on the details of the localization
bundle such as supplementary localization formats, data supported, etc. This
document will become part of the Dialog Designer help system and context-sensitive
help, so it is important that the details of the localization bundle are well
documented.
Libraries
The lib directory contains the Dialog Designer localization runtime JAR file that is
required for developing and testing the localization bundle. The localization bundle
should not employ any other JAR files which would introduce a requirement on the
Dialog Designer speech application to include the JAR file.
Phraseset metafile
The phraseset metafile is a Dialog Designer-specific file that contains supplemental
information about the audio files. There is one phraseset metafile per localization
bundle and it contains information about every audio file in the bundle. (NOTE: if
the phraseset file does not contain data for one or more audio files that are part of
the localization bundle, then Dialog Designer will not know anything about the audio
files—they are essentially orphaned). The metafile contains information such as the
transcription of the audio file, search words, etc. The phraseset metafile is generally
intended to be used for pre-recorded audio announcements in Dialog Designer
applications, so most of this information is not required for the “standard” phrases
(localization audio files), but these enable the localization phrases to seamlessly
integrate into a Dialog Designer application. If phrase text (transcription)
information is provided for each audio file in the phraseset, then these phrases can
be included in a recording script report.
6
In a Dialog Designer application, the phraseset metafile will generate a similarly
named Java class, which allows the runtime framework to generate a URL to the
audio file that the VoiceXML browser and media platform will use to play the audio to
the caller. If the phrase text (transcription) value is provided and the audio file
doesn’t exist, then the VXML browser can resort to using text-to-speech for the audio
otherwise the voice platform may have runtime errors if the audio files are not
available.
The localization phraseset must follow the following naming convention: “std_<lang
code>.phraseset”, such as “std_en_us.phraseset”. This naming convention will allow
the localization bundle to be loaded by the runtime framework. A phraseset is a
container for another Dialog Designer file type called a “phrase”. The names of
phrases within the phrase set should also follow a similar naming convention. While
this naming convention is not as critical as the naming convention for the phraseset,
it should be followed for consistency and to ensure compatibility with future changes.
Each phrase will start with the prefix “std_” as an abbreviation for “standard”. The
rest of the name should be a relatively descriptive name that identifies the audio
contents of the phrase, for example, “std_one”, “std_fifteen”, “std_monday”,
“std_2004”, “std_january”, etc. The name of the phrase should be all lower case and
should use underscores (‘_’) to separate words if necessary. Numbers are allowed in
the name, but other characters ‘-‘, ‘$’, ‘#’, etc. are not allowed.
To test if a name is valid, use the Java class wizard to create a new Java class. If
the type name is invalid, it will display an error message: (File > New >Class):
Every phrase from localization bundle has typically defined its respective string
constant to be used within java code to reference individual phrases instead of
7
referring them by their tags directly. Those constants’ definitions are for all
localization bundles isolated in separate file IPhraseDefs.java. The file contains a
definition of all the standard phrases but also provides a good place to define phrase
arrays for “offsetting” the ranges of phrases for simpler code. This definition can be
also placed directly in the FormatLocale.java, however this concept keeps the
phrases better organized for the localization bundle.
public interface IPhraseDefs {
....
....
}
Prompt metafile
Each language package contains one single metafile that specifies the available
localization formats and any additional formatting attributes that are required for the
language. The metafile is an XML file that is named with the two letter ISO language
code followed by the two letter ISO country code: “en_us.xml”, “es_es.xml”,
“fr_ca.xml”, etc.
The Dialog Designer Prompt Editor tool reads this file and uses it in the Eclipse
Properties view to populate the valid formatting choices and other format attributes.
The prompt code generation also uses the file when generating the code that is
ultimately passed to the locale formatting Java class.
8
<LocalizationProperties>
<Property name="format" comment="The value of the variable will be
formatted into pre-recorded audio using the selected format
specification.">
<Option tag="DMDYY" display="Date - 2 digit month, day, 4 digit year"/>
<Option tag="DMSPDYY" display="Date - spoken month, 2 digit day, 4 digit
year"/>
<Option tag="Nm" display="Number - normal intonation">
<Property name="gender" comment="The gender used in audio selection">
<Option tag="N" display="Neutral" default="true"/>
<Option tag="M" display="Male" />
<Option tag="F" display="Female" />
</Property>
</Option>
</Property>
</LocalizationProperties>
The XML document type definition (DTD) for the Prompt metafile
<!ELEMENT LocalizationProperties (Property+)>
<!ELEMENT Property (Option+)>
<!ATTLIST Property
name CDATA #REQUIRED
comment CDATA #IMPLIED>
<!ELEMENT Option (Property*)>
<!ATTLIST Option
tag CDATA #REQUIRED
display CDATA #REQUIRED
default CDATA #IMPLIED>
Note:
All prompt metafiles should be validated against the DTD to ensure that
the document is well formed and thus will be interpreted properly by the
Dialog Designer Prompt Editor.
This metafile allows the localization package developer to configure the Dialog
Designer Prompt Editor such that the formatting values and attributes are passed to
the localization class. It is important that the developer creates this file so that all
formatting rules and additional information (such as gender, etc.) can be supplied.
9
Localization Logic
Each localization package contains a single Java class that the Dialog Designer
runtime framework loads on demand to localize application data. This Java class
implements the logic required to convert the application data (in String format) into
the list of audio clips as specified by the formatting parameters.
The localization Java class must be named FormatLocale.java and must be in the
package “locale.<lang. code>” where <lang. code> is the two letter ISO language
code followed by the two letter ISO country code. Examples include,
“locale.en_us.FormatLocale” or “locale.fr_ca.FormatLocale”, etc.
The implementation of this method must be able to inspect the Format object, which
contains the formatting attributes as defined in the prompt metafile, and evaluate
the String “value” to return an array of phrase names. For example:
formatTextToAudio(“123”, formatInfo, messages);
10
{ “std_one”, “std_two”, “std_three”}
The same example but using format attribute key-value “format”==”number” may
return the string array:
{“std_hundred”, “std_and”, “std_twenty”, “std_three”}
After invoking the formatTextToAudio method, the runtime framework is then able to
resolve the set of phrase names into their corresponding audio files, which the VXML
platform will play to the caller.
Developing the logic to parse value string is the most complicated aspect of
developing a localization package; however example code already exists for English
and Spanish, so this code can provide an excellent starting point. Existing
Conversant/EBS localization packages may also be used as a reference for much of
the logic; however the code must be ported or re-written into Java. A novice or
intermediate Java developer should be able to understand the Spanish/English
example code and begin developing a new language, as most of the code required to
perform the data localization is String parsing.
11
4.Developing the Language Package
Example:
<LocalizationProperties>
<Property name="format" comment="The value of the variable will be
formatted into pre-recorded audio using the selected format
specification.">
<Option tag="number" display="Number">
<Property name="numbertype" comment="Type of numeric value">
<Option tag="integer" display="Integer" default="true">
<Property name="gender" comment="Gender of the spoken
integer number">
<Option tag="Nm" display="masculine gender">
<Property name="inflection" comment = "inflection
variants">
<Option tag = "Nmn" display ="neutral inflection"/>
<Option tag = "Nmf" display ="falling inflection"/>
</Property>
</Option>
<Option tag="Nf" display="feminine gender">
<Property name="inflection" comment = "inflection
variants">
<Option tag = "Nfn" display ="neutral inflection"/>
<Option tag = "Nff" display ="falling inflection" />
</Property>
</Option>
<Option tag="Nn" display="neutral gender">
<Property name="inflection" comment = "inflection
variants">
<Option tag = "Nnn" display ="neutral inflection"/>
<Option tag = "Nnf" display ="falling inflection" />
</Property>
</Option>
</Property>
</Option>
</Property>
</Option>
</Property>
</LocalizationProperties>
12
If the audio variable in the Prompt builder selects “Format = Number”, “Numbertype
= Integer”, “Gender = masculine gender”, and “Inflection = neutral inflection”, then
the generated code would contain the following code that will be passed to the
FormatLocale for the localization package:
Format formatInfo = new Format();
formatInfo.add(“format”, “number”);
formatInfo.add(“numbertype”, “integer”);
formatInfo.add(“gender”, “Nn”);
formatInfo.add(“inflection”, “Nnn”);
The runtime framework and prompt editor should be flexible enough to allow all
necessary localization parameters and attributes to be available to the localization
class. Current design evaluates only the last attribute from the formatInfo which
identifies the format to be applied for the variable. Therefore the format tag
(identifier) must be unique across all the formats defined within the prompt
metadata. It is the responsibility of the language package developer to keep the
prompt metadata file and FormatLocale class synchronized.
Localization Formats
These are the data formats that all localization packages are expected to support as
well as their naming conventions and data format. All localizable data is represented
in String form and it is expected that the data to be localized follow the format
specification. If the data is not in valid form, then the localization package may
throw an exception.
All localization bundles MUST support these formats. Localization bundles may
optionally support additional formats that may be specific for a certain locale. It is
up to the localization bundle developer to document the additional formats that are
supported.
13
Format Description Data Format Format Tag
(starts with)
Time Formats a time string as specified Type: String T
by the format type (i.e. 12 hour,
Format:
minutes, AM/PM; 24 hour,
minutes; 12 hour, minutes, HH[:]MM[:][SS]
seconds, AM/PM, etc.)
Example:
031545
03:15
03:15:45
Number Formats the digit string into Type: String N
numbers as specified by the
Format:
format type (i.e. “one hundred
fifty eight”, with decimal places, [-
fractions, etc.) ]#[,<space>.]###[
,<space>.]#
Example:
The delimiters for this format are
a comma (‘,’), and period (‘.’). 1024
The localization bundle will treat
15,588.345
the right most delimiter as the
decimal part of the number. 10.123,52
14
Format Description Data Format Format Tag
(starts with)
Characters Speaks a String character by Type: String C
character. At a minimum, all
xxxxxxx
localization bundles must support
A-Z, 0-9, *, #, (comma), Example:
(space). (i.e. “abc” as “a” “b”
aeiou
“c”, or “123” as “one” “two”
“three). 123
Localization bundles may support 401k
additional characters (including
non-Latin characters).
Localization bundles will ignore
extended characters that are not
supported.
Each localization package is expected to define additional format tags that provide
more detailed formatting options than the five listed in the above table—the tags
above are general categories that all localization packages must support. For
example, the Date format tags supported by Conversant US English is:
Tag Description
DMDYY 2 digit month, day, 4 digit year
DMDY 2 digit month, day, 2 digit year
DMD 2 digit month, day, but no year
DMSPDYY spoken month, 2 digit day, 4
digit year
DMSPDY spoken month, 2 digit day, 2
digit year
DMSPD spoken month, 2 digit day, but
no year
Tag Description
DDMSPYY day, spoken month and 4 digit year
DDMYY day, month and 4 digit year
DMMSP day, month spoken, no year
DDM day, month, no year
DDMSPYYf day, spoken month and 4 digit falling year
DDMYYf day, month and 4 digit year, falling form
DMMSPf day, month spoken, no year, falling form
15
DDMf day, month, no year, falling form
Because the format tags will often vary independently across localization packages, it
is important that each localization package support a default format if the tag that is
supplied to the localization package is not supported. This situation may occur in a
Dialog Designer project when a new language is added that is based off an existing
project language. The new language operation makes a copy of all resources in the
base language for the new language, so any prompts that use a format tag from the
base language will use the base language tag unless the Dialog Designer developer
modifies the format. To avoid illegal formats, each localization package should
define some code that determines if the format code is valid, and if it is not a
supported code, then resort to the default code for the language. For example:
/**
* Validates the formatTag is a legal tag supported by this
localization package
* and returns the tag or a default tag if formatTag is not supported.
*/
String getFormatString(String formatTag) {
// test to see if formatTag is a valid format, if not return the default ....
/**
* Converts the value string into an array of audio phrase names based
* on the attributes set in the Format object. Throws an
* InputFormatException if the value data is not formatted properly to
* be localized.
*/
public String[] formatTextToAudio(String value, Format format, LocaleResults
resultMessage) throws InputFormatException;
// get the requested format tag and if the tag is invalid, get the default
String formatTag = format.get(Format.FORMAT);
formatTag = getFormatString(formatTag);
...
16
Writing the FormatLocale class
The FormatLocale class is responsible for evaluating the value string given the
format attributes and returning an array of audio phrase names. The phrase names
must be the names of phrases in the localization package, and the order of the array
must be in the order the phrases will be played to the caller.
The Java language supplies all of the string parsing and number conversion API that
is required to develop the FormatLocale class. The String class contains useful API
such as startsWith(), indexOf(), substring(), endsWith(), length(), etc. The number
classes, Integer, Float, etc. define static API to convert a String into a float or int.
The String.split() method (or the StringTokenizer class) is a good utility that will
extract segments of a String given delimiters.
String arrays can be used for “offsetting” when evaluating various data values. For
example:
String[] MONTHS = {“std_january”, “std_february”, …, “std_december”};
String[] DIGITS = {“std_zero”, “std_one”, “std_two”, …, “std_nine”};
String[] TENS = {“std_zero”, “std_ten”, “std_twenty”, …, “std_ninety”};
The ultimate goal for these classes is to be easily readable and understandable,
which makes maintaining the code easier. The names of functions and variables
should be logical and care should be taken so that code (functions) can be called and
reused by other functions as opposed to a single one-thousand line function that
does everything.
17
5.Packaging the Localization Bundle for
Dialog Designer
Properly packaging the localization bundle for Dialog Designer is important otherwise
it will not be able to be imported into the development environment or invoked
properly.
The localization bundle must be packaged as a JAR file with the name <lang.
code>_<version>.zip, where version is a “dotted string” (i.e. “3.1.0”). The contents
of the bundle JAR are:
<lang. code>.jar The compiled contents of the src/ folder—contains the byte
code for locale.<lang. code>.FormatLocale as well as
any other helper classes. (NOTE: source code may
optionally be included).
For example, the packaged US English (en-us) localization bundle would look like:
en-us_3.1.0.jar
en-us.jar
Contains locale.en_us.FormatLocale.class,
any helper classes, and the en-us.properties
file.
en-us.properties
Contains the property: bundle.version=3.1.0
18
audio/*.wav
Contains the audio files for the US English
localization bundle
phraseset/std_en_us.phraseset
The phraseset file that contains information
about all of the audio files in the audio/
directory. This information is, at a minimum,
the phrase text, but may contain supplemental
information such as pronunciation comments,
voice talent, etc.
prompt/en-us.xml
The formats supported by the US English
localization bundle.
See Appendix B for an ANT script that can be used to compile and package a
localization bundle.
19
6.Linguistic development and other
practices
This section describes in general the best practices and common procedures when
creating new language bundle. This knowledge was gathered based on the
experience of the Avaya Globalization team with previous development of voice
applications including Enhanced Basic Speech for IVR platforms and the standard
localization bundles for Dialog Designer for existing languages.
• Date
• Time
• Number (integer)
• Number (decimal)
• Currency
• Spelling (digits & numbers)
In cooperation with the linguist it should be defined how each format is spoken and
also what individual phrases (voice fragments) would be used for concatenation. It
should be balanced how the formats would be fragmented in contrast to speech flow.
Despite some languages might allow higher fragmentation, for optimization reasons
it is often preferable to record more fragments to achieve smoother voice playback.
For example:
20
concatenated with word “pound” (for currency format), same for “minutes” multiplied
by intonation variants. The resulting phrase set includes 2500+ individual phrases.
It is also a good practice to experiment during the actual recording session in the
studio to record several voice fragments as separate recordings and concatenate
them manually in sound editor in order to:
This may fine tune the final set of phrases and respective voice files to be
created/recorded.
The recording script for a studio session should contain a list of phrases with their
respective file names. Release 3.1 of Dialog Designer introduces a new feature that
can generate a recording script for an existing phrase set. In order to create a
recording script, the developer must have a localization bundle pre-built with the
complete set of phrases and used by a dummy DD application. The report can be
created by running a utility from menu Project -> Reports -> Recording script. In
case the recording session is executed before the actual localization bundle is shaped
the recording script must be prepared manually.
Please see Appendix A for recording guidelines which should be shared with studio
prior recording.
The testing of the localization bundle can occur even before recording takes place
(when the voice files are created) because the tool can return only phrase names
allowing the developer to check whether the correct phrases are returned for the
21
given value/format as expected. After the voice files are available the test tool can
also play back the voice files (phrases) concatenated so the speech flow can be also
examined.
This is generally a good practice to use an extensive set of values to verify correct
behavior of the Java code for each format. The set of test values should cover
randomly an entire supported range of values for each format, also to cover certain
special cases (e.g. like 00:00 for time, or -0.001 for decimal, specific grammar cases
for that given language, etc.). Test values should also contain invalid ones - either
malformed or out of supported range (e.g 2006-20-20 for date, or 12:011:45 for
time, etc.)
22
Appendix A: Template for recording
guidelines
This is a template the Avaya Globalization team uses to communicate guidelines for
recording audio files to be used in a Dialog Designer Localization Bundle. Developers
may follow these guidelines as needed.
The following are the guidelines to use when conducting the recording session:
23
5. If necessary, apply a DC bias adjustment so that the waveform is centered at
0.
6. Silence at the beginning and end of each waveform should be as follows:
If phrase ends with a question mark append ~75 milliseconds at the end
(?) or period (.) – raising or falling of the waveform
inflection
If phrase ends with anything else append ~25 milliseconds at the end
(neutral inflection) of the waveform
7. Edit out all audible breaths between words and any “mouth clicks” within
words.
8. A backup of the original recording session must be archived at the studio.
9. Additional comments:
Due to specific nature of this recording the individual prompts should be recorded
considering the concatenation of the individual prompts into larger blocks e.g.:
The intonation of the prompts (pitch, pace, volume) should remain consistent
throughout the recording. It is a very good practice that during recording session the
individual edited prompts are concatenated in sound editor for test and played back
concatenated to verify that the final speech flow is smooth and sounds naturally. The
necessary adjustments to pronunciation can be made for recording alternates.
- ignore any colons, they are part of most standard phrase names by default
- phrases terminated with question marks (?) should be spoken with raising
inflection
- phrases terminated with period (.) should be spoken with falling inflection
24
Appendix B: Sample ANT script for
packaging a localization bundle.
This ANT script can be used to build and package a localization bundle. The script
relies on the proper project structure, so any packaging errors may indicate that the
project does not have a valid structure.
The ANT script may need some property values to be set so that the Java build
classpath is set correctly.
<?xml version="1.0"?>
<!-- ======================================================================
Aug 24, 2006 1:39:35 PM
====================================================================== -->
<project name="Localization Bundle Build" default="locbundle.build.english" basedir=".">
<description>
Script for building, packaging, and signing localization bundles
</description>
<!-- - - - - - - - - - - - - - - - - -
target: init
- - - - - - - - - - - - - - - - - -->
<target name="init">
<property name="temp.dir" value="${basedir}/temp.folder"/>
<property name="dest.dir" value="/temp"/>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: clean
- - - - - - - - - - - - - - - - - -->
<target name="clean" depends="init">
<delete dir="${temp.dir}" />
</target>
<!-- - - - - - - - - - - - - - - - - -
target: locbundle.build.english
Builds the US english localization bundle.
If the parameter "dest.dir" is provided, the packaged localization bundle
25
will be copied to this directory.
- - - - - - - - - - - - - - - - - -->
<target name="locbundle.build.english">
<antcall target="locbundle.build">
<param name="lang.code" value="en-us"/>
</antcall>
</target>
<!-- =================================
target: locbundle.build
Builds a localization bundle. Parameters:
- ${lang.code} - The language code for the bundle (ie. en-us)
- ${dest.dir} - The directory where the packaged bundle will be put.
================================= -->
<target name="locbundle.build" depends="init" description="Builds a localization
bundle. Need ${lang.code} and ${dest.dir}" if="lang.code">
<echo>Building language bundle ${lang.code} to directory: ${dest.dir}</echo>
<antcall target="build.bundle"/>
<!-- - - - - - - - - - - - - - - - - -
target: build.bundle
Requires param "lang.code"
- - - - - - - - - - - - - - - - - -->
<target name="build.bundle" depends="init">
<echo>Building localization bundle for ${lang.code}.</echo>
<echo>The packaged localization bundle will be copied to: ${dest.dir}</echo>
<!-- set the lang.code property for the rest of the script -->
<property name="lang.code" value="${lang.code}"/>
<!-- - - - - - - - - - - - - - - - - -
target: build.prepare
Prepares the build directory and copies all necessary files
into the working directory.
- - - - - - - - - - - - - - - - - -->
<target name="build.prepare.build.dir">
<property name="bundle.project" value="../com.avaya.sce.${lang.code}"/>
<echo>Preparing working directory for bundle ${lang.code}.</echo>
26
<!-- copy the audio files -->
<copy todir="${dir.audio}">
<fileset dir="${bundle.project}/audio">
<include name="*.wav"/>
</fileset>
</copy>
<!-- - - - - - - - - - - - - - - - - -
target: build.localization.logic.jar
Compiles the Java classes (the logic) for the localization bundle and
builds a JAR file.
- - - - - - - - - - - - - - - - - -->
<target name="build.localization.logic.jar">
<!-- - - - - - - - - - - - - - - - - -
target: build.localization.bundle.jar
Packages the localization bundle into a properly structured JAR file
- - - - - - - - - - - - - - - - - -->
<target name="build.localization.bundle.jar">
<!-- loads the "bundle.version" property from the properties file -->
<loadproperties srcFile="${dir.bundle}/${lang.code}.properties">
<filterchain>
<linecontains>
<contains value="bundle.version"/>
</linecontains>
</filterchain>
</loadproperties>
<echo>Localization bundle ${lang.code} version: ${bundle.version}</echo>
27
<!-- now JAR the localization bundle -->
<property name="jar.name" value="${lang.code}_${bundle.version}.jar"/>
<property name="jar.file" value="${temp.dir}/${jar.name}"/>
<jar destfile="${jar.file}">
<fileset dir="${dir.bundle}" />
<manifest>
<attribute name="Built-By" value="Avaya, Inc. (Dialog
Designer)"/>
</manifest>
</jar>
<!-- - - - - - - - - - - - - - - - - -
target: build.sign jar
Signs the JAR file if the "sign.jar" property is set
- - - - - - - - - - - - - - - - - -->
<target name="build.sign.jar" if="sign.jar">
<echo>Use the signjar task to sign the JAR file.
Certificates must be installed in order to successfully sign JAR files.
</echo>
</target>
</project>
28