diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
commit | 54b6cfa9a9e5b861a9930af873580d6dc20f773c (patch) | |
tree | 35051494d2af230dce54d6b31c6af8fc24091316 /tools/localize/testdata | |
download | frameworks_base-54b6cfa9a9e5b861a9930af873580d6dc20f773c.zip frameworks_base-54b6cfa9a9e5b861a9930af873580d6dc20f773c.tar.gz frameworks_base-54b6cfa9a9e5b861a9930af873580d6dc20f773c.tar.bz2 |
Initial Contribution
Diffstat (limited to 'tools/localize/testdata')
-rw-r--r-- | tools/localize/testdata/config.xml | 15 | ||||
-rw-r--r-- | tools/localize/testdata/import.xliff | 72 | ||||
-rw-r--r-- | tools/localize/testdata/merge.xliff | 72 | ||||
-rw-r--r-- | tools/localize/testdata/merge_en_current.xml | 44 | ||||
-rw-r--r-- | tools/localize/testdata/merge_en_old.xml | 45 | ||||
-rw-r--r-- | tools/localize/testdata/merge_xx_current.xml | 22 | ||||
-rw-r--r-- | tools/localize/testdata/merge_xx_old.xml | 21 | ||||
-rw-r--r-- | tools/localize/testdata/pseudo.xliff | 40 | ||||
-rw-r--r-- | tools/localize/testdata/res/values-zz-rZZ/strings.xml | 22 | ||||
-rw-r--r-- | tools/localize/testdata/res/values/strings.xml | 44 | ||||
-rw-r--r-- | tools/localize/testdata/strip_xliff.xliff | 70 | ||||
-rw-r--r-- | tools/localize/testdata/values/strings.xml | 32 | ||||
-rw-r--r-- | tools/localize/testdata/xliff1.xliff | 46 | ||||
-rw-r--r-- | tools/localize/testdata/xml.xml | 16 |
14 files changed, 561 insertions, 0 deletions
diff --git a/tools/localize/testdata/config.xml b/tools/localize/testdata/config.xml new file mode 100644 index 0000000..affa140 --- /dev/null +++ b/tools/localize/testdata/config.xml @@ -0,0 +1,15 @@ +<localize-config> + <configuration id="system" + old-cl="1" + new-cl="43019"> + <app dir="apps/common" /> + </configuration> + <configuration id="samples" + old-cl="24801" + new-cl="43019"> + <app dir="samples/NotePad" /> + <reject file="samples/NotePad/res/values/strings.xml" name="string:menu_delete"> + QA says this sounds <b>rude</b>. + </reject> + </configuration> +</localize-config> diff --git a/tools/localize/testdata/import.xliff b/tools/localize/testdata/import.xliff new file mode 100644 index 0000000..b99b739 --- /dev/null +++ b/tools/localize/testdata/import.xliff @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" + version="1.2" + > + <file datatype="x-android-res" + original="//device/tools/localize/testdata/res/values/strings.xml" + product-version="1.0" + date="08:10:54 12/07/07 PST" + source-language="en_US" + product-name="kila" + target-language="zz_ZZ" + build-num="44391" + > + <body> + <trans-unit id="string:changed_in_xx"> + <source>aaa</source> + <target>AAA</target> + </trans-unit> + <trans-unit id="string:first_translation"> + <source>bbb</source> + <target>BBB</target> + </trans-unit> + <trans-unit id="string:deleted_string"> + <source>ddd</source> + <target>DDDD</target> + </trans-unit> + <trans-unit id="array:0:growing_array"> + <source>1-One</source> + <target>1-oNE</target> + </trans-unit> + <trans-unit id="array:1:growing_array"> + <source>1-Two</source> + <target>1-tWO</target> + </trans-unit> + <trans-unit id="array:2:growing_array"> + <source>1-Three</source> + <target>1-tHREE</target> + </trans-unit> + <trans-unit id="array:0:shrinking_array"> + <source>2-One</source> + <target>2-oNE</target> + </trans-unit> + <trans-unit id="array:1:shrinking_array"> + <source>2-Two</source> + <target>2-tWO</target> + </trans-unit> + <trans-unit id="array:2:shrinking_array"> + <source>2-Three</source> + <target>2-tHREE</target> + </trans-unit> + <trans-unit id="array:3:shrinking_array"> + <source>2-Four</source> + <target>2-fOUR</target> + </trans-unit> + <trans-unit id="array:0:deleted_array"> + <source>4-One</source> + <target>4-oNE</target> + </trans-unit> + <trans-unit id="array:1:deleted_array"> + <source>4-Two</source> + <target>4-tWO</target> + </trans-unit> + <trans-unit id="array:2:deleted_array"> + <source>4-Three</source> + <target>4-tHREE</target> + </trans-unit> + + </body> + </file> +</xliff> + + diff --git a/tools/localize/testdata/merge.xliff b/tools/localize/testdata/merge.xliff new file mode 100644 index 0000000..2b78c45 --- /dev/null +++ b/tools/localize/testdata/merge.xliff @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" + version="1.2" + > + <file datatype="x-android-res" + original="testdata/merge_en_current.xml" + product-version="1.0" + date="08:10:54 12/07/07 PST" + source-language="en-US" + product-name="kila" + target-language="zz-ZZ" + build-num="44391" + > + <body> + <trans-unit id="string:changed_in_xx"> + <source>aaa</source> + <target>AAA</target> + </trans-unit> + <trans-unit id="string:first_translation"> + <source>bbb</source> + <target>BBB</target> + </trans-unit> + <trans-unit id="string:deleted_string"> + <source>ddd</source> + <target>DDDD</target> + </trans-unit> + <trans-unit id="array:0:growing_array"> + <source>1-One</source> + <target>1-oNE</target> + </trans-unit> + <trans-unit id="array:1:growing_array"> + <source>1-Two</source> + <target>1-tWO</target> + </trans-unit> + <trans-unit id="array:2:growing_array"> + <source>1-Three</source> + <target>1-tHREE</target> + </trans-unit> + <trans-unit id="array:0:shrinking_array"> + <source>2-One</source> + <target>2-oNE</target> + </trans-unit> + <trans-unit id="array:1:shrinking_array"> + <source>2-Two</source> + <target>2-tWO</target> + </trans-unit> + <trans-unit id="array:2:shrinking_array"> + <source>2-Three</source> + <target>2-tHREE</target> + </trans-unit> + <trans-unit id="array:3:shrinking_array"> + <source>2-Four</source> + <target>2-fOUR</target> + </trans-unit> + <trans-unit id="array:0:deleted_array"> + <source>4-One</source> + <target>4-oNE</target> + </trans-unit> + <trans-unit id="array:1:deleted_array"> + <source>4-Two</source> + <target>4-tWO</target> + </trans-unit> + <trans-unit id="array:2:deleted_array"> + <source>4-Three</source> + <target>4-tHREE</target> + </trans-unit> + + </body> + </file> +</xliff> + + diff --git a/tools/localize/testdata/merge_en_current.xml b/tools/localize/testdata/merge_en_current.xml new file mode 100644 index 0000000..6a11e68 --- /dev/null +++ b/tools/localize/testdata/merge_en_current.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="changed_in_xx">aaa</string> + <string name="first_translation">bbb</string> + <string name="previously_translated">ccc</string> + <string name="new_string">ccc</string> + + <string name="formatted_string"><b>bold</b><i>italic<u>italic_underline</u></i><u>underline</u></string> + + <array name="growing_array"> + <!-- somebody wrote a comment! --> + <item>1-One</item> + <item>1-Two</item> + <item>1-Three</item> + <item>1-Four</item> + </array> + <array name="shrinking_array"> + <!-- somebody wrote a comment! --> + <item>2-One</item> + <item>2-Two</item> + <item>2-Three</item> + </array> + <array name="new_array"> + <!-- somebody wrote a comment! --> + <item>3-One</item> + <item>3-Two</item> + <item>3-Three</item> + </array> +</resources> diff --git a/tools/localize/testdata/merge_en_old.xml b/tools/localize/testdata/merge_en_old.xml new file mode 100644 index 0000000..933f98e --- /dev/null +++ b/tools/localize/testdata/merge_en_old.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="changed_in_xx">aaa</string> + <string name="first_translation">bbb</string> + <string name="previously_translated">ccc</string> + <string name="deleted_string">ddd</string> + + <string name="formatted_string"><b>bold</b><i>italic<u>italic_underline</u></i><u>underline</u></string> + + <array name="growing_array"> + <!-- somebody wrote a comment! --> + <item>1-One</item> + <item>1-Two</item> + <item>1-Three</item> + </array> + <array name="shrinking_array"> + <!-- somebody wrote a comment! --> + <item>2-One</item> + <item>2-Two</item> + <item>2-Three</item> + <item>2-Four</item> + </array> + <array name="deleted_array"> + <!-- somebody wrote a comment! --> + <item>4-One</item> + <item>4-Two</item> + <item>4-Three</item> + </array> +</resources> + diff --git a/tools/localize/testdata/merge_xx_current.xml b/tools/localize/testdata/merge_xx_current.xml new file mode 100644 index 0000000..c2a783d --- /dev/null +++ b/tools/localize/testdata/merge_xx_current.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="changed_in_xx">AAAA</string> + <string name="previously_translated">CCC</string> +</resources> + + diff --git a/tools/localize/testdata/merge_xx_old.xml b/tools/localize/testdata/merge_xx_old.xml new file mode 100644 index 0000000..9d3a7d8 --- /dev/null +++ b/tools/localize/testdata/merge_xx_old.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="changed_in_xx">aaa</string> + <string name="previously_translated">CCC</string> +</resources> + diff --git a/tools/localize/testdata/pseudo.xliff b/tools/localize/testdata/pseudo.xliff new file mode 100644 index 0000000..5b44f86 --- /dev/null +++ b/tools/localize/testdata/pseudo.xliff @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" + version="1.2" + > + <file datatype="x-android-res" + original="//device/tools/localization/tests/res/values/strings.xml" + product-version="1.0" + date="08:10:54 12/07/07 PST" + source-language="en-US" + product-name="kila" + target-language="zz-ZZ" + build-num="32138" + > + <body> + <trans-unit id="string:complex"> + <source>First <g id="string:complex:0" ctype="underline">underline</g>, <g id="string:complex:1" ctype="italic">italic<g id="string:complex:2" ctype="bold">italicbold</g></g> End </source> + </trans-unit> + <trans-unit id="string:complex-quoted"> + <source xml:space="preserve">First <g id="string:complex-quoted:0" ctype="underline">underline</g>, <g id="string:complex-quoted:1" ctype="italic">italic<g id="string:complex-quoted:2" ctype="bold">italicbold</g></g> End</source> + </trans-unit> + <trans-unit id="string:simple"> + <source>Simple</source> + </trans-unit> + <trans-unit id="array:0:simple"> + <source>Simple</source> + </trans-unit> + <trans-unit id="array:1:simple"> + <source>Simple</source> + </trans-unit> + <trans-unit id="string:simple-quoted"> + <source xml:space="preserve"> Quote</source> + <alt-trans> + <source xml:lang="en" xml:space="preserve"> OLD Quote</source> + <target xml:lang="xx"> OLD Ờũỡŧę</target> + </alt-trans> + </trans-unit> + </body> + </file> +</xliff> + diff --git a/tools/localize/testdata/res/values-zz-rZZ/strings.xml b/tools/localize/testdata/res/values-zz-rZZ/strings.xml new file mode 100644 index 0000000..c2a783d --- /dev/null +++ b/tools/localize/testdata/res/values-zz-rZZ/strings.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="changed_in_xx">AAAA</string> + <string name="previously_translated">CCC</string> +</resources> + + diff --git a/tools/localize/testdata/res/values/strings.xml b/tools/localize/testdata/res/values/strings.xml new file mode 100644 index 0000000..6a11e68 --- /dev/null +++ b/tools/localize/testdata/res/values/strings.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="changed_in_xx">aaa</string> + <string name="first_translation">bbb</string> + <string name="previously_translated">ccc</string> + <string name="new_string">ccc</string> + + <string name="formatted_string"><b>bold</b><i>italic<u>italic_underline</u></i><u>underline</u></string> + + <array name="growing_array"> + <!-- somebody wrote a comment! --> + <item>1-One</item> + <item>1-Two</item> + <item>1-Three</item> + <item>1-Four</item> + </array> + <array name="shrinking_array"> + <!-- somebody wrote a comment! --> + <item>2-One</item> + <item>2-Two</item> + <item>2-Three</item> + </array> + <array name="new_array"> + <!-- somebody wrote a comment! --> + <item>3-One</item> + <item>3-Two</item> + <item>3-Three</item> + </array> +</resources> diff --git a/tools/localize/testdata/strip_xliff.xliff b/tools/localize/testdata/strip_xliff.xliff new file mode 100644 index 0000000..9254cf2 --- /dev/null +++ b/tools/localize/testdata/strip_xliff.xliff @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" + version="1.2" + > + <file datatype="x-android-res" + original="//device/tools/localization/tests/res/values/strings.xml" + product-version="1.0" + date="08:10:54 12/07/07 PST" + source-language="en-US" + product-name="kila" + target-language="zz-ZZ" + build-num="32138" + > + <body> + + <trans-unit id="string:string-000-0"> + </trans-unit> + <trans-unit id="string:string-001-0"> + <alt-trans> + <source xml:lang="en" xml:space="preserve">source</source> + </alt-trans> + </trans-unit> + <trans-unit id="string:string-010-0"> + <alt-trans> + <target xml:lang="zz" xml:space="preserve">target</target> + </alt-trans> + </trans-unit> + <trans-unit id="string:string-011-0"> + <alt-trans> + <source xml:lang="en" xml:space="preserve">source</source> + <target xml:lang="zz" xml:space="preserve">target</target> + </alt-trans> + </trans-unit> + + <trans-unit id="string:string-100-1"> + <source xml:space="preserve">source</source> + </trans-unit> + <trans-unit id="string:string-101-1"> + <source xml:space="preserve">source</source> + <alt-trans> + <source xml:lang="en" xml:space="preserve">source</source> + </alt-trans> + </trans-unit> + <trans-unit id="string:string-110-1"> + <source xml:space="preserve">source</source> + <alt-trans> + <target xml:lang="zz" xml:space="preserve">target</target> + </alt-trans> + </trans-unit> + + <trans-unit id="string:string-111-0"> + <source xml:space="preserve">source</source> + <alt-trans> + <source xml:lang="en" xml:space="preserve">source</source> + <target xml:lang="zz" xml:space="preserve">target</target> + </alt-trans> + </trans-unit> + <trans-unit id="string:string-111-1"> + <source xml:space="preserve">source</source> + <alt-trans> + <source xml:lang="en" xml:space="preserve">alt-source</source> + <target xml:lang="zz" xml:space="preserve">target</target> + </alt-trans> + </trans-unit> + + </body> + </file> +</xliff> + + diff --git a/tools/localize/testdata/values/strings.xml b/tools/localize/testdata/values/strings.xml new file mode 100644 index 0000000..5e8d43d --- /dev/null +++ b/tools/localize/testdata/values/strings.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="test1">Discard</string> + <!-- comment --> + <string name="test2">a<b>b<i>c</i></b>d</string> + <string name="test3">a<xliff:g a="b" xliff:a="asdf">bBb</xliff:g>C</string> + + <!-- Email address types from android.provider.Contacts --> + <array name="emailAddressTypes"> + <!-- somebody wrote a comment! --> + <item>Email</item> + <item>Home</item> + <item>Work</item> + <item>Other\u2026</item> + </array> +</resources> diff --git a/tools/localize/testdata/xliff1.xliff b/tools/localize/testdata/xliff1.xliff new file mode 100644 index 0000000..55a8d8e --- /dev/null +++ b/tools/localize/testdata/xliff1.xliff @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" + version="1.2" + > + <file datatype="x-android-res" + original="//device/tools/localization/tests/res/values/strings.xml" + product-version="1.0" + date="08:10:54 12/07/07 PST" + source-language="en-US" + product-name="kila" + target-language="zz-ZZ" + build-num="32138" + > + <body> + <trans-unit id="string:complex"> + <source>First <g id="string:complex:0" ctype="underline">underline</g>, <g id="string:complex:1" ctype="italic">italic<g id="string:complex:2" ctype="bold">italicbold</g></g> End </source> + <target>Ḟịṙṩŧ , Ḛŋḋ </target> + </trans-unit> + <trans-unit id="string:complex-quoted"> + <source xml:space="preserve">First <g id="string:complex-quoted:0" ctype="underline">underline</g>, <g id="string:complex-quoted:1" ctype="italic">italic<g id="string:complex-quoted:2" ctype="bold">italicbold</g></g> End</source> + <target>Ḟịṙṩŧ , Ḛŋḋ</target> + </trans-unit> + <trans-unit id="string:simple"> + <source>Simple</source> + <target>Ṩịṃṕļę</target> + </trans-unit> + <trans-unit id="array:0:simple"> + <source>Simple</source> + <target>Ṩịṃṕļę</target> + </trans-unit> + <trans-unit id="array:1:simple"> + <source>Simple</source> + <target>Ṩịṃṕļę</target> + </trans-unit> + <trans-unit id="string:simple-quoted"> + <source xml:space="preserve"> Quote</source> + <target> Ờũỡŧę</target> + <alt-trans> + <source xml:lang="en" xml:space="preserve"> OLD Quote</source> + <target xml:lang="xx"> OLD Ờũỡŧę</target> + </alt-trans> + </trans-unit> + </body> + </file> +</xliff> + diff --git a/tools/localize/testdata/xml.xml b/tools/localize/testdata/xml.xml new file mode 100644 index 0000000..ef930d0 --- /dev/null +++ b/tools/localize/testdata/xml.xml @@ -0,0 +1,16 @@ +<ASDF> + <a id="system" + old-cl="1" + new-cl="43019"> + <app dir="apps/common" /> + </a> + <a id="samples" + old-cl="1" + new-cl="43019">asdf + <app dir="samples/NotePad" /> + <app dir="samples/LunarLander" /> + <something>a<b>,</b>b </something> + <exact xml:space="preserve">a<b>,</b>b </exact> + </a> +</ASDF> + |