From 38125c0c6c88725e95d9e7dca06446b3cc3ccee1 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Tue, 3 Oct 2023 18:06:28 -0500 Subject: [PATCH] CLDR-17113 kbd: element/attr renaming - layers/@form > layers/@formId - key/@flicks > key/@flickId - key/@switch > key/@layerId - key/@to > key/@output - display/@to > display/@output - updates to dtd, samples - drop some old data in tests --- keyboards/3.0/fr-t-k0-azerty.xml | 51 +++++++++---------- keyboards/3.0/ja-Latn.xml | 2 +- keyboards/3.0/mt-t-k0-47key.xml | 40 +++++++-------- keyboards/3.0/mt.xml | 40 +++++++-------- keyboards/3.0/pcm.xml | 18 +++---- keyboards/3.0/pt-t-k0-abnt2.xml | 36 ++++++------- keyboards/dtd/ldmlKeyboard3.dtd | 12 ++--- keyboards/dtd/ldmlKeyboard3.xsd | 10 ++-- .../unicode/cldr/unittest/TestDtdData.java | 28 ++++------ .../KeyboardFlatten/broken-import-missing.xml | 40 +++++++-------- .../broken-import-unknownbase.xml | 40 +++++++-------- .../broken-import-unknownver.xml | 42 +++++++-------- .../broken-import-wrongparent.xml | 40 +++++++-------- 13 files changed, 195 insertions(+), 204 deletions(-) diff --git a/keyboards/3.0/fr-t-k0-azerty.xml b/keyboards/3.0/fr-t-k0-azerty.xml index 942ffe83f58..818ed39632e 100644 --- a/keyboards/3.0/fr-t-k0-azerty.xml +++ b/keyboards/3.0/fr-t-k0-azerty.xml @@ -22,7 +22,7 @@ - + - - - - + + + + - - - - - - + + + + + - - - + + + - + - + - - - - - - - - + + + + + + + + - + - + diff --git a/keyboards/3.0/ja-Latn.xml b/keyboards/3.0/ja-Latn.xml index 0e7be47e8d6..8c79ee4f373 100644 --- a/keyboards/3.0/ja-Latn.xml +++ b/keyboards/3.0/ja-Latn.xml @@ -12,7 +12,7 @@ - + diff --git a/keyboards/3.0/mt-t-k0-47key.xml b/keyboards/3.0/mt-t-k0-47key.xml index 56361ae242c..3adc34aa684 100644 --- a/keyboards/3.0/mt-t-k0-47key.xml +++ b/keyboards/3.0/mt-t-k0-47key.xml @@ -14,36 +14,36 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + - + - + diff --git a/keyboards/3.0/mt.xml b/keyboards/3.0/mt.xml index 84985d1c0ad..f63e0845476 100644 --- a/keyboards/3.0/mt.xml +++ b/keyboards/3.0/mt.xml @@ -20,33 +20,33 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + - + - + diff --git a/keyboards/3.0/pcm.xml b/keyboards/3.0/pcm.xml index 4bc34be49ac..50a308b81c1 100644 --- a/keyboards/3.0/pcm.xml +++ b/keyboards/3.0/pcm.xml @@ -6,21 +6,21 @@ - - - + + + - - - - + + + + - + - + diff --git a/keyboards/3.0/pt-t-k0-abnt2.xml b/keyboards/3.0/pt-t-k0-abnt2.xml index 8d056de3a1c..41060ea6403 100644 --- a/keyboards/3.0/pt-t-k0-abnt2.xml +++ b/keyboards/3.0/pt-t-k0-abnt2.xml @@ -7,11 +7,11 @@ - - - - - + + + + + @@ -19,22 +19,22 @@ - - - - - + + + + + - - + + - - - - - + + + + + - + diff --git a/keyboards/dtd/ldmlKeyboard3.dtd b/keyboards/dtd/ldmlKeyboard3.dtd index a667f0f12d2..64b2fd185de 100644 --- a/keyboards/dtd/ldmlKeyboard3.dtd +++ b/keyboards/dtd/ldmlKeyboard3.dtd @@ -71,7 +71,7 @@ Please view the subcommittee page for the most recent information. - + @@ -96,11 +96,11 @@ Please view the subcommittee page for the most recent information. - + - + @@ -117,7 +117,7 @@ Please view the subcommittee page for the most recent information. - + @@ -137,7 +137,7 @@ Please view the subcommittee page for the most recent information. - + @@ -158,7 +158,7 @@ Please view the subcommittee page for the most recent information. - + diff --git a/keyboards/dtd/ldmlKeyboard3.xsd b/keyboards/dtd/ldmlKeyboard3.xsd index f780408bf53..05a86684b13 100644 --- a/keyboards/dtd/ldmlKeyboard3.xsd +++ b/keyboards/dtd/ldmlKeyboard3.xsd @@ -140,7 +140,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file - + @@ -175,7 +175,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file - + @@ -183,7 +183,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file - + @@ -194,7 +194,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file - + @@ -293,7 +293,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file - + diff --git a/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestDtdData.java b/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestDtdData.java index 7cf5608c617..b1a15621793 100644 --- a/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestDtdData.java +++ b/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestDtdData.java @@ -1,9 +1,5 @@ package org.unicode.cldr.unittest; -import com.google.common.base.Joiner; -import com.google.common.collect.Multimap; -import com.google.common.collect.TreeMultimap; -import com.ibm.icu.dev.test.TestFmwk; import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -17,6 +13,7 @@ import java.util.Map.Entry; import java.util.Set; import java.util.TreeSet; + import org.unicode.cldr.util.CLDRConfig; import org.unicode.cldr.util.CLDRPaths; import org.unicode.cldr.util.DtdData; @@ -34,6 +31,11 @@ import org.unicode.cldr.util.XMLFileReader; import org.unicode.cldr.util.XPathParts; +import com.google.common.base.Joiner; +import com.google.common.collect.Multimap; +import com.google.common.collect.TreeMultimap; +import com.ibm.icu.dev.test.TestFmwk; + public class TestDtdData extends TestFmwk { private static final String COMMON_DIR = CLDRPaths.BASE_DIRECTORY + "common/"; static CLDRConfig testInfo = CLDRConfig.getInstance(); @@ -758,14 +760,12 @@ public boolean isDistinguishingOld(DtdType dtdType, String elementName, String a case keyboard3: if (elementName.equals("keyboard3") && attribute.equals("locale") - || elementName.equals("vkeys") && attribute.equals("from") - || elementName.equals("layers") && attribute.equals("form") + || elementName.equals("layers") && attribute.equals("formId") || elementName.equals("layers") && attribute.equals("minDeviceWidth") - || elementName.equals("vkey") && attribute.equals("from") || elementName.equals("layer") && attribute.equals("modifier") || elementName.equals("form") && attribute.equals("id") - || elementName.equals("map") && attribute.equals("id") || elementName.equals("key") && attribute.equals("id") + || elementName.equals("flick") && attribute.equals("id") || elementName.equals("import") && attribute.equals("path") || elementName.equals("import") && attribute.equals("base") || elementName.equals("layer") && attribute.equals("id") @@ -778,19 +778,11 @@ public boolean isDistinguishingOld(DtdType dtdType, String elementName, String a return attribute.equals("_q") || elementName.equals("keyboard3") && attribute.equals("locale") || elementName.equals("keyMap") && attribute.equals("modifiers") - || elementName.equals("key") && attribute.equals("flicks") + || elementName.equals("key") && attribute.equals("flickId") || elementName.equals("transforms") && attribute.equals("type") - || elementName.equals("layerMap") && attribute.equals("modifier") - || elementName.equals("transform") && attribute.equals("before") || elementName.equals("transform") && attribute.equals("after") - || elementName.equals("backspace") && attribute.equals("before") - || elementName.equals("backspace") && attribute.equals("from") - || elementName.equals("backspace") && attribute.equals("after") - || elementName.equals("vkeys") && attribute.equals("type") || elementName.equals("flickSegment") && attribute.equals("directions") - // || elementName.equals("row") && attribute.equals("keys") - || elementName.equals("vkey") && attribute.equals("iso") - || elementName.equals("display") && attribute.equals("to") + || elementName.equals("display") && attribute.equals("output") || elementName.equals("display") && attribute.equals("id") || elementName.equals("flick") && attribute.equals("id"); case keyboardTest3: diff --git a/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-missing.xml b/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-missing.xml index 73088028861..dad045e1e46 100644 --- a/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-missing.xml +++ b/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-missing.xml @@ -16,35 +16,35 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + - + - + diff --git a/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-unknownbase.xml b/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-unknownbase.xml index a1e902f480e..a7fe30b2763 100644 --- a/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-unknownbase.xml +++ b/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-unknownbase.xml @@ -16,35 +16,35 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + - + - + diff --git a/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-unknownver.xml b/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-unknownver.xml index 1ff9b4fa415..f1443c3eb02 100644 --- a/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-unknownver.xml +++ b/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-unknownver.xml @@ -8,7 +8,7 @@ - + @@ -18,35 +18,35 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + - + - + diff --git a/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-wrongparent.xml b/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-wrongparent.xml index 5ee1baa544d..de14815c45a 100644 --- a/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-wrongparent.xml +++ b/tools/cldr-code/src/test/resources/org/unicode/cldr/tool/KeyboardFlatten/broken-import-wrongparent.xml @@ -16,35 +16,35 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + - + - +