diff --git a/core/include/ldml/keyman_core_ldml.h b/core/include/ldml/keyman_core_ldml.h index 919c02fd792..b498065acaa 100644 --- a/core/include/ldml/keyman_core_ldml.h +++ b/core/include/ldml/keyman_core_ldml.h @@ -19,6 +19,7 @@ #define LDML_CLDR_IMPLIED_FORMS_IMPORT "45/scanCodes-implied.xml" #define LDML_CLDR_IMPLIED_KEYS_IMPORT "45/keys-Latn-implied.xml" #define LDML_CLDR_IMPORT_BASE "cldr" +#define LDML_CLDR_TEST_VERSION_LATEST "techpreview" #define LDML_CLDR_VERSION_LATEST "45" #define LDML_ELEM_FLAGS_ORDER_BITSHIFT 0x10 #define LDML_ELEM_FLAGS_ORDER_MASK 0xFF0000 diff --git a/core/include/ldml/keyman_core_ldml.ts b/core/include/ldml/keyman_core_ldml.ts index 683b04c2d75..ca9654587b5 100644 --- a/core/include/ldml/keyman_core_ldml.ts +++ b/core/include/ldml/keyman_core_ldml.ts @@ -60,6 +60,10 @@ class Constants { * The current CLDR version */ readonly cldr_version_latest = '45'; + /** + * The version for testdata files + */ + readonly cldr_test_version_latest = 'techpreview'; /** * import base */ diff --git a/core/src/ldml/C7532_ldml_updating.md b/core/src/ldml/C7532_ldml_updating.md index 5b20c0d0f85..da6bbcb80c0 100644 --- a/core/src/ldml/C7532_ldml_updating.md +++ b/core/src/ldml/C7532_ldml_updating.md @@ -22,7 +22,7 @@ working on ‘layr’, using ‘disp’ as a model from https://github.com/keyma ## XML changes -- `resources/standards-data/ldml-keyboards/techpreview/` : update / reimport / fix fixup script if needed +- `resources/standards-data/ldml-keyboards/45/` : update / reimport / fix fixup script if needed - E/C: `common/web/types/src/ldml-keyboard/ldml-keyboard-xml.ts` - add to `LKKeyboard` and subproperties as needed to support the structure on the XML side - Now would be a good time to stop and make sure everything compiles. It didn’t, there was an unrelated issue with snprintf! diff --git a/core/tests/unit/ldml/keyboards/k_001_tiny-test.xml b/core/tests/unit/ldml/keyboards/k_001_tiny-test.xml index efa0597670c..ae2e3abf07a 100644 --- a/core/tests/unit/ldml/keyboards/k_001_tiny-test.xml +++ b/core/tests/unit/ldml/keyboards/k_001_tiny-test.xml @@ -1,5 +1,5 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_001_tiny.xml b/core/tests/unit/ldml/keyboards/k_001_tiny.xml index aae89fd4119..b8a543cd2d7 100644 --- a/core/tests/unit/ldml/keyboards/k_001_tiny.xml +++ b/core/tests/unit/ldml/keyboards/k_001_tiny.xml @@ -8,8 +8,7 @@ @@expected: \u0127\u1790\u17B6\u0127 --> - - + diff --git a/core/tests/unit/ldml/keyboards/k_002_tinyu32.xml b/core/tests/unit/ldml/keyboards/k_002_tinyu32.xml index a8c5e372339..078e8aec3cf 100644 --- a/core/tests/unit/ldml/keyboards/k_002_tinyu32.xml +++ b/core/tests/unit/ldml/keyboards/k_002_tinyu32.xml @@ -6,8 +6,7 @@ @@expected: \u0127\u1790\u17B6\u0127\uD83D\uDE40\u0127 --> - - + diff --git a/core/tests/unit/ldml/keyboards/k_003_transform.xml b/core/tests/unit/ldml/keyboards/k_003_transform.xml index ba837a7115b..2fc8d61e3dc 100644 --- a/core/tests/unit/ldml/keyboards/k_003_transform.xml +++ b/core/tests/unit/ldml/keyboards/k_003_transform.xml @@ -7,8 +7,7 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke @@expected: qu\u00ea --> - - + diff --git a/core/tests/unit/ldml/keyboards/k_004_tinyshift.xml b/core/tests/unit/ldml/keyboards/k_004_tinyshift.xml index e2c442b28ad..4346fa801b0 100644 --- a/core/tests/unit/ldml/keyboards/k_004_tinyshift.xml +++ b/core/tests/unit/ldml/keyboards/k_004_tinyshift.xml @@ -6,8 +6,7 @@ @@expected: \u0037\u1790\u17B6\u0127 --> - - + diff --git a/core/tests/unit/ldml/keyboards/k_005_modbittest.xml b/core/tests/unit/ldml/keyboards/k_005_modbittest.xml index 2af7cf2be05..054c81d8c06 100644 --- a/core/tests/unit/ldml/keyboards/k_005_modbittest.xml +++ b/core/tests/unit/ldml/keyboards/k_005_modbittest.xml @@ -6,8 +6,7 @@ @@expected: \u0061\u0041\u0062\u0063\u0064\u0064\u0065\u0066\u0067\u0067 --> - - + diff --git a/core/tests/unit/ldml/keyboards/k_006_backspace-test.xml b/core/tests/unit/ldml/keyboards/k_006_backspace-test.xml index 5239fe3409c..159f757dd16 100644 --- a/core/tests/unit/ldml/keyboards/k_006_backspace-test.xml +++ b/core/tests/unit/ldml/keyboards/k_006_backspace-test.xml @@ -1,5 +1,5 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_006_backspace.xml b/core/tests/unit/ldml/keyboards/k_006_backspace.xml index d9f29956957..763d90bc7f7 100644 --- a/core/tests/unit/ldml/keyboards/k_006_backspace.xml +++ b/core/tests/unit/ldml/keyboards/k_006_backspace.xml @@ -1,7 +1,6 @@ - - + diff --git a/core/tests/unit/ldml/keyboards/k_007_transform_rgx-test.xml b/core/tests/unit/ldml/keyboards/k_007_transform_rgx-test.xml index 6fe824270e3..4dc8756d208 100644 --- a/core/tests/unit/ldml/keyboards/k_007_transform_rgx-test.xml +++ b/core/tests/unit/ldml/keyboards/k_007_transform_rgx-test.xml @@ -1,5 +1,5 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_007_transform_rgx.xml b/core/tests/unit/ldml/keyboards/k_007_transform_rgx.xml index 6a74ea5a77a..18356b2c3e3 100644 --- a/core/tests/unit/ldml/keyboards/k_007_transform_rgx.xml +++ b/core/tests/unit/ldml/keyboards/k_007_transform_rgx.xml @@ -4,8 +4,7 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-keyboards.md#element-transform --> - - + diff --git a/core/tests/unit/ldml/keyboards/k_008_transform_norm-test.xml b/core/tests/unit/ldml/keyboards/k_008_transform_norm-test.xml index 7717ef5c30a..ea1355ddd1f 100644 --- a/core/tests/unit/ldml/keyboards/k_008_transform_norm-test.xml +++ b/core/tests/unit/ldml/keyboards/k_008_transform_norm-test.xml @@ -1,5 +1,5 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_008_transform_norm.xml b/core/tests/unit/ldml/keyboards/k_008_transform_norm.xml index aa121f66fdb..cc1a7ab43d1 100644 --- a/core/tests/unit/ldml/keyboards/k_008_transform_norm.xml +++ b/core/tests/unit/ldml/keyboards/k_008_transform_norm.xml @@ -5,8 +5,7 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-keyboards.md#element-transform --> - - + diff --git a/core/tests/unit/ldml/keyboards/k_009_transform_nfc-test.xml b/core/tests/unit/ldml/keyboards/k_009_transform_nfc-test.xml index f6462c61d7f..6bbae3b9f46 100644 --- a/core/tests/unit/ldml/keyboards/k_009_transform_nfc-test.xml +++ b/core/tests/unit/ldml/keyboards/k_009_transform_nfc-test.xml @@ -1,5 +1,5 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_009_transform_nfc.xml b/core/tests/unit/ldml/keyboards/k_009_transform_nfc.xml index 877aeefc8e8..e975260dcb8 100644 --- a/core/tests/unit/ldml/keyboards/k_009_transform_nfc.xml +++ b/core/tests/unit/ldml/keyboards/k_009_transform_nfc.xml @@ -3,8 +3,7 @@ - - + diff --git a/core/tests/unit/ldml/keyboards/k_010_mt.xml b/core/tests/unit/ldml/keyboards/k_010_mt.xml index 2fd3e2b44f9..af50d2cb751 100644 --- a/core/tests/unit/ldml/keyboards/k_010_mt.xml +++ b/core/tests/unit/ldml/keyboards/k_010_mt.xml @@ -10,9 +10,7 @@ Gets part of the way, Based on mt.xml from CLDR. 'TODO-LDML' denotes modifications. Note this is the 47-key version. --> - - - + @@ -21,8 +19,8 @@ Gets part of the way, - - + + diff --git a/core/tests/unit/ldml/keyboards/k_011_mt_iso.xml b/core/tests/unit/ldml/keyboards/k_011_mt_iso.xml index 59496726fad..0ea0b7f3177 100644 --- a/core/tests/unit/ldml/keyboards/k_011_mt_iso.xml +++ b/core/tests/unit/ldml/keyboards/k_011_mt_iso.xml @@ -11,8 +11,7 @@ Exact copy of mt.xml from CLDR, but with: - an updated DTD path - test case --> - - + @@ -21,8 +20,8 @@ Exact copy of mt.xml from CLDR, but with: - - + + diff --git a/core/tests/unit/ldml/keyboards/k_020_fr-test.xml b/core/tests/unit/ldml/keyboards/k_020_fr-test.xml index f4ac30aa9f6..bedac406c39 100644 --- a/core/tests/unit/ldml/keyboards/k_020_fr-test.xml +++ b/core/tests/unit/ldml/keyboards/k_020_fr-test.xml @@ -1,6 +1,6 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_020_fr.xml b/core/tests/unit/ldml/keyboards/k_020_fr.xml index 297062e5d18..671f1b8b9b6 100644 --- a/core/tests/unit/ldml/keyboards/k_020_fr.xml +++ b/core/tests/unit/ldml/keyboards/k_020_fr.xml @@ -1,7 +1,6 @@ - - + @@ -28,8 +27,8 @@ - - + + diff --git a/core/tests/unit/ldml/keyboards/k_100_keytest.xml b/core/tests/unit/ldml/keyboards/k_100_keytest.xml index 47457bb99f8..6c2d6934477 100644 --- a/core/tests/unit/ldml/keyboards/k_100_keytest.xml +++ b/core/tests/unit/ldml/keyboards/k_100_keytest.xml @@ -5,8 +5,7 @@ @@expected: \u0061 --> - - + diff --git a/core/tests/unit/ldml/keyboards/k_101_keytest.xml b/core/tests/unit/ldml/keyboards/k_101_keytest.xml index 9dc35408fa4..2af4ee26c94 100644 --- a/core/tests/unit/ldml/keyboards/k_101_keytest.xml +++ b/core/tests/unit/ldml/keyboards/k_101_keytest.xml @@ -4,8 +4,7 @@ @@keys: [K_BKQUOTE] @@expected: \u0061 --> - - + diff --git a/core/tests/unit/ldml/keyboards/k_102_keytest.xml b/core/tests/unit/ldml/keyboards/k_102_keytest.xml index de61b8a9c2d..5b47eb5f155 100644 --- a/core/tests/unit/ldml/keyboards/k_102_keytest.xml +++ b/core/tests/unit/ldml/keyboards/k_102_keytest.xml @@ -16,8 +16,7 @@ qaz Az enter=not mappable, should cause context reset of qaz. TODO-LDML no invalidate here? --> - - + diff --git a/core/tests/unit/ldml/keyboards/k_200_reorder_nod_Lana-test.xml b/core/tests/unit/ldml/keyboards/k_200_reorder_nod_Lana-test.xml index e207d191931..056aa894e97 100644 --- a/core/tests/unit/ldml/keyboards/k_200_reorder_nod_Lana-test.xml +++ b/core/tests/unit/ldml/keyboards/k_200_reorder_nod_Lana-test.xml @@ -1,5 +1,5 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_200_reorder_nod_Lana.xml b/core/tests/unit/ldml/keyboards/k_200_reorder_nod_Lana.xml index f5f5adf7535..b6e6cc2e924 100644 --- a/core/tests/unit/ldml/keyboards/k_200_reorder_nod_Lana.xml +++ b/core/tests/unit/ldml/keyboards/k_200_reorder_nod_Lana.xml @@ -5,8 +5,7 @@ see https://keyman.com/keyboards/sil_boonkit --> - - + diff --git a/core/tests/unit/ldml/keyboards/k_201_reorder_esk-test.xml b/core/tests/unit/ldml/keyboards/k_201_reorder_esk-test.xml index c1510ba1dae..c148afc3fd2 100644 --- a/core/tests/unit/ldml/keyboards/k_201_reorder_esk-test.xml +++ b/core/tests/unit/ldml/keyboards/k_201_reorder_esk-test.xml @@ -1,5 +1,5 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_201_reorder_esk.xml b/core/tests/unit/ldml/keyboards/k_201_reorder_esk.xml index 5f3134ee05e..419d4d17943 100644 --- a/core/tests/unit/ldml/keyboards/k_201_reorder_esk.xml +++ b/core/tests/unit/ldml/keyboards/k_201_reorder_esk.xml @@ -1,7 +1,6 @@ - - + diff --git a/core/tests/unit/ldml/keyboards/k_210_marker-test.xml b/core/tests/unit/ldml/keyboards/k_210_marker-test.xml index 8b05aca859d..fdd5005177b 100644 --- a/core/tests/unit/ldml/keyboards/k_210_marker-test.xml +++ b/core/tests/unit/ldml/keyboards/k_210_marker-test.xml @@ -1,5 +1,5 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_210_marker.xml b/core/tests/unit/ldml/keyboards/k_210_marker.xml index 750a1870bba..4d3d66ce986 100644 --- a/core/tests/unit/ldml/keyboards/k_210_marker.xml +++ b/core/tests/unit/ldml/keyboards/k_210_marker.xml @@ -4,8 +4,7 @@ Test Keyboard --> - - + diff --git a/core/tests/unit/ldml/keyboards/k_211_marker_escape-test.xml b/core/tests/unit/ldml/keyboards/k_211_marker_escape-test.xml index f8eb8ed921a..f6aa60bfb91 100644 --- a/core/tests/unit/ldml/keyboards/k_211_marker_escape-test.xml +++ b/core/tests/unit/ldml/keyboards/k_211_marker_escape-test.xml @@ -1,5 +1,5 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_211_marker_escape.xml b/core/tests/unit/ldml/keyboards/k_211_marker_escape.xml index 8ddae398195..4130e22850f 100644 --- a/core/tests/unit/ldml/keyboards/k_211_marker_escape.xml +++ b/core/tests/unit/ldml/keyboards/k_211_marker_escape.xml @@ -4,8 +4,7 @@ Test Keyboard --> - - + diff --git a/core/tests/unit/ldml/keyboards/ldml_test-test.xml b/core/tests/unit/ldml/keyboards/ldml_test-test.xml index a771562bda9..ea196dab893 100644 --- a/core/tests/unit/ldml/keyboards/ldml_test-test.xml +++ b/core/tests/unit/ldml/keyboards/ldml_test-test.xml @@ -1,5 +1,5 @@ - + diff --git a/core/tests/unit/ldml/keyboards/ldml_test.xml b/core/tests/unit/ldml/keyboards/ldml_test.xml index 2885d6cc32d..684e9fdd395 100644 --- a/core/tests/unit/ldml/keyboards/ldml_test.xml +++ b/core/tests/unit/ldml/keyboards/ldml_test.xml @@ -1,11 +1,11 @@ - + - - + + diff --git a/core/tests/unit/ldml/keyboards/meson.build b/core/tests/unit/ldml/keyboards/meson.build index 890a4e65f7a..ca047a67bc6 100644 --- a/core/tests/unit/ldml/keyboards/meson.build +++ b/core/tests/unit/ldml/keyboards/meson.build @@ -5,13 +5,13 @@ # -# keyboards in resources/standards-data/ldml-keyboards/techpreview/3.0/ -# tests in resources/standards-data/ldml-keyboards/techpreview/test/ +# keyboards in resources/standards-data/ldml-keyboards/45/3.0/ +# tests in resources/standards-data/ldml-keyboards/45/test/ tests_from_cldr = [ 'ja-Latn', 'pt-t-k0-abnt2', # 'fr-t-k0-optimise', (not yet) - # 'fr-t-k0-test', + 'fr-t-k0-azerty', 'pcm', 'bn', ] @@ -55,7 +55,7 @@ tests += tests_from_cldr # Setup kmc kmc_root = join_paths(meson.source_root(),'..','developer','src','kmc') -ldml_root = join_paths(meson.source_root(),'..','resources','standards-data','ldml-keyboards','techpreview') +ldml_root = join_paths(meson.source_root(),'..','resources','standards-data','ldml-keyboards','45') ldml_data = join_paths(ldml_root, '3.0') ldml_testdata = join_paths(ldml_root, 'test') kmc_cmd = [node, '--enable-source-maps', kmc_root] diff --git a/core/tests/unit/ldml/ldml_test_source.cpp b/core/tests/unit/ldml/ldml_test_source.cpp index 9bb08b11f25..b638379bb6d 100644 --- a/core/tests/unit/ldml/ldml_test_source.cpp +++ b/core/tests/unit/ldml/ldml_test_source.cpp @@ -753,7 +753,7 @@ int LdmlJsonTestSourceFactory::load(const km::core::path &compiled, const km::co } auto conformsTo = data["/keyboardTest3/conformsTo"_json_pointer].get(); - assert_or_return(std::string(LDML_CLDR_VERSION_LATEST) == conformsTo); + assert_or_return(std::string(LDML_CLDR_TEST_VERSION_LATEST) == conformsTo); auto info_keyboard = data["/keyboardTest3/info/keyboard"_json_pointer].get(); auto info_author = data["/keyboardTest3/info/author"_json_pointer].get(); auto info_name = data["/keyboardTest3/info/name"_json_pointer].get();