From 753a6c60f47f3ac4f270005b65e9d6481de8eb68 Mon Sep 17 00:00:00 2001 From: Ashlee Young Date: Fri, 23 Oct 2015 10:00:02 -0700 Subject: Adding maven and ant source trees Change-Id: I0a39b9add833a31b9c3f98d193983ae2f3a5a445 Signed-off-by: Ashlee Young --- .../apache-ant-1.9.6/manual/Tasks/translate.html | 182 +++++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100644 framework/src/ant/apache-ant-1.9.6/manual/Tasks/translate.html (limited to 'framework/src/ant/apache-ant-1.9.6/manual/Tasks/translate.html') diff --git a/framework/src/ant/apache-ant-1.9.6/manual/Tasks/translate.html b/framework/src/ant/apache-ant-1.9.6/manual/Tasks/translate.html new file mode 100644 index 00000000..10e812a9 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/manual/Tasks/translate.html @@ -0,0 +1,182 @@ + + + + + + +Translate Task + + + + +

Translate

+

Description

+

Identifies keys in files delimited by special tokens +and translates them with values read from resource bundles. +

+

+A resource bundle contains locale-specific key-value pairs. +A resource bundle is a hierarchical set of property files. +A bundle name makes up its base family name. Each file that +makes up this bundle has this name plus its locale. For example, +if the resource bundle name is MyResources, the file that contains +German text will take the name MyResources_de. In addition to +language, country and variant are also used to form the files in +the bundle. +

+

+The resource bundle lookup searches for resource files with various +suffixes on the basis of (1) the desired locale and (2) the default +locale (basebundlename), in the following order from lower-level +(more specific) to parent-level (less specific): +

+
+basebundlename + "_" + language1 + "_" + country1 + "_" + variant1
+basebundlename + "_" + language1 + "_" + country1
+basebundlename + "_" + language1
+basebundlename
+basebundlename + "_" + language2 + "_" + country2 + "_" + variant2
+basebundlename + "_" + language2 + "_" + country2
+basebundlename + "_" + language2
+
+

+The file names generated thus are appended with the string ".properties" +to make up the file names that are to be used. +

+

+File encoding is supported. The encoding scheme of the source files, +destination files and the bundle files can be specified. + +Destination files can be explicitly overwritten using the +forceoverwrite attribute. If forceoverwrite +is false, the destination file is overwritten only if either the +source file or any of the files that make up the bundle have been +modified after the destination file was last modified. +

+

+New in Apache Ant 1.6:
+Line endings of source files are preserved in the translated files. +

+

FileSets are used to select files to +translate. +

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
todirDestination directory where destination files are + to be created.Yes
starttokenThe starting token to identify keys.Yes
endtokenThe ending token to identify keys.Yes
bundleFamily name of resource bundle.Yes
bundlelanguage + Locale specific language of resource bundle. Defaults to + default locale's language. + No
bundlecountry + Locale specific country of resource bundle. Defaults to + default locale's country. + No
bundlevariant + Locale specific variant of resource bundle. Defaults to + the default variant of the country and language being used. + No
srcencodingSource file encoding scheme. Defaults to + system default file encoding.No
destencodingDestination file encoding scheme. Defaults to + source file encoding.No
bundleencodingResource Bundle file encoding scheme. Defaults to + source file encoding.No
forceoverwriteOverwrite existing files even if the destination + files are newer. Defaults to "no".No
+

Parameters specified as nested elements

+ +

fileset

+

FileSets are used to select files that + contain keys for which value translated files are to be generated. +

+

Examples

+

Translate source file encoded in english into its japanese +equivalent using a resource bundle encoded in japanese. +

+
+  <translate toDir="$(dest.dir}/ja"
+        starttoken="#"
+        endtoken="#"
+        bundle="resource/BaseResource"
+        bundlelanguage="ja"
+        forceoverwrite="yes"
+        srcencoding="ISO8859_1"
+        destencoding="SJIS"
+        bundleencoding="SJIS">
+        <fileset dir="${src.dir}">
+            <include name="**/*.jsp"/>
+        </fileset>
+  </translate>
+
+ + + -- cgit 1.2.3-korg