From d7f73f3078de0a605e2eb0f1ad3dc84f3389af54 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 1 Sep 2023 20:30:43 +0800 Subject: [PATCH 01/56] chore: workaround npm/cli#3466 when bundling internal deps Works around npm/cli#3466 when bundling internal dependencies using the bundleDependencies package.json property. This change works in tandem with the npm pack/publish process -- when we run `developer/src/kmc/build.sh publish` (or `pack`), we end up with `npm version` stomping on all our package.json files, so the repo is dirty after this. We need a copy of the top-level package.json before this stomping happens, in order to get a simple map of the location of each of our internal dependencies, from the `dependencies` property (it would be possible to figure this out with a lot more parsing of our package.json files, but this is simpler). This means, in future, we should avoid publishing our internal dependencies such as those under common/ to npm, as they serve no practical purpose there. --- developer/src/kmc/build.sh | 10 +++++ resources/build/build-utils-ci.inc.sh | 63 ++++++++++++++++++++++++++- 2 files changed, 72 insertions(+), 1 deletion(-) diff --git a/developer/src/kmc/build.sh b/developer/src/kmc/build.sh index 0c85d8764ef..e7c809419ef 100755 --- a/developer/src/kmc/build.sh +++ b/developer/src/kmc/build.sh @@ -133,6 +133,10 @@ fi if builder_start_action publish; then . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" + # To ensure that we cache the top-level package.json, we must call this before + # the global publish + builder_publish_cleanup + # For now, kmc will have responsibility for publishing keyman-version and # common-types, as well as all the other dependent modules. In the future, we # should probably have a top-level npm publish script that publishes all @@ -143,14 +147,20 @@ if builder_start_action publish; then # Finally, publish kmc builder_publish_to_npm + builder_publish_cleanup builder_finish_action success publish elif builder_start_action pack; then . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" + # To ensure that we cache the top-level package.json, we must call this before + # the global pack + builder_publish_cleanup + for package in "${PACKAGES[@]}"; do "$KEYMAN_ROOT/$package/build.sh" pack $DRY_RUN done builder_publish_to_pack + builder_publish_cleanup builder_finish_action success pack fi diff --git a/resources/build/build-utils-ci.inc.sh b/resources/build/build-utils-ci.inc.sh index cab449a4636..973f6f8aca7 100644 --- a/resources/build/build-utils-ci.inc.sh +++ b/resources/build/build-utils-ci.inc.sh @@ -100,7 +100,9 @@ function _builder_publish_npm_package() { dry_run=--dry-run fi + _builder_publish_cache_package_json _builder_write_npm_version + _builder_prepublish # Note: In either case, npm publish MUST be given --access public to publish a # package in the @keymanapp scope on the public npm package index. @@ -141,9 +143,68 @@ function _builder_write_npm_version() { . + (try { dependencies: (.dependencies | to_entries | . + map(select(.key | match("@keymanapp/.*")) .value |= $VERSION_WITH_TAG) | from_entries) } catch {}) + (try { devDependencies: (.devDependencies | to_entries | . + map(select(.key | match("@keymanapp/.*")) .value |= $VERSION_WITH_TAG) | from_entries) } catch {}) + - (try { bundleDependencies: (.bundleDependencies | to_entries | . + map(select(.key | match("@keymanapp/.*")) .value |= $VERSION_WITH_TAG) | from_entries) } catch {}) + (try { optionalDependencies: (.optionalDependencies | to_entries | . + map(select(.key | match("@keymanapp/.*")) .value |= $VERSION_WITH_TAG) | from_entries) } catch {}) ' > "${line}_" mv -f "${line}_" "$line" done +} + +# +# Due to https://github.com/npm/cli/issues/3466, we manually create all +# bundleDependencies (__NOT__ bundledDependencies, beware typos) from +# the target's package.json in its node_modules folder. Must run from +# the target's folder. +# +function _builder_prepublish() { + mkdir -p node_modules/@keymanapp + local packages=($(cat package.json | "$JQ" --raw-output '.bundleDependencies | join(" ")')) + local package + + # For each @keymanapp/ package, we'll do a local symlink, note that Windows + # mklink is internal to cmd! + for package in "${packages[@]}"; do + if [[ $package =~ ^@keymanapp/ ]]; then + # Creating local symlink under node_modules + local link_source=node_modules/$package + + # lookup the link_target from top-level package.json/dependencies + local link_target="$(cat "$KEYMAN_ROOT/builder_package_publish.json" | jq -r .dependencies.\"$package\")" + + if [[ $link_target =~ ^file: ]]; then + link_target="$KEYMAN_ROOT"/${link_target#file:} + + builder_echo "Manually linking $link_source -> $link_target (see https://github.com/npm/cli/issues/3466)" + rm -rf $link_source + if [[ $BUILDER_OS == win ]]; then + link_source="$(cygpath -w "$link_source")" + link_target="$(cygpath -w "$link_target")" + cmd //c mklink //j "$link_source" "$link_target" + else + ln -sr "$link_target" "$link_source" + fi + fi + fi + done +} + +# +# We need to cache /package.json before npm version gets its sticky fingers on +# it, because afterwards, we lose the file: paths that help us to resolve +# dependencies easily. Part of the https://github.com/npm/cli/issues/3466 +# workaround. +# +function _builder_publish_cache_package_json() { + if [[ -f "$KEYMAN_ROOT/builder_package_publish.json" ]]; then + return 0 + fi + + if "$JQ" -e '.version' "$KEYMAN_ROOT/developer/src/kmc/package.json" > /dev/null; then + builder_die "npm version has already been run. Revert the version changes to all package.json files before re-running" + fi + + cp "$KEYMAN_ROOT/package.json" "$KEYMAN_ROOT/builder_package_publish.json" +} + +function builder_publish_cleanup() { + rm -f "$KEYMAN_ROOT/builder_package_publish.json" } \ No newline at end of file From ae07e5174c8a4838ed8fd69245effd92a2b90b13 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Sat, 9 Sep 2023 17:51:40 +0200 Subject: [PATCH 02/56] fix(developer): only include mobile touch platform in basic project Fixes #9546. Previously, a new project would include both mobile and tablet platform in the touch layout file. However, the majority of devs want to work with just one, so this removes the tablet platform. Adding a new platform is a single click within the editor, which duplicates the current platform as a starting point. --- .../template-basic.keyman-touch-layout | 212 ------------------ 1 file changed, 212 deletions(-) diff --git a/developer/src/tike/xml/layoutbuilder/template-basic.keyman-touch-layout b/developer/src/tike/xml/layoutbuilder/template-basic.keyman-touch-layout index 2887e3b0a67..c26323dc3fc 100644 --- a/developer/src/tike/xml/layoutbuilder/template-basic.keyman-touch-layout +++ b/developer/src/tike/xml/layoutbuilder/template-basic.keyman-touch-layout @@ -1,216 +1,4 @@ { - "tablet": { - "font": "Tahoma", - "layer": [ - { - "id": "default", - "row": [ - { - "id": 1, - "key": [ - {"id": "K_Q","text":"q"}, - {"id": "K_W","text":"w"}, - {"id": "K_E","text":"e"}, - {"id": "K_R","text":"r"}, - {"id": "K_T","text":"t"}, - {"id": "K_Y","text":"y"}, - {"id": "K_U","text":"u"}, - {"id": "K_I","text":"i"}, - {"id": "K_O","text":"o"}, - {"id": "K_P","text":"p"} - ] - }, - { - "id": 2, - "key": [ - {"id": "K_A","text":"a","pad":70}, - {"id": "K_S","text":"s"}, - {"id": "K_D","text":"d"}, - {"id": "K_F","text":"f"}, - {"id": "K_G","text":"g"}, - {"id": "K_H","text":"h"}, - {"id": "K_J","text":"j"}, - {"id": "K_K","text":"k"}, - {"id": "K_L","text":"l"}, - {"sp": "10","width":"10"} - ] - }, - { - "id": 3, - "key": [ - {"id": "K_SHIFT","text": "*Shift*","width": "110","sp": "1","nextlayer": "shift"}, - {"id": "K_Z","text":"z"}, - {"id": "K_X","text":"x"}, - {"id": "K_C","text":"c"}, - {"id": "K_V","text":"v"}, - {"id": "K_B","text":"b"}, - {"id": "K_N","text":"n"}, - {"id": "K_M","text":"m"}, - {"id": "K_PERIOD","text": ".","sk": [ - {"text": ",","id": "K_COMMA"}, - {"text": "!","id": "K_1", "layer": "shift"}, - {"text": "?","id": "K_SLASH", "layer": "shift"}, - {"text": "'","id": "K_QUOTE"}, - {"text": "\"","id": "K_QUOTE", "layer": "shift"}, - {"text": "\\","id": "K_BKSLASH"}, - {"text": ":","id": "K_COLON", "layer": "shift"}, - {"text": ";","id": "K_COLON"} - ] - }, - {"id": "K_BKSP","text": "*BkSp*","width":"90","sp": "1"} - ] - }, - { - "id": 4, - "key": [ - {"id": "K_NUMLOCK","text": "*123*","width":"140","sp": "1","nextlayer": "numeric"}, - {"id": "K_LOPT","text": "*Menu*","width": "120","sp": "1"}, - {"id": "K_SPACE","text": "","width": "630","sp": "0"}, - {"id": "K_ENTER","text": "*Enter*","width":"140","sp": "1"} - ] - } - ] - }, - { - "id": "shift", - "row": [ - { - "id": 1, - "key": [ - {"id": "K_Q","text":"Q"}, - {"id": "K_W","text":"W"}, - {"id": "K_E","text":"E"}, - {"id": "K_R","text":"R"}, - {"id": "K_T","text":"T"}, - {"id": "K_Y","text":"Y"}, - {"id": "K_U","text":"U"}, - {"id": "K_I","text":"I"}, - {"id": "K_O","text":"O"}, - {"id": "K_P","text":"P"} - ] - }, - { - "id": 2, - "key": [ - {"id": "K_A","text":"A","pad":70}, - {"id": "K_S","text":"S"}, - {"id": "K_D","text":"D"}, - {"id": "K_F","text":"F"}, - {"id": "K_G","text":"G"}, - {"id": "K_H","text":"H"}, - {"id": "K_J","text":"J"}, - {"id": "K_K","text":"K"}, - {"id": "K_L","text":"L"}, - {"sp": "10","width":"10"} - ] - }, - { - "id": 3, - "key": [ - {"id": "K_SHIFT","text": "*Shift*","width": "110","sp": "2","nextlayer": "default"}, - {"id": "K_Z","text":"Z"}, - {"id": "K_X","text":"X"}, - {"id": "K_C","text":"C"}, - {"id": "K_V","text":"V"}, - {"id": "K_B","text":"B"}, - {"id": "K_N","text":"N"}, - {"id": "K_M","text":"M"}, - {"id": "K_PERIOD","text": ".", "layer": "default", "sk": [ - {"text": ",","id": "K_COMMA", "layer": "default"}, - {"text": "!","id": "K_1", "layer": "shift"}, - {"text": "?","id": "K_SLASH", "layer": "shift"}, - {"text": "'","id": "K_QUOTE", "layer": "default"}, - {"text": "\"","id": "K_QUOTE", "layer": "shift"}, - {"text": "\\","id": "K_BKSLASH", "layer": "default"}, - {"text": ":","id": "K_COLON", "layer": "shift"}, - {"text": ";","id": "K_COLON", "layer": "default"} - ] - }, - {"id": "K_BKSP","text": "*BkSp*","width": "90","sp": "1"} - ] - }, - { - "id": 4, - "key": [ - {"id": "K_NUMLOCK","text": "*123*","width":"140","sp": "1","nextlayer": "numeric"}, - {"id": "K_LOPT","text": "*Menu*","width": "120","sp": "1"}, - {"id": "K_SPACE","text": "","width": "630","sp": "0"}, - {"id": "K_ENTER","text": "*Enter*","width":"140","sp": "1"} - ] - } - ] - }, - { - "id": "numeric", - "row": [ - { - "id": 1, - "key": [ - {"id": "K_1","text": "1"}, - {"id": "K_2","text": "2"}, - {"id": "K_3","text": "3"}, - {"id": "K_4","text": "4"}, - {"id": "K_5","text": "5"}, - {"id": "K_6","text": "6"}, - {"id": "K_7","text": "7"}, - {"id": "K_8","text": "8"}, - {"id": "K_9","text": "9"}, - {"id": "K_0","text": "0"} - ] - }, - { - "id": 2, - "key": [ - {"id": "K_4","text": "$","layer":"shift","pad":70}, - {"id": "K_2","text": "@","layer":"shift"}, - {"id": "K_3","text": "#","layer":"shift"}, - {"id": "K_5","text": "%","layer":"shift"}, - {"id": "K_7","text": "&","layer":"shift"}, - {"id": "K_HYPHEN","text": "_","layer":"shift"}, - {"id": "K_EQUAL","text": "=","layer":"default"}, - {"id": "K_BKSLASH","text": "|","layer":"shift"}, - {"id": "K_BKSLASH","text": "\\","layer":"default"}, - {"text": "","width": "10","sp": "10"} - ] - }, - { - "id": 3, - "key": [ - {"id": "K_SHIFT","text": "*Shift*","width": "110","sp": "1"}, - {"id": "K_LBRKT","text": "[","sk": [ - {"id": "U_00AB","text":"\u00ab"}, - {"id": "K_COMMA","text":"<","layer":"shift"}, - {"id": "K_LBRKT","text":"{","layer":"shift"} - ] - }, - {"id": "K_9","text": "(","layer":"shift"}, - {"id": "K_0","text": ")","layer":"shift"}, - {"id": "K_RBRKT","text": "]","sk": [ - {"id": "U_00BB","text":"\u00bb"}, - {"id": "K_PERIOD","text":">","layer":"shift"}, - {"id": "K_RBRKT","text":"}","layer":"shift"} - ] - }, - {"id": "K_EQUAL","text": "+","layer":"shift"}, - {"id": "K_HYPHEN","text": "-","layer":"default"}, - {"id": "K_8","text": "*","layer":"shift"}, - {"id": "K_SLASH","text": "/","layer":"default"}, - {"id": "K_BKSP","text": "*BkSp*","width": "90","sp": "1"} - ] - }, - { - "id": 4, - "key": [ - {"id": "K_LOWER","text": "*abc*","width": "140","sp": "1","nextlayer": "default"}, - {"id": "K_LOPT","text": "*Menu*","width": "120","sp": "1"}, - {"id": "K_SPACE","text": "","width": "630","sp": "0"}, - {"id": "K_ENTER","text": "*Enter*","width": "140","sp": "1"} - ] - } - ] - } - ] - }, "phone": { "font": "Tahoma", "layer": [ From 427459ce2981a5ba72f3cb0077ca56dcdbed8f23 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Tue, 12 Sep 2023 13:05:44 +0700 Subject: [PATCH 03/56] chore(common): Add crowdin strings for Mon --- .../src/main/res/values-mnw-rMM/strings.xml | 164 ++++ .../src/main/res/values-mnw-rMM/strings.xml | 168 ++++ .../mnw.lproj/ResourceInfoView.strings | 2 + .../mnw.lproj/Localizable.strings | 257 +++++ .../mnw.lproj/Localizable.stringsdict | 104 ++ .../Keyman/mnw.lproj/Localizable.strings | 81 ++ linux/keyman-config/locale/mnw_MM.po | 332 +++++++ .../mnw.lproj/KMAboutWindowController.strings | 8 + .../mnw.lproj/preferences.strings | 38 + .../mnw.lproj/KMInfoWindowController.strings | 8 + .../KMKeyboardHelpWindowController.strings | 8 + .../mnw.lproj/Localizable.strings | 71 ++ .../Keyman4MacIM/mnw.lproj/MainMenu.strings | 14 + .../desktop/kmshell/locale/mnw-MM/strings.xml | 911 ++++++++++++++++++ .../desktop/setup/locale/mnw-MM/strings.xml | 79 ++ 15 files changed, 2245 insertions(+) create mode 100644 android/KMAPro/kMAPro/src/main/res/values-mnw-rMM/strings.xml create mode 100644 android/KMEA/app/src/main/res/values-mnw-rMM/strings.xml create mode 100644 ios/engine/KMEI/KeymanEngine/Classes/mnw.lproj/ResourceInfoView.strings create mode 100644 ios/engine/KMEI/KeymanEngine/mnw.lproj/Localizable.strings create mode 100644 ios/engine/KMEI/KeymanEngine/mnw.lproj/Localizable.stringsdict create mode 100644 ios/keyman/Keyman/Keyman/mnw.lproj/Localizable.strings create mode 100644 linux/keyman-config/locale/mnw_MM.po create mode 100644 mac/Keyman4MacIM/Keyman4MacIM/KMAboutWindow/mnw.lproj/KMAboutWindowController.strings create mode 100644 mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/mnw.lproj/preferences.strings create mode 100644 mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/mnw.lproj/KMInfoWindowController.strings create mode 100644 mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/mnw.lproj/KMKeyboardHelpWindowController.strings create mode 100644 mac/Keyman4MacIM/Keyman4MacIM/mnw.lproj/Localizable.strings create mode 100644 mac/Keyman4MacIM/Keyman4MacIM/mnw.lproj/MainMenu.strings create mode 100644 windows/src/desktop/kmshell/locale/mnw-MM/strings.xml create mode 100644 windows/src/desktop/setup/locale/mnw-MM/strings.xml diff --git a/android/KMAPro/kMAPro/src/main/res/values-mnw-rMM/strings.xml b/android/KMAPro/kMAPro/src/main/res/values-mnw-rMM/strings.xml new file mode 100644 index 00000000000..cbfb557c8c1 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/res/values-mnw-rMM/strings.xml @@ -0,0 +1,164 @@ + + + + + ပါ်ပရအ် + + ဝေက်ဗရဴသာ + + အဝဲမလိက် + + ဂၠိုၚ်နူဏံ + + ပလီုလိက် + + တၚ်နၚ် + + ဒၞါဲပလေဝ်နာနာ + + ပ္တိုန်စုတ်က္ဆံၚ်ဂမၠိုၚ် + + ပါယှေန်: %1$s + + ကဳမာန် ဒးသုၚ်စောဲ Chrome ပါယှေန် ၅၇ အေန်အိုတ်ဟွံသေၚ်မ္ဂး သၠုၚ်နူဂှ်။ + + သၠုၚ်ပ္တိုန်က္ဆံၚ် Chrome + + စတက်လိက်ဒၞာဲဏံ… + + + + + အဝဲမလိက်: %1$d + + အဝဲမလိက်လ္တူ + + ဗၞတ်ဗ္ၜတ်မလိက်သၟဝ် + + တသောဝ်ဖျေံ အဝဲမလိက် + + \nလိက်သီုဖအိုတ်ဂှ် သ္အးထောံရောၚ်\n + + စတရဴစိုအ် + + စုတ်ကဳဗုဒ်သွက်ဘာသာမၞးညိ + + သ္ပဒတန်ကဳမာန် နကဵု ကဳဗုဒ်အလုံစက် + + ကဳမာန်ဂှ် စွံနဒဒှ်ကဳဗုဒ်ပကတိညိ + + တၚ်နၚ်ဂမၠိုၚ် + + ကာလစပ္တံမ္ဂး ထ္ၜး “%1$s”ညိ + + သွက်ဂွံစုတ်ပက်ကေကဳဗုဒ်ဂမၠိုၚ်ကီု, သွက်ဂွံဗှ်အရာမစွံပ္တန်လဝ်မ္ၚးတအ်မာန်ကီုဂှ် ပံက်ကဵုအခေါၚ် ကဳမာန်ညိ + + အခေါၚ်သွက်ဂွံစွံပ္တန်ဂှ် တးပါဲလဝ်ရ။ သွက်ဂွံစုတ်ပက်ကုက်ကဳဗုဒ်လေဝ် လီုအာမာန်ရ။ + + ဒၞါဲပလေဝ်နာနာ + + + အရေဝ်ဘာသာ (%1$d) စုတ်လဝ် တုဲတုဲဂမၠိုၚ် + + + စုတ် ကဳဗုဒ် ဟွံသေၚ်မ္ဂး အဘိဓာန် + + ဘာသာဓမံက်ထ္ၜး + + ချိၚ်ဆသမၠုၚ်ကဳဗုဒ်ညိ + + က္တိုပ်လိက် Spacebar + + ကဳဗုဒ် + + အရေဝ်ဘာသာ + + ဘာသာ + ကဳဗုဒ် + + သၠး + + ပ္ဍဲ spacebar ဂှ် ထ္ၜးယၟုကဳဗုဒ်ညိ + + ပ္ဍဲ spacebar ဂှ် ထ္ၜးယၟုအရေဝ်ဘာသာညိ + + ကဳဗုဒ် ကေုာံ အရေဝ်ဘာသာ +ပ္ဍဲspacebar + + လ္ပဓမံက်ထ္ၜးမလိက်ပ္ဍဲspacebarညိ + + ပ္ဍဲကာလမတက်လိက် ချဳဒတဝ်ညိ + + ဓမံက်ထ္ၜးbannerလၟိုန်ညိ + + သွက်ဂွံဓမံက်ရုပ်ရဴ + + ကၟာတ်လဝ်မ္ဂး မလိက်ချိၚ်ဆလဝ်တံဂှ် ထ္ၜးအဃောပံက်လဝ်ဟေၚ် + + ကဵုအခေါၚ် ပၠံၚ်လိက်စဳရေၚ်လ္တူ အေန်တာနက်ညိ + + ယဝ်ပံက်လဝ်မ္ဂး လိက်ဒုၚ်စဳရေၚ်ဂှ်ပၠံၚ်ဏာရောၚ် + + ယဝ်ကၟာတ်လဝ်မ္ဂး လိက်ဒုၚ်စဳရေၚ်ဂှ် ဟွံပၠံၚ်ရ။. + + စုတ်နူ keyman.com + + စုတ်နူ ဝှါၚ် ပ္ဍဲစက် + + စုတ်နူစက်တၞဟ်ဟ် + + ဂွံစုတ်ကဳဗုဒ်ဂှ် ထပ်စုတ် အရေဝ်ဘာသာဂမၠိုၚ် + + (နူကဵုပက်ကေ ကဳဗုဒ်) + + ရုဲစှ်ကဳဗုဒ်ပက်ကေ + + ရုဲစှ်အရေဝ်ဘာသာ%1$s + + စုတ်လဝ်ဘာသာနူ %1$s စိုပ် %2$s တုဲရ + + စုတ်ဘာသာသီုဖအိုတ်တုဲ + + သ္ဂောံချိၚ်သမၠုၚ် ကဳဗုဒ်ဂှ် ဂြဲညိ + + ဂွံချိၚ် လံက်သတိက် လံက်ဇမၠိၚ်ဂှ် ဗဂေတ်ကဵုစက်ပိုဲညိ။ + + ကလေၚ်သ္ပနူပကတိ + + ဂၠာဲ ဟွံသေၚ် တက် URL + + သမ္တီမုက်လိက်ဂမၠိုၚ် + + မုက်လိက်သမ္တီလဝ်ဂမၠိုၚ်ဟွံမွဲ + + စွံ သမ္တီမုက်လိက် + + မာတိကာ + + Url + + ပက်ကေ %1$s ဂှ် ပ္တိုန်စုတ်ဟွံအံၚ်ဇၞး + + အဃောဂြဲဖျေံဒၟံၚ် ပက်ကေကဳဗုဒ်\n&%1$s… + + သှ် ဟွံအံၚ်ဇၞး + + စုတ်ကဳဗုဒ် + + စုတ်အဘိဓာန် + + %1$s ဂှ် ဝှါၚ်ပက်ကေ ကဳမာန် ဟွံသေၚ်ရ။\n%2$s\" + + ပက်ကေ ကဳဗုဒ် ဂှ် ကဳဗုဒ် လုက်စုက် သမၠုၚ်လဝ်ကဆံၚ် ဂမၠိုၚ်ဟွံဂွံစုတ်လဝ်ရ။ + + မလိက်ခယျတၟိ ဟွံစုတ်လဝ်ရ။ + + မလိက်ခယျတၟိ ဟွံစုတ်လဝ်ရ။ + + ပ္ဍဲပက်ကေ ကဳဗုဒ်ဏံ ဘာသာ မဆက်စပ်ဂမၠိုၚ် ဟွံပ္တိုန်စုတ်လဝ်ရ + + မဳတာဒေတာ ပ္ဍဲပက်ကေဏံ သုၚ်စောဲ ဟွံဂွံ/ကၠေံမံၚ်ရ။ + + ကဳဗုဒ်ဏံ နွံပၟိက်ကု ပါယှေန် ကဳမာန်တၟိ + + ပံက် ဝေက်ဗရဴသာဟွံဂွံ + diff --git a/android/KMEA/app/src/main/res/values-mnw-rMM/strings.xml b/android/KMEA/app/src/main/res/values-mnw-rMM/strings.xml new file mode 100644 index 00000000000..e5ee1cabdfc --- /dev/null +++ b/android/KMEA/app/src/main/res/values-mnw-rMM/strings.xml @@ -0,0 +1,168 @@ + + + + + + + ကဳဗုဒ် + + + + နဲကဲစုတ်ကဳဗုဒ်တၞဟ်ဟ် + + + စုတ်ကဳဗုဒ်တၟိ + + ဘာသာစုတ်လဝ်တုဲတုဲဂမၠိုၚ် + + ဒၞါဲပလေဝ်နာနာ %1$s + + ထပ်စုတ် + + ကလေၚ် + + တးပါဲ + + ကၟာတ် + + ကၟာတ်ကဳမာန် + + ဆက်အာဂတ + + နဲကဲဲကဳဗုဒ်မွဲပၠန် + + ဂြဲဖျေံ + + စုတ် + + ဂတဏံမှ + + မွဲပၠန် + + အဵုခေ + + ပ္တိုန်က္ဆံၚ် + + ဆက်စၠောံအေန်တာနက်ဟွံဂွံ + + ချိက်စၠောံကဵုသ္ၚိစာတ် Keyman ဟွံဂွံဏီရ! + + မၞးမိက်ဂွံဇိုတ်ပ္တိတ်ထောံ ကောန်ဍေၚ်ဏံဟာ? + + မၞးမိက်ဂွံကလောၚ်စုတ်ကေတ်မူလက္ကရဴအိုတ် သွက်ကောန်ဍေၚ်ဏံဟာ? + + မၞးနွံပၟိက်မိက်သ္ဂောံသၠုၚ်ပ္တိုန်မူကု ကောန်ဍေၚ်ဏံကဵုအဘိဓါန်ဂမၠိုၚ်လၟုဟ်ရဟာ? + + သၠုၚ်ကဆံၚ်တမ်ရိုဟ်ဂမၠိုၚ် + + ကလိဂွံတမ်ရိုဟ်သၠုၚ်ကဆံၚ်ဂမၠိုၚ်မာန် + + %1$s (သမၠုၚ်ပ္တိုန်က္ဆံၚ်ဂွံယျ) + + ကလိဂွံပ္တိုန်ကဆံၚ် သွက်ကဳဗုဒ် %1$s: %2$s + + ကလိဂွံပ္တိုန်ကဆံၚ် သွက်အဘိဓာန် %1$s: %2$s + + ပါယှေန်ကဳဗုဒ် + + လေက်မရီုဗၚ် + + ပ္တိတ်ကဳဗုဒ် + + %1$s [တၟိ] + + ဂွံစုတ်ကဳဗုဒ်ဏံ\nပ္ဍဲစက်တၞဟ်ဟ်ဂှ် သဂေန်ကုက်ဏံညိ + + ဒုၚ်တၠုၚ်ဏာ %1$s + + တၚ်နၚ်လိက် FileProvider မိက်ဂွံဗဵု ဝှါၚ်အရီုဗၚ်: %1$s + + ကဳဗုဒ်ယောၚ်ယာဇၞော်ဇၞော်နကဵု %1$s:%2$s သွက် ဘာသာ %3$s ။ ဂြဲပ္တိုန်မံၚ် ကဳဗုဒ်ပကတိ။ + + တၚ်ယောၚ်ယာ ပ္ဍဲကဳဗုဒ် %1$s:%2$s သွက် ဘာသာ %3$s + + စၟဳစၟတ်ဒၟံၚ် အဘိဓာန် မဆက်စပ် သ္ဂောံဂြဲဖျေံ + သ္ဂောံဂြဲဖျေံ အဘိဓာန်မဆက်စပ်တံဂှ် ဆက်စၠောံကု သာပါ ကဳမာန်ဟွံဂွံ + + မၞးမိက်ဂွံဂြဲဖျေံမူတၟိသွက်အဘိဓာန်ဏံဟာ? + + တံၚ်ဂြဲလဝ်အဘိဓာန်ဟွံမွဲ + + တံရိုဟ်သွက်ဏံဟွံမွဲ + + ကာတ်တလံက် သၠုၚ်ပ္တိုန်ဒၟံၚ်ကဆံၚ်လက်ကရဴရ + + ဂြဲဖျေံဒၟံၚ်ကာတ်တလံက်ဖိုဟ်၊ မၚ်မွဲလစုတ်တုဲဂ္စါန်မွဲဝါပၠန်ညိ! + + စၟဳစၟတ်သွက်တမ်ရိုဟ် + + ဂြဲ​ဖျေံဒၟံၚ် ကဳဗုဒ် လ္ပါ်လက်ကရဴ + + ကဳဗုဒ်မရုဲလဝ်ဂှ် အဃောဂၠောၚ်ဂြဲ​ဖျေံဒၟံၚ်ရောင်။ မၚ်မွဲချိုန်ခဏတုဲ ဆက်ဂစာန်ပၠန်ညိ! + + ​​​​ဂၠောၚ်ဂြဲဖျေံကဳဗုဒ်အာစိုပ်ဒတုဲ! + + ပွမဂြဲ​ဂၠောၚ်ဖျေံဒၟံၚ် အဘိဓာန်ဂှ် ​ဍေံပ္တံလဝ်ပ္ဍဲလက်ကရဴတေံ + + အဘိဓာန်ရုဲစှ်လဝ်ဂှ် အဃောဂၠောၚ်ဂြဲ​ဖျေံဒၟံၚ်ရောင်။ မၚ်မွဲချိုန်ခဏတုဲ ဆက်ဂစာန်ပၠန်ညိ! + + ​​​​ဂၠောၚ်ဂြဲဖျေံအဘိဓာန်အာစိုပ်ဒတုဲ။ + + ​တံၚ်ဂြဲဖျေံဟွံအံၚ်ဇၞး + + ဝှာၚ်မဂၠောၚ်ဂြဲ​ဖျေံလဝ်ဂှ် ကလေၚ်​ကေတ်ဟွံဂွံ + + ဆက်စၠောံကုသာပါဟွံအံၚ်ဇၞး! + + "တံရိုဟ်ဖအိုတ်ဂှ် ဒှ်တၟိရ!" + + သၠုၚ်ပ္တိုန်ကဆံၚ် တံရိုဟ် မွဲဟွံသေၚ်မွဲ ဟွံအံၚ်ဇၞး! + + သမၠုၚ်ပ္တိုန်ကဆံၚ်တံရိုဟ်အံၚ်ဇၞး! + + ပါယှေန်အဘိဓာန် + + ပလှ်ပတိတ် အဘိဓာန် + + မၞးမိက်ဂွံဇိုတ် အဘိဓာန်ဟာ? + + ဇိုတ် အဘိဓာန်တုဲ + + ကဳဗုဒ် %1$s စုတ်လဝ်တုဲ + + ဇိုတ် ကဳဗုဒ်တုဲ + + ပံက် ပလေဝ်ဒါန် + + ပံက် တၚ်ချိၚ်ခယျဂမၠိုၚ် + + အဘိဓာန် + + အဘိဓာန် + + + စၟဳစၟတ်အဘိဓာန်နွံဟွံမွဲ + စၟဳစၟတ်အဘိဓာန်အောန်လာၚ် + + အဘိဓာန်: %1$s + + အဘိဓာန် %1$s ဂမၠိုၚ် + + + စုတ် အဘိဓာန်တုဲ + + + (ကဳဗုဒ် %1$d) + + + အရေဝ်ဘာသာပကတိ + + + + ပလီု + + + မိက်ဂွံသၠာဲ ကဳဗုဒ်မ္ဂး ဍဵုအဏံညိ + + ပံက် ဝေက်ဗရဴသာဟွံဂွံ + diff --git a/ios/engine/KMEI/KeymanEngine/Classes/mnw.lproj/ResourceInfoView.strings b/ios/engine/KMEI/KeymanEngine/Classes/mnw.lproj/ResourceInfoView.strings new file mode 100644 index 00000000000..83c0b2ec700 --- /dev/null +++ b/ios/engine/KMEI/KeymanEngine/Classes/mnw.lproj/ResourceInfoView.strings @@ -0,0 +1,2 @@ +/* Class = "UILabel"; text = "Scan this code to load this keyboard on another device"; ObjectID = "z2O-MT-IoV"; */ +"z2O-MT-IoV.text" = "ဂွံစုတ်ကဳဗုဒ်ဏံ ပ္ဍဲစက်တၞဟ်ဟ်ဂှ် သဂေန် ကုက်ဏံညိ"; diff --git a/ios/engine/KMEI/KeymanEngine/mnw.lproj/Localizable.strings b/ios/engine/KMEI/KeymanEngine/mnw.lproj/Localizable.strings new file mode 100644 index 00000000000..4a6595036bd --- /dev/null +++ b/ios/engine/KMEI/KeymanEngine/mnw.lproj/Localizable.strings @@ -0,0 +1,257 @@ +/* A descriptive message used for errors when the app is already busy downloading */ +"alert-download-error-busy" = "ဂြဲဖျေံဒၟံၚ်ဖိုဟ်ရ။"; + +/* A descriptive message used when a download fails */ +"alert-download-error-detail" = "အဃော ပ္တိုန်စုတ်ဒၟံၚ် ဟွံသေၚ်မ္ဂး အဃော ဂြဲဖျေံဒၟံၚ်ဂှ် ယောၚ်ယာအာ။"; + +/* Title for a "download failed" alert */ +"alert-download-error-title" = "ဂြဲဖျေံဆောတ်ယောၚ်"; + +/* Title for a general alert about errors */ +"alert-error-title" = "ယောၚ်ယာ"; + +/* A descriptive message used when no internet connection is detected */ +"alert-no-connection-detail" = "ကေတ်အဆက်ကု သာပါ ကဳမာန် ဟွံဂွံ။ ဂ္စါန်မွဲဝါပၠန်ညိ။"; + +/* Title for a "no connection" alert */ +"alert-no-connection-title" = "ဆက်စၠောံယောၚ်ယာ"; + +/* Short text for a 'back' navigational command. Used to return to the previous screen */ +"command-back" = "ကလေၚ်"; + +/* Short text for a 'cancel' command. Used to back out of a menu or install process without making changes */ +"command-cancel" = "တးပါဲ"; + +/* Short text for a 'done' command. Used to back out of settings menus after changes have been made */ +"command-done" = "တုဲ"; + +/* Short text for an 'install' command. Used to confirm installation of a package. */ +"command-install" = "စုတ်"; + +/* Short text for a 'next' navigational command. Used to advance to the next screen */ +"command-next" = "မွဲပၠန်"; + +/* Short text for an 'OK' command. Used for some error alerts */ +"command-ok" = "အဵုခေ"; + +/* Short text for confirmining 'uninstall' commands. */ +"command-uninstall" = "ပလှ်ပ္တိတ်"; + +/* Text for the command to uninstall a keyboard */ +"command-uninstall-keyboard" = "ပ္တိတ်ကဳဗုဒ်"; + +/* Confirmation text to display before uninstalling a keyboard */ +"command-uninstall-keyboard-confirm" = "မၞးမိက်ဂွံပလှ်ပ္တိတ်ကဳဗုဒ်ဏံဟာ?"; + +/* Text for the command to uninstall a lexical model */ +"command-uninstall-lexical-model" = "ပလှ်ပတိတ် အဘိဓာန်"; + +/* Confirmation text to display before uninstalling a lexical model */ +"command-uninstall-lexical-model-confirm" = "မၞးမိက်ဂွံပတိတ် အဘိဓာန်ဏံဟာ?"; + +/* Text for error when a keyboard cannot load properly */ +"error-loading-keyboard" = "ဂြဲစုတ်ကဳဗုဒ် အာတ်မိက်ဟွံဂွံ"; + +/* Text for error when a lexical model cannot load properly */ +"error-loading-lexical-model" = "ဂြဲကေတ် အဘိဓာန် အာတ်မိက်ဟွံဂွံ"; + +/* Text for error when an installed file is unexpectedly missing */ +"error-missing-file" = "ဝှါၚ်ပၟိက်ဇၞော်ဂၠာဲဟွံဆဵု။"; + +/* Text for error when an installed file is unexpectedly missing */ +"error-missing-file-critical" = "ဝှါၚ်ပၟိက်ဇၞော်အိုတ် ဟွံဆဵု။ ကလေၚ်ပ္တိုန် အေပ်ဏံ မွဲဝါပၠန်ညိ။"; + +/* Text for errors in data received from search queries */ +"error-query-decoding" = "သာပါဂှ် ပြဟ်ဟ်ဏံ သွာၚ်စက်ဒှ်မံၚ်အခက်ခုဲညိရ"; + +/* A descriptive message used when a download fails */ +"error-query-general" = "ဆက်စၠောံကု သာပါယောၚ်အာ"; + +/* Text for error when a search query is unexpectedly empty */ +"error-query-no-data" = "ဆက်စၠောံကု သာပါဟွံဂွံ"; + +/* Text for general errors where not much information is known */ +"error-unknown" = "တၚ်ယောၚ်ယာက္တဵုဒှ်"; + +/* Text for error when updating a resource: cannot download because no source is available */ +"error-update-no-link" = "တံရိုဟ်ပ္တိုန်ကဆံၚ်သွက်ဏံဟွံမွဲဏီ"; + +/* Text for error when updating a resource: Keyman does not know how to update the resource */ +"error-update-not-managed" = "ပ္တိုန်ကဆံၚ်သွက် တံရိုဟ် ဏံဂှ် နူ စက်ကဳမာန်တေံ ထိၚ်ဒဝ်လဝ်ဟွံသေၚ်ရ"; + +/* Text for the command to open the help page of a keyboard, as shown on resource information views */ +"info-command-help-keyboard" = "အရီုဗၚ် ကဳဗုဒ်"; + +/* Text for the command to open the help page of a lexical model, as shown on resource information views */ +"info-command-help-lexical-model" = "အရီုဗၚ် အဘိဓာန်"; + +/* Text label for displaying a keyboard's version, as shown on resource information views */ +"info-label-version-keyboard" = "ပါယှေန်ကဳဗုဒ်"; + +/* Text label for displaying a lexical model's version, as shown on resource information views */ +"info-label-version-lexical-model" = "ပါယှေန်အဘိဓာန်"; + +/* Label used for the "package info" / readme tab with the package installation prompt on phones. */ +"installer-label-package-info" = "တၚ်နၚ်ပက်ကေ"; + +/* Label used for the language-selection tab with the package installation prompt on phones. */ +"installer-label-select-languages" = "ရုဲဘာသာဂမၠိုၚ်"; + +/* Label used with a package's version, as seen within the package installation prompt. Example: "Version: 14.0.0" */ +"installer-label-version" = "ပါယှေန်: %@"; + +/* Section header for languages supported by a package, as seen within the package installation prompt */ +"installer-section-available-languages" = "ဘာသာကၠိဂွံဂမၠိုၚ်"; + +/* Text for the help popup for changing keyboards with the globe key */ +"keyboard-help-change" = "မိက်ဂွံသၠာဲ ကဳဗုဒ်မ္ဂး ဍဵုအဏံညိ"; + +/* Text for the command to exit the Keyman keyboard in favor of other keyboards installed on the system */ +"keyboard-menu-exit" = "ကၟာတ် %@"; + +/* Error installing a Keyman package - could not allocate a location to install it */ +"kmp-error-file-system" = "ယောၚ်လီုအာ အဃောမတၚ်စုတ် တၚ်နၚ်မံၚ်ပ္ဍဲစက်"; + +/* Error installing a Keyman package - could not copy package files */ +"kmp-error-file-copying" = "ယောၚ်လီုအာ အဃောမတၚ်စုတ်ဆာဲစၠောံဒၟံၚ် တၚ်နၚ်မံၚ်ပ္ဍဲစက်"; + +/* Error opening a Keyman package - package is not valid */ +"kmp-error-invalid" = "ပက်ကေဝှါၚ်ယောၚ်။"; + +/* Error opening a Keyman package - it does not exist / the specified location is wrong */ +"kmp-error-missing" = "ပက်ကေမၞးစုတ်ဂှ် ဟွံမွဲရ။"; + +/* Error installing a Keyman package - expected resource (keyboard or dictionary) is missing */ +"kmp-error-missing-resource" = "ပ္ဍဲပက်ကေဏံ ကဳဗုဒ်ကဵု အဘိဓာန်အာတ်လဝ်တံဟွံပါရ။"; + +/* Error installing a Keyman package with a version of Keyman that does not support it */ +"kmp-error-unsupported-keyman-version" = "ပက်ကေဏံ နွံပၟိက်ကုပါယှေန် ကဳမာန်တၟိရ။"; + +/* Error opening a Keyman package - cannot parse contents */ +"kmp-error-no-metadata" = "ပက်ကေဏံသိုၚ်လဝ်ဟွံချိုတ်ပၠိုတ် - ကပေါတ်ဟွံတီ။"; + +/* Error opening a Keyman package - package's contents are for desktop platforms only */ +"kmp-error-unsupported" = "ပ္ဍဲပက်ကေဏံ အထံက်ပၚ် သွက်စက်မၞးဟွံပါ။"; + +/* Error opening a Keyman package - package contains unexpected resource (keyboard or dictionary) type */ +"kmp-error-wrong-type" = "ပက်ကေဏံ ဂကူတမ်ရိုဟ်စၟဳလဝ်ဟွံပါ"; + +/* Title for the Installed Languages menu */ +"menu-installed-languages-title" = "ဘာသာစုတ်လဝ်တုဲတုဲဂမၠိုၚ်"; + +/* Section header for lexical models within a language-specific settings menu */ +"menu-langsettings-label-lexical-models" = "အဘိဓာန်ဂမၠိုၚ်"; + +/* Section header for keyboards within a language-specific settings menu */ +"menu-langsettings-section-keyboards" = "ကဳဗုဒ်ဂမၠိုၚ်"; + +/* Section header for the settings toggles within a language-specific settings menu */ +"menu-langsettings-section-settings" = "တၚ်ပလေဝ် ဘာသာနာနာ"; + +/* Title for the language-specific settings menus */ +"menu-langsettings-title" = "ဒၞါဲပလေဝ်နာနာ %@"; + +/* Label for the toggle that enables corrections that is displayed within a language-specific settings menu */ +"menu-langsettings-toggle-correct" = "ပံက် ပလေဝ်ဒါန်"; + +/* Label for the toggle that enables predictions that is displayed within a language-specific settings menu */ +"menu-langsettings-toggle-predict" = "ပံက် တၚ်ချိၚ်ခယျဂမၠိုၚ်"; + +/* Help message for a prompt that appears for confirming a lexical model download: language (1): lexical model (dictionary) name (2) */ +"menu-lexical-model-install-message" = "မၞးမိက်ဂွံ စုတ်အဘိဓါန်ဟာ?"; + +/* Title for a prompt that appears for confirming a lexical model download: language (1): lexical model (dictionary) name (2) */ +"menu-lexical-model-install-title" = "%1$@: %2$@"; + +/* Text for an info alert indicating that no lexical models are available */ +"menu-lexical-model-none-message" = "အဘိဓာန်ဟွံမွဲ"; + +/* Title for the lexical model menu, a submenu of the language-specific settings menus */ +"menu-lexical-model-title" = "အဘိဓာန် %@ ဂမၠိုၚ်"; + +/* Title for the keyboard picker */ +"menu-picker-title" = "ကဳဗုဒ်ဂမၠိုၚ်"; + +/* Primary text for the Settings menu option to report keyboard crashes */ +"menu-settings-error-report" = "ကဵုအခေါၚ် ပ္တိုန်ထ္ၜးတၚ်ယောၚ်ယာ"; + +/* Secondary text for the Settings menu option to report keyboard crashes */ +"menu-settings-error-report-description" = "သ္ဒးကဵု \"အခေါၚ်ပေၚ်ၚ်\" မာန်"; + +/* Primary text for the Settings menu local-file package installation option */ +"menu-settings-install-from-file" = "ပ္တိုန်စုတ်နူ ဝှါၚ်"; + +/* Secondary text for the Settings menu local-file package installation option */ +"menu-settings-install-from-file-description" = "ဂၠါဲ ဝှါၚ် .kmp ဂမၠိုၚ်"; + +/* Primary text for the Settings menu option that displays the iOS system menu options for the app's keyboard */ +"menu-settings-system-keyboard-menu" = "တၚ်ပလေဝ်နာနာသွက် ကဳဗုဒ် စက်"; + +/* Label for the "Show Banner" toggle on the main settings screen */ +"menu-settings-show-banner" = "ထ္ၜးလ္တူဗၠးမုက်"; + +/* Label for the "Get Started" automatic display toggle seen in the Settings menu */ +"menu-settings-startup-get-started" = "ထ္ၜး \"စတရဴစိုအ်\" ပ္ဍဲကဵုအစ"; + +/* Title for the main Settings menu */ +"menu-settings-title" = "တၚ်ပလေဝ်နာနာ သွက်ကဳမာန်"; + +/* Secondary text showing current setting for spacebar caption - blank */ +"menu-settings-spacebar-hint-blank" = "လ္ပဓမံက်ထ္ၜးမလိက်ပ္ဍဲspacebarညိ"; + +/* Secondary text showing current setting for spacebar caption - keyboard */ +"menu-settings-spacebar-hint-keyboard" = "ပ္ဍဲ spacebar ဂှ် ထ္ၜးယၟုကဳဗုဒ်ညိ"; + +/* Secondary text showing current setting for spacebar caption - language */ +"menu-settings-spacebar-hint-language" = "ပ္ဍဲ spacebar ဂှ် ထ္ၜးယၟုအရေဝ်ဘာသာညိ"; + +/* Secondary text showing current setting for spacebar caption - language + keyboard */ +"menu-settings-spacebar-hint-languageKeyboard" = "ထ္ၜးယၟုအရေဝ်ဘာသာ ကေုာံ ကဳဗုဒ် လ္တူ spacebar"; + +/* Label for the "Spacebar Caption" item on the main settings screen */ +"menu-settings-spacebar-text" = "က္တိုပ်လိက် Spacebar"; + +/* Title for the "Spacebar Caption" settings screen */ +"menu-settings-spacebar-title" = "က္တိုပ်လိက် Spacebar"; + +/* Text showing name of spacebar caption - blank */ +"menu-settings-spacebar-item-blank" = "သၠး"; + +/* Text showing name of spacebar caption - keyboard */ +"menu-settings-spacebar-item-keyboard" = "ကဳဗုဒ်"; + +/* Text showing name of spacebar caption - language */ +"menu-settings-spacebar-item-language" = "ဘာသာဂမၠိုၚ်"; + +/* Text showing name of spacebar caption - language + keyboard */ +"menu-settings-spacebar-item-languageKeyboard" = "ဘာသာ ကေုာံ ကဳဗုဒ်"; + +/* Short text for notification: download failure for keyboard */ +"notification-download-failure-keyboard" = "ဂြဲဖျေံကဳဗုဒ်ဟွံအံၚ်ဇၞး"; + +/* Short text for notification: download failure for lexical model */ +"notification-download-failure-lexical-model" = "ဂြဲဖျေံအဘိဓာန်ဟွံအံၚ်ဇၞး"; + +/* Short text for notification: download success for keyboard */ +"notification-download-success-keyboard" = "ဂြဲဖျေံကဳဗုဒ် အံၚ်ဇၞး"; + +/* Short text for notification: download success for lexical model */ +"notification-download-success-lexical-model" = "သ္ၚိအၚ်အဘိဓာန်ဂြဲဖျေံအံၚ်ဇၞးအာယျ"; + +/* Short text for notification: downloading a keyboard */ +"notification-downloading-keyboard" = "ဂြဲဖျေံဒၟံၚ် ကဳဗုဒ်\U2026"; + +/* Short text for notification: downloading a lexical model */ +"notification-downloading-lexical-model" = "ဂြဲဖျေံဒၟံၚ် အဘိဓာန်\U2026"; + +/* Short text for notification: an update is available */ +"notification-update-available" = "သၠုၚ်ပ္တိုန်က္ဆံၚ်ဂွံယျ"; + +/* Short text for notification: currently updating */ +"notification-update-processing" = "သၠုၚ်ပ္တိုန်ဒၟံၚ်က္ဆံၚ်\U2026"; + +/* Text indicating success at installing new keyboards or dictionaries */ +"success-install" = "ပ္တိုန်စုတ် အံၚ်ဇၞးယျ။"; + +/* A title to use in alerts indicating 'success' at whatever task the user requested */ +"success-title" = "အံၚ်ဇၞး"; diff --git a/ios/engine/KMEI/KeymanEngine/mnw.lproj/Localizable.stringsdict b/ios/engine/KMEI/KeymanEngine/mnw.lproj/Localizable.stringsdict new file mode 100644 index 00000000000..e6394635f5e --- /dev/null +++ b/ios/engine/KMEI/KeymanEngine/mnw.lproj/Localizable.stringsdict @@ -0,0 +1,104 @@ + + + + + menu-langsettings-lexical-model-count + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + other + %u အဘိဓာန်ဂမၠိုၚ် စုတ်လဝ်တုဲ + + + notification-update-failed + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + other + %u ပ္တိုန်က္ဆံၚ်ဟွံအံၚ်ဇၞး + + + notification-update-success + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + other + %u ပ္တိုန်က္ဆံၚ်အံၚ်ဇၞး + + + settings-keyboards-installed-count + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + other + ကဳဗုဒ် %u စုတ်လဝ်တုဲ + + + settings-languages-installed-count + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + other + အရေဝ်ဘာသာ %u ဘာသာ စုတ်လဝ်တုဲ + + + package-default-found-keyboards + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + other + ကဳဗုဒ် %u ဂွံဆဵုကေတ်ပ္ဍဲပက်ကေ: + + + package-default-found-lexical-models + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + other + အဘိဓာန် %u ဂွံဆဵုကေတ်ပ္ဍဲပက်ကေ: + + + + diff --git a/ios/keyman/Keyman/Keyman/mnw.lproj/Localizable.strings b/ios/keyman/Keyman/Keyman/mnw.lproj/Localizable.strings new file mode 100644 index 00000000000..9b0c3ae1799 --- /dev/null +++ b/ios/keyman/Keyman/Keyman/mnw.lproj/Localizable.strings @@ -0,0 +1,81 @@ +/* Title for the bookmarks menu within the embedded browser */ +"browser-bookmarks-add-title" = "စွံ သမ္တီမုက်လိက်"; + +/* Title for the bookmarks menu within the embedded browser */ +"browser-bookmarks-none" = "မုက်လိက်သမ္တီလဝ်ဟွံမွဲ"; + +/* Title for the bookmarks menu within the embedded browser */ +"browser-bookmarks-title" = "သမ္တီမုက်လိက်"; + +/* Used to confirm a user's desire to install a package */ +"confirm-install" = "စုတ်"; + +/* The label for the toggle to stop automatically showing the "Get Started" tutorial popup. */ +"disable-get-started" = "လ္ပထ္ၜးမွဲလန်ပၠန်ညိ"; + +/* Indicates an error opening a web page requested by a user */ +"error-opening-page" = "ပံက်မုက်လိက်ဟွံဂွံ"; + +/* Long-form used when installing a font in order to display a language properly. */ +"font-install-description" = "%@ ဂွံထ္ၜးပ္ဍဲကဵု ကပေါတ်စက်စုၚ်ၚ်မာန်ဂှ် ရုဲစှ်ကဵု စုတ် ညိ"; + +/* The name of the iOS Settings menu option for keyboards */ +"ios-settings-keyboards" = "ကဳဗုဒ်ဂမၠိုၚ်"; + +/* The name of the iOS Settings menu option for giving the keyboard full access. (The menu entry +underneath the app's name within the app-specific keyboard menu.) */ +"ios-settings-allow-full-access" = "ကဵုအခေါၚ်ပေၚ်ၚ်"; + +/* Short-form used when installing a font in order to display a language properly. */ +"language-for-font" = "မလိက် %@"; + +/* Used for 'add' options within menus */ +"menu-add" = "စုတ်"; + +/* Used to indicate a sequence of menu options that a user needs to copy. May be chained. Example: "Keyboards (1) > Enable Keyman (2)" */ +"menu-breadcrumbing" = "%1$@ > %2$@"; + +/* Used to exit a menu without choosing an option */ +"menu-cancel" = "တးပါဲ"; + +/* Menu option that erases all previously-typed text. */ +"menu-clear-text" = "ပလီုလိက်"; + +/* Menu option that displays a list designed to help users start using the app */ +"menu-get-started" = "စတရဴစိုအ်"; + +/* Menu option that displays help for the app */ +"menu-help" = "တၚ်နၚ်"; + +/* Menu option that displays the main screen's drop-down menu */ +"menu-more" = "ဂၠိုၚ်နူဏံ"; + +/* Menu option used to edit keyboard and dictionary settings */ +"menu-settings" = "ဒၞါဲပလေဝ်နာနာ"; + +/* Menu option that displays the iOS Share menu */ +"menu-share" = "ပါ်ပရအ်"; + +/* Menu option that displays an embedded web browser. */ +"menu-show-browser" = "ဗရဴသာ"; + +/* Menu option used to control in-app font size. */ +"menu-text-size" = "အဝဲမလိက်"; + +/* Used to describe the current font size */ +"text-size-label" = "အဝဲမလိက်: %i"; + +/* Text to indicate that a user should set a toggle within iOS Settings to 'active'. */ +"toggle-to-enable" = "ပံက် %@"; + +/* First option on the Get Started tutorial - Add a keyboard for your language */ +"tutorial-add-keyboard" = "စုတ်ကဳဗုဒ်သွက်ဘာသာမၞး"; + +/* Third option on the Get Started tutorial - Displays app help. */ +"tutorial-show-help" = "တၚ်နၚ်ဂၠိုၚ်နူဏံ"; + +/* Second option on the Get Started tutorial - Set up Keyman as system-wide keyboard */ +"tutorial-system-keyboard" = "သ္ပဒတန်ကဳမာန် နကဵု ကဳဗုဒ်သၞောတ်စက်"; + +/* Used to display app version (as in \"Version: 1.0.2\" */ +"version-label" = "ပါယှေန်: %@"; diff --git a/linux/keyman-config/locale/mnw_MM.po b/linux/keyman-config/locale/mnw_MM.po new file mode 100644 index 00000000000..cd464491c12 --- /dev/null +++ b/linux/keyman-config/locale/mnw_MM.po @@ -0,0 +1,332 @@ +msgid "" +msgstr "" +"Project-Id-Version: keyman\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-08-19 19:17+0200\n" +"PO-Revision-Date: 2023-09-12 04:15\n" +"Last-Translator: \n" +"Language-Team: Mon\n" +"Language: mnw_MM\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Crowdin-Project: keyman\n" +"X-Crowdin-Project-ID: 386703\n" +"X-Crowdin-Language: mnw\n" +"X-Crowdin-File: /master/linux/keyman-config.pot\n" +"X-Crowdin-File-ID: 504\n" + +#: keyman_config/__init__.py:68 +msgid "Neither sentry-sdk nor raven is available. Not enabling Sentry error reporting." +msgstr "Sentry-sdk ကီု raven ကီုဟွံမွဲရ။ ဟွံပံက် ဒုၚ်စဳရေၚ် ပရေၚ်ယောၚ်ယာ Sentry ရ။" + +#: keyman_config/downloadkeyboard.py:23 +msgid "Download Keyman keyboards" +msgstr "ဂြဲကေတ် ကဳဗုဒ် ကဳမာန်ဂမၠိုၚ်" + +#: keyman_config/downloadkeyboard.py:37 keyman_config/keyboard_details.py:49 +#: keyman_config/keyboard_details.py:340 keyman_config/view_installed.py:205 +msgid "_Close" +msgstr "_ကၟာတ်" + +#: keyman_config/install_kmp.py:99 +msgid "You do not have permissions to install the keyboard files to the shared area /usr/local/share/keyman" +msgstr "သ္ဂောံစုတ်ကဳဗုဒ် ပ္ဍဲဨရိယျာ /usr/local/share/keyman ဂှ် မၞးအခေါၚ်ဟၟံမွဲ" + +#: keyman_config/install_kmp.py:103 +msgid "You do not have permissions to install the documentation to the shared documentation area /usr/local/share/doc/keyman" +msgstr "သ္ဂောံစုတ်ကဳဗုဒ် ပ္ဍဲဨရိယျာ /usr/local/share/doc/keyman ဂှ် မၞးအခေါၚ်ဟၟံမွဲ" + +#: keyman_config/install_kmp.py:107 +msgid "You do not have permissions to install the font files to the shared font area /usr/local/share/fonts" +msgstr "သ္ဂောံစုတ်ဝှတ် ပ္ဍဲဨရိယျာ /usr/local/share/fonts ဂှ် မၞးအခေါၚ်ဟၟံမွဲ" + +#: keyman_config/install_kmp.py:179 +#, python-brace-format +msgid "install_kmp.py: error: No kmp.json or kmp.inf found in {package}" +msgstr "install_kmp.py: error: No kmp.json or kmp.inf found in {package}" + +#: keyman_config/install_kmp.py:246 +#, python-brace-format +msgid "install_kmp.py: error: No kmp.json or kmp.inf found in {packageFile}" +msgstr "install_kmp.py: error: No kmp.json or kmp.inf found in {packageFile}" + +#: keyman_config/install_window.py:54 +#, python-brace-format +msgid "Installing keyboard/package {keyboardid}" +msgstr "စုတ် ကဳဗုဒ်/ပက်ကေ တုဲ {keyboardid}" + +#: keyman_config/install_window.py:72 keyman_config/install_window.py:93 +msgid "Keyboard is installed already" +msgstr "ကဳဗုဒ် ဂှ် စုတ်လဝ်တုဲတုဲရ" + +#: keyman_config/install_window.py:74 +#, python-brace-format +msgid "The {name} keyboard is already installed at version {version}. Do you want to uninstall then reinstall it?" +msgstr "ကဳဗုဒ် {name} စုတ်လဝ်တုဲ နကဵု ပါယှေန် {version} ရ။ မၞးမိက်ဂွံပ္တိတ်တုဲ စုတ်တၟိဟာ?" + +#: keyman_config/install_window.py:95 +#, python-brace-format +msgid "The {name} keyboard is already installed with a newer version {installedversion}. Do you want to uninstall it and install the older version {version}?" +msgstr "ကဳဗုဒ် {name} ဂှ်စုတ်လဝ်တုဲနကဵု ပါယှေန်တၟိ {installedversion} ရ။ မၞးမိက်ဂွံ ပ္တိတ်တုဲ စုတ် ပါယှေန်တြေံ {version} ပၠန်ဟာ?" + +#: keyman_config/install_window.py:128 +msgid "Keyboard layouts: " +msgstr "သ္ၚိအၚ်ကဳဗုဒ်: " + +#: keyman_config/install_window.py:147 +msgid "Fonts: " +msgstr "မလိက်ဖွန်: " + +#: keyman_config/install_window.py:167 keyman_config/keyboard_details.py:96 +msgid "Package version: " +msgstr "ပါယှေန်ပက်ကေ: " + +#: keyman_config/install_window.py:179 +msgid "Author: " +msgstr "ညးချူဗဒှ်: " + +#: keyman_config/install_window.py:197 +msgid "Website: " +msgstr "ဝက်သာ်: " + +#: keyman_config/install_window.py:211 +msgid "Copyright: " +msgstr "အခေါၚ်အဝဵုပိုၚ်ပြဳ: " + +#: keyman_config/install_window.py:245 +msgid "Details" +msgstr "တၚ်နၚ်သောဲသောဲဗြောဲဗြောဲ" + +#: keyman_config/install_window.py:248 +msgid "README" +msgstr "ဗှ်အဲညိ" + +#: keyman_config/install_window.py:256 keyman_config/view_installed.py:200 +msgid "_Install" +msgstr "_ပ္တိုန်စုတ်" + +#: keyman_config/install_window.py:260 +msgid "_Cancel" +msgstr "_တးပါဲ" + +#: keyman_config/install_window.py:305 +#, python-brace-format +msgid "Keyboard {name} installed" +msgstr "ကဳဗုဒ် {name} ဂှ် စုတ်လဝ်တုဲတုဲ" + +#: keyman_config/install_window.py:310 keyman_config/install_window.py:315 +#, python-brace-format +msgid "Keyboard {name} could not be installed." +msgstr "ကဳဗုဒ် {name} ဂှ်စုတ်ဟွံဂွံ။" + +#: keyman_config/install_window.py:311 +msgid "Error Message:" +msgstr "လိက်တၚ်ဗၠေတ်:" + +#: keyman_config/install_window.py:316 +msgid "Warning Message:" +msgstr "လိက်ကဵုသတိ:" + +#: keyman_config/keyboard_details.py:37 +#, python-brace-format +msgid "{name} keyboard" +msgstr "ကဳဗုဒ် {name}" + +#: keyman_config/keyboard_details.py:53 +msgid "ERROR: Keyboard metadata is damaged.\n" +"Please \"Uninstall\" and then \"Install\" the keyboard." +msgstr "တၚ်ယောၚ်ယာ: မဳတာဒေတာ ကဳဗုဒ်လီု။\n" +"ကလေၚ် ပ္တိတ်တုဲ ပ္တိုန်စုတ်ကဳဗုဒ်တၟိပၠန်ညိ။" + +#: keyman_config/keyboard_details.py:74 +msgid "Package name: " +msgstr "ယၟု ပက်ကေ: " + +#: keyman_config/keyboard_details.py:85 +msgid "Package id: " +msgstr "ID ပက်ကေ: " + +#: keyman_config/keyboard_details.py:108 +msgid "Package description: " +msgstr "တၚ်သောၚ် ပက်ကေ: " + +#: keyman_config/keyboard_details.py:121 +msgid "Package author: " +msgstr "ညးချူခၞံ ပက်ကေ: " + +#: keyman_config/keyboard_details.py:133 +msgid "Package copyright: " +msgstr "တၠမူ ပက်ကေ: " + +#: keyman_config/keyboard_details.py:174 +msgid "Keyboard filename: " +msgstr "ယၟုဝှါၚ် ကဳဗုဒ်: " + +#: keyman_config/keyboard_details.py:187 +msgid "Keyboard name: " +msgstr "ယၟုကဳဗုဒ်: " + +#: keyman_config/keyboard_details.py:198 +msgid "Keyboard id: " +msgstr "Id ကဳဗုဒ်: " + +#: keyman_config/keyboard_details.py:209 +msgid "Keyboard version: " +msgstr "ပါယှေန်ကဳဗုဒ်: " + +#: keyman_config/keyboard_details.py:221 +msgid "Keyboard author: " +msgstr "ညးချူ ကဳဗုဒ်: " + +#: keyman_config/keyboard_details.py:232 +msgid "Keyboard license: " +msgstr "လာၚ်ဇြေန် ကဳဗုဒ်: " + +#: keyman_config/keyboard_details.py:243 +msgid "Keyboard description: " +msgstr "တၚ်သောၚ်ကဳဗုဒ် ဍန်န်: " + +#: keyman_config/keyboard_details.py:334 +#, python-brace-format +msgid "Scan this code to load this keyboard\n" +"on another device or share online" +msgstr "သ္ဂောံစုတ်ကဳဗုဒ်ဏံ\n" +"ပ္ဍဲစက်တၞဟ်ဟ်ဂှ် သဂေန်ညိ ဟွံသေၚ် share online" + +#: keyman_config/options.py:24 +#, python-brace-format +msgid "{packageId} Settings" +msgstr "ဒၞါဲချိၚ်နာနာ {packageId}" + +#: keyman_config/view_installed.py:30 +msgid "Keyman Configuration" +msgstr "ဒၞါဲပလေဝ်သၞောတ်စက် ကဳမာန် နာနာ" + +#: keyman_config/view_installed.py:60 +msgid "Choose a kmp file..." +msgstr "ရုဲစှ် ဝှါၚ် kmp..." + +#. i18n: file type in file selection dialog +#: keyman_config/view_installed.py:65 +msgid "KMP files" +msgstr "ဝှါၚ် KMP ဂမၠိုၚ်" + +#. i18n: column header in table displaying installed keyboards +#: keyman_config/view_installed.py:141 +msgid "Icon" +msgstr "ရုပ်" + +#. i18n: column header in table displaying installed keyboards +#: keyman_config/view_installed.py:145 +msgid "Name" +msgstr "ယၟု" + +#. i18n: column header in table displaying installed keyboards +#: keyman_config/view_installed.py:148 +msgid "Version" +msgstr "ပါယှေန်" + +#: keyman_config/view_installed.py:161 +msgid "_Uninstall" +msgstr "_ပ္တိတ်" + +#: keyman_config/view_installed.py:162 keyman_config/view_installed.py:304 +msgid "Uninstall keyboard" +msgstr "ပ္တိတ်ကဳဗုဒ်" + +#: keyman_config/view_installed.py:167 +msgid "_About" +msgstr "_ပရော" + +#: keyman_config/view_installed.py:168 keyman_config/view_installed.py:306 +msgid "About keyboard" +msgstr "ပရောကဳဗုဒ်" + +#: keyman_config/view_installed.py:173 +msgid "_Help" +msgstr "_အရီုဗၚ်" + +#: keyman_config/view_installed.py:174 keyman_config/view_installed.py:305 +msgid "Help for keyboard" +msgstr "အရီုဗၚ်သွက် ကဳဗုဒ်" + +#: keyman_config/view_installed.py:179 +msgid "_Options" +msgstr "_တၚ်ရုဲစှ်ဂမၠိုၚ်" + +#: keyman_config/view_installed.py:180 keyman_config/view_installed.py:307 +msgid "Settings for keyboard" +msgstr "တၚ်ချိၚ်သွက် ကဳဗုဒ်" + +#: keyman_config/view_installed.py:190 +msgid "_Refresh" +msgstr "_ကလေၚ်ကေတ်တၟိ" + +#: keyman_config/view_installed.py:191 +msgid "Refresh keyboard list" +msgstr "ကလေၚ်ကေတ် စရၚ် ကဳဗုဒ်တၟိ" + +#: keyman_config/view_installed.py:195 +msgid "_Download" +msgstr "_ဂြဲ" + +#: keyman_config/view_installed.py:196 +msgid "Download and install a keyboard from the Keyman website" +msgstr "ဂြဲကေတ်တုဲ စုတ် ကဳဗုဒ် နူ ဝက်သာ် ကဳမာန်" + +#: keyman_config/view_installed.py:201 +msgid "Install a keyboard from a file" +msgstr "စုတ်ကဳဗုဒ် နူကဵု ဝှါၚ်" + +#: keyman_config/view_installed.py:206 +msgid "Close window" +msgstr "ကၟာတ်ဝေန်ဒဵု" + +#: keyman_config/view_installed.py:278 +#, python-brace-format +msgid "Uninstall keyboard {package}" +msgstr "ပလှ်ကဳဗုဒ် {package}" + +#: keyman_config/view_installed.py:280 +#, python-brace-format +msgid "Help for keyboard {package}" +msgstr "အရီုဗၚ်သွက်ကဳဗုဒ် {package}" + +#: keyman_config/view_installed.py:282 +#, python-brace-format +msgid "About keyboard {package}" +msgstr "ပရောကဳဗုဒ် {package}" + +#: keyman_config/view_installed.py:284 +#, python-brace-format +msgid "Settings for keyboard {package}" +msgstr "တၚ်ချိၚ်နာနာသွက်ကဳဗုဒ် {package}" + +#: keyman_config/view_installed.py:349 +msgid "Uninstall keyboard package?" +msgstr "ပလှ်ပ္တိတ် သ္ၚိကဳဗုဒ်ဟာ?" + +#: keyman_config/view_installed.py:351 +#, python-brace-format +msgid "Are you sure that you want to uninstall the {keyboard} keyboard and its fonts?" +msgstr "မၞးပ္တိတ် ကဳဗုဒ် {keyboard} ကေုာံ မလိက် ကောန်ဍောၚ်ဍေံရောၚ်ဂှ် ချိုတ်ပၠိုတ်ဟာ?" + +#: keyman_config/welcome.py:22 +#, python-brace-format +msgid "{name} installed" +msgstr "{name} စုတ်လဝ်တုဲတုဲ" + +#: keyman_config/welcome.py:40 +msgid "Open in _Web browser" +msgstr "ပံက်ပ္ဍဲ _ဝက်ပ်ဗရဴသာ" + +#: keyman_config/welcome.py:42 +msgid "Open in the default web browser to do things like printing" +msgstr "သ္ဂောံကၠောန်ကမၠောန် ဗီုဆာဲလိက်တံမာန်ဂှ် အာပံက်ကု ဗရဴသာ ပကတိညိ" + +#: keyman_config/welcome.py:45 +msgid "_OK" +msgstr "_အဵုခေ" + diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMAboutWindow/mnw.lproj/KMAboutWindowController.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMAboutWindow/mnw.lproj/KMAboutWindowController.strings new file mode 100644 index 00000000000..c556a39c16c --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMAboutWindow/mnw.lproj/KMAboutWindowController.strings @@ -0,0 +1,8 @@ +/* button text to close the About window */ +"Kab-Up-fYH.title" = "ကၟာတ်"; + +/* text of link to the license agreement */ +"hYC-Bx-aoP.title" = "တၚ်တုပ်စိုတ် လာၚ်ဇြေန်"; + +/* button text to open Configuration window */ +"vkh-b5-vO7.title" = "ပလေဝ်နာနာ..."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/mnw.lproj/preferences.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/mnw.lproj/preferences.strings new file mode 100644 index 00000000000..a04044df41f --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/mnw.lproj/preferences.strings @@ -0,0 +1,38 @@ +/* Checkbox text to always show on-screen keyboard */ +"4UX-80-0Vo.title" = "ထ္ၜး ကဳဗုဒ် ဗၠးမုက်လၟိုန်"; + +/* Checkbox text to enable verbose Console logging */ +"7J6-zy-R20.title" = "သုၚ်စောဲ verbose Console logging"; + +/* Support button text */ +"93O-x6-RLF.label" = "အထံက်အပၚ်"; + +/* Download Keyboard button text */ +"CTw-kf-WNS.title" = "ဂြဲကေတ် ကဳဗုဒ်..."; + +/* Keyman Configuration window title */ +"F0z-JX-Cv5.title" = "ဗီုပြၚ်သၞောတ်စက် ကဳမာန်"; + +/* button text to go back to previous page */ +"JOK-JV-n8w.title" = "ကလေၚ်"; + +/* Keyboards button text */ +"MPN-9N-wWc.label" = "ကဳဗုဒ်ဂမၠိုၚ်"; + +/* text to explain verbose Console logging option */ +"MrI-GM-7d6.title" = "အခါရ တၚ်ရုဲစှ် verbose logging ဂှ်ပံက်လဝ်မ္ဂး ကဳမာန် တော်ဆ ကမၠောန်သွက်ဂွံကဵု အထံက်အရီုကု ဂၠိုက်ဂၠါဲပြဿနာရ။ ဂွံဆဵု တၚ်တော်ဆလဝ်သွက်ကဳမာန်တံဂှ် သုၚ်စောဲ Console programဏံမာန်ရ။ ပ္ဍဲ Console ဂှ် ဒၞါဲထ္ဍိုဟ်ဒှ် ရုဲစှ်ကဵု ထ္ၜးလိက်တၚ်နၚ် နူကဵု ကမၠောန် ကဳမာန်တံဖအိုတ်ညိ။ တၚ်နၚ်တော်ဆလဝ်တံဂှ် နွံပၟိက်မ္ဂး ဆာဲပ္တိတ်တုဲ ပၠံၚ်ဗ္စိုပ်ကု ဂကောံအထံက်ပၚ် ကဳမာန် မာန်ရ။"; + +/* button text to move forward to the next page */ +"eXr-8V-h1g.title" = "ဆက်အာဂတ"; + +/* button text to return to the home help page */ +"fXS-aC-CMH.title" = "မုက်တမ်"; + +/* Options button text */ +"frd-No-seV.label" = "တၚ်ရုဲစှ်ဂမၠိုၚ်"; + +/* Installed Keyboard column heading */ +"jex-Nd-Qzg.headerCell.title" = "ကဳဗုဒ်စုတ်လဝ်တုဲတုဲ"; + +/* Verbose logging tooltip text */ +"uWx-3J-U0D.ibShadowedToolTip" = "ယဝ်ရမၞးဒှ်မံၚ်ခက်ခုဲမွဲမွဲသာကု ကဳဗုဒ်မွဲမွဲ ဒှ်ဒှ် ကဵု ကဳမာန်ဒှ်ဒှ် မ္ဂး ပံက်လဝ်ၝဏံညိ။"; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/mnw.lproj/KMInfoWindowController.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/mnw.lproj/KMInfoWindowController.strings new file mode 100644 index 00000000000..a1f26e4980d --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/mnw.lproj/KMInfoWindowController.strings @@ -0,0 +1,8 @@ +/* Package Information window title */ +"F0z-JX-Cv5.title" = "တၚ်နၚ် ပက်ကေ"; + +/* button text to show Details */ +"Fvy-XJ-s38.label" = "တၚ်နၚ်သောဲသောဲဗြောဲဗြောဲ"; + +/* button text to show Read Me */ +"waA-IW-Qyn.label" = "ဗှ်အဲ"; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/mnw.lproj/KMKeyboardHelpWindowController.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/mnw.lproj/KMKeyboardHelpWindowController.strings new file mode 100644 index 00000000000..3dac797d345 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/mnw.lproj/KMKeyboardHelpWindowController.strings @@ -0,0 +1,8 @@ +/* Keyboard Help window title */ +"F0z-JX-Cv5.title" = "အရီုဗၚ် ကဳဗုဒ်"; + +/* OK button text */ +"Zla-QF-m0K.title" = "အဵုခေ"; + +/* Print button text */ +"fYY-Uj-y4S.title" = "ဆာဲပ္တိတ်..."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/mnw.lproj/Localizable.strings b/mac/Keyman4MacIM/Keyman4MacIM/mnw.lproj/Localizable.strings new file mode 100644 index 00000000000..4357d9d66ee --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/mnw.lproj/Localizable.strings @@ -0,0 +1,71 @@ +/* Message displayed to confirm delete of the Keyman keyboard selected by the user from the keyboard list */ +"message-confirm-delete-keyboard" = "မၞးပလီု ကဳဗုဒ် '%@' ဏံရောၚ် ဂှ်ချိုတ်ပၠိုတ်ရဟာ?"; + +/* Delete keyboard confirmation info indicating that the delete action cannot be undone */ +"info-cannot-undo-delete-keyboard" = "မၞးကၠောန်ဏာတုဲ ကလေၚ်ကေတ်ဟွံဂွံရောၚ်။"; + +/* Button text to cancel delete of the specified installed Keyman keyboard */ +"button-cancel-delete-keyboard" = "တးပါဲ"; + +/* Button text to confirm delete of the specified installed Keyman keyboard */ +"button-delete-keyboard" = "ပလီု"; + +/* Message displayed to confirm installation of a keyboard from the specifed .kmp file double-clicked by the user */ +"message-confirm-install-keyboard" = "စုတ် ကဳမာန် ကဳဗုဒ်ဟာ?"; + +/* Message displayed to confirm installation of a keyboard from the specifed .kmp file double-clicked by the user */ +"info-install-keyboard-filename" = "မၞးမိက်ဂွံကဵု ကဳမာန် စုတ် ကဳဗုဒ်နူ ဝှါၚ် '%@' ဟာ?"; + +/* Button text to cancel installation of the double-clicked Keyman file */ +"button-cancel-install-keyboard" = "တးပါဲ"; + +/* Button text to confirm installation of the double-clicked Keyman file */ +"button-install-keyboard" = "စုတ်"; + +/* Message displayed to inform user that .kmp file could not be read/unzipped */ +"message-keyboard-file-unreadable" = "ဗှ် ဝှါၚ်ကဳမာန် '%@' ဟွံဂွံ။"; + +/* Message displayed in Configuration window when keyboard cannot be loaded */ +"message-error-loading-keyboard" = "(ပ္တိုန်စုတ်ကဳဗုဒ်ဆောတ်ယောၚ်)"; + +/* Message displayed in Configuration window when keyboard metadata cannot be loaded */ +"message-error-unknown-metadata" = "ဟွံတီ"; + +/* Button text to acknowledge that .kmp file could not be read */ +"button-keyboard-file-unreadable" = "အဵုခေ"; + +/* label text to identify Keyman version */ +"version-label-text" = "ပါယှေန်: %@"; + +/* Status text for keyboard downloading */ +"message-keyboard-downloading" = "ဂြဲဖျေံဒၟံၚ်..."; + +/* Status text for keyboard download complete */ +"message-keyboard-download-complete" = "ဂြဲဖျေံအံၚ်ဇၞး။"; + +/* Button text to cancel downloading keyboard */ +"button-cancel-downloading" = "တးပါဲ"; + +/* Button text keyboard download complete */ +"button-download-complete" = "တုဲ"; + +/* keyboards label in the Package Information window */ +"keyboards-label" = "ကဳဗုဒ်ဂမၠိုၚ်:"; + +/* fonts label in the Package Information window */ +"fonts-label" = "ဖွန်ဂမၠိုၚ်:"; + +/* package version label in the Package Information window */ +"package-version-label" = "ပါယှေန်ဓုပ်:"; + +/* author label in the Package Information window */ +"author-label" = "ညးချူဗဒှ်:"; + +/* website label in the Package Information window */ +"website-label" = "ဝေက်သာ်:"; + +/* copyright label in the Package Information window */ +"copyright-label" = "တၠမူ:"; + +/* message displayed to alert user to need grant accessibility permission */ +"privacy-alert-text" = "ဂွံကၠောန်ကမၠောန်ခိုဟ်ဟ်မာန်ှဂှ် ကဳမာန်ဒးသုၚ်စောဲ နဲကဲဆက်စၠောံအကြာစက်ဂမၠိုၚ်ရ။\n\nအာပ္ဍဲ တၚ်ပလေဝ်သၞောတ်စက်၊ ပရေၚ်ဂီုဂၠီု ကေုာံ ပရေၚ်ဂီုဂၠီုပူဂဵု တုဲ ကဵုအခေါၚ်ညိ။\nကလေၚ်ပံက်ကၟာတ်စက်ညိ။"; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/mnw.lproj/MainMenu.strings b/mac/Keyman4MacIM/Keyman4MacIM/mnw.lproj/MainMenu.strings new file mode 100644 index 00000000000..d0379f7fd91 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/mnw.lproj/MainMenu.strings @@ -0,0 +1,14 @@ +/* Configuration window menu text */ +"P1b-lE-yFw.title" = "ပလေဝ်ပလေတ်နာနာ..."; + +/* Keyboards menu text */ +"bQa-j9-nHe.title" = "ကဳဗုဒ်ဂမၠိုၚ်"; + +/* Keyboards menu text */ +"goP-aK-3WB.title" = "ကဳဗုဒ်ဂမၠိုၚ်"; + +/* About menu text */ +"kb2-ww-RS3.title" = "ပရော"; + +/* On-Screen Keyboard menu text */ +"s96-JI-YDh.title" = "ကဳဗုဒ်လ္တူဗၠးမုက်"; diff --git a/windows/src/desktop/kmshell/locale/mnw-MM/strings.xml b/windows/src/desktop/kmshell/locale/mnw-MM/strings.xml new file mode 100644 index 00000000000..bcb2195dcae --- /dev/null +++ b/windows/src/desktop/kmshell/locale/mnw-MM/strings.xml @@ -0,0 +1,911 @@ + + + + + + + ကဳမာန် + + + + Segoe UI + + + + + + + + &ယွံ + + + + &ဟအှ်ေ + + + + အဵုခေ + + + + တးပါဲ + + + + ကၟာတ် + + + + အဵုခေ + + + + တးပါဲ + + + + စုတ်/ပ္တိတ် ဘာသာတၟိ... + + + + သ္ဂောံရုဲကောန်ဍေၚ်ဂှ် ခ္ဍံက်လ္တူ ဗီုဏံညိ + + + + Keyman ဂှ် ကၠောန်မံၚ်ကမၠောန်ဖိုဟ်ဏောၚ်။ ခ္ဍံက်လ္တူ ရုပ် ဏံတုဲ အခိၚ်လဵုဟွံရုဲ ပြံၚ်သၠာဲကေတ် ကောန်ဍေၚ်ဘာသာ မၞးမာန်ရ။ + + + + Keyman ကၠောန်မံၚ်ကမၠောန်တုဲတုဲရ။ သ္ဂောံသုၚ်စောဲ ကောန်ဍေၚ်ဘာသာမၞးဂှ် ဍဵုလ္တူ ရုပ် Keyman ညိ + + + + ဗီုပြၚ်သၞောတ်စက် Keyman + + + + အရီုဗၚ် + + + + ပလှ် + + + + ပံက် + + + + ကၟာတ် + + + + သ္ၚိအၚ်ကဳဗုဒ်ဂမၠိုၚ် + + + + K + + + + တၚ်ရုဲစှ်ဂမၠိုၚ် + + + + O + + + + မဍဵုတၟေၚ် + + + + H + + + + အထံက်အပၚ် + + + + S + + + + ကေတ်အဆက်ညိ + + + + T + + + + ယၟုဝှါၚ်: + + + + ပါယှေန်ပက်ကေ: + + + + ပါယှေန်ကဳဗုဒ်: + + + + မၞိဟ်ချူဗဒှ်: + + + + ဝက်သာ်: + + + + ပက်ကေ: + + + + မလိက်ဖွန်ဂမၠိုၚ်: + + + + သ္ၚိအၚ်ကဳဗုဒ်ဂမၠိုၚ်: + + + + သ္ၚိအၚ်ကဳဗုဒ်: + + + + ဘာသာ ကဳဗုဒ်: + + + + အေန်ကုဒ်ဂမၠိုၚ်: + + + + ဂကူ သ္ၚိအၚ်: + + + + ဗီုပြၚ်ဂမစိုတ် (Positional) + + + + ခံက်အၚ် သွက် သ္ၚိအၚ် ဝေန်ဒဵု (Mnemonic) + + + + ဘာသာဂမၠိုၚ်: + + + + + + + + ထပ်စုတ် ဘာသာ + + + + စုတ်/ပ္တိတ် ဘာသာ + + + + ကဳဗုဒ်လ္တူဗၠးမုက်: + + + + ပၟိက်စိုတ် + + + + စုတ်လဝ်တုဲ + + + + ဟွံဂွံစုတ်လဝ်ဏီ + + + + ပရောပရာ + + + + စုတ်တုဲ + + + + ဟွံဂွံစုတ်လဝ် + + + + လိက်ဂကန်ဖျန်: + + + + တၠမူ: + + + + ပရေၚ်ပြံၚ်သၠာဲ ဒှ်ဒတန် ဓဝါဲဂှ် + + + + စုတ်ကဳဗုဒ်... + + + + ဂြဲကေတ် ကဳဗုဒ်... + + + + ဒၞါဲရုဲစှ် ကဳဗုဒ် ဂမၠိုၚ်... + + + + ကဳဗုဒ်လဵုမွဲ မၞးဟွံဂွံစုတ်လဝ်ဏီ။ သ္ဂောံစုတ် သ္ၚိအၚ်ကဳဗုဒ် နူ ဝက်သာ် ကဳမာန်ဂှ် ဍဵုလ္တူ မဍဵု ဂြဲကေတ် ကဳဗုဒ်ညိ။ + + + + + မၞိဟ်က္ဆံၚ် ထိၚ်ဒဝ်ဟေၚ် ပလှ်ပ္တိတ် ကဳဗုဒ် \'%1$s\' ဏံမာန်ရ။ + + + + ပါ်ပြအ် ကဳဗုဒ် + + + + ဂွံစုတ်ကဳဗုဒ်ဏံ ပ္ဍဲစက်တၞဟ်ဟ်ဂှ် သဂေန် ကုက်ဏံညိ + + + + ပါ်ပြအ်လ္တူ လပှ်ကျာ + + + + + + + + နာနာ + + + + စညိ + + + + ကဳဗုဒ်လ္တူဗၠးမုက် + + + + ဒၞါဲပလေဝ် က္ဆံၚ်သၠုၚ် + + + + မဍဵုတၟေၚ် ကဳဗုဒ် ပံက် ကဳဗုဒ် + + + + ပချဳ AltGr နကဵု Ctrl+Alt + + + + စွံ မဍဵုချိုတ်တ် နကဵု မဍဵု အလောတ် + + + + ထ္ၜးလိက်စၞောန် + + + + ပ္တိုန်ထ္ၜး တၚ်ယောၚ်ယာကဵု keyman.com ကေတ်တ် + + + + ပါ်ပရအ် စရၚ်သုၚ်စောဲ သ္ၚိတ်တ်ကု keyman.com + + + + စကမၠောန် အဃော ဝေန်ဒဵုစ + + + + ပံက် ဗၠးသပလက် + + + + ထ္ၜးမုက်လိက် ဒုၚ်တၠုၚ် + + + + စၟဳစၟတ် keyman.com သွက် သမၠုၚ်က္ဆံၚ် ဇၟာပ်သတ္တဟ + + + + စၟဳစၟတ် အပလဳကေယှေန် ပဠပထုဲမာန် အဃောစ ကဳမာန် + + + + ဍဵုကဳတုဲ ဗလး Shift/Ctrl/Alt လ္တူ ကဳဗုဒ်ဗၠးမုက် + + + + ယဝ်ရ ကဳဗုဒ်ကဳမာန် ရုဲလဝ်မ္ဂး ပံက် ကဳဗုဒ်ဗၠးမုက် လၟိန် + + + + ယဝ်ရ ရုဲစှ်လဝ်ကဳဗုဒ်မွဲမွဲမ္ဂး ပံက်ကဵု အရီုဗၚ် မဆက်စပ် ကု ကဳဗုဒ်ဗၠးမုက် + + + + ဂၠိုက်ဂၠာဲပသောၚ်စၟ + + + + ကဳဗုဒ် သဇိုၚ်... + + + + + + + + + + + + + (ကဳတၟေၚ်ဟွံမွဲ) + + + + ကၟာတ် ပြံၚ်သၠာဲ ကဳမာန် + + + + ပံက် မဳနူ ကဳဗုဒ် + + + + ထ္ၜးက္ဆံၚ် ကဳဗုဒ်ဗၠးမုက် + + + + ဗီုပြၚ်သၞောတ်စက် ကဳမာန် + + + + ထ္ၜးအရီုဗၚ်သွက်မလိက် + + + + ထ္ၜးခံက်အၚ် အက္ခရ် + + + + ပံက် ဒၞါဲပလေဝ်ဒါန်လိက် + + + + ပံက်စက်ပြံၚ် ဘာသာ + + + + မဍဵုတၟေၚ်နာနာ + + + + သ္ၚိအၚ်ကဳဗုဒ်ဂမၠိုၚ် + + + + တၚ်ယောၚ်ယာ တၚ်ဟွံကၠးမးမွဲမွဲဒှ်တိုန်အဃောသုၚ်စောဲ ကဳမာန်မ္ဂး သၟာန်သၟုက်ပ္ဍဲကဵု ဂကောံ ဖဝ်ရာမ် ကဳမာန်ဂွံရ။ + + + + ပံက်ဖဝ်ရာမ် ကဳမာန် + + + + SIL International ဖန်ဗဒှ်လဝ် + + + + တၠမူ © SIL International. အခေါၚ်အဝဵုနွံပေၚ်ၚ်။ + + + + ပါယှေန် + + + + လေက် ဒှ်အထံက်အရီုဂမၠိုၚ် + + + + အရီုဗၚ်လ္တူလပှ်ကျာ + + + + စၟဳစၟတ်တၚ်နၚ်ပ္တိုန်က္ဆံၚ် + + + + တၚ်ပလေဝ် ပရံက်ဇြဳ... + + + + တၚ်ပလေဝ် ကဳမာန်နာနာ... + + + + ဂၠိုၚ်ဂၠါဲပြဿနာ + + + + ဂြဲကေတ် ကဳဗုဒ်နူ keyman.com + + + + ဂြဲဖျေံသၟး လ္ပစုတ် + + + + + ဂြဲဖျေံကဳဗုဒ်ဟွံဂွံ၊ တၚ်ဗၠေတ် %2$d: %1$s + + + + < ကလေၚ် + + + + စုတ် ကဳဗုဒ်/ပက်ကေ + + + + တၚ်နၚ်သောဲသောဲဗြောဲဗြောဲ + + + + ဗှ်အဲညိ + + + + စုတ် + + + + တၚ်ချိၚ်သာပါပရံက်ဇြဳ + + + + သာပါ: + + + + ဖတ်: + + + + ယၟုမၞိဟ်သုၚ်စောဲ: + + + + မဓလုက်: + + + + စွံဒတန် ကဳဗုဒ်သဇိုၚ် + + + + ရုဲစှ် သ္ၚိအၚ်ကဳဗုဒ် လက်တေန် မၞးသုၚ်စောဲ ပ္ဍဲဝေန်ဒဵုညိ။ ကဳဗုဒ် ကဳမာန် ချိၚ်ဆဏာကဵု ကဳဗုဒ် အတိုၚ်မၞးဒးစိုတ်ဂှ်ဏောၚ်။ + + + + ပြံၚ်မဍဵုတၟေၚ် + + + + + ရုဲစှ်မဍဵုတၟေၚ် ဟွံသေၚ်မ္ဂး ရုဲကေတ် \'ပၟိက်စိုတ်\' တုဲ ဍဵုလဝ် Ctrl,Shift and/ Alt တုဲ တက်စုတ် မဍဵုတၟေၚ်မၞးဒးစိုတ်သွက်ဘာသာ %1$s: + + + + ရုဲစှ်မဍဵုတၟေၚ် ဟွံသေၚ်မ္ဂး ရုဲကေတ် \'ပၟိက်စိုတ်\' တုဲ ဍဵုလဝ် Ctrl,Shift and/ Alt တုဲ တက်စုတ် မဍဵုတၟေၚ်မၞးဒးစိုတ်: + + + + + မဍဵုတၟေၚ် %1$s ဂှ်ဒှ် ပဠပထုဲကု ကဳဗုဒ်ဓမ္မတာမာန်ရ။ မၞးအောန်အိုတ်သုၚ်စောဲ ကဵု Ctrl ကဵု Alt ညိ။ မိက်ဂွံပြံၚ်လၟုဟ်ဟာ\? + + + + + မဍဵုတၟေၚ် %1$s ဒှ်ပြသာနာကု မဍဵုတၟေၚ် ရုဲစှ်လဝ်သွက် ကဳဗုဒ် %2$s ရ။ ယဝ်ဆက်အာမ္ဂး မဍဵုတၟေၚ်သွက် ကဳဗုဒ် %2$s ဂှ်သ္အးထောံဏောၚ်။ ဆက်အာဟာ\? + + + + + မဍဵုတၟေၚ် %1$s ဒှ်ပြဿနာကု မဍဵုတၟေၚ်တၞဟ်ဟ်ရ။ ယဝ်ဆက်အာမ္ဂး မဍဵုတၟေၚ်တၞဟ်ဟ်ဂှ် သ္အးထောံရောၚ်။ ဆက်အာဟာ\? + + + + ကပေါတ်တၟိသွက်ကဳမာန်တံကလိဂွံမာန်ယျ + + + + ပ္တိုန်က္ဆံၚ်သွက်ကဳမာန်ဂွံရ + + + + ရုဲစှ်တၚ်သမၠုၚ်က္ဆံၚ်မၞးမိက်ဂွံစုတ်ညိ: + + + + မၞးဂြဲကေတ်ပါယှေန်တၟိမာန် နူ : + + + + စုတ်လၟုဟ် + + + + တးပါဲ + + + + ပါယှေန်တြေံ + + + + ကပေါတ်သမၠုၚ်က္ဆံၚ်တုဲ + + + + အဝဲ + + + + + ကဳမာန် %1$s + + + + + ကဳဗုဒ် %1$s %2$s + + + + ဆက်စၠောံကု keyman.com ဟွံဂွံ - ကလေၚ်စၟဳစၟတ် အေန်တာနက်တုဲ ဂ္စါန်မွဲဝါပၠန်ညိ။ + + + + + ဆက်စၠောံကု keyman.com ဟွံဂွံ - ကလေၚ်စၟဳစၟတ် အေန်တာနက်တုဲ ဂ္စါန်မွဲဝါပၠန်ညိ။ တၚ်ယောၚ်ယာဂှ် :%1$s + + + + တၚ်သမၠုၚ်က္ဆံၚ်သွက်ကီမာန်ကလိဂွံမာန်ရ + + + + သ္ဂောံဂြဲကေတ်တုဲ ပ္တိုန်က္ဆံၚ်ဂှ် ဍဵုရုပ်ဏံညိ + + + + ဗဵုကေုာံ &ပ္တိုန် သမၠုၚ်က္ဆံၚ်ကဳမာန် + + + + ဗ&ဒေါံ စၟဳစၟတ်သမၠုၚ်က္ဆံၚ်အောန်လာၚ် + + + + ကဳမာန် + + + + စ ကဳမာန် + + + + တိတ် + + + + ပလေဝ်ပလေတ်နာနာ + + + + ထ္ၜးမုက်ဒ္ၚောဝ်တဏအ်ကာလစကၠောန် + + + + ဓမံက်ထ္ၜးပ္ဍဲ + + + + ကလေၚ်ဂၠာဲဓမံက်ထ္ၜးအရေဝ်ဘာသာတၞဟ်လ္ပာ်အောန်လာဲ... + + + + ကဵုအရီုကၠာဲဘာသာမဆေၚ်စပ်ကဵုကိစ္စညးလွပ်တၞဟ်... + + + + မန် + + + + မန် (Mon) + + + + mnw + + + + mnw + + + + ကဳမာအ် + + + + သအးထောံဂရိပ်အရေဝ်ဂမၠိုၚ် + + + + ထိုၚ်လိက်ဂရိပ်အရေဝ်သီုဖအိုတ်ဒးဒုၚ်သအးထောံတုဲ ကဵု ကလေၚ်ဓမံက်ထ္ၜးကဵုမွဲအလန်ပၠန်။ + + + + + တိတ်နူကဳမာအ်ချိုတ်ပၠိုတ်ယျဟာ? + + + + + မိက်ဂွံကၟာတ် ကဳမာန်ဂှ် ချိုတ်ပၠိုန်ဟာ\? ကဳဗုဒ်ကဳမာန်မၞးဂှ် လုပ်အာပ္ဍဲစရၚ် အရေဝ်ဘသာ ဝေန်ဒဵု ရောၚ် ဆ္ဂး ဟွံကေၚ်ပံက်ကၟာတ် ကဳမာန်ဏီမ္ဂး ဟွံကၠောန်ကမၠောန်ရ။ + + + + + ကၟာတ်ကဳဗုဒ်ဗၠးမုက် + + + + + ကၟာတ် ကဳဗုဒ်ဗၠးမုက်တုဲ။ ကဳမာန်ကၠောန်မံၚ်ကမၠောန်ဖိုဟ်။ မၞးဍဵုလ္တူရုပ်ကဳမာန်တုဲ ရုဲကေတ် ကဳဗုဒ်ဗၠးမုက်မာန်ရ။ + + + + လ္ပထ္ၜးလိက်စၞောန်ပၠန်ညိ + + + + အရီုဗၚ် ကဳမာန် + + + + တၚ်အရီုဗၚ်ဂမၠိုၚ် + + + + အရီုဗၚ်လ္တူ \" + + + + \" ကဳဗုဒ် + + + + ဗဵုကဳဗုဒ်လ္တူဗလးမုက် + + + + ဗဵုအရီုဗၚ်မလိက်ဖွန် + + + + ဗဵုခံက်သ္ၚိအၚ်အက္ခရ် + + + + ပံက်ဒၞါဲပလေဝ်သၞောတ်စက် ကဳမာန် နာနာ + + + + ပံက်ဒၞါဲအရီုဗၚ် + + + + ကၟာတ် ကဳဗုဒ်ဗၠးမုက် + + + + ပြံၚ် ကဳမာန် &ကၟာတ် + + + + ကဳဗုဒ် &လ္တူဗၠးမုက် + + + + အရီုဗၚ်မလိက်ဖွန်& + + + + သ္ၚိအၚ် အက္ခရ် & + + + + &ပလေဝ်ဒါန်လိက်... + + + + တၚ်ပလေဝ်နာနာ &... + + + + &အရီုဗၚ်... + + + + တိတ်& + + + + ဟွံချဳဓရာၚ်မ္ဂး အေဲဖျေံလျး + + + + ထ္ၜးဒၞါဲကပေါတ် + + + + ဂွံစွံနကဵု မုက်လိက် ဝေက်... + + + + ဆာဲပ္တိတ်... + + + + ကဳမာန် + + + + + ပါယှေန် %1$s + + + + &ဆာဲပ္တိတ်... + + + + + ပက်ကေ နကဵုယၟု %1$s ဂှ်စုတ်လဝ်တုဲတုဲ။ မိက်ဂွံပ္တိတ်ထောံဍေံတုဲ ကလေၚ်စုတ်တၟိဟာ\? + + + + + ကဳဗုဒ် နကဵု ယၟု %1$s ဂှ်စုတ်လဝ်တုဲတုဲ။ ယဝ်ဆက်အာမ္ဂး ပ္တိတ်ဍေံကၠာတုဲ စုတ်တၟိရောၚ်။ ဆက်အာဟာ\? + + + + + ကဳဗုဒ် %1$s ဂှ် အပိုၚ်ခြာ နူကဵု ပက်ကေ %2$s ရ။ မၞးဒးပ္တိတ် အတိုၚ်ပက်ကေမွဲရောၚ်။ ဆက်အာဟာ\? + + + + + စုတ် အရေဝ်ဘာသာကဳဗုဒ် ဟွံဂွံ။ ဝေန်ဒဵုစဵုဒၞါလဝ် စုတ်ပၟိက်စိုတ်ဂွံ ၄ ဘာသာဟေၚ် တုဲ မၞးစုတ်လဝ် ပဵုအာနူကဵု ဗ္ၜတ်ဒှ်ဂွံရ။ + + + + + ပက်ကေ (ဟွံ) ကဳဗုဒ် %1$s ဟွံမွဲပ္ဍဲကဵု အရီုဗၚ်ဆက်မိတ်ရ။ + + + + စက်မၞးသုၚ်စောဲမံၚ်လၟုဟ်ဏံဟွံထံက်ပၚ်ရ။ + + + + KeymanDesktop.chm + + + + ဝှါၚ်အရီုဗၚ်ဂၠါဲဟွံဆဵု။ + + + + မုက်လိက်ကုက် + + + + ယူနဳကုဒ် + + + + ဂြဲဖျေံဒၟံၚ်ဝှါၚ် + + + + + မိက်ဂွံပ္တိတ် ကဳဗုဒ်ဗၠးမုက် စုတ်လဝ်သွက်%1$s ဂှ်ချိုတ်ပၠိုတ်ဟာ? + + + + + မၞးမိက်ဂွံပ္တိတ် ကဳဗုဒ် %1$s ဂှ်ချိုတ်ပၠိုတ်ဟာ\? + + + + + မၞးမိက်ဂွံပ္တိတ် ပက်ကေ %1$s ဂှ်ချိုတ်ပၠိုတ်ဟာ\?\n\n%2$s + + + + + မလိက်ဝှတ်သၟဝ်တေံဂှ်လေဝ်တိတ်အာဏောၚ်: %1$s ။ + + + + အက္ခရ်ဂမၠိုၚ်ဂှ် ကၠာဟွံဂိုၚ် သြိုၚ်ခၞံ သုၚ်စောဲဂွံဂှ် နွံပ္ဍဲသ္ၚိအၚ်အက္ခရ်ရ။ မိက်ဂွံသြိုၚ်လၟုဟ်ဟာ? + + + + + သ္ဂောံကလေၚ် သြိုၚ်ခၞံ အက္ခရ်ဂှ် ပလီု ဒေတာသွက်အက္ခရ်ယူနဳကုဒ် ဟွံဂွံရ။ တၚ်ယောၚ်ယာသောဲသောဲဗြောဲဗြောဲဂမၠိုၚ်ဂှ်: %1$s + + + + + ဒေတာသွက် အက္ခရ်ယူနဳကုဒ် ဂှ် ဖန်ဗဒှ်ဟွံဂွံတုဲ ကၟာတ်ထောံရ။ တၚ်ယောၚ်ယာသောဲသောဲဗြောဲဗြောဲဂမၠိုၚ်ဂှ်: %1$s + + + + + ဒေတာသွက်အက္ခရ်ယူနဳကုဒ် ဂြဲပ္တိုန် ဟွံအံၚ်ဇၞး (%1$s)။ ကလေၚ်သြိုၚ်ဍေံလၟုဟ်ဟာ\? + + + + + ကဳမာန် စကမၠောန်ဟွံဂွံ။ အာစၟဳစၟတ် တၚ်ပလေဝ်နာနာပ္ဍဲ ပရေၚ်ဂီုဂၠီုတေံတုဲ keyman.exe ဂှ်ကဵုအခေါၚ်ကၠာညိ။ ယဝ်တၚ်ယောၚ်ယာ ကလေၚ်ကၠုၚ်ဂှ်: \n\n%1$s\n\n မိက်ဂွံကလေၚ်ဂ္စါန် တုဲ ပံက် ကဳမာန် မွဲဝါလၟုဟ်ဟာ\? + + + + တၚ်နၚ် သောၚ်သၠးစၟသွက်ကဳမာန်ဂှ် ဂိုၚ်စွံလဝ်ပ္ဍဲ ဝှါၚ်ကော်စ %LOCALAPPDATA% \Keyman\Diag\system#.etl (#ဂှ် မဂၞန်ရ)။ ကၠာဟွံပလီု ဝှါၚ်ဂှ် ကၟာတ်ထောံကဳမာန်ကၠာညိ။\n\n\သတိ: ဝှါၚ်ဏံဇၞော်တိုန်ပြဟ်ဟ်မာန်ရ။ ပံက်ဂၠိုက်ဂၠာဲပသောၚ်စၟဂှ် ဖအိၚ်ဖျေံစက်မၞးမာန်တုဲ အ္စာပလေဝ်စက်တံကဵုကသပ်မှ ပံက်မ္ဂးခိုဟ်ရ။\n\nတၚ်ကဵုသတိပရေၚ်ပူဂဵု: ဝှါၚ်ပသောၚ်စၟဂှ် သမ္တီစုတ် အရာမၞးတက်ဏာတံဖအိုတ်ရောၚ်။ အခိၚ်ပိုဲဂၠိုက်ဂၠာဲပသောၚ်စၟမှ ပံက်ကဵု ဝှါၚ်ပသောၚ်စၟမ္ဂးခိုဟ်ရ။ + + + + အဃောဂၠာဲဒၟံၚ် ဝှတ်မလိက်သွက် ကဳဗုဒ် %1$s ဂှ်မၚ်ညိ + + + + ကဳဗုဒ် %1$s ဂှ် ကဳဗုဒ်ယူနဳကုဒ် ဟွံသေၚ်။ မလိက်ဝှတ်ဂှ် ဂၠာဲကေတ်တ်ဟွံဂွံ။ စၟဳစၟတ် လိက်ကၞပ် ကဳဗုဒ် သွက်တၚ်နၚ် ဝှတ်။ + + + + သ္ၚိအၚ်ကဳဗုဒ် လဵုမွဲဟွံဂွံပ္တိုန်စုတ်လဝ်။ + + + + သ္ဂောံဆဵု မလိက်ကောန်ဍောၚ် မဆေၚ်စပ်တံဂှ် ရုဲကဵု ကဳဗုဒ် ကဳမာန်တံညိ။ + + + + ဒၞါဲပလေဝ်ဒါန်လိက် - ကဳမာန် + diff --git a/windows/src/desktop/setup/locale/mnw-MM/strings.xml b/windows/src/desktop/setup/locale/mnw-MM/strings.xml new file mode 100644 index 00000000000..8c0c53a4a7f --- /dev/null +++ b/windows/src/desktop/setup/locale/mnw-MM/strings.xml @@ -0,0 +1,79 @@ + + + မန် (Mon) + ပလေဝ်ပလေတ် $APPNAME $VERSION + စုတ် $APPNAME $VERSION + $APPNAME $VERSION ဂှ်ပ္တိုန်စုတ်တုဲအာ ဗွဲမအံၚ်ဇၞးရ။ + မၞးတးပါဲ ပ္တိုန်စုတ် $APPNAME ဏောၚ်ဂှ် ချိုတ်ပၠိုတ်ဟာ? + သှ်ဒၟံၚ် ကဠာဗါန်ဒဴ... + အဃောစၟဳစၟတ်ဒၟံၚ် ပက်ကေဂမၠိုၚ်... + သွက်သ္ဂောံသၠုၚ်က္ဆံၚ်တံဂှ် အဃောစၟဳစၟတ်ဒၟံၚ်လ္တူအွန်လာၚ်... + အဃောစၟဳစၟတ်ဒၟံၚ် ပါယှေန်စုတ်လဝ်တုဲတုဲ... + ဒတုဲမံၚ်... + + • $APPNAME %0:s %1:s + + • %0:s %1:s %2:s + + • %0:s %1:s for %2:s %3:s + မုသက်ပ္တိုန်စုတ်ဟွံမွဲ။ + + (%0:s ဂြဲဖျေံလဝ်တုဲ) + တၚ်ပ္တိုန်ဏံ ပ္တိုန်ဏာ: + $APPNAME $VERSION ဂှ် မးး ကေုာံ ဒှ် တံရိုဟ်ပံက်လဝ်မးမးရ + &ဗှ်လာၚ်ဇြေန် + စုတ် &တၚ်ရုဲစှ်ဂမၠိုၚ် + ပ္တိုန် $APPNAME + အဵုခေ + &ပ္တိုန်စုတ် + တးပါဲ + ပ&တိတ် + စုတ်ဒၟံၚ် $APPNAME + ပ္တိတ်ဒၟံၚ် ပါယှေန်တြေံဂမၠိုၚ် + စုတ်တုဲအာယျ + ပရေၚ်ပ္တိုန်စုတ် ဂွံအံၚ်ဇၞးမာန်ဂှ် မၞးဒးကလေၚ် ကၟာတ်ပံက် ဝေန်ဒဵုကၠာရောၚ်။ ကလေၚ် ကၟာတ်ပံက်စက်တုဲမ္ဂး ဍေံဆက်စုတ်အာကဵုရောၚ်။ + + +ကၟာတ်ပံက်စက်လၟုဟ်ဟာ? + ဝေန်ဒဵုကလေၚ်ပံက်ကၟာတ်ကေတ်တ်ဟွံဂွံ။ ကၠာဟွံဂွံပံက် $APPNAME ဂှ် မၞးကလေၚ်ပံက်ကၟာတ်ကုစက်ထေက်ရ။ + သ္ဂောံပတုဲကမၠောန်ဂှ်မၞးဒးပံက်ကၟာတ်ကဵု ဝေန်ဒဵုဟေၚ်။ ပံက်ကၟာတ်တုဲမ္ဂး ကမၠောန်ပ္တိုန်တုဲရ။ + ဂွံစုတ် $APPNAME $VERSION ဂှ် ဒးကေတ် ဝေန်ဒဵု ၇ (ဟွံ) လပါ်လ္တူရ။ ဆ္ဂး ကဳမာန်ဒက်တပ် ၇၊ ၈၊ ၉ ဂှ် ဂွံဆဵုညာတ်ကေတ်ရ။ မၞးမိက်ဂွံပ္တိုန်စုတ် ကဳဗုဒ်ပါလုပ်ပ္ဍဲ စက်ပ္တိုန်ဏံ လ္တူ ပါယှေတ် ကဳမာန်ဒက်တပ်ဟာ? + $APPNAME ပါယှေန်ဏံ ဂှ် ဒးကေတ် ဝေန်ဒဵု ၇ ဟွံသေၚ်တှ်ေ လ္ပါ်လ္တူရ။ ဂြဲကေတ် ကဳမာန်ဒက်တပ် ၈ ဟာ? + နဲကဲပ္တိုန်ဂွံဂမၠိုၚ် + ဗီုပြၚ်ပ္တိုန်စုတ်ဂမၠိုၚ် + ပလေဝ်နာနာ $APPNAME ပကတိ + မဝ်ဒျူ သွက်ဂွံ စုတ် ဟွံသေၚ် သမၠုၚ်က္ဆံၚ် + ဘာသာ ကဳဗုဒ် မဆက်စပ် + ပါယှေန်သွက်ဂွံစုတ် + စ $APPNAME ပ္ဍဲဝေန်ဒဵုတိုန် + စ $APPNAME အခါရ ပ္တိုန်တုဲဒှ် + စၟဳစၟတ်က္ဆံၚ် လ္တူအောန်လာၚ် နကဵုအခိၚ်အပိုၚ်အခြာ + သမၠုၚ်ပ္တိုန်ကဳဗုဒ် ပါယှေန် စုတ်လဝ်တုဲတုဲ နကဵု ပါယှေန် $VERSION + ပါ်ပရအ် စရၚ်သုၚ်စောဲ သ္ၚိတ်တ်ကု keyman.com + + စုတ် ပါယှေန်: %0:s + စုတ် $APPNAME + သၠုၚ်ကဆံၚ် $APPNAME + + $APPNAME %0:s ဂှ် စုတ်လဝ်တုဲ။ + + တံၚ်ဂြဲ ပါယှေန် %0:s (%1:s) + + ပါယှေန် %0:s + + စုတ် %0:s + + တံၚ်ဂြဲ ပါယှေန် %0:s (%1:s) + + ပါယှေန် %0:s + + ရုဲကဵု အရေဝ်ဘာသာ သ္ဂောံစၠောံကု ကဳဗုဒ် %0:s ညိ + ဘာသာပကတိ + + အဃောတံၚ်ဂြဲ %0:s + + အဃောတံၚ်ဂြဲ %0:s + စက်ပ္တိုန် $APPNAME ဂွံဂြဲဖျေံတမ်ရိုဟ်ဂှ် ဆက်စၠောံကု keyman.com ဟွံဂွံ။ + ကလေၚ်ရံၚ် မၞးနွံလ္တူအောန်လာၚ်ရဟာ တုဲ ကဵုအခေါၚ်သုၚ်စောဲအေန်တာနက် ကု စက်ပ္တိုန် $APPNAME ပ္ဍဲကဵု တၚ်ချိၚ် ဗ္ဒၚ်ပၟတ်ညိ။ + ဍဵု ဗဒေါံ သွက်ဂွံတိတ်နူ စက်ပ္တိုန်၊ က္လေၚ်ဂ္စါန် သွက်ဂွံ ဂ္စါန်တုဲ ဂြဲဖျေံတမ်ရိုဟ်မွဲတုဲပၠန်၊ ဟွံသေၚ်မ္ဂး ဟွံပဂရု သွက်ဂွံ ဆက်အာ အိုပ်လာၚ်။ + From e536d846b7fed9eb26d7051b51feb463730e1b6f Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Tue, 12 Sep 2023 13:22:13 +0700 Subject: [PATCH 04/56] chore(android): Add Mon to the list of languages --- .../app/src/main/java/com/keyman/engine/DisplayLanguages.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/DisplayLanguages.java b/android/KMEA/app/src/main/java/com/keyman/engine/DisplayLanguages.java index f437e563dbf..27c462e95a0 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/DisplayLanguages.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/DisplayLanguages.java @@ -58,6 +58,7 @@ public static final DisplayLanguageType[] getDisplayLanguages(Context context) { new DisplayLanguageType("ckl-NG", "Kibaku"), new DisplayLanguageType("mfi-NG", "Mandara (Wandala)"), new DisplayLanguageType("mrt-NG", "Marghi"), + new DisplayLanguageType("mnw-MM", "မန် (Mon)"), new DisplayLanguageType("nl-NL", "Nederlands (Dutch)"), new DisplayLanguageType("ann", "Obolo"), new DisplayLanguageType("pl-PL", "Polski (Polish)"), From 026568009ca7c4685075522c0323b019c483ac42 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Thu, 14 Sep 2023 08:41:40 +0100 Subject: [PATCH 05/56] =?UTF-8?q?chore(resources):=20ldml=20update=20(CLDR?= =?UTF-8?q?=20v44=20alpha=202)=20=F0=9F=99=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - unicode-org/cldr:61b74a36de8329daed152005133a699ae7f2012b - for feat(core): ldml drop \u1234 format 🙀 #9515 --- .../techpreview/3.0/fr-t-k0-azerty.xml | 20 +- .../ldml-keyboards/techpreview/cldr_info.json | 6 +- .../techpreview/dtd/ldmlKeyboard.dtd | 19 +- .../techpreview/dtd/ldmlKeyboard.xsd | 1179 +++++++---------- .../techpreview/dtd/ldmlKeyboardTest.xsd | 381 ++---- .../techpreview/import/scanCodes-implied.xml | 28 + .../techpreview/ldml-keyboard.schema.json | 71 +- .../techpreview/test/fr-t-k0-azerty-test.xml | 10 +- .../techpreview/test/ja-Latn-test.xml | 2 +- .../techpreview/test/pt-t-k0-abnt2-test.xml | 4 +- 10 files changed, 718 insertions(+), 1002 deletions(-) create mode 100644 resources/standards-data/ldml-keyboards/techpreview/import/scanCodes-implied.xml diff --git a/resources/standards-data/ldml-keyboards/techpreview/3.0/fr-t-k0-azerty.xml b/resources/standards-data/ldml-keyboards/techpreview/3.0/fr-t-k0-azerty.xml index f91943f3b9b..b7162f6e01b 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/3.0/fr-t-k0-azerty.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/3.0/fr-t-k0-azerty.xml @@ -43,7 +43,7 @@ - + - - - + + + @@ -99,9 +99,9 @@ - - - + + + @@ -203,9 +203,9 @@ - - - + + + diff --git a/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json b/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json index 43c89392c5e..23d8cfe40d8 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json +++ b/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json @@ -1,5 +1,5 @@ { - "sha": "44903d0867e42df37f17cf21d28938044eb1edc0", - "description": "release-44-m1-75-g44903d0867", - "date": "Thu, 17 Aug 2023 19:14:19 +0000" + "sha": "61b74a36de8329daed152005133a699ae7f2012b", + "description": "release-44-alpha2-5-g61b74a36de", + "date": "Thu, 14 Sep 2023 07:38:47 +0000" } diff --git a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd index d1734c8b0ed..e668787eafa 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd +++ b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd @@ -10,7 +10,7 @@ The CLDR Keyboard Subcommittee is currently developing major changes to the CLDR Please view the subcommittee page for the most recent information. --> - + @@ -161,9 +161,24 @@ Please view the subcommittee page for the most recent information. + + + + + + + + + + + + + + - + + diff --git a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.xsd b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.xsd index cd8fda58792..1a881854991 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.xsd +++ b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.xsd @@ -1,5 +1,8 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.xsd b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.xsd index 29b7b7c2bb8..612ab789c10 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.xsd +++ b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.xsd @@ -1,5 +1,8 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/standards-data/ldml-keyboards/techpreview/import/scanCodes-implied.xml b/resources/standards-data/ldml-keyboards/techpreview/import/scanCodes-implied.xml new file mode 100644 index 00000000000..2ebb0ac85aa --- /dev/null +++ b/resources/standards-data/ldml-keyboards/techpreview/import/scanCodes-implied.xml @@ -0,0 +1,28 @@ + + + +
+ + + + + + + +
+ + + + + \ No newline at end of file diff --git a/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard.schema.json b/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard.schema.json index 169c9c1f3be..cd91f563a10 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard.schema.json +++ b/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard.schema.json @@ -101,6 +101,55 @@ ], "type": "object" }, + "form": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "scanCodes": { + "items": { + "$ref": "#/definitions/scanCodes" + }, + "minItems": 1, + "type": "array" + }, + "special": { + "items": { + "$ref": "#/definitions/special" + }, + "type": "array" + } + }, + "required": [ + "scanCodes" + ], + "type": "object" + }, + "forms": { + "additionalProperties": false, + "properties": { + "form": { + "items": { + "$ref": "#/definitions/form" + }, + "type": "array" + }, + "import": { + "items": { + "$ref": "#/definitions/import" + }, + "type": "array" + }, + "special": { + "items": { + "$ref": "#/definitions/special" + }, + "type": "array" + } + }, + "type": "object" + }, "import": { "additionalProperties": false, "properties": { @@ -250,13 +299,6 @@ "additionalProperties": false, "properties": { "form": { - "enum": [ - "touch", - "us", - "iso", - "jis", - "abnt2" - ], "type": "string" }, "import": { @@ -389,6 +431,18 @@ ], "type": "object" }, + "scanCodes": { + "additionalProperties": false, + "properties": { + "codes": { + "type": "string" + } + }, + "required": [ + "codes" + ], + "type": "object" + }, "set": { "additionalProperties": false, "properties": { @@ -636,6 +690,9 @@ "displays": { "$ref": "#/definitions/displays" }, + "forms": { + "$ref": "#/definitions/forms" + }, "import": { "items": { "$ref": "#/definitions/import" diff --git a/resources/standards-data/ldml-keyboards/techpreview/test/fr-t-k0-azerty-test.xml b/resources/standards-data/ldml-keyboards/techpreview/test/fr-t-k0-azerty-test.xml index 638fe3954fd..5c827d6b878 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/test/fr-t-k0-azerty-test.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/test/fr-t-k0-azerty-test.xml @@ -6,17 +6,17 @@ - + - + - + - + - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/test/ja-Latn-test.xml b/resources/standards-data/ldml-keyboards/techpreview/test/ja-Latn-test.xml index 047795bad40..a1e3a185ebf 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/test/ja-Latn-test.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/test/ja-Latn-test.xml @@ -3,7 +3,7 @@ + chars="[a-z A-Z 0-9 !\u{0022}#$%\u{0026}\[\]\{\}=\-|¥~\^_\u{0020}\u{003c}>,./?`@\+\*]" type="simple" /> diff --git a/resources/standards-data/ldml-keyboards/techpreview/test/pt-t-k0-abnt2-test.xml b/resources/standards-data/ldml-keyboards/techpreview/test/pt-t-k0-abnt2-test.xml index 3457ab67fa7..4eb59db813b 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/test/pt-t-k0-abnt2-test.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/test/pt-t-k0-abnt2-test.xml @@ -3,7 +3,7 @@ @@ -35,7 +35,7 @@ - + From 71c6bfb9604ff737ad98aa33dbc2492d0cf657ab Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 14 Sep 2023 11:31:29 +0200 Subject: [PATCH 06/56] refactor(linux): Reformat file --- linux/ibus-keyman/src/main.c | 152 +++++++++++++++++------------------ 1 file changed, 72 insertions(+), 80 deletions(-) diff --git a/linux/ibus-keyman/src/main.c b/linux/ibus-keyman/src/main.c index e23a1a58e33..1ced7590473 100644 --- a/linux/ibus-keyman/src/main.c +++ b/linux/ibus-keyman/src/main.c @@ -23,125 +23,117 @@ #include #include -#include #include -#include "keymanutil.h" +#include #include "engine.h" #include "keyman-service.h" +#include "keymanutil.h" -static IBusBus *bus = NULL; +static IBusBus *bus = NULL; static IBusFactory *factory = NULL; /* options */ -static gboolean xml = FALSE; +static gboolean xml = FALSE; static gboolean ibus = FALSE; -gboolean testing = FALSE; - -static const GOptionEntry entries[] = -{ - { "xml", 'x', 0, G_OPTION_ARG_NONE, &xml, "generate xml for engines", NULL }, - { "ibus", 'i', 0, G_OPTION_ARG_NONE, &ibus, "component is executed by ibus", NULL }, - { "testing", 0, 0, G_OPTION_ARG_NONE, &testing, "component is executed by integration testing", NULL}, - { NULL }, +gboolean testing = FALSE; + +static const GOptionEntry entries[] = { + {"xml", 'x', 0, G_OPTION_ARG_NONE, &xml, "generate xml for engines", NULL}, + {"ibus", 'i', 0, G_OPTION_ARG_NONE, &ibus, "component is executed by ibus", NULL}, + {"testing", 0, 0, G_OPTION_ARG_NONE, &testing, "component is executed by integration testing", NULL}, + {NULL}, }; // Add an environment variable to see debug messages: export G_MESSAGES_DEBUG=all static void -ibus_disconnected_cb (IBusBus *unused_bus, - gpointer unused_data) -{ - g_debug ("bus disconnected"); - KeymanService *service = km_service_get_default(NULL); - g_clear_object(&service); +ibus_disconnected_cb(IBusBus *unused_bus, gpointer unused_data) { + g_debug("bus disconnected"); + KeymanService *service = km_service_get_default(NULL); + g_clear_object(&service); - g_object_unref(factory); - g_object_unref(bus); + g_object_unref(factory); + g_object_unref(bus); - ibus_quit (); + ibus_quit(); } - static void -start_component (void) -{ - GList *engines, *p; - IBusComponent *component; +start_component(void) { + GList *engines, *p; + IBusComponent *component; - ibus_init (); + ibus_init(); - bus = ibus_bus_new (); - g_signal_connect (bus, "disconnected", G_CALLBACK (ibus_disconnected_cb), NULL); + bus = ibus_bus_new(); + g_signal_connect(bus, "disconnected", G_CALLBACK(ibus_disconnected_cb), NULL); - component = ibus_keyman_get_component (); + component = ibus_keyman_get_component(); - factory = ibus_factory_new (ibus_bus_get_connection (bus)); + factory = ibus_factory_new(ibus_bus_get_connection(bus)); - engines = ibus_component_get_engines (component); - for (p = engines; p != NULL; p = p->next) { - IBusEngineDesc *engine = (IBusEngineDesc *)p->data; -#if IBUS_CHECK_VERSION(1,3,99) - const gchar *engine_name = ibus_engine_desc_get_name (engine); + engines = ibus_component_get_engines(component); + for (p = engines; p != NULL; p = p->next) { + IBusEngineDesc *engine = (IBusEngineDesc *)p->data; +#if IBUS_CHECK_VERSION(1, 3, 99) + const gchar *engine_name = ibus_engine_desc_get_name(engine); #else - const gchar *engine_name = engine->name; -#endif /* !IBUS_CHECK_VERSION(1,3,99) */ - ibus_factory_add_engine (factory, engine_name, IBUS_TYPE_KEYMAN_ENGINE); - } - - if (ibus) { - ibus_bus_request_name (bus, "org.freedesktop.IBus.Keyman", 0); - } - else { - ibus_bus_register_component (bus, component); - } - - g_object_unref (component); - km_service_get_default(NULL); // initialise dbus service - - ibus_main (); + const gchar *engine_name = engine->name; +#endif /* !IBUS_CHECK_VERSION(1,3,99) */ + ibus_factory_add_engine(factory, engine_name, IBUS_TYPE_KEYMAN_ENGINE); + } + + if (ibus) { + ibus_bus_request_name(bus, "org.freedesktop.IBus.Keyman", 0); + } else { + ibus_bus_register_component(bus, component); + } + + g_object_unref(component); + km_service_get_default(NULL); // initialise dbus service + + ibus_main(); } static void -print_engines_xml (void) -{ - IBusComponent *component; - GString *output; +print_engines_xml(void) { + IBusComponent *component; + GString *output; - ibus_init (); + ibus_init(); - component = ibus_keyman_get_component (); - output = g_string_new (""); + component = ibus_keyman_get_component(); + output = g_string_new(""); - ibus_component_output_engines (component, output, 0); + ibus_component_output_engines(component, output, 0); - fprintf (stdout, "%s", output->str); + fprintf(stdout, "%s", output->str); - g_string_free (output, TRUE); - g_object_unref(component); + g_string_free(output, TRUE); + g_object_unref(component); } int -main (gint argc, gchar **argv) -{ - GError *error = NULL; - GOptionContext *context; +main(gint argc, gchar **argv) { + GError *error = NULL; + GOptionContext *context; - setlocale (LC_ALL, ""); + setlocale(LC_ALL, ""); - context = g_option_context_new ("- ibus Keyman engine component"); + context = g_option_context_new("- ibus Keyman engine component"); - g_option_context_add_main_entries (context, entries, "ibus-keyman"); + g_option_context_add_main_entries(context, entries, "ibus-keyman"); - if (!g_option_context_parse (context, &argc, &argv, &error)) { - g_print ("Option parsing failed: %s\n", error->message); - exit (-1); - } + if (!g_option_context_parse(context, &argc, &argv, &error)) { + g_print("Option parsing failed: %s\n", error->message); + exit(-1); + } - if (xml) { - print_engines_xml (); - exit (0); - } + if (xml) { + print_engines_xml(); + exit(0); + } - start_component (); - return 0; + start_component(); + return 0; } From 7c7d46720c13fadd1ecf36394874b0e3c79e8fc9 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Fri, 15 Sep 2023 12:08:17 +0200 Subject: [PATCH 07/56] chore(linux): Split startup process This change improves the startup method so that it will also work if ibus hasn't started yet. Also fixes two memory leaks. --- linux/ibus-keyman/src/keymanutil.c | 16 +++++---- linux/ibus-keyman/src/main.c | 57 +++++++++++++++++++++--------- 2 files changed, 51 insertions(+), 22 deletions(-) diff --git a/linux/ibus-keyman/src/keymanutil.c b/linux/ibus-keyman/src/keymanutil.c index c9fbed80d95..ce06280a5e8 100644 --- a/linux/ibus-keyman/src/keymanutil.c +++ b/linux/ibus-keyman/src/keymanutil.c @@ -290,10 +290,17 @@ ibus_keyman_list_engines (void) return engines; } +void +add_engine(gpointer data, gpointer user_data) { + IBusEngineDesc *desc = IBUS_ENGINE_DESC(data); + IBusComponent *component = IBUS_COMPONENT(user_data); + ibus_component_add_engine(component, desc); +} + IBusComponent * ibus_keyman_get_component (void) { - GList *engines, *p; + GList *engines; IBusComponent *component; component = ibus_component_new ("org.freedesktop.IBus.Keyman", @@ -306,12 +313,9 @@ ibus_keyman_get_component (void) "ibus-keyman"); engines = ibus_keyman_list_engines (); - - for (p = engines; p != NULL; p = p->next) { - ibus_component_add_engine (component, (IBusEngineDesc *) p->data); - } - + g_list_foreach(engines, add_engine, component); g_list_free (engines); + return component; } diff --git a/linux/ibus-keyman/src/main.c b/linux/ibus-keyman/src/main.c index 1ced7590473..80e67458bc6 100644 --- a/linux/ibus-keyman/src/main.c +++ b/linux/ibus-keyman/src/main.c @@ -59,29 +59,33 @@ ibus_disconnected_cb(IBusBus *unused_bus, gpointer unused_data) { } static void -start_component(void) { - GList *engines, *p; - IBusComponent *component; +add_single_keyboard(gpointer data, gpointer user_data) { + IBusEngineDesc *engine = IBUS_ENGINE_DESC(data); +#if IBUS_CHECK_VERSION(1, 3, 99) + const gchar *engine_name = ibus_engine_desc_get_name(engine); +#else + const gchar *engine_name = engine->name; +#endif /* !IBUS_CHECK_VERSION(1,3,99) */ + ibus_factory_add_engine(factory, engine_name, IBUS_TYPE_KEYMAN_ENGINE); +} - ibus_init(); +static void +add_keyboards(IBusBus *bus, gpointer user_data) { + GList *engines; + IBusComponent *component; - bus = ibus_bus_new(); - g_signal_connect(bus, "disconnected", G_CALLBACK(ibus_disconnected_cb), NULL); + g_message("Adding keyboards to ibus"); component = ibus_keyman_get_component(); - factory = ibus_factory_new(ibus_bus_get_connection(bus)); + GDBusConnection *connection = ibus_bus_get_connection(bus); + factory = ibus_factory_new(connection); + + g_signal_connect(bus, "disconnected", G_CALLBACK(ibus_disconnected_cb), NULL); engines = ibus_component_get_engines(component); - for (p = engines; p != NULL; p = p->next) { - IBusEngineDesc *engine = (IBusEngineDesc *)p->data; -#if IBUS_CHECK_VERSION(1, 3, 99) - const gchar *engine_name = ibus_engine_desc_get_name(engine); -#else - const gchar *engine_name = engine->name; -#endif /* !IBUS_CHECK_VERSION(1,3,99) */ - ibus_factory_add_engine(factory, engine_name, IBUS_TYPE_KEYMAN_ENGINE); - } + g_list_foreach(engines, add_single_keyboard, NULL); + g_list_free(engines); if (ibus) { ibus_bus_request_name(bus, "org.freedesktop.IBus.Keyman", 0); @@ -91,6 +95,22 @@ start_component(void) { g_object_unref(component); km_service_get_default(NULL); // initialise dbus service +} + +static void +start_component(void) { + g_message("Starting ibus-engine-keyman"); + + ibus_init(); + + bus = ibus_bus_new(); + + if (ibus_bus_is_connected(bus)) { + add_keyboards(bus, NULL); + } else { + g_message("Waiting for ibus-daemon to start up..."); + g_signal_connect(bus, "connected", G_CALLBACK(add_keyboards), NULL); + } ibus_main(); } @@ -126,14 +146,19 @@ main(gint argc, gchar **argv) { if (!g_option_context_parse(context, &argc, &argv, &error)) { g_print("Option parsing failed: %s\n", error->message); + g_option_context_free(context); exit(-1); } if (xml) { print_engines_xml(); + g_option_context_free(context); exit(0); } start_component(); + + g_option_context_free(context); + g_message("Exiting ibus-engine-keyman"); return 0; } From 28012d1f7d0b7eefa37f432de5ee5057e901903e Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Fri, 15 Sep 2023 14:23:28 -0400 Subject: [PATCH 08/56] =?UTF-8?q?chore(developer):=20ldml=20fix=20for=20up?= =?UTF-8?q?date=20=F0=9F=99=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - hardware types isn't a fixed set anymore - un-mothball the pertinent error type Related to #9403, exposed during #9515 CLDR update --- developer/src/kmc-ldml/src/compiler/messages.ts | 3 --- developer/src/kmc-ldml/test/test-layr.ts | 10 ++++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/developer/src/kmc-ldml/src/compiler/messages.ts b/developer/src/kmc-ldml/src/compiler/messages.ts index a701abbcb0e..804ec1d02dd 100644 --- a/developer/src/kmc-ldml/src/compiler/messages.ts +++ b/developer/src/kmc-ldml/src/compiler/messages.ts @@ -90,9 +90,6 @@ export class CompilerMessages { static Error_InvalidHardware = (o:{form: string}) => m(this.ERROR_InvalidHardware, `layers has invalid value form=${o.form}`); - /** - * Note: may not hit this due to XML validation. - */ static ERROR_InvalidHardware = SevError | 0x0013; static Error_InvalidModifier = (o:{layer: string, modifier: string}) => m(this.ERROR_InvalidModifier, diff --git a/developer/src/kmc-ldml/test/test-layr.ts b/developer/src/kmc-ldml/test/test-layr.ts index e9288826980..86c7e2729bd 100644 --- a/developer/src/kmc-ldml/test/test-layr.ts +++ b/developer/src/kmc-ldml/test/test-layr.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; import { LayrCompiler } from '../src/compiler/layr.js'; import { CompilerMessages } from '../src/compiler/messages.js'; import { compilerTestCallbacks, loadSectionFixture, testCompilationCases } from './helpers/index.js'; -import { KMXPlus, CommonTypesMessages } from '@keymanapp/common-types'; +import { KMXPlus } from '@keymanapp/common-types'; import { constants } from '@keymanapp/ldml-keyboard-constants'; import Layr = KMXPlus.Layr; @@ -106,11 +106,9 @@ describe('layr', function () { }, { subpath: 'sections/layr/invalid-invalid-form.xml', - errors: [CommonTypesMessages.Error_SchemaValidationError({ - instancePath: '/keyboard/layers/0/form', - keyword: 'enum', - message: 'must be equal to one of the allowed values', - params: `allowedValues="touch,us,iso,jis,abnt2"`}),], + errors: [CompilerMessages.Error_InvalidHardware({ + form: 'holographic', + }),], }, { // missing layer element From 213dd7d2adcfbfdcc96b7d71b9bf34bed26c9fa1 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Fri, 15 Sep 2023 18:22:41 +0100 Subject: [PATCH 09/56] =?UTF-8?q?fix(developer):=20ldml=20drop=20\u1234=20?= =?UTF-8?q?=F0=9F=99=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - for now, convert \u{1234} to \u1234 before going into UnicodeSet. - for feat(core): ldml drop \u1234 format 🙀 #9515 --- developer/src/kmc-kmn/src/compiler/compiler.ts | 10 ++++++++++ developer/src/kmc-kmn/test/test-wasm-uset.ts | 12 ++++++++++++ 2 files changed, 22 insertions(+) diff --git a/developer/src/kmc-kmn/src/compiler/compiler.ts b/developer/src/kmc-kmn/src/compiler/compiler.ts index 33d1b545f57..c3c3bb32566 100644 --- a/developer/src/kmc-kmn/src/compiler/compiler.ts +++ b/developer/src/kmc-kmn/src/compiler/compiler.ts @@ -421,6 +421,12 @@ export class KmnCompiler implements UnicodeSetParser { return Module.kmcmp_testSentry(); } + /** convert `\u{1234}` to `\u1234` */ + public static fixNewPattern(pattern: string) : string { + return pattern.replaceAll(/\\u\{([0-9a-fA-F]{4})\}/g, `\\u$1`); + // TODO-LDML: other lengths! #9515 + } + /** * * @param pattern UnicodeSet pattern such as `[a-z]` @@ -435,6 +441,8 @@ export class KmnCompiler implements UnicodeSetParser { // TODO-LDML: Catch OOM const buf = this.wasmExports.malloc(rangeCount * 2 * Module.HEAPU32.BYTES_PER_ELEMENT); + // fix \u1234 pattern format + pattern = KmnCompiler.fixNewPattern(pattern); /** If <= 0: return code. If positive: range count */ const rc = Module.kmcmp_parseUnicodeSet(pattern, buf, rangeCount * 2); if (rc >= 0) { @@ -459,6 +467,8 @@ export class KmnCompiler implements UnicodeSetParser { /* c8 ignore next 2 */ return null; } + // fix \u1234 pattern format + pattern = KmnCompiler.fixNewPattern(pattern); // call with rangeCount = 0 to invoke in 'preflight' mode. const rc = Module.kmcmp_parseUnicodeSet(pattern, 0, 0); if (rc >= 0) { diff --git a/developer/src/kmc-kmn/test/test-wasm-uset.ts b/developer/src/kmc-kmn/test/test-wasm-uset.ts index a924f9fe05a..3d9c4e01399 100644 --- a/developer/src/kmc-kmn/test/test-wasm-uset.ts +++ b/developer/src/kmc-kmn/test/test-wasm-uset.ts @@ -6,6 +6,18 @@ import { CompilerMessages } from '../src/compiler/messages.js'; import { compilerErrorFormatCode } from '@keymanapp/common-types'; describe('Compiler UnicodeSet function', function() { + it('should fixup \\u1234 format escapes', function() { + assert.equal(KmnCompiler.fixNewPattern(`\\u{1234}`), `\\u1234`); + assert.equal(KmnCompiler.fixNewPattern(`\\u1234`), `\\u1234`); + assert.equal(KmnCompiler.fixNewPattern(`[\\u{1234}-\\u{5678}]`), `[\\u1234-\\u5678]`); + assert.equal(KmnCompiler.fixNewPattern(`something else`), `something else`); + }); + + it.skip('should fixup more creative \\u format escapes', function() { + assert.equal(KmnCompiler.fixNewPattern(`\\u{22}`), `\\u0022`); // " + assert.equal(KmnCompiler.fixNewPattern(`\\u{1F640}`), `\\uD83D\\uDE40`); // TODO-LDM #9515: or something, 🙀 + }); + it('should start', async function() { const compiler = new KmnCompiler(); const callbacks = new TestCompilerCallbacks(); From 256017110b1908e5aeb68f4dfe430e76e32c754e Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Fri, 15 Sep 2023 14:40:09 -0400 Subject: [PATCH 10/56] =?UTF-8?q?fix(developer):=20ldml=20drop=20\u1234=20?= =?UTF-8?q?=F0=9F=99=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - temporarily roll back change to test.xml - for feat(core): ldml drop \u1234 format 🙀 #9515 --- .../techpreview/test/fr-t-k0-azerty-test.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/standards-data/ldml-keyboards/techpreview/test/fr-t-k0-azerty-test.xml b/resources/standards-data/ldml-keyboards/techpreview/test/fr-t-k0-azerty-test.xml index 5c827d6b878..23a0cdba516 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/test/fr-t-k0-azerty-test.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/test/fr-t-k0-azerty-test.xml @@ -2,21 +2,21 @@ - + - + - + - + - + - + From 27508571c9bebee37e1b14f27939d410b3a4784d Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Fri, 15 Sep 2023 15:27:47 -0400 Subject: [PATCH 11/56] =?UTF-8?q?fix(developer):=20ldml=20drop=20\u1234=20?= =?UTF-8?q?=F0=9F=99=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - fix 1..6 char Unicode escapes with an unrolled loop - for feat(core): ldml drop \u1234 format 🙀 #9515 --- .../src/kmc-kmn/src/compiler/compiler.ts | 11 ++++-- developer/src/kmc-kmn/test/test-wasm-uset.ts | 39 +++++++++++++++++-- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/developer/src/kmc-kmn/src/compiler/compiler.ts b/developer/src/kmc-kmn/src/compiler/compiler.ts index c3c3bb32566..6f5f9b331a7 100644 --- a/developer/src/kmc-kmn/src/compiler/compiler.ts +++ b/developer/src/kmc-kmn/src/compiler/compiler.ts @@ -421,10 +421,15 @@ export class KmnCompiler implements UnicodeSetParser { return Module.kmcmp_testSentry(); } - /** convert `\u{1234}` to `\u1234` */ + /** convert `\u{1234}` to `\u1234` etc */ public static fixNewPattern(pattern: string) : string { - return pattern.replaceAll(/\\u\{([0-9a-fA-F]{4})\}/g, `\\u$1`); - // TODO-LDML: other lengths! #9515 + pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{6})\}/g, `\\U00$1`); + pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{5})\}/g, `\\U000$1`); + pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{4})\}/g, `\\u$1`); + pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{3})\}/g, `\\u0$1`); + pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{2})\}/g, `\\u00$1`); + pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{1})\}/g, `\\u000$1`); + return pattern; } /** diff --git a/developer/src/kmc-kmn/test/test-wasm-uset.ts b/developer/src/kmc-kmn/test/test-wasm-uset.ts index 3d9c4e01399..0b11ddf789e 100644 --- a/developer/src/kmc-kmn/test/test-wasm-uset.ts +++ b/developer/src/kmc-kmn/test/test-wasm-uset.ts @@ -6,16 +6,20 @@ import { CompilerMessages } from '../src/compiler/messages.js'; import { compilerErrorFormatCode } from '@keymanapp/common-types'; describe('Compiler UnicodeSet function', function() { + it('should fixup "short" \\u{} escapes', function () { + assert.equal(KmnCompiler.fixNewPattern(`\\u{A}`), `\\u000A`); // " + assert.equal(KmnCompiler.fixNewPattern(`\\u{22}`), `\\u0022`); // " + assert.equal(KmnCompiler.fixNewPattern(`\\u{ead}`), `\\u0ead`); // " + }); it('should fixup \\u1234 format escapes', function() { assert.equal(KmnCompiler.fixNewPattern(`\\u{1234}`), `\\u1234`); assert.equal(KmnCompiler.fixNewPattern(`\\u1234`), `\\u1234`); assert.equal(KmnCompiler.fixNewPattern(`[\\u{1234}-\\u{5678}]`), `[\\u1234-\\u5678]`); assert.equal(KmnCompiler.fixNewPattern(`something else`), `something else`); }); - - it.skip('should fixup more creative \\u format escapes', function() { - assert.equal(KmnCompiler.fixNewPattern(`\\u{22}`), `\\u0022`); // " - assert.equal(KmnCompiler.fixNewPattern(`\\u{1F640}`), `\\uD83D\\uDE40`); // TODO-LDM #9515: or something, 🙀 + it('should fixup supplemental \\u format escapes', function() { + assert.equal(KmnCompiler.fixNewPattern(`\\u{1F640}`), `\\U0001F640`); + assert.equal(KmnCompiler.fixNewPattern(`\\u{10FFFD}`),`\\U0010FFFD`); }); it('should start', async function() { @@ -63,6 +67,33 @@ describe('Compiler UnicodeSet function', function() { assert.deepEqual(callbacks.messages, []); assert.equal(len2, set.length); }); + it('should compile an even more complex uset', async function() { + const compiler = new KmnCompiler(); + const callbacks = new TestCompilerCallbacks(); + assert(await compiler.init(callbacks)); + assert(compiler.verifyInitialized()); + + const pat = "[\\u{10FFFD}\\u{2019}\\u{22}\\u{a}\\u{ead}\\u{1F640}]"; + const set = compiler.parseUnicodeSet(pat, 23); + + assert.equal(set.length, 6); + // verify we're all single chars + for (let i = 0; i Date: Sat, 16 Sep 2023 14:02:22 -0400 Subject: [PATCH 12/56] auto: increment master version to 17.0.175 --- HISTORY.md | 4 ++++ VERSION.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 09a45f661be..2f82a38f363 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,9 @@ # Keyman Version History +## 17.0.174 alpha 2023-09-16 + +* refactor(linux): Reformat file (#9569) + ## 17.0.173 alpha 2023-09-13 * chore(common): Update to Unicode 15.1 (#9555) diff --git a/VERSION.md b/VERSION.md index 5ebcd945ab1..60908d105aa 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -17.0.174 \ No newline at end of file +17.0.175 \ No newline at end of file From 1e734a47f5337515b58cfdc55145bc5dd4de2660 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Mon, 18 Sep 2023 18:49:04 +0200 Subject: [PATCH 13/56] docs(common): Fix documentation for builder_describe_internal_dependency Fixes #9581. --- resources/build/build-utils.md | 4 ++-- resources/builder.inc.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/build/build-utils.md b/resources/build/build-utils.md index 6c27e5e8a4b..5ba91cffc63 100644 --- a/resources/build/build-utils.md +++ b/resources/build/build-utils.md @@ -510,8 +510,8 @@ builder_describe_internal_dependency action:target depaction:deptarget ... ```bash builder_describe_internal_dependency \ - mac:build mac-x86_64:build \ - mac:build mac-arm64:build + build:mac build:mac-x86_64 \ + build:mac build:mac-arm64 ``` **Note:** actions and targets must be fully specified, and this _must_ be called diff --git a/resources/builder.inc.sh b/resources/builder.inc.sh index d4d6bf7e2ae..0eb4b995b63 100755 --- a/resources/builder.inc.sh +++ b/resources/builder.inc.sh @@ -1143,8 +1143,8 @@ _builder_define_default_internal_dep() { # 2: depaction:deptarget The dependency action and target # Example: # builder_describe_internal_dependency \ -# mac:build mac-x86_64:build \ -# mac:build mac-arm64:build +# build:mac build:mac-x86_64 \ +# build:mac build:mac-arm64 # # Note: actions and targets must be fully specified, and this _must_ # be called before either builder_describe_outputs or builder_parse in From a03eca3d817f7cb9dbe26676c2544154d6cf24be Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 3 Aug 2023 19:50:11 +0200 Subject: [PATCH 14/56] =?UTF-8?q?refactor(linux):=20Rename=20defines=20to?= =?UTF-8?q?=20clarify=20purpose=20=F0=9F=8F=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linux/ibus-keyman/src/keymanutil.c | 8 ++-- linux/ibus-keyman/src/keymanutil.h | 9 +++-- linux/ibus-keyman/src/test/keymanutil_tests.c | 40 +++++++++---------- linux/keyman-config/.editorconfig | 2 +- 4 files changed, 31 insertions(+), 28 deletions(-) diff --git a/linux/ibus-keyman/src/keymanutil.c b/linux/ibus-keyman/src/keymanutil.c index ce06280a5e8..9eb42c173b2 100644 --- a/linux/ibus-keyman/src/keymanutil.c +++ b/linux/ibus-keyman/src/keymanutil.c @@ -335,8 +335,8 @@ keyman_get_options_fromdconf(gchar *package_id, g_message("keyman_get_options_fromdconf"); // Obtain keyboard options from DConf - gchar *path = g_strdup_printf("%s%s/%s/", KEYMAN_DCONF_PATH, package_id, keyboard_id); - GSettings *child_settings = g_settings_new_with_path(KEYMAN_CHILD_DCONF_NAME, path); + gchar *path = g_strdup_printf("%s%s/%s/", KEYMAN_DCONF_OPTIONS_PATH, package_id, keyboard_id); + GSettings *child_settings = g_settings_new_with_path(KEYMAN_DCONF_OPTIONS_CHILD_NAME, path); gchar **options = NULL; if (child_settings != NULL) { @@ -456,8 +456,8 @@ keyman_put_options_todconf(gchar *package_id, } // Write to DConf - gchar *path = g_strdup_printf("%s%s/%s/", KEYMAN_DCONF_PATH, package_id, keyboard_id); - GSettings *child_settings = g_settings_new_with_path(KEYMAN_CHILD_DCONF_NAME, path); + gchar *path = g_strdup_printf("%s%s/%s/", KEYMAN_DCONF_OPTIONS_PATH, package_id, keyboard_id); + GSettings *child_settings = g_settings_new_with_path(KEYMAN_DCONF_OPTIONS_CHILD_NAME, path); if (child_settings != NULL) { g_message("writing keyboard options to DConf"); diff --git a/linux/ibus-keyman/src/keymanutil.h b/linux/ibus-keyman/src/keymanutil.h index 1c455dd1678..4b358c02ead 100644 --- a/linux/ibus-keyman/src/keymanutil.h +++ b/linux/ibus-keyman/src/keymanutil.h @@ -61,11 +61,14 @@ #define KEYMAN_ENVIRONMENT_OPTIONS 3 // Path information for Keyman keyboard options in DConf -#define KEYMAN_DCONF_NAME "com.keyman.options" -#define KEYMAN_CHILD_DCONF_NAME "com.keyman.options.child" -#define KEYMAN_DCONF_PATH "/desktop/ibus/keyman/options/" +#define KEYMAN_DCONF_OPTIONS_NAME "com.keyman.options" +#define KEYMAN_DCONF_OPTIONS_CHILD_NAME "com.keyman.options.child" +// TODO: migrate to /com/keyman/options to better follow Gnome recommmendations +// (https://docs.gtk.org/gio/class.Settings.html) (#9579) +#define KEYMAN_DCONF_OPTIONS_PATH "/desktop/ibus/keyman/options/" #define KEYMAN_DCONF_OPTIONS_KEY "options" + G_BEGIN_DECLS void ibus_keyman_init (void); diff --git a/linux/ibus-keyman/src/test/keymanutil_tests.c b/linux/ibus-keyman/src/test/keymanutil_tests.c index 8b49488cf75..80f77a72ea6 100644 --- a/linux/ibus-keyman/src/test/keymanutil_tests.c +++ b/linux/ibus-keyman/src/test/keymanutil_tests.c @@ -6,27 +6,27 @@ #define TEST_FIXTURE "keymanutil-test" void -delete_key(gchar* testname) { - gchar *path = g_strdup_printf("%s%s/%s/", KEYMAN_DCONF_PATH, TEST_FIXTURE, testname); - GSettings *settings = g_settings_new_with_path(KEYMAN_CHILD_DCONF_NAME, path); +delete_options_key(gchar* testname) { + gchar *path = g_strdup_printf("%s%s/%s/", KEYMAN_DCONF_OPTIONS_PATH, TEST_FIXTURE, testname); + GSettings *settings = g_settings_new_with_path(KEYMAN_DCONF_OPTIONS_CHILD_NAME, path); g_settings_reset(settings, KEYMAN_DCONF_OPTIONS_KEY); g_object_unref(G_OBJECT(settings)); g_free(path); } void -set_key(gchar* testname, gchar** options) { - gchar *path = g_strdup_printf("%s%s/%s/", KEYMAN_DCONF_PATH, TEST_FIXTURE, testname); - GSettings *settings = g_settings_new_with_path(KEYMAN_CHILD_DCONF_NAME, path); +set_options_key(gchar* testname, gchar** options) { + gchar *path = g_strdup_printf("%s%s/%s/", KEYMAN_DCONF_OPTIONS_PATH, TEST_FIXTURE, testname); + GSettings *settings = g_settings_new_with_path(KEYMAN_DCONF_OPTIONS_CHILD_NAME, path); g_settings_set_strv(settings, KEYMAN_DCONF_OPTIONS_KEY, (const gchar* const*)options); g_object_unref(G_OBJECT(settings)); g_free(path); } gchar** -get_key(gchar* testname) { - gchar* path = g_strdup_printf("%s%s/%s/", KEYMAN_DCONF_PATH, TEST_FIXTURE, testname); - GSettings* settings = g_settings_new_with_path(KEYMAN_CHILD_DCONF_NAME, path); +get_options_key(gchar* testname) { + gchar* path = g_strdup_printf("%s%s/%s/", KEYMAN_DCONF_OPTIONS_PATH, TEST_FIXTURE, testname); + GSettings* settings = g_settings_new_with_path(KEYMAN_DCONF_OPTIONS_CHILD_NAME, path); gchar** result = g_settings_get_strv(settings, KEYMAN_DCONF_OPTIONS_KEY); g_object_unref(G_OBJECT(settings)); g_free(path); @@ -37,14 +37,14 @@ void test_keyman_put_options_todconf__new_key() { // Initialize gchar* testname = "test_keyman_put_options_todconf__new_key"; - delete_key(testname); + delete_options_key(testname); gchar* value = g_strdup_printf("%d", g_test_rand_int()); // Execute keyman_put_options_todconf(TEST_FIXTURE, testname, "new_key", value); // Verify - gchar** options = get_key(testname); + gchar** options = get_options_key(testname); gchar* expected = g_strdup_printf("new_key=%s", value); g_assert_nonnull(options); g_assert_cmpstr(options[0], ==, expected); @@ -54,23 +54,23 @@ test_keyman_put_options_todconf__new_key() { g_free(expected); g_free(value); g_strfreev(options); - delete_key(testname); + delete_options_key(testname); } void test_keyman_put_options_todconf__other_keys() { // Initialize gchar* testname = "test_keyman_put_options_todconf__other_keys"; - delete_key(testname); + delete_options_key(testname); gchar* existingKeys[] = {"key1=val1", "key2=val2", NULL}; - set_key(testname, existingKeys); + set_options_key(testname, existingKeys); gchar* value = g_strdup_printf("%d", g_test_rand_int()); // Execute keyman_put_options_todconf(TEST_FIXTURE, testname, "new_key", value); // Verify - gchar** options = get_key(testname); + gchar** options = get_options_key(testname); gchar* expected = g_strdup_printf("new_key=%s", value); g_assert_nonnull(options); g_assert_cmpstr(options[0], ==, "key1=val1"); @@ -82,23 +82,23 @@ test_keyman_put_options_todconf__other_keys() { g_free(expected); g_free(value); g_strfreev(options); - delete_key(testname); + delete_options_key(testname); } void test_keyman_put_options_todconf__existing_key() { // Initialize gchar* testname = "test_keyman_put_options_todconf__existing_key"; - delete_key(testname); + delete_options_key(testname); gchar* existingKeys[] = {"key1=val1", "new_key=val2", NULL}; - set_key(testname, existingKeys); + set_options_key(testname, existingKeys); gchar* value = g_strdup_printf("%d", g_test_rand_int()); // Execute keyman_put_options_todconf(TEST_FIXTURE, testname, "new_key", value); // Verify - gchar** options = get_key(testname); + gchar** options = get_options_key(testname); gchar* expected = g_strdup_printf("new_key=%s", value); g_assert_nonnull(options); g_assert_cmpstr(options[0], ==, "key1=val1"); @@ -109,7 +109,7 @@ test_keyman_put_options_todconf__existing_key() { g_free(expected); g_free(value); g_strfreev(options); - delete_key(testname); + delete_options_key(testname); } int diff --git a/linux/keyman-config/.editorconfig b/linux/keyman-config/.editorconfig index f65775da76c..47f432c7aa5 100644 --- a/linux/keyman-config/.editorconfig +++ b/linux/keyman-config/.editorconfig @@ -1,5 +1,5 @@ # Editor configuration, see https://editorconfig.org -[*] +[*.py] indent_style = space indent_size = 4 From a870b9a6c05f85ad3466d3e3af799bf119fcbd6a Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Mon, 18 Sep 2023 18:44:11 +0200 Subject: [PATCH 15/56] chore(linux): Add coverage action to `ibus-keyman/build.sh` --- docs/settings/linux/tasks.json | 17 +++++++++++++++++ linux/ibus-keyman/build.sh | 22 ++++++++++++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/docs/settings/linux/tasks.json b/docs/settings/linux/tasks.json index 9751c95a44c..c5f2d063614 100644 --- a/docs/settings/linux/tasks.json +++ b/docs/settings/linux/tasks.json @@ -166,6 +166,23 @@ "group": "build", "detail": "run unit and integration tests of ibus-keyman" }, + { + "type": "shell", + "label": "ibus-keyman: report", + "command": "./build.sh", + "args": [ + "test", + "report", + "--debug", + "--coverage", + "--no-integration" + ], + "options": { + "cwd": "${workspaceFolder}/linux/ibus-keyman/", + }, + "group": "build", + "detail": "create unit test coverage" + }, { "type": "shell", "label": "keyman-config: tests", diff --git a/linux/ibus-keyman/build.sh b/linux/ibus-keyman/build.sh index 58bc0576916..ecb6bd5e089 100755 --- a/linux/ibus-keyman/build.sh +++ b/linux/ibus-keyman/build.sh @@ -19,11 +19,16 @@ builder_describe \ "test" \ "install install artifacts" \ "uninstall uninstall artifacts" \ + "report create coverage report" \ "@/core:arch" \ - "--no-integration don't run integration tests" + "--no-integration don't run integration tests" \ + "--coverage capture test coverage" builder_parse "$@" +builder_describe_internal_dependency \ + report:engine test:engine + if builder_is_debug_build; then MESON_TARGET=debug export CPPFLAGS=-DG_MESSAGES_DEBUG @@ -40,6 +45,12 @@ builder_describe_outputs \ configure "${MESON_PATH}/build.ninja" \ build "${MESON_PATH}/src/ibus-engine-keyman" +if builder_has_option --coverage; then + MESON_COVERAGE=-Db_coverage=true +else + MESON_COVERAGE= +fi + if builder_start_action clean; then rm -rf "$THIS_SCRIPT_PATH/../build/" builder_finish_action success clean @@ -48,7 +59,7 @@ fi if builder_start_action configure; then cd "$THIS_SCRIPT_PATH" # shellcheck disable=SC2086 - meson setup "$MESON_PATH" --werror --buildtype $MESON_TARGET "${builder_extra_params[@]}" + meson setup "$MESON_PATH" --werror --buildtype $MESON_TARGET ${MESON_COVERAGE} "${builder_extra_params[@]}" builder_finish_action success configure fi @@ -79,3 +90,10 @@ if builder_start_action uninstall; then ninja uninstall builder_finish_action success uninstall fi + +if builder_start_action report; then + cd "$THIS_SCRIPT_PATH/$MESON_PATH" + # Note: requires lcov > 1.16 to properly work (see https://github.com/mesonbuild/meson/issues/6747) + ninja coverage-html + builder_finish_action success report +fi From 0c4d5067174dd757748f34c0042a616eb0c78624 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Mon, 18 Sep 2023 14:02:08 -0400 Subject: [PATCH 16/56] auto: increment master version to 17.0.176 --- HISTORY.md | 4 ++++ VERSION.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 2f82a38f363..f2bd7ab3dff 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,9 @@ # Keyman Version History +## 17.0.175 alpha 2023-09-18 + +* chore(linux): Split startup process (#9570) + ## 17.0.174 alpha 2023-09-16 * refactor(linux): Reformat file (#9569) diff --git a/VERSION.md b/VERSION.md index 60908d105aa..dd9aca5084d 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -17.0.175 \ No newline at end of file +17.0.176 \ No newline at end of file From f969c13423c17d6b8cbfddc025370657dbfa6332 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Mon, 18 Sep 2023 18:07:16 +0700 Subject: [PATCH 17/56] change(web): Remove Android pendingLongpress --- web/src/app/webview/src/keymanEngine.ts | 1 - .../app/webview/src/osk/pendingLongpress.ts | 52 ------------------- web/src/app/webview/src/oskConfiguration.ts | 32 ------------ 3 files changed, 85 deletions(-) delete mode 100644 web/src/app/webview/src/osk/pendingLongpress.ts diff --git a/web/src/app/webview/src/keymanEngine.ts b/web/src/app/webview/src/keymanEngine.ts index 1cc7f08248a..c22943d6b1d 100644 --- a/web/src/app/webview/src/keymanEngine.ts +++ b/web/src/app/webview/src/keymanEngine.ts @@ -69,7 +69,6 @@ export default class KeymanEngine extends KeymanEngineBase void; - private readonly vkbd: VisualKeyboard; - - public readonly baseKey: KeyElement; - public readonly promise: Promise; - - constructor(vkbd: VisualKeyboard, e: KeyElement) { - this.vkbd = vkbd; - let _this = this; - - this.promise = new Promise(function(resolve) { - _this.resolver = resolve; - }); - this.baseKey = e; - } - - public resolve() { - if(this.resolver) { - this.resolver(new SubkeyDelegator(this.vkbd, this.baseKey)); - } - this.resolver = null; - } - - public cancel() { - if(this.resolver) { - this.resolver(null); - this.resolver = null; - } - } -} \ No newline at end of file diff --git a/web/src/app/webview/src/oskConfiguration.ts b/web/src/app/webview/src/oskConfiguration.ts index 80a8cdb6989..242b130bffe 100644 --- a/web/src/app/webview/src/oskConfiguration.ts +++ b/web/src/app/webview/src/oskConfiguration.ts @@ -5,7 +5,6 @@ import { type EmbeddedGestureConfig } from "keyman/engine/osk"; import { GlobeHint } from './osk/globeHint.js'; import { KeyTip } from './osk/keytip.js'; -import { PendingLongpress } from './osk/pendingLongpress.js'; import type KeymanEngine from "./keymanEngine.js"; export function setupEmbeddedListeners(engine: KeymanEngine, osk: OSKView) { @@ -45,35 +44,4 @@ export function buildEmbeddedGestureConfig(device: DeviceSpec) { return new GlobeHint(vkbd); } } - - if(device.OS == DeviceSpec.OperatingSystem.Android) { - embeddedGestureConfig.createKeyTip = (vkbd) => { - if(vkbd.device.formFactor == 'phone') { - return new KeyTip(window['oskCreateKeyPreview'], window['oskClearKeyPreview']); - } else { - return null; - } - } - - embeddedGestureConfig.startLongpress = (vkbd, key) => { - if(typeof(window['oskCreatePopup']) == 'function') { - var xBase = getAbsoluteX(key) - getAbsoluteX(vkbd.kbdDiv) + key.offsetWidth/2, - yBase = getAbsoluteY(key); - - // #3718: No longer prepend base key to subkey array - window['oskCreatePopup'](key['subKeys'], xBase, yBase, key.offsetWidth, key.offsetHeight); - - return new PendingLongpress(vkbd, key); - } else { - // When embedded within our Android app, we expect the `oskCreatePopup` function to - // exist; all subkey control is delegated to the app. - // - // No function = big problem. - console.error("Missing `oskCreatePopup` function for engine integration."); - return null; - } - } - - return embeddedGestureConfig; - } }; \ No newline at end of file From 584053af771c4eebe0bdaf55f1ef6374095263f0 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Mon, 18 Sep 2023 18:07:51 +0700 Subject: [PATCH 18/56] change(android/engine): Use web-based longpress --- .../KMEA/app/src/main/assets/android-host.js | 2 +- .../java/com/keyman/engine/KMKeyboard.java | 26 ++----------------- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/android/KMEA/app/src/main/assets/android-host.js b/android/KMEA/app/src/main/assets/android-host.js index 25e4223032e..61e6c70d36e 100644 --- a/android/KMEA/app/src/main/assets/android-host.js +++ b/android/KMEA/app/src/main/assets/android-host.js @@ -323,7 +323,7 @@ function showKeyboard() { function executePopupKey(keyID, keyText) { // KMW only needs keyID to process the popup key. keyText merely logged to console //window.console.log('executePopupKey('+keyID+'); keyText: ' + keyText); - keyman.executePopupKey(keyID); + keyman.executePopupKey(keyID, keyText); } // Cannot make it explicitly async / await on API 21. diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java index bc0aed1d049..e6e4113e699 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java @@ -268,22 +268,12 @@ public boolean onDown(MotionEvent event) { @Override public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { - if(e2.getY() - e1.getY() < -5) { // TODO: get better threshold value from KMW - if (subKeysList != null && (subKeysWindow == null || !subKeysWindow.isShowing())) { - showSubKeys(context); - return true; - } - } return false; } @Override public void onLongPress(MotionEvent event) { - // This is also called for banner longpresses! Need a way to differentiate the sources. - if (subKeysList != null && (subKeysWindow == null || !subKeysWindow.isShowing())) { - showSubKeys(context); - return; - } else if (KMManager.getGlobeKeyState() == KMManager.GlobeKeyState.GLOBE_KEY_STATE_DOWN) { + if (KMManager.getGlobeKeyState() == KMManager.GlobeKeyState.GLOBE_KEY_STATE_DOWN) { KMManager.setGlobeKeyState(KMManager.GlobeKeyState.GLOBE_KEY_STATE_LONGPRESS); KMManager.handleGlobeKeyAction(context, true, keyboardType); return; @@ -381,11 +371,7 @@ public boolean onTouchEvent(MotionEvent event) { // Come to think of it, I wonder if suggestionMenuWindow was work being done to link with // suggestion banner longpresses - if so, it's not yet ready for proper integration... // and would need its own rung in this if-else ladder. - if (subKeysWindow != null && suggestionMenuWindow == null && subKeysWindow.isShowing()) { - // Passes KMKeyboard (subclass of WebView)'s touch events off to our subkey window - // if active, allowing for smooth, integrated gesture control. - subKeysWindow.getContentView().findViewById(R.id.grid).dispatchTouchEvent(event); - } else { + if (true) { if (event.getPointerCount() > 1) { // Multiple points touch the screen at the same time, so dismiss any pending subkeys dismissKeyPreview(0); @@ -451,14 +437,6 @@ public void onConfigurationChanged(Configuration newConfig) { } public void dismissSubKeysWindow() { - try { - if (subKeysWindow != null && subKeysWindow.isShowing()) { - subKeysWindow.dismiss(); - } - subKeysList = null; - } catch (Exception e) { - KMLog.LogException(TAG, "", e); - } } public void dismissSuggestionMenuWindow() { From 15de700db41d6dd5b6d41ee4fa01389897975a9b Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Mon, 18 Sep 2023 18:35:57 -0500 Subject: [PATCH 19/56] =?UTF-8?q?chore(resources):=20ldml=20update=20keybo?= =?UTF-8?q?ard=20->=20keyboard3=20=F0=9F=99=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - unicode-org/cldr:bd40148d4c8675d0fb2db8c36cfb9f8e328250a8 --- .../techpreview/3.0/fr-t-k0-azerty.xml | 6 +++--- .../ldml-keyboards/techpreview/3.0/ja-Latn.xml | 6 +++--- .../techpreview/3.0/mt-t-k0-47key.xml | 6 +++--- .../ldml-keyboards/techpreview/3.0/mt.xml | 6 +++--- .../techpreview/3.0/pt-t-k0-abnt2.xml | 6 +++--- .../ldml-keyboards/techpreview/cldr_info.json | 6 +++--- .../{ldmlKeyboard.dtd => ldmlKeyboard3.dtd} | 6 +++--- .../{ldmlKeyboard.xsd => ldmlKeyboard3.xsd} | 2 +- ...lKeyboardTest.dtd => ldmlKeyboardTest3.dtd} | 4 ++-- ...lKeyboardTest.xsd => ldmlKeyboardTest3.xsd} | 2 +- .../fetch-latest-cldr-techpreview.sh | 8 ++++++-- .../ldml-keyboards/techpreview/fixup-schema.js | 8 ++++---- .../techpreview/import/keys-Latn-implied.xml | 2 +- .../techpreview/import/keys-Zyyy-currency.xml | 2 +- .../import/keys-Zyyy-punctuation.xml | 2 +- ....schema.json => ldml-keyboard3.schema.json} | 6 +++--- ...ema.json => ldml-keyboardtest3.schema.json} | 6 +++--- .../techpreview/test/fr-t-k0-azerty-test.xml | 18 +++++++++--------- .../techpreview/test/ja-Latn-test.xml | 6 +++--- .../techpreview/test/pt-t-k0-abnt2-test.xml | 6 +++--- 20 files changed, 59 insertions(+), 55 deletions(-) rename resources/standards-data/ldml-keyboards/techpreview/dtd/{ldmlKeyboard.dtd => ldmlKeyboard3.dtd} (96%) rename resources/standards-data/ldml-keyboards/techpreview/dtd/{ldmlKeyboard.xsd => ldmlKeyboard3.xsd} (99%) rename resources/standards-data/ldml-keyboards/techpreview/dtd/{ldmlKeyboardTest.dtd => ldmlKeyboardTest3.dtd} (95%) rename resources/standards-data/ldml-keyboards/techpreview/dtd/{ldmlKeyboardTest.xsd => ldmlKeyboardTest3.xsd} (99%) rename resources/standards-data/ldml-keyboards/techpreview/{ldml-keyboard.schema.json => ldml-keyboard3.schema.json} (99%) rename resources/standards-data/ldml-keyboards/techpreview/{ldml-keyboardtest.schema.json => ldml-keyboardtest3.schema.json} (97%) diff --git a/resources/standards-data/ldml-keyboards/techpreview/3.0/fr-t-k0-azerty.xml b/resources/standards-data/ldml-keyboards/techpreview/3.0/fr-t-k0-azerty.xml index b7162f6e01b..4ccedc062f3 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/3.0/fr-t-k0-azerty.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/3.0/fr-t-k0-azerty.xml @@ -1,5 +1,5 @@ - + - + @@ -209,4 +209,4 @@ - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/3.0/ja-Latn.xml b/resources/standards-data/ldml-keyboards/techpreview/3.0/ja-Latn.xml index a381fca2309..8b5b845bf25 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/3.0/ja-Latn.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/3.0/ja-Latn.xml @@ -1,6 +1,6 @@ - - + + @@ -31,4 +31,4 @@ - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/3.0/mt-t-k0-47key.xml b/resources/standards-data/ldml-keyboards/techpreview/3.0/mt-t-k0-47key.xml index 99a6b39d7b3..02db33accc6 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/3.0/mt-t-k0-47key.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/3.0/mt-t-k0-47key.xml @@ -1,6 +1,6 @@ - - + + @@ -81,4 +81,4 @@ - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/3.0/mt.xml b/resources/standards-data/ldml-keyboards/techpreview/3.0/mt.xml index d52184fcc1d..a5a415d8745 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/3.0/mt.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/3.0/mt.xml @@ -1,12 +1,12 @@ - + - + @@ -84,4 +84,4 @@ - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/3.0/pt-t-k0-abnt2.xml b/resources/standards-data/ldml-keyboards/techpreview/3.0/pt-t-k0-abnt2.xml index ddd35bcd684..6de82a8f9d3 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/3.0/pt-t-k0-abnt2.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/3.0/pt-t-k0-abnt2.xml @@ -1,6 +1,6 @@ - - + + @@ -62,4 +62,4 @@ - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json b/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json index 23d8cfe40d8..f0014664bbe 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json +++ b/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json @@ -1,5 +1,5 @@ { - "sha": "61b74a36de8329daed152005133a699ae7f2012b", - "description": "release-44-alpha2-5-g61b74a36de", - "date": "Thu, 14 Sep 2023 07:38:47 +0000" + "sha": "bd40148d4c8675d0fb2db8c36cfb9f8e328250a8", + "description": "release-44-alpha3-3-gbd40148d4c", + "date": "Mon, 18 Sep 2023 23:31:25 +0000" } diff --git a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd similarity index 96% rename from resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd rename to resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd index e668787eafa..668aa1740bc 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd +++ b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd @@ -10,11 +10,11 @@ The CLDR Keyboard Subcommittee is currently developing major changes to the CLDR Please view the subcommittee page for the most recent information. --> - + - + - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.xsd b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.xsd similarity index 99% rename from resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.xsd rename to resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.xsd index 1a881854991..027abb8a14d 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.xsd +++ b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.xsd @@ -16,7 +16,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file Please view the subcommittee page for the most recent information. --> - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.dtd b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd similarity index 95% rename from resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.dtd rename to resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd index 1cb20db71e9..f08d3b8a2b7 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.dtd +++ b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd @@ -13,9 +13,9 @@ This DTD is a work in progress. Please see CLDR-15034 for the latest information. --> - + - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.xsd b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.xsd similarity index 99% rename from resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.xsd rename to resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.xsd index 612ab789c10..1c61ec482ff 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.xsd +++ b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.xsd @@ -19,7 +19,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file Please see CLDR-15034 for the latest information. --> - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/fetch-latest-cldr-techpreview.sh b/resources/standards-data/ldml-keyboards/techpreview/fetch-latest-cldr-techpreview.sh index a51566515c9..b2ddcbda58d 100755 --- a/resources/standards-data/ldml-keyboards/techpreview/fetch-latest-cldr-techpreview.sh +++ b/resources/standards-data/ldml-keyboards/techpreview/fetch-latest-cldr-techpreview.sh @@ -33,8 +33,8 @@ DATA_DIR="${KEYBOARDS_DIR}/3.0" TEST_DIR="${KEYBOARDS_DIR}/test" # a file to check -CHECK_1="${DTD_DIR}/ldmlKeyboard.dtd" # Critical, present in prior CLDR -CHECK_2="${DTD_DIR}/ldmlKeyboardTest.dtd" # Only in Keyboard 3.0+ +CHECK_1="${DTD_DIR}/ldmlKeyboard3.dtd" # Critical, present in prior CLDR +CHECK_2="${DTD_DIR}/ldmlKeyboardTest3.dtd" # Only in Keyboard 3.0+ if [[ ! -f "${CHECK_1}" ]]; then @@ -59,6 +59,10 @@ rm -rf ./import ./3.0 ./dtd ./test # copy over everything cp -Rv "${IMPORT_DIR}" "${DATA_DIR}" "${DTD_DIR}" "${TEST_DIR}" . +# delete old files, no reason to keep them +rm -vf dtd/{ldmlKeyboard,ldmlPlatform}.{xsd,dtd} + + echo "{\"sha\": \"${GIT_SHA}\",\"description\":\"${GIT_DESCRIBE}\",\"date\":\"${NOW}\"}" | ${JQ} . | tee cldr_info.json echo "Updated cldr_info.json" diff --git a/resources/standards-data/ldml-keyboards/techpreview/fixup-schema.js b/resources/standards-data/ldml-keyboards/techpreview/fixup-schema.js index 8c1fb540128..84f00f6711a 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/fixup-schema.js +++ b/resources/standards-data/ldml-keyboards/techpreview/fixup-schema.js @@ -48,12 +48,12 @@ function singleToArray(o) { } } -if (data.title.endsWith('ldmlKeyboard.xsd')) { - if (data?.properties?.keyboard) { - data.properties.keyboard.type = 'object'; +if (data.title.endsWith('ldmlKeyboard3.xsd')) { + if (data?.properties?.keyboard3) { + data.properties.keyboard3.type = 'object'; } - arrayToSingle(data?.properties?.keyboard?.properties?.vkeys); + arrayToSingle(data?.properties?.keyboard3?.properties?.vkeys); singleToArray(data?.definitions?.keys?.properties?.key); singleToArray(data?.definitions?.keys?.properties?.flicks); arrayToSingle(data?.definitions?.displays?.properties?.displayOptions); diff --git a/resources/standards-data/ldml-keyboards/techpreview/import/keys-Latn-implied.xml b/resources/standards-data/ldml-keyboards/techpreview/import/keys-Latn-implied.xml index 8de55e41851..eed84d38f82 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/import/keys-Latn-implied.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/import/keys-Latn-implied.xml @@ -9,7 +9,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic This is the implied import for implied keys. Please note that any implied keys may be overridden by keyboard layouts. --> - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-currency.xml b/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-currency.xml index e5e87c9a765..778cad451ad 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-currency.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-currency.xml @@ -11,7 +11,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic This file is subject to change. Please see https://cldr.unicode.org/index/keyboard-workgroup for the latest information. --> - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-punctuation.xml b/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-punctuation.xml index 91f8f9dfaf5..1e540cf024e 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-punctuation.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-punctuation.xml @@ -5,7 +5,7 @@ This file is subject to change. Please see https://cldr.unicode.org/index/keyboard-workgroup for the latest information. --> - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard.schema.json b/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard3.schema.json similarity index 99% rename from resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard.schema.json rename to resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard3.schema.json index cd91f563a10..c5d13311ef8 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard.schema.json +++ b/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard3.schema.json @@ -678,7 +678,7 @@ } }, "properties": { - "keyboard": { + "keyboard3": { "additionalProperties": false, "properties": { "conformsTo": { @@ -754,8 +754,8 @@ } }, "required": [ - "keyboard" + "keyboard3" ], - "title": "techpreview/dtd/ldmlKeyboard.xsd", + "title": "techpreview/dtd/ldmlKeyboard3.xsd", "type": "object" } diff --git a/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest.schema.json b/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest3.schema.json similarity index 97% rename from resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest.schema.json rename to resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest3.schema.json index 6d163770f9d..cbf09b39d5b 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest.schema.json +++ b/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest3.schema.json @@ -176,7 +176,7 @@ } }, "properties": { - "keyboardTest": { + "keyboardTest3": { "additionalProperties": false, "properties": { "conformsTo": { @@ -214,8 +214,8 @@ } }, "required": [ - "keyboardTest" + "keyboardTest3" ], - "title": "techpreview/dtd/ldmlKeyboardTest.xsd", + "title": "techpreview/dtd/ldmlKeyboardTest3.xsd", "type": "object" } diff --git a/resources/standards-data/ldml-keyboards/techpreview/test/fr-t-k0-azerty-test.xml b/resources/standards-data/ldml-keyboards/techpreview/test/fr-t-k0-azerty-test.xml index 23a0cdba516..0228dae7c14 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/test/fr-t-k0-azerty-test.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/test/fr-t-k0-azerty-test.xml @@ -1,22 +1,22 @@ - - + + - + - + - + - + - + - + - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/test/ja-Latn-test.xml b/resources/standards-data/ldml-keyboards/techpreview/test/ja-Latn-test.xml index a1e3a185ebf..c4d950f8d90 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/test/ja-Latn-test.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/test/ja-Latn-test.xml @@ -1,6 +1,6 @@ - - + + @@ -24,4 +24,4 @@ - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/test/pt-t-k0-abnt2-test.xml b/resources/standards-data/ldml-keyboards/techpreview/test/pt-t-k0-abnt2-test.xml index 4eb59db813b..c9f7148438b 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/test/pt-t-k0-abnt2-test.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/test/pt-t-k0-abnt2-test.xml @@ -1,6 +1,6 @@ - - + + - + From 8be00cb482a9327fe7ebc468151f2a2ff63ca584 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Mon, 18 Sep 2023 18:38:16 -0500 Subject: [PATCH 20/56] =?UTF-8?q?chore(resources):=20code=20changes=20for?= =?UTF-8?q?=20keyboard=20to=20keyboard3=20=20=F0=9F=99=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/web/types/build.sh | 4 +- .../ldml-keyboard-testdata-xml.ts | 2 +- .../ldml-keyboard/ldml-keyboard-xml-reader.ts | 60 +++++++++---------- .../src/ldml-keyboard/ldml-keyboard-xml.ts | 2 +- common/web/types/src/schemas.ts | 10 ++-- .../types/test/fixtures/import-minimal.xml | 6 +- .../types/test/fixtures/import-minimal1.xml | 6 +- .../types/test/fixtures/import-minimal2.xml | 6 +- .../types/test/fixtures/import-symbols.xml | 6 +- .../test/fixtures/invalid-conforms-to.xml | 4 +- .../test/fixtures/invalid-import-base.xml | 6 +- .../test/fixtures/invalid-import-path.xml | 6 +- .../test/fixtures/invalid-import-readfail.xml | 6 +- .../fixtures/invalid-import-wrongroot.xml | 6 +- .../fixtures/invalid-structure-per-dtd.xml | 6 +- common/web/types/test/fixtures/test-fr.xml | 6 +- .../test/helpers/reader-callback-test.ts | 2 +- .../test-ldml-keyboard-testdata-reader.ts | 16 ++--- .../test-ldml-keyboard-xml-reader.ts | 20 +++---- .../invalid-keyboards/ik_000_null_invalid.xml | 2 +- .../ldml/keyboards/k_000_null_keyboard.xml | 2 +- .../unit/ldml/keyboards/k_001_tiny-test.xml | 6 +- core/tests/unit/ldml/keyboards/k_001_tiny.xml | 6 +- .../unit/ldml/keyboards/k_002_tinyu32.xml | 6 +- .../unit/ldml/keyboards/k_003_transform.xml | 6 +- .../unit/ldml/keyboards/k_004_tinyshift.xml | 6 +- .../unit/ldml/keyboards/k_005_modbittest.xml | 6 +- .../unit/ldml/keyboards/k_006_backspace.xml | 6 +- .../keyboards/k_007_transform_rgx-test.xml | 6 +- .../ldml/keyboards/k_007_transform_rgx.xml | 6 +- core/tests/unit/ldml/keyboards/k_010_mt.xml | 6 +- .../unit/ldml/keyboards/k_011_mt_iso.xml | 6 +- .../unit/ldml/keyboards/k_020_fr-test.xml | 6 +- core/tests/unit/ldml/keyboards/k_020_fr.xml | 6 +- .../unit/ldml/keyboards/k_100_keytest.xml | 6 +- .../unit/ldml/keyboards/k_101_keytest.xml | 6 +- .../unit/ldml/keyboards/k_102_keytest.xml | 6 +- .../keyboards/k_200_reorder_nod_Lana-test.xml | 6 +- .../ldml/keyboards/k_200_reorder_nod_Lana.xml | 6 +- .../unit/ldml/keyboards/k_210_marker-test.xml | 6 +- .../unit/ldml/keyboards/k_210_marker.xml | 6 +- developer/src/inst/download.in.mak | 2 +- developer/src/kmc-ldml/src/compiler/disp.ts | 8 +-- .../src/compiler/keymanweb-compiler.ts | 6 +- developer/src/kmc-ldml/src/compiler/keys.ts | 20 +++---- developer/src/kmc-ldml/src/compiler/layr.ts | 4 +- developer/src/kmc-ldml/src/compiler/loca.ts | 4 +- developer/src/kmc-ldml/src/compiler/meta.ts | 22 +++---- developer/src/kmc-ldml/src/compiler/name.ts | 4 +- .../kmc-ldml/src/compiler/section-compiler.ts | 4 +- .../src/compiler/touch-layout-compiler.ts | 6 +- developer/src/kmc-ldml/src/compiler/tran.ts | 4 +- developer/src/kmc-ldml/src/compiler/vars.ts | 12 ++-- .../src/compiler/visual-keyboard-compiler.ts | 4 +- developer/src/kmc-ldml/src/compiler/vkey.ts | 8 +-- .../src/kmc-ldml/test/fixtures/basic.xml | 6 +- .../test/fixtures/sections/bksp/minimal.xml | 6 +- .../test/fixtures/sections/disp/escaped.xml | 6 +- .../fixtures/sections/disp/invalid-both.xml | 6 +- .../fixtures/sections/disp/invalid-dupid.xml | 6 +- .../fixtures/sections/disp/invalid-dupto.xml | 6 +- .../fixtures/sections/disp/invalid-none.xml | 6 +- .../test/fixtures/sections/disp/maximal.xml | 6 +- .../test/fixtures/sections/disp/minimal.xml | 6 +- .../fixtures/sections/disp/options-only.xml | 6 +- .../test/fixtures/sections/disp/typical.xml | 6 +- .../test/fixtures/sections/finl/minimal.xml | 6 +- .../test/fixtures/sections/keys/escaped.xml | 6 +- .../test/fixtures/sections/keys/escaped2.xml | 6 +- .../fixtures/sections/keys/gap-switch.xml | 6 +- .../test/fixtures/sections/keys/hardware.xml | 6 +- .../fixtures/sections/keys/hardware_iso.xml | 6 +- .../fixtures/sections/keys/hardware_us.xml | 6 +- .../sections/keys/invalid-bad-modifier.xml | 6 +- .../keys/invalid-hardware-too-many-keys.xml | 6 +- .../keys/invalid-hardware-too-many-rows.xml | 6 +- .../keys/invalid-key-missing-attrs.xml | 6 +- .../sections/keys/invalid-missing-flick.xml | 6 +- .../sections/keys/invalid-undefined-key.xml | 6 +- .../test/fixtures/sections/keys/markers.xml | 6 +- .../test/fixtures/sections/keys/maximal.xml | 6 +- .../test/fixtures/sections/keys/minimal.xml | 6 +- .../sections/layr/invalid-invalid-form.xml | 6 +- .../layr/invalid-missing-hardware.xml | 6 +- .../sections/layr/invalid-missing-layer.xml | 6 +- .../sections/layr/invalid-missing-layer2.xml | 6 +- .../sections/layr/invalid-multi-hardware.xml | 6 +- .../fixtures/sections/loca/invalid-locale.xml | 6 +- .../test/fixtures/sections/loca/minimal.xml | 6 +- .../test/fixtures/sections/loca/multiple.xml | 6 +- .../sections/meta/invalid-normalization.xml | 6 +- .../sections/meta/invalid-version-1.0.xml | 6 +- .../sections/meta/invalid-version-v1.0.3.xml | 6 +- .../test/fixtures/sections/meta/maximal.xml | 6 +- .../test/fixtures/sections/meta/minimal.xml | 6 +- .../test/fixtures/sections/name/minimal.xml | 6 +- .../test/fixtures/sections/name/multiple.xml | 6 +- .../test/fixtures/sections/ordr/minimal.xml | 6 +- .../fixtures/sections/ordr/multi-escape.xml | 6 +- .../test/fixtures/sections/ordr/nod-Lana.xml | 6 +- .../sections/tran/fail-duplicate-type.xml | 6 +- .../fixtures/sections/tran/fail-empty.xml | 6 +- .../tran/fail-invalid-duplicate-type.xml | 6 +- .../sections/tran/fail-invalid-type.xml | 6 +- .../fixtures/sections/tran/fail-mixed.xml | 6 +- .../test/fixtures/sections/tran/minimal.xml | 6 +- .../test/fixtures/sections/tran/tran-vars.xml | 6 +- .../test/fixtures/sections/vars/dup0.xml | 6 +- .../test/fixtures/sections/vars/dup1.xml | 6 +- .../fixtures/sections/vars/fail-badref-0.xml | 6 +- .../fixtures/sections/vars/fail-badref-1.xml | 6 +- .../fixtures/sections/vars/fail-badref-2.xml | 6 +- .../fixtures/sections/vars/fail-badref-3.xml | 6 +- .../fixtures/sections/vars/fail-badref-4.xml | 6 +- .../fixtures/sections/vars/fail-badref-5.xml | 6 +- .../fixtures/sections/vars/fail-badref-6.xml | 6 +- .../sections/vars/fail-markers-badref-0.xml | 6 +- .../sections/vars/fail-uset-props1.xml | 6 +- .../sections/vars/fail-uset-props2.xml | 6 +- .../sections/vars/fail-uset-strings.xml | 6 +- .../sections/vars/fail-uset-syntax.xml | 6 +- .../sections/vars/markers-maximal.xml | 6 +- .../test/fixtures/sections/vars/maximal.xml | 6 +- .../test/fixtures/sections/vars/minimal.xml | 6 +- .../sections/vkey/invalid-from-vkey.xml | 6 +- .../sections/vkey/invalid-repeated-vkey.xml | 6 +- .../sections/vkey/invalid-to-vkey.xml | 6 +- .../test/fixtures/sections/vkey/minimal.xml | 6 +- .../test/fixtures/sections/vkey/redundant.xml | 6 +- .../fixtures/sections/vkey/same-target.xml | 6 +- .../src/kmc-ldml/test/fixtures/test-fr.json | 2 +- .../src/kmc-ldml/test/fixtures/test-fr.xml | 6 +- .../src/kmc-ldml/test/test-dependencies.ts | 2 +- .../standards-data/ldml-keyboards/readme.md | 2 +- .../ldml-keyboards/techpreview/3.0/pcm.xml | 6 +- .../techpreview/test/pcm-test.xml | 6 +- 136 files changed, 443 insertions(+), 443 deletions(-) diff --git a/common/web/types/build.sh b/common/web/types/build.sh index 74b200e6d65..f0c73b0e077 100755 --- a/common/web/types/build.sh +++ b/common/web/types/build.sh @@ -29,8 +29,8 @@ builder_parse "$@" function compile_schemas() { # We need the schema files at runtime and bundled, so always copy it for all actions except `clean` local schemas=( - "$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard.schema.json" - "$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest.schema.json" + "$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard3.schema.json" + "$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest3.schema.json" "$KEYMAN_ROOT/common/schemas/kvks/kvks.schema.json" "$KEYMAN_ROOT/common/schemas/kpj/kpj.schema.json" "$KEYMAN_ROOT/common/schemas/kpj-9.0/kpj-9.0.schema.json" diff --git a/common/web/types/src/ldml-keyboard/ldml-keyboard-testdata-xml.ts b/common/web/types/src/ldml-keyboard/ldml-keyboard-testdata-xml.ts index c0a5e9dd6d7..86a05e38934 100644 --- a/common/web/types/src/ldml-keyboard/ldml-keyboard-testdata-xml.ts +++ b/common/web/types/src/ldml-keyboard/ldml-keyboard-testdata-xml.ts @@ -11,7 +11,7 @@ export interface LDMLKeyboardTestDataXMLSourceFile { /** * -- the root element. */ - keyboardTest: LKTKeyboardTest; + keyboardTest3: LKTKeyboardTest; } export interface LKTKeyboardTest { diff --git a/common/web/types/src/ldml-keyboard/ldml-keyboard-xml-reader.ts b/common/web/types/src/ldml-keyboard/ldml-keyboard-xml-reader.ts index 3e7bda502e6..3fdd9a74025 100644 --- a/common/web/types/src/ldml-keyboard/ldml-keyboard-xml-reader.ts +++ b/common/web/types/src/ldml-keyboard/ldml-keyboard-xml-reader.ts @@ -39,27 +39,27 @@ export class LDMLKeyboardXMLSourceFileReader { * @returns true on success, false on failure */ private boxArrays(source: any) : boolean { - if (source?.keyboard) { - if (!source.keyboard.keys) { - source.keyboard.keys = { + if (source?.keyboard3) { + if (!source.keyboard3.keys) { + source.keyboard3.keys = { key: [], flicks: [], }; } - if (!source.keyboard.keys.import) { - source.keyboard.keys.import = []; + if (!source.keyboard3.keys.import) { + source.keyboard3.keys.import = []; } } - boxXmlArray(source?.keyboard, 'layers'); - boxXmlArray(source?.keyboard?.displays, 'display'); - boxXmlArray(source?.keyboard?.names, 'name'); - boxXmlArray(source?.keyboard?.vkeys, 'vkey'); - boxXmlArray(source?.keyboard?.keys, 'key'); - boxXmlArray(source?.keyboard?.keys, 'flicks'); - boxXmlArray(source?.keyboard?.locales, 'locale'); - boxXmlArray(source?.keyboard, 'transforms'); - if(source?.keyboard?.layers) { - for(let layers of source?.keyboard?.layers) { + boxXmlArray(source?.keyboard3, 'layers'); + boxXmlArray(source?.keyboard3?.displays, 'display'); + boxXmlArray(source?.keyboard3?.names, 'name'); + boxXmlArray(source?.keyboard3?.vkeys, 'vkey'); + boxXmlArray(source?.keyboard3?.keys, 'key'); + boxXmlArray(source?.keyboard3?.keys, 'flicks'); + boxXmlArray(source?.keyboard3?.locales, 'locale'); + boxXmlArray(source?.keyboard3, 'transforms'); + if(source?.keyboard3?.layers) { + for(let layers of source?.keyboard3?.layers) { boxXmlArray(layers, 'layer'); if(layers?.layer) { for(let layer of layers?.layer) { @@ -68,18 +68,18 @@ export class LDMLKeyboardXMLSourceFileReader { } } } - if(source?.keyboard?.keys?.flicks) { - for(let flicks of source?.keyboard?.keys?.flicks) { + if(source?.keyboard3?.keys?.flicks) { + for(let flicks of source?.keyboard3?.keys?.flicks) { boxXmlArray(flicks, 'flick'); } } - if(source?.keyboard?.variables) { - boxXmlArray(source?.keyboard?.variables, 'set'); - boxXmlArray(source?.keyboard?.variables, 'string'); - boxXmlArray(source?.keyboard?.variables, 'unicodeSet'); + if(source?.keyboard3?.variables) { + boxXmlArray(source?.keyboard3?.variables, 'set'); + boxXmlArray(source?.keyboard3?.variables, 'string'); + boxXmlArray(source?.keyboard3?.variables, 'unicodeSet'); } - if(source?.keyboard?.transforms) { - for(let transforms of source.keyboard.transforms) { + if(source?.keyboard3?.transforms) { + for(let transforms of source.keyboard3.transforms) { boxXmlArray(transforms, 'transformGroup'); for (let transformGroup of transforms.transformGroup) { boxXmlArray(transformGroup, 'transform'); @@ -208,7 +208,7 @@ export class LDMLKeyboardXMLSourceFileReader { */ public validate(source: LDMLKeyboardXMLSourceFile | LDMLKeyboardTestDataXMLSourceFile): boolean { const ajv = new Ajv(); - if(!ajv.validate(Schemas.ldmlKeyboard, source)) { + if(!ajv.validate(Schemas.ldmlKeyboard3, source)) { for (let err of ajv.errors) { this.callbacks.reportMessage(CommonTypesMessages.Error_SchemaValidationError({ instancePath: err.instancePath, @@ -345,16 +345,16 @@ export class LDMLKeyboardXMLSourceFileReader { boxTestDataArrays(raw: any) : LDMLKeyboardTestDataXMLSourceFile | null { if (!raw) return null; const a : LDMLKeyboardTestDataXMLSourceFile = { - keyboardTest: { - conformsTo: raw?.keyboardTest?.$?.conformsTo, + keyboardTest3: { + conformsTo: raw?.keyboardTest3?.$?.conformsTo, } }; - const $$ : NameAndProps[] = raw?.keyboardTest?.$$; + const $$ : NameAndProps[] = raw?.keyboardTest3?.$$; - this.stuffBoxes(a.keyboardTest, $$, 'info'); - this.stuffBoxes(a.keyboardTest, $$, 'repertoire', true); - this.stuffBoxes(a.keyboardTest, $$, 'tests', true, (o, r) => { + this.stuffBoxes(a.keyboardTest3, $$, 'info'); + this.stuffBoxes(a.keyboardTest3, $$, 'repertoire', true); + this.stuffBoxes(a.keyboardTest3, $$, 'tests', true, (o, r) => { // start with basic unpack const tests : LKTTests = LDMLKeyboardXMLSourceFileReader.defaultMapper(o, r); // add ingredients diff --git a/common/web/types/src/ldml-keyboard/ldml-keyboard-xml.ts b/common/web/types/src/ldml-keyboard/ldml-keyboard-xml.ts index 396f3589a05..629b8e8aa24 100644 --- a/common/web/types/src/ldml-keyboard/ldml-keyboard-xml.ts +++ b/common/web/types/src/ldml-keyboard/ldml-keyboard-xml.ts @@ -11,7 +11,7 @@ export interface LDMLKeyboardXMLSourceFile { /** * -- the root element. */ - keyboard: LKKeyboard; + keyboard3: LKKeyboard; } export interface LKKeyboard { diff --git a/common/web/types/src/schemas.ts b/common/web/types/src/schemas.ts index 451afc416bc..3d1ce0cbf12 100644 --- a/common/web/types/src/schemas.ts +++ b/common/web/types/src/schemas.ts @@ -2,8 +2,8 @@ import kpj from './schemas/kpj.schema.js'; import kpj90 from './schemas/kpj-9.0.schema.js'; import kvks from './schemas/kvks.schema.js'; -import ldmlKeyboard from './schemas/ldml-keyboard.schema.js'; -import ldmlKeyboardTest from './schemas/ldml-keyboardtest.schema.js'; +import ldmlKeyboard3 from './schemas/ldml-keyboard3.schema.js'; +import ldmlKeyboardTest3 from './schemas/ldml-keyboardtest3.schema.js'; import displayMap from './schemas/displaymap.schema.js'; import touchLayoutClean from './schemas/keyman-touch-layout.clean.spec.js'; import touchLayout from './schemas/keyman-touch-layout.spec.js'; @@ -12,11 +12,11 @@ const Schemas = { kpj, kpj90, kvks, - ldmlKeyboard, - ldmlKeyboardTest, + ldmlKeyboard3, + ldmlKeyboardTest3, displayMap, touchLayoutClean, touchLayout, }; -export default Schemas; \ No newline at end of file +export default Schemas; diff --git a/common/web/types/test/fixtures/import-minimal.xml b/common/web/types/test/fixtures/import-minimal.xml index 500367699d1..f23bc5c3255 100644 --- a/common/web/types/test/fixtures/import-minimal.xml +++ b/common/web/types/test/fixtures/import-minimal.xml @@ -1,8 +1,8 @@ - - + + - + diff --git a/common/web/types/test/fixtures/import-minimal1.xml b/common/web/types/test/fixtures/import-minimal1.xml index 439741d0415..ce2140893e1 100644 --- a/common/web/types/test/fixtures/import-minimal1.xml +++ b/common/web/types/test/fixtures/import-minimal1.xml @@ -1,6 +1,6 @@ - - + + @@ -8,4 +8,4 @@ - + diff --git a/common/web/types/test/fixtures/import-minimal2.xml b/common/web/types/test/fixtures/import-minimal2.xml index f04e32d6736..66a836057de 100644 --- a/common/web/types/test/fixtures/import-minimal2.xml +++ b/common/web/types/test/fixtures/import-minimal2.xml @@ -1,6 +1,6 @@ - - + + @@ -8,4 +8,4 @@ - + diff --git a/common/web/types/test/fixtures/import-symbols.xml b/common/web/types/test/fixtures/import-symbols.xml index 9ca4638204b..e3421c8ff33 100644 --- a/common/web/types/test/fixtures/import-symbols.xml +++ b/common/web/types/test/fixtures/import-symbols.xml @@ -1,6 +1,6 @@ - - + + @@ -10,4 +10,4 @@ - + diff --git a/common/web/types/test/fixtures/invalid-conforms-to.xml b/common/web/types/test/fixtures/invalid-conforms-to.xml index e2fdf8e4229..e5cca5ebacc 100644 --- a/common/web/types/test/fixtures/invalid-conforms-to.xml +++ b/common/web/types/test/fixtures/invalid-conforms-to.xml @@ -4,7 +4,7 @@ DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd" Disabling doctype for this invalid file, not used by compiler, and avoids complaints in IDEs etc. --> - + @@ -16,4 +16,4 @@ - + diff --git a/common/web/types/test/fixtures/invalid-import-base.xml b/common/web/types/test/fixtures/invalid-import-base.xml index 3b56f1feeb7..f52a13031e8 100644 --- a/common/web/types/test/fixtures/invalid-import-base.xml +++ b/common/web/types/test/fixtures/invalid-import-base.xml @@ -1,6 +1,6 @@ - - + + @@ -13,4 +13,4 @@ - + diff --git a/common/web/types/test/fixtures/invalid-import-path.xml b/common/web/types/test/fixtures/invalid-import-path.xml index a9e670f8822..c52b18ff567 100644 --- a/common/web/types/test/fixtures/invalid-import-path.xml +++ b/common/web/types/test/fixtures/invalid-import-path.xml @@ -1,6 +1,6 @@ - - + + @@ -13,4 +13,4 @@ - + diff --git a/common/web/types/test/fixtures/invalid-import-readfail.xml b/common/web/types/test/fixtures/invalid-import-readfail.xml index e254b553505..d66288ecda4 100644 --- a/common/web/types/test/fixtures/invalid-import-readfail.xml +++ b/common/web/types/test/fixtures/invalid-import-readfail.xml @@ -1,6 +1,6 @@ - - + + @@ -13,4 +13,4 @@ - + diff --git a/common/web/types/test/fixtures/invalid-import-wrongroot.xml b/common/web/types/test/fixtures/invalid-import-wrongroot.xml index 522e106e860..45d6b3b7137 100644 --- a/common/web/types/test/fixtures/invalid-import-wrongroot.xml +++ b/common/web/types/test/fixtures/invalid-import-wrongroot.xml @@ -1,6 +1,6 @@ - - + + @@ -13,4 +13,4 @@ - + diff --git a/common/web/types/test/fixtures/invalid-structure-per-dtd.xml b/common/web/types/test/fixtures/invalid-structure-per-dtd.xml index be504fdbf9e..961e6033fa6 100644 --- a/common/web/types/test/fixtures/invalid-structure-per-dtd.xml +++ b/common/web/types/test/fixtures/invalid-structure-per-dtd.xml @@ -1,8 +1,8 @@ - - + + diff --git a/common/web/types/test/fixtures/test-fr.xml b/common/web/types/test/fixtures/test-fr.xml index c97825385ad..e138a1b5d16 100644 --- a/common/web/types/test/fixtures/test-fr.xml +++ b/common/web/types/test/fixtures/test-fr.xml @@ -1,6 +1,6 @@ - - + + @@ -19,4 +19,4 @@ - + diff --git a/common/web/types/test/helpers/reader-callback-test.ts b/common/web/types/test/helpers/reader-callback-test.ts index 4515aa15ea6..86758ad413f 100644 --- a/common/web/types/test/helpers/reader-callback-test.ts +++ b/common/web/types/test/helpers/reader-callback-test.ts @@ -105,7 +105,7 @@ export function testReaderCases(cases : CompilationCase[]) { assert.includeDeepMembers(callbacks.messages, testcase.warnings, 'expected warnings to be included'); } else if (!expectFailure) { // no warnings, so expect zero messages - assert.strictEqual(callbacks.messages.length, 0, 'expected zero messages'); + assert.deepEqual(callbacks.messages, [], 'expected zero messages'); } // run the user-supplied callback if any diff --git a/common/web/types/test/ldml-keyboard/test-ldml-keyboard-testdata-reader.ts b/common/web/types/test/ldml-keyboard/test-ldml-keyboard-testdata-reader.ts index 6a789c74936..80a78a1187b 100644 --- a/common/web/types/test/ldml-keyboard/test-ldml-keyboard-testdata-reader.ts +++ b/common/web/types/test/ldml-keyboard/test-ldml-keyboard-testdata-reader.ts @@ -11,16 +11,16 @@ describe('ldml keyboard xml reader tests', function () { subpath: 'test-fr.xml', callback: (data, source) => { assert.ok(source); - assert.ok(source.keyboardTest); - assert.equal(source.keyboardTest.conformsTo, constants.cldr_version_latest); + assert.ok(source.keyboardTest3); + assert.equal(source.keyboardTest3.conformsTo, constants.cldr_version_latest); - assert.deepEqual(source.keyboardTest.info, { + assert.deepEqual(source.keyboardTest3.info, { keyboard: 'fr-t-k0-azerty.xml', author: 'Team Keyboard', name: 'fr-test' }); - assert.sameDeepMembers(source.keyboardTest.repertoire, [ + assert.sameDeepMembers(source.keyboardTest3.repertoire, [ { name: 'simple-repertoire', chars: '[a b c d e \\u{22}]', @@ -29,10 +29,10 @@ describe('ldml keyboard xml reader tests', function () { { name: 'chars-repertoire', chars: '[á é ó]', type: 'gesture' } ]); - assert.equal(1, source.keyboardTest.tests?.length); - assert.equal('key-tests', source.keyboardTest.tests[0].name); - assert.equal(1, source.keyboardTest.tests[0].test?.length); - const test0 = source.keyboardTest.tests[0].test[0]; + assert.equal(1, source.keyboardTest3.tests?.length); + assert.equal('key-tests', source.keyboardTest3.tests[0].name); + assert.equal(1, source.keyboardTest3.tests[0].test?.length); + const test0 = source.keyboardTest3.tests[0].test[0]; assert.equal('key-test', test0.name); assert.equal('abc\\u0022...', test0.startContext?.to); assert.sameDeepOrderedMembers([ diff --git a/common/web/types/test/ldml-keyboard/test-ldml-keyboard-xml-reader.ts b/common/web/types/test/ldml-keyboard/test-ldml-keyboard-xml-reader.ts index ac791dac33a..4da7a006636 100644 --- a/common/web/types/test/ldml-keyboard/test-ldml-keyboard-xml-reader.ts +++ b/common/web/types/test/ldml-keyboard/test-ldml-keyboard-xml-reader.ts @@ -15,7 +15,7 @@ describe('ldml keyboard xml reader tests', function () { { subpath: 'invalid-structure-per-dtd.xml', errors: [CommonTypesMessages.Error_SchemaValidationError({ - instancePath: '/keyboard', + instancePath: '/keyboard3', keyword: 'required', message: `must have required property 'names'`, params: 'missingProperty="names"', @@ -24,7 +24,7 @@ describe('ldml keyboard xml reader tests', function () { { subpath: 'invalid-conforms-to.xml', errors: [CommonTypesMessages.Error_SchemaValidationError({ - instancePath: '/keyboard/conformsTo', + instancePath: '/keyboard3/conformsTo', keyword: 'enum', message: `must be equal to one of the allowed values`, params: 'allowedValues="techpreview"', @@ -33,8 +33,8 @@ describe('ldml keyboard xml reader tests', function () { { subpath: 'import-minimal.xml', callback: (data, source, subpath, callbacks) => { - assert.ok(source?.keyboard?.keys); - const k = pluckKeysFromKeybag(source?.keyboard?.keys.key, ['a', 'b', 'c']); + assert.ok(source?.keyboard3?.keys); + const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c']); assert.sameDeepOrderedMembers(k, [ {id: 'a', to: 'a'}, {id: 'b', to: 'b'}, @@ -45,8 +45,8 @@ describe('ldml keyboard xml reader tests', function () { { subpath: 'import-minimal1.xml', callback: (data, source, subpath, callbacks) => { - assert.ok(source?.keyboard?.keys); - const k = pluckKeysFromKeybag(source?.keyboard?.keys.key, ['a', 'b', 'c']); + assert.ok(source?.keyboard3?.keys); + const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c']); assert.sameDeepOrderedMembers(k, [ {id: 'a', to: 'a'}, {id: 'b', to: 'b'}, @@ -57,8 +57,8 @@ describe('ldml keyboard xml reader tests', function () { { subpath: 'import-minimal2.xml', callback: (data, source, subpath, callbacks) => { - assert.ok(source?.keyboard?.keys); - const k = pluckKeysFromKeybag(source?.keyboard?.keys.key, ['a', 'b', 'c']); + assert.ok(source?.keyboard3?.keys); + const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c']); assert.sameDeepOrderedMembers(k, [ {id: 'a', to: 'a'}, {id: 'b', to: 'b'}, @@ -70,8 +70,8 @@ describe('ldml keyboard xml reader tests', function () { { subpath: 'import-symbols.xml', callback: (data, source, subpath, callbacks) => { - assert.ok(source?.keyboard?.keys); - const k = pluckKeysFromKeybag(source?.keyboard?.keys.key, ['a', 'b', 'c', 'zz', 'hash', 'hyphen']); + assert.ok(source?.keyboard3?.keys); + const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c', 'zz', 'hash', 'hyphen']); assert.sameDeepOrderedMembers(k, [ {id: 'a', to: 'a'}, // implied {id: 'b', to: 'b'}, diff --git a/core/tests/unit/ldml/invalid-keyboards/ik_000_null_invalid.xml b/core/tests/unit/ldml/invalid-keyboards/ik_000_null_invalid.xml index 85b7023d5a3..a16eb613468 100644 --- a/core/tests/unit/ldml/invalid-keyboards/ik_000_null_invalid.xml +++ b/core/tests/unit/ldml/invalid-keyboards/ik_000_null_invalid.xml @@ -7,4 +7,4 @@ @@expect-error: This keyboard is invalid, so it will fail to load --> - + diff --git a/core/tests/unit/ldml/keyboards/k_000_null_keyboard.xml b/core/tests/unit/ldml/keyboards/k_000_null_keyboard.xml index 516c336b247..73dfce5dd93 100644 --- a/core/tests/unit/ldml/keyboards/k_000_null_keyboard.xml +++ b/core/tests/unit/ldml/keyboards/k_000_null_keyboard.xml @@ -7,4 +7,4 @@ @@expect: --> - + 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 63fba5778a7..231523458c6 100644 --- a/core/tests/unit/ldml/keyboards/k_001_tiny-test.xml +++ b/core/tests/unit/ldml/keyboards/k_001_tiny-test.xml @@ -1,6 +1,6 @@ - - + + @@ -13,4 +13,4 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_001_tiny.xml b/core/tests/unit/ldml/keyboards/k_001_tiny.xml index 65bf21ea51a..e17284025d4 100644 --- a/core/tests/unit/ldml/keyboards/k_001_tiny.xml +++ b/core/tests/unit/ldml/keyboards/k_001_tiny.xml @@ -8,8 +8,8 @@ @@expected: \u0127\u1790\u17B6\u0127 --> - - + + @@ -26,4 +26,4 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_002_tinyu32.xml b/core/tests/unit/ldml/keyboards/k_002_tinyu32.xml index 85d5f7d9432..7ef6c0b3792 100644 --- a/core/tests/unit/ldml/keyboards/k_002_tinyu32.xml +++ b/core/tests/unit/ldml/keyboards/k_002_tinyu32.xml @@ -6,8 +6,8 @@ @@expected: \u0127\u1790\u17B6\u0127\uD83D\uDE40\u0127 --> - - + + @@ -25,4 +25,4 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_003_transform.xml b/core/tests/unit/ldml/keyboards/k_003_transform.xml index 565378400a3..814b6829d8e 100644 --- a/core/tests/unit/ldml/keyboards/k_003_transform.xml +++ b/core/tests/unit/ldml/keyboards/k_003_transform.xml @@ -7,8 +7,8 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke @@expected: qu\u00ea --> - - + + @@ -58,4 +58,4 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke - + diff --git a/core/tests/unit/ldml/keyboards/k_004_tinyshift.xml b/core/tests/unit/ldml/keyboards/k_004_tinyshift.xml index 212e41d8fe1..fa7df968789 100644 --- a/core/tests/unit/ldml/keyboards/k_004_tinyshift.xml +++ b/core/tests/unit/ldml/keyboards/k_004_tinyshift.xml @@ -6,8 +6,8 @@ @@expected: \u0037\u1790\u17B6\u0127 --> - - + + @@ -29,4 +29,4 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_005_modbittest.xml b/core/tests/unit/ldml/keyboards/k_005_modbittest.xml index 8d1a934016e..a7397280922 100644 --- a/core/tests/unit/ldml/keyboards/k_005_modbittest.xml +++ b/core/tests/unit/ldml/keyboards/k_005_modbittest.xml @@ -6,8 +6,8 @@ @@expected: \u0061\u0041\u0062\u0063\u0064\u0064\u0065\u0066\u0067\u0067 --> - - + + @@ -42,4 +42,4 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_006_backspace.xml b/core/tests/unit/ldml/keyboards/k_006_backspace.xml index f1ab58c6958..b3f126eeabe 100644 --- a/core/tests/unit/ldml/keyboards/k_006_backspace.xml +++ b/core/tests/unit/ldml/keyboards/k_006_backspace.xml @@ -7,8 +7,8 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke @@expected: t --> - - + + @@ -58,4 +58,4 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke - + 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 d79f4f92b40..e6cc5ce387b 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,6 +1,6 @@ - - + + @@ -21,4 +21,4 @@ - + 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 32c690b76de..c2addf9dc1b 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,8 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-keyboards.md#element-transform --> - - + + @@ -45,4 +45,4 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke - + diff --git a/core/tests/unit/ldml/keyboards/k_010_mt.xml b/core/tests/unit/ldml/keyboards/k_010_mt.xml index c0734ac1809..3253c1f0957 100644 --- a/core/tests/unit/ldml/keyboards/k_010_mt.xml +++ b/core/tests/unit/ldml/keyboards/k_010_mt.xml @@ -10,9 +10,9 @@ Gets part of the way, Based on mt.xml from CLDR. 'TODO-LDML' denotes modifications. Note this is the 47-key version. --> - + - + @@ -93,4 +93,4 @@ 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 f572bac9ec6..30378708cf4 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,8 @@ Exact copy of mt.xml from CLDR, but with: - an updated DTD path - test case --> - - + + @@ -90,4 +90,4 @@ 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 04066ae220b..99cbe4bd6f7 100644 --- a/core/tests/unit/ldml/keyboards/k_020_fr-test.xml +++ b/core/tests/unit/ldml/keyboards/k_020_fr-test.xml @@ -1,7 +1,7 @@ - - + + @@ -20,4 +20,4 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_020_fr.xml b/core/tests/unit/ldml/keyboards/k_020_fr.xml index 1f6fc2c32f1..843ad80ede4 100644 --- a/core/tests/unit/ldml/keyboards/k_020_fr.xml +++ b/core/tests/unit/ldml/keyboards/k_020_fr.xml @@ -1,7 +1,7 @@ - - + + @@ -195,4 +195,4 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_100_keytest.xml b/core/tests/unit/ldml/keyboards/k_100_keytest.xml index 80766204949..0078ed9c269 100644 --- a/core/tests/unit/ldml/keyboards/k_100_keytest.xml +++ b/core/tests/unit/ldml/keyboards/k_100_keytest.xml @@ -5,8 +5,8 @@ @@expected: \u0061 --> - - + + @@ -23,4 +23,4 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_101_keytest.xml b/core/tests/unit/ldml/keyboards/k_101_keytest.xml index f3ef3fbdceb..827fe9cd9dd 100644 --- a/core/tests/unit/ldml/keyboards/k_101_keytest.xml +++ b/core/tests/unit/ldml/keyboards/k_101_keytest.xml @@ -4,8 +4,8 @@ @@keys: [K_BKQUOTE] @@expected: \u0061 --> - - + + @@ -26,4 +26,4 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_102_keytest.xml b/core/tests/unit/ldml/keyboards/k_102_keytest.xml index f541fbfd7ba..3f379fd76b8 100644 --- a/core/tests/unit/ldml/keyboards/k_102_keytest.xml +++ b/core/tests/unit/ldml/keyboards/k_102_keytest.xml @@ -5,8 +5,8 @@ @@expected: \u0061 --> - - + + @@ -19,4 +19,4 @@ - + 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 d23862ca2bb..d8fc776ac99 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,6 +1,6 @@ - - + + @@ -54,4 +54,4 @@ - + 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 8df0d5ffd7c..061b40c8826 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,8 @@ see https://keyman.com/keyboards/sil_boonkit --> - - + + @@ -46,4 +46,4 @@ - + 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 9853a3dca6f..5d7fdb51bd6 100644 --- a/core/tests/unit/ldml/keyboards/k_210_marker-test.xml +++ b/core/tests/unit/ldml/keyboards/k_210_marker-test.xml @@ -1,6 +1,6 @@ - - + + @@ -43,4 +43,4 @@ - + diff --git a/core/tests/unit/ldml/keyboards/k_210_marker.xml b/core/tests/unit/ldml/keyboards/k_210_marker.xml index 80f4559a27c..1635ce0a2a6 100644 --- a/core/tests/unit/ldml/keyboards/k_210_marker.xml +++ b/core/tests/unit/ldml/keyboards/k_210_marker.xml @@ -4,8 +4,8 @@ Test Keyboard --> - - + + @@ -50,4 +50,4 @@ - + diff --git a/developer/src/inst/download.in.mak b/developer/src/inst/download.in.mak index bed37b413ff..eeadd67ac0a 100644 --- a/developer/src/inst/download.in.mak +++ b/developer/src/inst/download.in.mak @@ -127,7 +127,7 @@ make-kmcomp-install-zip: copy-schemas # TODO: are these required? # kpj.schema.json kvks.schema.json \ -# ldml-keyboard.schema.json ldml-keyboardtest.schema.json \ +# ldml-keyboard3.schema.json ldml-keyboardtest3.schema.json \ copy-schemas: copy $(KEYMAN_ROOT)\common\schemas\keyboard_info\keyboard_info.source.json $(DEVELOPER_ROOT)\bin diff --git a/developer/src/kmc-ldml/src/compiler/disp.ts b/developer/src/kmc-ldml/src/compiler/disp.ts index 8f6d65d79b7..77c9609876a 100644 --- a/developer/src/kmc-ldml/src/compiler/disp.ts +++ b/developer/src/kmc-ldml/src/compiler/disp.ts @@ -27,8 +27,8 @@ export class DispCompiler extends SectionCompiler { const tos = new Set(); const ids = new Set(); - if (this.keyboard.displays?.display) { - for (const { to, id } of this.keyboard.displays?.display) { + if (this.keyboard3.displays?.display) { + for (const { to, id } of this.keyboard3.displays?.display) { if ((to && id) || (!to && !id)) { this.callbacks.reportMessage(CompilerMessages.Error_DisplayNeedsToOrId({ to, id })); return false; @@ -57,12 +57,12 @@ export class DispCompiler extends SectionCompiler { let result = new Disp(); // displayOptions - result.baseCharacter = sections.strs.allocAndUnescapeString(this.keyboard.displays?.displayOptions?.baseCharacter); + result.baseCharacter = sections.strs.allocAndUnescapeString(this.keyboard3.displays?.displayOptions?.baseCharacter); // TODO-LDML: substitute variables! // displays - result.disps = this.keyboard.displays?.display.map(display => ({ + result.disps = this.keyboard3.displays?.display.map(display => ({ to: sections.strs.allocAndUnescapeString(sections.vars.substituteMarkerString(display.to)), id: sections.strs.allocString(display.id), // not escaped, not substituted display: sections.strs.allocAndUnescapeString(display.display), diff --git a/developer/src/kmc-ldml/src/compiler/keymanweb-compiler.ts b/developer/src/kmc-ldml/src/compiler/keymanweb-compiler.ts index 0087e1356d1..542cbc7d8f3 100644 --- a/developer/src/kmc-ldml/src/compiler/keymanweb-compiler.ts +++ b/developer/src/kmc-ldml/src/compiler/keymanweb-compiler.ts @@ -73,13 +73,13 @@ export class LdmlKeyboardKeymanWebCompiler { // `${tab}${this.setupDebug()}${nl}` + ? we may use this for modifierBitmask in future // `${tab}this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;${nl}` + ? we probably don't need this, it's for back-compat `${tab}this.KI="${sName}";${nl}` + - `${tab}this.KN=${JSON.stringify(source.keyboard.names.name[0])};${nl}` + + `${tab}this.KN=${JSON.stringify(source.keyboard3.names.name[0])};${nl}` + `${tab}this.KMINVER=${JSON.stringify(MINIMUM_KMW_VERSION)};${nl}` + `${tab}this.KV=${this.compileVisualKeyboard(source)};${nl}` + `${tab}this.KDU=${displayUnderlying ? '1' : '0'};${nl}` + `${tab}this.KH="";${nl}` + // TODO-LDML: help text not supported `${tab}this.KM=0;${nl}` + // TODO-LDML: mnemonic layout not supported for LDML keyboards - `${tab}this.KBVER=${JSON.stringify(source.keyboard.version?.number || '0.0')};${nl}` + + `${tab}this.KBVER=${JSON.stringify(source.keyboard3.version?.number || '0.0')};${nl}` + `${tab}this.KMBM=${modifierBitmask};${nl}`; if(isRTL) { @@ -111,4 +111,4 @@ export class LdmlKeyboardKeymanWebCompiler { result += `}${nl}`; return result; } -} \ No newline at end of file +} diff --git a/developer/src/kmc-ldml/src/compiler/keys.ts b/developer/src/kmc-ldml/src/compiler/keys.ts index 5301c93bee0..652b584d0ff 100644 --- a/developer/src/kmc-ldml/src/compiler/keys.ts +++ b/developer/src/kmc-ldml/src/compiler/keys.ts @@ -30,15 +30,15 @@ export class KeysCompiler extends SectionCompiler { * @returns just the non-touch layers. */ public hardwareLayers() { - return this.keyboard.layers?.filter(({ form }) => form !== "touch"); + return this.keyboard3.layers?.filter(({ form }) => form !== "touch"); } public validate() { let valid = true; // general key-level validation here, only of used keys - const usedKeys = allUsedKeyIdsInLayers(this.keyboard?.layers); - const uniqueKeys = calculateUniqueKeys([...this.keyboard.keys?.key]); + const usedKeys = allUsedKeyIdsInLayers(this.keyboard3?.layers); + const uniqueKeys = calculateUniqueKeys([...this.keyboard3.keys?.key]); for (let key of uniqueKeys) { const { id, flicks } = key; if (!usedKeys.has(id)) { @@ -48,7 +48,7 @@ export class KeysCompiler extends SectionCompiler { if (!flicks) { continue; // no flicks } - const flickEntry = this.keyboard.keys?.flicks?.find( + const flickEntry = this.keyboard3.keys?.flicks?.find( (x) => x.id === flicks ); if (!flickEntry) { @@ -80,7 +80,7 @@ export class KeysCompiler extends SectionCompiler { public compile(sections: DependencySections): Keys { /* c8 ignore next 4 */ - if (!this.keyboard?.keys?.key && !this.keyboard?.keys?.flicks) { + if (!this.keyboard3?.keys?.key && !this.keyboard3?.keys?.flicks) { // short-circuit if no keys or flicks. Doesn't happen in practice due to implied import. return null; } @@ -114,7 +114,7 @@ export class KeysCompiler extends SectionCompiler { } public loadFlicks(sections: DependencySections, sect: Keys) { - for (let lkflicks of this.keyboard.keys.flicks) { + for (let lkflicks of this.keyboard3.keys.flicks) { let flicks: KeysFlicks = new KeysFlicks( sections.strs.allocString(lkflicks.id) ); @@ -142,8 +142,8 @@ export class KeysCompiler extends SectionCompiler { } public loadKeys(sections: DependencySections, sect: Keys) { - const usedKeys = allUsedKeyIdsInLayers(this.keyboard?.layers); - const uniqueKeys = calculateUniqueKeys([...this.keyboard.keys?.key]); + const usedKeys = allUsedKeyIdsInLayers(this.keyboard3?.layers); + const uniqueKeys = calculateUniqueKeys([...this.keyboard3.keys?.key]); for (let key of uniqueKeys) { if (!usedKeys.has(key.id)) { @@ -227,7 +227,7 @@ export class KeysCompiler extends SectionCompiler { valid = false; } - const uniqueKeys = calculateUniqueKeys([...this.keyboard.keys?.key]); + const uniqueKeys = calculateUniqueKeys([...this.keyboard3.keys?.key]); if (layer.row.length > keymap.length) { this.callbacks.reportMessage( CompilerMessages.Error_HardwareLayerHasTooManyRows() @@ -300,7 +300,7 @@ export class KeysCompiler extends SectionCompiler { // TODO-LDML: we already validated that the key exists, above. // So here we only need the ID? - // let keydef = this.keyboard.keys?.key?.find(x => x.id == key); + // let keydef = this.keyboard3.keys?.key?.find(x => x.id == key); sect.kmap.push({ vkey: keymap[y][x], diff --git a/developer/src/kmc-ldml/src/compiler/layr.ts b/developer/src/kmc-ldml/src/compiler/layr.ts index e0be7a6f5eb..281ca8d5db9 100644 --- a/developer/src/kmc-ldml/src/compiler/layr.ts +++ b/developer/src/kmc-ldml/src/compiler/layr.ts @@ -22,7 +22,7 @@ export class LayrCompiler extends SectionCompiler { let totalLayerCount = 0; let hardwareLayers = 0; // let touchLayers = 0; - this.keyboard.layers?.forEach((layers) => { + this.keyboard3.layers?.forEach((layers) => { const { form } = layers; if (form === 'touch') { // touchLayers++; @@ -62,7 +62,7 @@ export class LayrCompiler extends SectionCompiler { public compile(sections: DependencySections): Layr { const sect = new Layr(); - sect.lists = this.keyboard.layers.map((layers) => { + sect.lists = this.keyboard3.layers.map((layers) => { const hardware = constants.layr_list_hardware_map.get(layers.form); // Already validated in validate const list: LayrList = { diff --git a/developer/src/kmc-ldml/src/compiler/loca.ts b/developer/src/kmc-ldml/src/compiler/loca.ts index a57a8224ae7..84be9e0bbf4 100644 --- a/developer/src/kmc-ldml/src/compiler/loca.ts +++ b/developer/src/kmc-ldml/src/compiler/loca.ts @@ -24,7 +24,7 @@ export class LocaCompiler extends SectionCompiler { public validate(): boolean { let valid = true; - const locales = this.getLocales(this.keyboard); + const locales = this.getLocales(this.keyboard3); for(let tag of locales) { try { new Intl.Locale(tag); @@ -46,7 +46,7 @@ export class LocaCompiler extends SectionCompiler { // This also minimizes locales according to Remove Likely Subtags algorithm: // https://www.unicode.org/reports/tr35/#Likely_Subtags - const sourceLocales = this.getLocales(this.keyboard); + const sourceLocales = this.getLocales(this.keyboard3); const locales = sourceLocales.map((sourceLocale: string) => { const locale = new Intl.Locale(sourceLocale).minimize().toString(); if(locale != sourceLocale) { diff --git a/developer/src/kmc-ldml/src/compiler/meta.ts b/developer/src/kmc-ldml/src/compiler/meta.ts index 2606692d99a..187a2ca9511 100644 --- a/developer/src/kmc-ldml/src/compiler/meta.ts +++ b/developer/src/kmc-ldml/src/compiler/meta.ts @@ -20,8 +20,8 @@ export class MetaCompiler extends SectionCompiler { public validate(): boolean { let valid = true; - valid &&= this.validateNormalization(this.keyboard.info?.normalization); - valid &&= this.validateVersion(this.keyboard.version?.number); + valid &&= this.validateNormalization(this.keyboard3.info?.normalization); + valid &&= this.validateVersion(this.keyboard3.version?.number); return valid; } @@ -53,16 +53,16 @@ export class MetaCompiler extends SectionCompiler { public compile(sections: DependencySections): Meta { let result = new Meta(); - result.author = sections.strs.allocString(this.keyboard.info?.author); - result.conform = sections.strs.allocString(this.keyboard.conformsTo); - result.layout = sections.strs.allocString(this.keyboard.info?.layout); - result.normalization = sections.strs.allocString(this.keyboard.info?.normalization); - result.indicator = sections.strs.allocString(this.keyboard.info?.indicator); - result.version = sections.strs.allocString(this.keyboard.version?.number ?? "0.0.0"); + result.author = sections.strs.allocString(this.keyboard3.info?.author); + result.conform = sections.strs.allocString(this.keyboard3.conformsTo); + result.layout = sections.strs.allocString(this.keyboard3.info?.layout); + result.normalization = sections.strs.allocString(this.keyboard3.info?.normalization); + result.indicator = sections.strs.allocString(this.keyboard3.info?.indicator); + result.version = sections.strs.allocString(this.keyboard3.version?.number ?? "0.0.0"); result.settings = - (this.keyboard.settings?.fallback == "omit" ? KeyboardSettings.fallback : 0) | - (this.keyboard.settings?.transformFailure == "omit" ? KeyboardSettings.transformFailure : 0) | - (this.keyboard.settings?.transformPartial == "hide" ? KeyboardSettings.transformPartial : 0); + (this.keyboard3.settings?.fallback == "omit" ? KeyboardSettings.fallback : 0) | + (this.keyboard3.settings?.transformFailure == "omit" ? KeyboardSettings.transformFailure : 0) | + (this.keyboard3.settings?.transformPartial == "hide" ? KeyboardSettings.transformPartial : 0); return result; } } diff --git a/developer/src/kmc-ldml/src/compiler/name.ts b/developer/src/kmc-ldml/src/compiler/name.ts index 21307cbc00c..138732ae30c 100644 --- a/developer/src/kmc-ldml/src/compiler/name.ts +++ b/developer/src/kmc-ldml/src/compiler/name.ts @@ -13,13 +13,13 @@ export class NameCompiler extends SectionCompiler { public validate(): boolean { let valid = true; - valid = (this.keyboard.names?.name?.length ?? 0) > 0; + valid = (this.keyboard3.names?.name?.length ?? 0) > 0; return valid; } public compile(sections: DependencySections): Name { let result = new Name(); - result.names = this.keyboard.names?.name?.map(v => sections.strs.allocString(v.value)) ?? []; + result.names = this.keyboard3.names?.name?.map(v => sections.strs.allocString(v.value)) ?? []; return result; } } diff --git a/developer/src/kmc-ldml/src/compiler/section-compiler.ts b/developer/src/kmc-ldml/src/compiler/section-compiler.ts index 9e187fafe62..8744059f7bd 100644 --- a/developer/src/kmc-ldml/src/compiler/section-compiler.ts +++ b/developer/src/kmc-ldml/src/compiler/section-compiler.ts @@ -3,11 +3,11 @@ import { SectionIdent, constants } from '@keymanapp/ldml-keyboard-constants'; /* istanbul ignore next */ export class SectionCompiler { - protected readonly keyboard: LDMLKeyboard.LKKeyboard; + protected readonly keyboard3: LDMLKeyboard.LKKeyboard; protected readonly callbacks: CompilerCallbacks; constructor(source: LDMLKeyboard.LDMLKeyboardXMLSourceFile, callbacks: CompilerCallbacks) { - this.keyboard = source.keyboard; + this.keyboard3 = source.keyboard3; this.callbacks = callbacks; } diff --git a/developer/src/kmc-ldml/src/compiler/touch-layout-compiler.ts b/developer/src/kmc-ldml/src/compiler/touch-layout-compiler.ts index 311f2137495..19ac78f13cf 100644 --- a/developer/src/kmc-ldml/src/compiler/touch-layout-compiler.ts +++ b/developer/src/kmc-ldml/src/compiler/touch-layout-compiler.ts @@ -10,7 +10,7 @@ export class TouchLayoutCompiler { layer: [] }; - for(let layers of source.keyboard.layers) { + for(let layers of source.keyboard3.layers) { for(let layer of layers.layer) { const resultLayer = this.compileHardwareLayer(source, result, layer); result.desktop.layer.push(resultLayer); @@ -41,7 +41,7 @@ export class TouchLayoutCompiler { const keys = row.keys.split(' '); for(let key of keys) { - const keydef = source.keyboard.keys?.key?.find(x => x.id == key); + const keydef = source.keyboard3.keys?.key?.find(x => x.id == key); if(keydef) { const fileKey: TouchLayout.TouchLayoutKey = { id: this.translateKeyIdentifierToTouch(keydef.id) as TouchLayout.TouchLayoutKeyId, @@ -106,4 +106,4 @@ export class TouchLayoutCompiler { // Not a standard key return 'T_'+id; } -} \ No newline at end of file +} diff --git a/developer/src/kmc-ldml/src/compiler/tran.ts b/developer/src/kmc-ldml/src/compiler/tran.ts index fa1f828622a..9f39e302ef3 100644 --- a/developer/src/kmc-ldml/src/compiler/tran.ts +++ b/developer/src/kmc-ldml/src/compiler/tran.ts @@ -41,7 +41,7 @@ export class TransformCompiler type); if (!verifyValidAndUnique(types, @@ -167,7 +167,7 @@ export class TransformCompiler x.id == key); + let keydef = source.keyboard3.keys?.key?.find(x => x.id == key); if (!keydef) { throw Error(`Internal Error: could not find key id="${key}" in layer "${layer.id || ''}", row "${y}"`); diff --git a/developer/src/kmc-ldml/src/compiler/vkey.ts b/developer/src/kmc-ldml/src/compiler/vkey.ts index 2d6d44d9d01..1c4c69403be 100644 --- a/developer/src/kmc-ldml/src/compiler/vkey.ts +++ b/developer/src/kmc-ldml/src/compiler/vkey.ts @@ -14,10 +14,10 @@ export class VkeyCompiler extends SectionCompiler { public validate(): boolean { let valid = true; - if(this.keyboard.vkeys) { + if(this.keyboard3.vkeys) { let from: string[] = [], to: string[] = []; - this.keyboard.vkeys.vkey.forEach(vk => { + this.keyboard3.vkeys.vkey.forEach(vk => { if(LdmlVkeyNames[vk.from] === undefined) { // TODO-LDML: When we do #7135 this may need to change back to an error. this.callbacks.reportMessage(CompilerMessages.Hint_VkeyIsNotValid({vkey: vk.from})); @@ -51,12 +51,12 @@ export class VkeyCompiler extends SectionCompiler { public compile(): Vkey { let result = new Vkey(); - if(!this.keyboard.vkeys) { + if(!this.keyboard3.vkeys) { /* c8 ignore next 2 */ return result; // not hit due to boxing } - result.vkeys = this.keyboard.vkeys?.vkey.map(vk => { + result.vkeys = this.keyboard3.vkeys?.vkey.map(vk => { return { vkey: LdmlVkeyNames[vk.from], target: LdmlVkeyNames[vk.to] diff --git a/developer/src/kmc-ldml/test/fixtures/basic.xml b/developer/src/kmc-ldml/test/fixtures/basic.xml index 15266ceb663..9c45f5e07fc 100644 --- a/developer/src/kmc-ldml/test/fixtures/basic.xml +++ b/developer/src/kmc-ldml/test/fixtures/basic.xml @@ -4,8 +4,8 @@ @@keys: [K_Q][K_W][K_Q] @@expected: \u0127\u1790\u17B6\u0127 --> - - + + @@ -65,4 +65,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/bksp/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/bksp/minimal.xml index 6de012b33a1..cdff4b37fa3 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/bksp/minimal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/bksp/minimal.xml @@ -1,7 +1,7 @@ - - + + @@ -13,4 +13,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/disp/escaped.xml b/developer/src/kmc-ldml/test/fixtures/sections/disp/escaped.xml index 56508009fda..d934eb83993 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/disp/escaped.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/disp/escaped.xml @@ -1,7 +1,7 @@ - - + + @@ -11,4 +11,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-both.xml b/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-both.xml index 9554fcd9b61..4c2be92e499 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-both.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-both.xml @@ -1,7 +1,7 @@ - - + + @@ -10,4 +10,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-dupid.xml b/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-dupid.xml index 8766cbd6c69..20cda7475f7 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-dupid.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-dupid.xml @@ -1,7 +1,7 @@ - - + + @@ -12,4 +12,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-dupto.xml b/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-dupto.xml index 3f4c264cece..0018f0a5d95 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-dupto.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-dupto.xml @@ -1,7 +1,7 @@ - - + + @@ -12,4 +12,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-none.xml b/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-none.xml index ce5cd689e73..fd05facbaa6 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-none.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/disp/invalid-none.xml @@ -1,7 +1,7 @@ - - + + @@ -10,4 +10,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/disp/maximal.xml b/developer/src/kmc-ldml/test/fixtures/sections/disp/maximal.xml index 22fb293a692..1a698edddbb 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/disp/maximal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/disp/maximal.xml @@ -1,7 +1,7 @@ - - + + @@ -12,4 +12,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/disp/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/disp/minimal.xml index feb599c825f..23ff75e29b1 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/disp/minimal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/disp/minimal.xml @@ -1,10 +1,10 @@ - - + + - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/disp/options-only.xml b/developer/src/kmc-ldml/test/fixtures/sections/disp/options-only.xml index c030909cc91..e2b98695216 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/disp/options-only.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/disp/options-only.xml @@ -1,7 +1,7 @@ - - + + @@ -9,4 +9,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/disp/typical.xml b/developer/src/kmc-ldml/test/fixtures/sections/disp/typical.xml index 935225e214f..78ab408dece 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/disp/typical.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/disp/typical.xml @@ -1,7 +1,7 @@ - - + + @@ -9,4 +9,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/finl/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/finl/minimal.xml index b9d5176bc12..6ed96310297 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/finl/minimal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/finl/minimal.xml @@ -1,7 +1,7 @@ - - + + @@ -13,4 +13,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/keys/escaped.xml b/developer/src/kmc-ldml/test/fixtures/sections/keys/escaped.xml index d0a968927b3..6caeda0dfdd 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/keys/escaped.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/keys/escaped.xml @@ -1,7 +1,7 @@ - - + + @@ -34,4 +34,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/keys/escaped2.xml b/developer/src/kmc-ldml/test/fixtures/sections/keys/escaped2.xml index fee8847897b..63a4384260a 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/keys/escaped2.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/keys/escaped2.xml @@ -1,7 +1,7 @@ - - + + @@ -16,4 +16,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/keys/gap-switch.xml b/developer/src/kmc-ldml/test/fixtures/sections/keys/gap-switch.xml index 4cba4320e4b..9734a7cf828 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/keys/gap-switch.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/keys/gap-switch.xml @@ -1,7 +1,7 @@ - - + + @@ -23,4 +23,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/keys/hardware.xml b/developer/src/kmc-ldml/test/fixtures/sections/keys/hardware.xml index fc282c7a6c0..2c23b582c3e 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/keys/hardware.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/keys/hardware.xml @@ -1,7 +1,7 @@ - - + + @@ -23,4 +23,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/keys/hardware_iso.xml b/developer/src/kmc-ldml/test/fixtures/sections/keys/hardware_iso.xml index 84afa0dddbb..6c9e5e47081 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/keys/hardware_iso.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/keys/hardware_iso.xml @@ -1,7 +1,7 @@ - - + + @@ -19,4 +19,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/keys/hardware_us.xml b/developer/src/kmc-ldml/test/fixtures/sections/keys/hardware_us.xml index 8182e8c3f00..35be4e6ee3d 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/keys/hardware_us.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/keys/hardware_us.xml @@ -1,7 +1,7 @@ - - + + @@ -19,4 +19,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-bad-modifier.xml b/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-bad-modifier.xml index 77f2ff39d10..8bb9f69513c 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-bad-modifier.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-bad-modifier.xml @@ -1,7 +1,7 @@ - - + + @@ -14,4 +14,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-hardware-too-many-keys.xml b/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-hardware-too-many-keys.xml index 6c2f01a0857..59abe6c9bfd 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-hardware-too-many-keys.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-hardware-too-many-keys.xml @@ -1,7 +1,7 @@ - - + + @@ -30,4 +30,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-hardware-too-many-rows.xml b/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-hardware-too-many-rows.xml index f868fb3db39..5c6cc4ae4f7 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-hardware-too-many-rows.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-hardware-too-many-rows.xml @@ -1,7 +1,7 @@ - - + + @@ -22,4 +22,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-key-missing-attrs.xml b/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-key-missing-attrs.xml index 98e2131b5da..53af177744d 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-key-missing-attrs.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-key-missing-attrs.xml @@ -1,7 +1,7 @@ - - + + @@ -16,4 +16,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-missing-flick.xml b/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-missing-flick.xml index 4bce8aa31d2..0ccd239239f 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-missing-flick.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-missing-flick.xml @@ -1,7 +1,7 @@ - - + + @@ -20,4 +20,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-undefined-key.xml b/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-undefined-key.xml index 65a86838ee4..5d030c29297 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-undefined-key.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/keys/invalid-undefined-key.xml @@ -1,7 +1,7 @@ - - + + @@ -15,4 +15,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/keys/markers.xml b/developer/src/kmc-ldml/test/fixtures/sections/keys/markers.xml index b911be97600..42b7013bd86 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/keys/markers.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/keys/markers.xml @@ -1,7 +1,7 @@ - - + + @@ -24,6 +24,6 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/keys/maximal.xml b/developer/src/kmc-ldml/test/fixtures/sections/keys/maximal.xml index 61554e8dd97..6c9b983fbd6 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/keys/maximal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/keys/maximal.xml @@ -1,7 +1,7 @@ - - + + @@ -34,4 +34,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/keys/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/keys/minimal.xml index d8f9a64bff2..801524e65f9 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/keys/minimal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/keys/minimal.xml @@ -1,7 +1,7 @@ - - + + @@ -17,4 +17,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-invalid-form.xml b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-invalid-form.xml index 064a59df80f..9758cf8bbd6 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-invalid-form.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-invalid-form.xml @@ -1,7 +1,7 @@ - - + + @@ -17,4 +17,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-hardware.xml b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-hardware.xml index 8d1c63e8010..4be11f26047 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-hardware.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-hardware.xml @@ -1,7 +1,7 @@ - - + + @@ -17,4 +17,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer.xml b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer.xml index 0a2cdf06105..f0ca747ae79 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer.xml @@ -1,7 +1,7 @@ - - + + @@ -14,4 +14,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer2.xml b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer2.xml index dd08e40e580..062e745dd18 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer2.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer2.xml @@ -1,11 +1,11 @@ - - + + - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-multi-hardware.xml b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-multi-hardware.xml index dadef48404d..644b8d452fd 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-multi-hardware.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-multi-hardware.xml @@ -1,7 +1,7 @@ - - + + @@ -24,4 +24,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/loca/invalid-locale.xml b/developer/src/kmc-ldml/test/fixtures/sections/loca/invalid-locale.xml index 1644742c733..0661d9a021a 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/loca/invalid-locale.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/loca/invalid-locale.xml @@ -1,9 +1,9 @@ - - + + - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/loca/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/loca/minimal.xml index 7ca838be6fd..4fe10cba2a4 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/loca/minimal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/loca/minimal.xml @@ -1,10 +1,10 @@ - - + + - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/loca/multiple.xml b/developer/src/kmc-ldml/test/fixtures/sections/loca/multiple.xml index 30d00bea2e1..a6363c35332 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/loca/multiple.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/loca/multiple.xml @@ -1,7 +1,7 @@ - - + + @@ -15,4 +15,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-normalization.xml b/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-normalization.xml index 13723cbb2e2..ffb1befffec 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-normalization.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-normalization.xml @@ -1,7 +1,7 @@ - - + + @@ -9,4 +9,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-1.0.xml b/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-1.0.xml index f7246e40cbb..9e2536ba751 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-1.0.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-1.0.xml @@ -1,7 +1,7 @@ - - + + @@ -9,4 +9,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-v1.0.3.xml b/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-v1.0.3.xml index dd6e292345c..04ecb5a656b 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-v1.0.3.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-v1.0.3.xml @@ -1,7 +1,7 @@ - - + + @@ -9,4 +9,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/meta/maximal.xml b/developer/src/kmc-ldml/test/fixtures/sections/meta/maximal.xml index f42d892e91c..06f56ebbb03 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/meta/maximal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/meta/maximal.xml @@ -1,7 +1,7 @@ - - + + @@ -13,4 +13,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/meta/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/meta/minimal.xml index 9de105e868e..e523031e53a 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/meta/minimal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/meta/minimal.xml @@ -1,10 +1,10 @@ - - + + - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/name/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/name/minimal.xml index 7181aa65f31..f1e4914e99f 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/name/minimal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/name/minimal.xml @@ -1,10 +1,10 @@ - - + + - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/name/multiple.xml b/developer/src/kmc-ldml/test/fixtures/sections/name/multiple.xml index 8838c4b4a6b..8f4fd6d72f7 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/name/multiple.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/name/multiple.xml @@ -1,7 +1,7 @@ - - + + @@ -12,4 +12,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/ordr/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/ordr/minimal.xml index c29f6621cb6..e019298c24d 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/ordr/minimal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/ordr/minimal.xml @@ -1,7 +1,7 @@ - - + + @@ -14,4 +14,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/ordr/multi-escape.xml b/developer/src/kmc-ldml/test/fixtures/sections/ordr/multi-escape.xml index 754d8fc0032..6d27dc48e32 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/ordr/multi-escape.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/ordr/multi-escape.xml @@ -1,6 +1,6 @@ - - + + @@ -12,4 +12,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/ordr/nod-Lana.xml b/developer/src/kmc-ldml/test/fixtures/sections/ordr/nod-Lana.xml index be2da524692..1053655c9d8 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/ordr/nod-Lana.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/ordr/nod-Lana.xml @@ -1,6 +1,6 @@ - - + + @@ -18,4 +18,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-duplicate-type.xml b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-duplicate-type.xml index ac26d5b1759..ec268acfe30 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-duplicate-type.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-duplicate-type.xml @@ -1,7 +1,7 @@ - - + + @@ -18,4 +18,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-empty.xml b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-empty.xml index ec295a4261e..61d3ab896ab 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-empty.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-empty.xml @@ -1,7 +1,7 @@ - - + + @@ -19,4 +19,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-duplicate-type.xml b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-duplicate-type.xml index 3cf5de19823..15d3b5dcb03 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-duplicate-type.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-duplicate-type.xml @@ -1,7 +1,7 @@ - - + + @@ -18,4 +18,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-type.xml b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-type.xml index e881965f668..9fc7f7c3f55 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-type.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-type.xml @@ -1,7 +1,7 @@ - - + + @@ -13,4 +13,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-mixed.xml b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-mixed.xml index 56f962e52d7..d16e55fd4e5 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-mixed.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-mixed.xml @@ -1,7 +1,7 @@ - - + + @@ -14,4 +14,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/tran/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/tran/minimal.xml index d93ef22dd57..a5392f596e9 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/tran/minimal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/tran/minimal.xml @@ -1,7 +1,7 @@ - - + + @@ -16,4 +16,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/tran/tran-vars.xml b/developer/src/kmc-ldml/test/fixtures/sections/tran/tran-vars.xml index 383ecd43867..676d281f970 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/tran/tran-vars.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/tran/tran-vars.xml @@ -1,7 +1,7 @@ - - + + @@ -26,4 +26,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/dup0.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/dup0.xml index 6cd9fdf987b..12c27067306 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/dup0.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/dup0.xml @@ -1,7 +1,7 @@ - - + + @@ -17,4 +17,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/dup1.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/dup1.xml index e5d53b507b0..a5bef8196f6 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/dup1.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/dup1.xml @@ -1,7 +1,7 @@ - - + + @@ -18,4 +18,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-0.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-0.xml index af37a292da1..be94255504f 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-0.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-0.xml @@ -1,7 +1,7 @@ - - + + @@ -14,4 +14,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-1.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-1.xml index ec687e7bf08..45b7670a809 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-1.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-1.xml @@ -1,7 +1,7 @@ - - + + @@ -14,4 +14,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-2.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-2.xml index dc4e143a8f9..656faf0cd0f 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-2.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-2.xml @@ -1,7 +1,7 @@ - - + + @@ -14,4 +14,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-3.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-3.xml index c0a100ceb25..628148a8219 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-3.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-3.xml @@ -1,7 +1,7 @@ - - + + @@ -14,4 +14,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-4.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-4.xml index 6fcca4d0e0d..c05a8ec6535 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-4.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-4.xml @@ -1,7 +1,7 @@ - - + + @@ -16,4 +16,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-5.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-5.xml index 161c69154a0..82721d834bf 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-5.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-5.xml @@ -1,7 +1,7 @@ - - + + @@ -14,4 +14,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-6.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-6.xml index 2b24b4c71e6..dbe9deb07cc 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-6.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-6.xml @@ -1,7 +1,7 @@ - - + + @@ -13,4 +13,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-markers-badref-0.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-markers-badref-0.xml index fd63c36b025..cdfaf3f3245 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-markers-badref-0.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-markers-badref-0.xml @@ -4,8 +4,8 @@ This will fail because the two markers given don't exist anywhere. --> - - + + @@ -40,4 +40,4 @@ This will fail because the two markers given don't exist anywhere. - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props1.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props1.xml index c7930181d3b..110af579409 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props1.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props1.xml @@ -1,7 +1,7 @@ - - + + @@ -14,4 +14,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props2.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props2.xml index 761c2251c3a..5c03b0d682a 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props2.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props2.xml @@ -1,7 +1,7 @@ - - + + @@ -13,4 +13,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-strings.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-strings.xml index a207df13f15..5d691f3d4b2 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-strings.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-strings.xml @@ -1,7 +1,7 @@ - - + + @@ -13,4 +13,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-syntax.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-syntax.xml index 0fd29f5babb..9ed1b08c9a7 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-syntax.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-syntax.xml @@ -1,7 +1,7 @@ - - + + @@ -13,4 +13,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/markers-maximal.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/markers-maximal.xml index cbe36d4db1c..345e70d8f4a 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/markers-maximal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/markers-maximal.xml @@ -8,8 +8,8 @@ into something testable for implementation. --> - - + + @@ -41,4 +41,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/maximal.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/maximal.xml index 1747026a767..89d32d89db7 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/maximal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/maximal.xml @@ -1,7 +1,7 @@ - - + + @@ -18,4 +18,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/minimal.xml index 1113008dc68..6e6a3ab02e1 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vars/minimal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/minimal.xml @@ -1,7 +1,7 @@ - - + + @@ -16,4 +16,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vkey/invalid-from-vkey.xml b/developer/src/kmc-ldml/test/fixtures/sections/vkey/invalid-from-vkey.xml index d28c9f09d02..9ed1d1b63f1 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vkey/invalid-from-vkey.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vkey/invalid-from-vkey.xml @@ -1,7 +1,7 @@ - - + + @@ -15,4 +15,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vkey/invalid-repeated-vkey.xml b/developer/src/kmc-ldml/test/fixtures/sections/vkey/invalid-repeated-vkey.xml index 15641e6855a..36deceb4d86 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vkey/invalid-repeated-vkey.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vkey/invalid-repeated-vkey.xml @@ -1,7 +1,7 @@ - - + + @@ -13,4 +13,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vkey/invalid-to-vkey.xml b/developer/src/kmc-ldml/test/fixtures/sections/vkey/invalid-to-vkey.xml index ff475970009..58b573adc24 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vkey/invalid-to-vkey.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vkey/invalid-to-vkey.xml @@ -1,7 +1,7 @@ - - + + @@ -12,4 +12,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vkey/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/vkey/minimal.xml index 3223d311893..4af6dd30320 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vkey/minimal.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vkey/minimal.xml @@ -1,7 +1,7 @@ - - + + @@ -14,4 +14,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vkey/redundant.xml b/developer/src/kmc-ldml/test/fixtures/sections/vkey/redundant.xml index 8d5d1caf617..612d12c0146 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vkey/redundant.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vkey/redundant.xml @@ -1,7 +1,7 @@ - - + + @@ -12,4 +12,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vkey/same-target.xml b/developer/src/kmc-ldml/test/fixtures/sections/vkey/same-target.xml index 65aa1fa2a52..9dd34420eb3 100644 --- a/developer/src/kmc-ldml/test/fixtures/sections/vkey/same-target.xml +++ b/developer/src/kmc-ldml/test/fixtures/sections/vkey/same-target.xml @@ -1,7 +1,7 @@ - - + + @@ -13,4 +13,4 @@ - + diff --git a/developer/src/kmc-ldml/test/fixtures/test-fr.json b/developer/src/kmc-ldml/test/fixtures/test-fr.json index 9e3341f8243..895360dd85f 100644 --- a/developer/src/kmc-ldml/test/fixtures/test-fr.json +++ b/developer/src/kmc-ldml/test/fixtures/test-fr.json @@ -1,5 +1,5 @@ { - "keyboardTest": { + "keyboardTest3": { "conformsTo": "techpreview", "info": { "keyboard": "fr-t-k0-azerty.xml", diff --git a/developer/src/kmc-ldml/test/fixtures/test-fr.xml b/developer/src/kmc-ldml/test/fixtures/test-fr.xml index c97825385ad..e138a1b5d16 100644 --- a/developer/src/kmc-ldml/test/fixtures/test-fr.xml +++ b/developer/src/kmc-ldml/test/fixtures/test-fr.xml @@ -1,6 +1,6 @@ - - + + @@ -19,4 +19,4 @@ - + diff --git a/developer/src/kmc-ldml/test/test-dependencies.ts b/developer/src/kmc-ldml/test/test-dependencies.ts index e58fd36c55a..5171648c4a6 100644 --- a/developer/src/kmc-ldml/test/test-dependencies.ts +++ b/developer/src/kmc-ldml/test/test-dependencies.ts @@ -7,7 +7,7 @@ describe('test of section compiler dependencies', () => { const sects : Set = new Set(); for (const sect of SECTION_COMPILERS) { // construct the compiler - const c = new sect({ keyboard: null }, null); // For now, this is OK for the inspection + const c = new sect({ keyboard3: null }, null); // For now, this is OK for the inspection const id = c.id; assert.ok(id); assert.isFalse(sects.has(id), `Duplicate compiler ${id} in SECTION_COMPILERS`); diff --git a/resources/standards-data/ldml-keyboards/readme.md b/resources/standards-data/ldml-keyboards/readme.md index 188c80ec765..66f54789c08 100644 --- a/resources/standards-data/ldml-keyboards/readme.md +++ b/resources/standards-data/ldml-keyboards/readme.md @@ -12,7 +12,7 @@ Each directory contains: - `ldmlKeyboard.dtd` - the DTD file - `ldmlKeyboard.xsd` - the XSD file, automatically converted from the DTD using Visual Studio, hand tweaked as necessary -- `ldml-keyboard.schema.json` - the JSON schema file, automatically converted +- `ldml-keyboard3.schema.json` - the JSON schema file, automatically converted from the XSD using xsd2json (https://github.com/Mermade/jgeXml), hand tweaked as necessary: - change toplevel "id" to "$id" diff --git a/resources/standards-data/ldml-keyboards/techpreview/3.0/pcm.xml b/resources/standards-data/ldml-keyboards/techpreview/3.0/pcm.xml index 5796575ee85..f175fbd039a 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/3.0/pcm.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/3.0/pcm.xml @@ -1,6 +1,6 @@ - - + + @@ -55,4 +55,4 @@ - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/test/pcm-test.xml b/resources/standards-data/ldml-keyboards/techpreview/test/pcm-test.xml index 88fc500091e..8f85126acc8 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/test/pcm-test.xml +++ b/resources/standards-data/ldml-keyboards/techpreview/test/pcm-test.xml @@ -1,6 +1,6 @@ - - + + @@ -18,4 +18,4 @@ - + From f58cd50e6281c3d198e6b6ac08eb46f1b71ba642 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Tue, 19 Sep 2023 09:23:10 +0700 Subject: [PATCH 21/56] chore(web): Update background color for Android popup keys Match from styles/colors.xml https://github.com/keymanapp/keyman/blob/31fd6ea42afef1dddd7d883fc31c5086fe9ae9b2/android/KMEA/app/src/main/res/values/colors.xml#L11 --- web/src/resources/osk/kmwosk.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/resources/osk/kmwosk.css b/web/src/resources/osk/kmwosk.css index 1044d177226..029a0f74665 100644 --- a/web/src/resources/osk/kmwosk.css +++ b/web/src/resources/osk/kmwosk.css @@ -490,7 +490,7 @@ div.android div.kmw-keytip-cap { .tablet.ios #kmw-popup-keys .kmw-key{border:none;} .phone.ios #kmw-popup-keys .kmw-key{border:none;} -.phone.android #kmw-popup-keys {border:none; border-radius: 2px; background-color:#ccc; padding:5px 5px 0 0;} +.phone.android #kmw-popup-keys {border:none; border-radius: 2px; background-color:#333333; padding:5px 5px 0 0;} .tablet.android #kmw-popup-keys {border:1px solid #eee; border-radius: 3px; background-color:#888; padding:8px 12px 4px 4px;} @media (prefers-color-scheme: dark) { From 250b8a6b7d2a32b9209c1cab8b2c2155582964b2 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Tue, 19 Sep 2023 09:40:41 +0700 Subject: [PATCH 22/56] chore(android): Remove popup code --- .../KMEA/app/src/main/assets/android-host.js | 52 --- .../com/keyman/engine/KMKeyPreviewView.java | 111 ------ .../java/com/keyman/engine/KMKeyboard.java | 359 ------------------ .../keyman/engine/KMKeyboardJSHandler.java | 8 - .../engine/KMKeyboardWebViewClient.java | 72 ---- .../java/com/keyman/engine/KMManager.java | 9 - .../app/src/main/res/layout/subkey_layout.xml | 10 - .../main/res/layout/subkeys_popup_layout.xml | 19 - .../KMEA/app/src/main/res/values/colors.xml | 4 - 9 files changed, 644 deletions(-) delete mode 100644 android/KMEA/app/src/main/java/com/keyman/engine/KMKeyPreviewView.java delete mode 100644 android/KMEA/app/src/main/res/layout/subkey_layout.xml delete mode 100644 android/KMEA/app/src/main/res/layout/subkeys_popup_layout.xml diff --git a/android/KMEA/app/src/main/assets/android-host.js b/android/KMEA/app/src/main/assets/android-host.js index 61e6c70d36e..afa2825e33d 100644 --- a/android/KMEA/app/src/main/assets/android-host.js +++ b/android/KMEA/app/src/main/assets/android-host.js @@ -229,58 +229,12 @@ function updateKMSelectionRange(start, end) { } var lastKeyTip = null; -function oskCreateKeyPreview(x,y,w,h,t) { - if(lastKeyTip && - lastKeyTip.t == t && - lastKeyTip.x == x && - lastKeyTip.y == y && - lastKeyTip.w == w && - lastKeyTip.h == h) { - return; - } - lastKeyTip = {x:x,y:y,w:w,h:h,t:t}; - - fragmentToggle = (fragmentToggle + 1) % 100; - var div = document.createElement('div'); - div.innerHTML = t; - var dt = div.firstChild.nodeValue; - window.location.hash = 'showKeyPreview-'+fragmentToggle+'+x='+x+'+y='+y+'+w='+w+'+h='+h+'+t='+toHex(dt); -} - -function oskClearKeyPreview() { - lastKeyTip = null; - fragmentToggle = (fragmentToggle + 1) % 100; - window.location.hash = 'dismissKeyPreview-'+fragmentToggle; -} function signalHelpBubbleDismissal() { fragmentToggle = (fragmentToggle + 1) % 100; window.location.hash = 'helpBubbleDismissed-'+fragmentToggle; } -function oskCreatePopup(obj,x,y) { - if(obj != null) { - var i; - var s = ''; - var shift = false; - var keyPos = x.toString() + ',' + y.toString(); - for(i=0; i> subKeysList = null; - public String[] subKeysWindowPos = {"0", "0"}; - // public something-something for the suggestion. public PopupWindow suggestionMenuWindow = null; public double[] suggestionWindowPos = {0, 0}; @@ -343,8 +337,6 @@ public void run() { } public void hideKeyboard() { - dismissKeyPreview(0); - dismissSubKeysWindow(); String jsString = "hideKeyboard()"; loadJavascript(jsString); @@ -372,18 +364,11 @@ public boolean onTouchEvent(MotionEvent event) { // suggestion banner longpresses - if so, it's not yet ready for proper integration... // and would need its own rung in this if-else ladder. if (true) { - if (event.getPointerCount() > 1) { - // Multiple points touch the screen at the same time, so dismiss any pending subkeys - dismissKeyPreview(0); - dismissSubKeysWindow(); - } gestureDetector.onTouchEvent(event); } if (action == MotionEvent.ACTION_UP) { // Cleanup popups. #6636 - dismissKeyPreview(0); - dismissSubKeysWindow(); } return super.onTouchEvent(event); @@ -402,23 +387,15 @@ public void onResume() { } public void onPause() { - dismissKeyPreview(0); - dismissSubKeysWindow(); - dismissHelpBubble(); } public void onDestroy() { - dismissKeyPreview(0); - dismissSubKeysWindow(); - dismissHelpBubble(); } public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); - dismissKeyPreview(0); - dismissSubKeysWindow(); RelativeLayout.LayoutParams params = KMManager.getKeyboardLayoutParams(); this.setLayoutParams(params); @@ -436,9 +413,6 @@ public void onConfigurationChanged(Configuration newConfig) { } } - public void dismissSubKeysWindow() { - } - public void dismissSuggestionMenuWindow() { try { if (suggestionMenuWindow != null && suggestionMenuWindow.isShowing()) { @@ -946,234 +920,6 @@ public void onDismiss() { return; } - @SuppressLint({"InflateParams", "ClickableViewAccessibility"}) - private void showSubKeys(Context context) { - if (subKeysList == null || subKeysWindow != null) { - return; - } - - WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); - DisplayMetrics metrics = new DisplayMetrics(); - wm.getDefaultDisplay().getMetrics(metrics); - float density = metrics.density; - - String[] pos = subKeysWindowPos; - int x = (int) (Float.valueOf(pos[0]) * density); - int y = (int) (Float.valueOf(pos[1]) * density); - - // Calculate desired size for subkey display, # of rows/cols, etc. - int kbWidth = getWidth(); - float pvWidth, pvHeight; - - float margin = getResources().getDimension(R.dimen.popup_margin); - int padding = getResources().getDimensionPixelSize(R.dimen.popup_padding); - int rows, columns; - float buttonWidth = getResources().getDimension(R.dimen.key_width); - float buttonHeight = getResources().getDimension(R.dimen.key_height); - float arrowWidth = getResources().getDimension(R.dimen.popup_arrow_width); - float arrowHeight = getResources().getDimension(R.dimen.popup_arrow_height); - float offset_y = getResources().getDimension(R.dimen.popup_offset_y); - - //int orientation = getResources().getConfiguration().orientation; - //columns = (orientation == Configuration.ORIENTATION_PORTRAIT)?6:10; - columns = (int) ((getWidth() - margin) / (buttonWidth + margin)); - int subKeysCount = subKeysList.size(); - if (subKeysCount <= columns) { - rows = 1; - pvWidth = (subKeysCount * (buttonWidth + padding)) + 2 * margin + padding; - pvHeight = (buttonHeight + padding) + 2 * margin + padding + arrowHeight; - } else { - rows = (subKeysCount / columns); - if (subKeysCount % columns > 0) { - rows++; - } - - if (subKeysCount % rows == 0) { - columns = subKeysCount / rows; - } else { - int s = (columns * rows - subKeysCount) / 2; - columns -= s / (rows - 1); - } - - pvWidth = (columns * (buttonWidth + padding)) + 2 * margin + padding; - pvHeight = (rows * (buttonHeight + padding)) + 2 * margin + padding + arrowHeight; - } - - // Construct from resources. - LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - View contentView = inflater.inflate(R.layout.subkeys_popup_layout, null, false); - - // Configure the popover view with desired size and construct its popup "arrow." - KMPopoverView popoverView = (KMPopoverView) contentView.findViewById(R.id.kmPopoverView); - popoverView.setSize((int) pvWidth, (int) pvHeight); - popoverView.setArrowSize(arrowWidth, arrowHeight); - - float px = x - pvWidth / 2.0f; - float py = y + offset_y - pvHeight; - if (px < 0) { - px = 0; - } else if ((px + pvWidth) > kbWidth) { - px = kbWidth - pvWidth; - } - - if (px == 0) { - popoverView.setArrowPosX(x); - } else if (px == (kbWidth - pvWidth)) { - popoverView.setArrowPosX(x - px); - } else { - popoverView.setArrowPosX(pvWidth / 2.0f); - } - - popoverView.redraw(); - - // Add needed subkeys to the popup view. - GridLayout grid = (GridLayout) contentView.findViewById(R.id.grid); - grid.setColumnCount(columns); - - for (int i = 0; i < subKeysCount; i++) { - Button button = (Button) inflater.inflate(R.layout.subkey_layout, null); - button.setId(i + 1); - button.setLayoutParams(new FrameLayout.LayoutParams((int) buttonWidth, (int) buttonHeight)); - // May as well set them here, keeping them in a closure than a prone-to-change field. - // Helps keep things from totally breaking when the event handler triggering subkey menu - // generation and the menu's event handler stop talking to each other. - final ArrayList> subkeyList = subKeysList; - button.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - int index = v.getId() - 1; - String keyId = subkeyList.get(index).get("keyId"); - String keyText = getSubkeyText(keyId, subkeyList.get(index).get("keyText")); - String jsFormat = "executePopupKey('%s','%s')"; - String jsString = KMString.format(jsFormat, keyId, keyText); - loadJavascript(jsString); - } - }); - button.setClickable(false); - - // Show existing text for subkeys. If subkey text is blank, get from id - String kId = subKeysList.get(i).get("keyId"); - String kText = getSubkeyText(kId, subKeysList.get(i).get("keyText")); - String title = convertKeyText(kText); - - // Disable Android's default uppercasing transformation on buttons. - button.setTransformationMethod(null); - button.setText(title); - - if (!specialOskFont.isEmpty()) { - button.setTypeface(KMManager.getFontTypeface(context, specialOSKFontFilename(specialOskFont))); - } else { - Typeface font = KMManager.getFontTypeface(context, (oskFont != null) ? oskFontFilename() : textFontFilename()); - if (font != null) { - button.setTypeface(font); - } else { - button.setTypeface(Typeface.SANS_SERIF); - } - } - - FrameLayout frame = new FrameLayout(context); - frame.setPadding(padding, padding, 0, 0); - frame.addView(button); - grid.addView(frame); - } - - grid.setOnTouchListener(new OnTouchListener() { - @SuppressLint("ClickableViewAccessibility") - @Override - public boolean onTouch(View v, MotionEvent event) { - int action = event.getAction(); - int tx = (int) event.getRawX(); - int ty = (int) event.getRawY(); - - if (action == MotionEvent.ACTION_UP) { - int count = ((ViewGroup) v).getChildCount(); - for (int i = 0; i < count; i++) { - FrameLayout frame = (FrameLayout) ((ViewGroup) v).getChildAt(i); - Button button = (Button) frame.getChildAt(0); - if (button.isPressed()) { - button.performClick(); - break; - } - } - dismissSubKeysWindow(); - return true; - } else if (action == MotionEvent.ACTION_MOVE) { - int count = ((ViewGroup) v).getChildCount(); - for (int i = 0; i < count; i++) { - FrameLayout frame = (FrameLayout) ((ViewGroup) v).getChildAt(i); - Button button = (Button) frame.getChildAt(0); - int[] pos = new int[2]; - button.getLocationOnScreen(pos); - Rect rect = new Rect(); - button.getDrawingRect(rect); - rect.offset(pos[0], pos[1]); - if (rect.contains(tx, ty)) { - button.setPressed(true); - } else { - button.setPressed(false); - } - } - return true; - } else if (action == MotionEvent.ACTION_DOWN) { - // Must return true if we want the others to properly process if and when this handler - // becomes decoupled from the keyboard's touch handler. - return true; - } - return false; - } - }); - - // Now to finalize the actual window. - subKeysWindow = new PopupWindow(contentView, (int) pvWidth, (int) pvHeight, false); - subKeysWindow.setTouchable(true); - subKeysWindow.setOnDismissListener(new OnDismissListener() { - @Override - public void onDismiss() { - subKeysList = null; - subKeysWindow = null; - String jsString = "popupVisible(0)"; - loadJavascript(jsString); - } - }); - - int posX, posY; - if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) { - int[] kbPos = new int[2]; - KMKeyboard.this.getLocationOnScreen(kbPos); - posX = (int) px; - posY = kbPos[1] + (int) py; - } else { - int[] kbPos = new int[2]; - KMKeyboard.this.getLocationInWindow(kbPos); - posX = (int) px; - posY = kbPos[1] + (int) py; - } - - dismissHelpBubble(); - this.setShouldShowHelpBubble(false); - dismissKeyPreview(0); - //subKeysWindow.setAnimationStyle(R.style.PopupAnim); - - // And now to actually display it. - subKeysWindow.showAtLocation(KMKeyboard.this, Gravity.TOP | Gravity.LEFT, posX, posY); - String jsString = "popupVisible(1)"; - loadJavascript(jsString); - } - - // Attempt to get the subkey text. - // If the subkey popup text is empty, parse the ID - private String getSubkeyText(String keyID, String keyText) { - String text = keyText; - if (text.isEmpty()) { - if(keyID.indexOf("U_") != -1 && keyID.indexOf("+") != -1 ) { - // Chop off any appended '+____' portion of the key ID. - keyID = keyID.substring(0, keyID.indexOf("+")); - } - text = keyID.replaceAll("U_", "\\\\u"); - } - return text; - } - /** * Take a font JSON object and adjust to pass to JS * 1. Replace "source" keys for "files" keys @@ -1233,111 +979,6 @@ private JSONObject makeFontPaths(String font) { return null; } - @SuppressLint("InflateParams") - protected void showKeyPreview(Context context, int px, int py, RectF baseKeyFrame, String text) { - WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); - DisplayMetrics metrics = new DisplayMetrics(); - wm.getDefaultDisplay().getMetrics(metrics); - float density = metrics.density; - - if (keyPreviewWindow != null && keyPreviewWindow.isShowing()) { - View contentView = keyPreviewWindow.getContentView(); - KMKeyPreviewView keyPreview = (KMKeyPreviewView) contentView.findViewById(R.id.kmKeyPreviewView); - TextView textView = (TextView) contentView.findViewById(R.id.textView1); - textView.setText(text); - Typeface font = KMManager.getFontTypeface(context, (oskFont != null) ? oskFontFilename() : textFontFilename()); - if (font != null) { - textView.setTypeface(font); - } else { - textView.setTypeface(Typeface.SANS_SERIF); - } - - int w = (int)getResources().getDimension(R.dimen.key_width); - int h = (int)getResources().getDimension(R.dimen.key_height); - RectF frame = keyPreview.setKeySize(w, h); - keyPreview.redraw(); - - float offset_y = getResources().getDimension(R.dimen.popup_offset_y); - int posX, posY; - if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) { - int[] kbPos = new int[2]; - KMKeyboard.this.getLocationOnScreen(kbPos); - posX = (int) (px * density - frame.width() / 2.0f); - posY = kbPos[1] + (int) (py * density - frame.height() + offset_y); - } else { - int[] kbPos = new int[2]; - KMKeyboard.this.getLocationInWindow(kbPos); - posX = (int) (px * density - frame.width() / 2.0f); - posY = kbPos[1] + (int) (py * density - frame.height() + offset_y); - } - - keyPreviewWindow.update(posX, posY, (int) frame.width(), (int) frame.height()); - return; - } - - LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - View contentView = inflater.inflate(R.layout.key_preview_layout, null, false); - KMKeyPreviewView keyPreview = (KMKeyPreviewView) contentView.findViewById(R.id.kmKeyPreviewView); - TextView textView = (TextView) contentView.findViewById(R.id.textView1); - textView.setText(text); - Typeface font = KMManager.getFontTypeface(context, (oskFont != null) ? oskFontFilename() : textFontFilename()); - if (font != null) { - textView.setTypeface(font); - } else { - textView.setTypeface(Typeface.SANS_SERIF); - } - - int w = (int)getResources().getDimension(R.dimen.key_width); - int h = (int)getResources().getDimension(R.dimen.key_height); - RectF frame = keyPreview.setKeySize(w, h); - keyPreview.redraw(); - keyPreviewWindow = new PopupWindow(contentView, (int) frame.width(), (int) frame.height(), false); - keyPreviewWindow.setTouchable(true); - keyPreviewWindow.setOnDismissListener(new OnDismissListener() { - @Override - public void onDismiss() { - keyPreviewWindow = null; - } - }); - - float offset_y = getResources().getDimension(R.dimen.popup_offset_y); - int posX, posY; - if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) { - int[] kbPos = new int[2]; - KMKeyboard.this.getLocationOnScreen(kbPos); - posX = (int) (px * density - frame.width() / 2.0f); - posY = kbPos[1] + (int) (py * density - frame.height() + offset_y); - } else { - int[] kbPos = new int[2]; - KMKeyboard.this.getLocationInWindow(kbPos); - posX = (int) (px * density - frame.width() / 2.0f); - posY = kbPos[1] + (int) (py * density - frame.height() + offset_y); - } - - dismissHelpBubble(); - this.setShouldShowHelpBubble(false); - //keyPreviewWindow.setAnimationStyle(R.style.KeyPreviewAnim); - if (keyPreviewWindow != null) { - keyPreviewWindow.showAtLocation(KMKeyboard.this, Gravity.TOP | Gravity.LEFT, posX, posY); - } - } - - protected void dismissKeyPreview(long delay) { - // dismiss after delay - Handler handler = new Handler(); - handler.postDelayed(new Runnable() { - @Override - public void run() { - try { - if (keyPreviewWindow != null && keyPreviewWindow.isShowing()) - keyPreviewWindow.dismiss(); - } catch (Exception e) { - KMLog.LogException(TAG, "", e); - } - } - }, delay); - } - protected void showHelpBubble() { if(keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM) { return; // Help bubble is disabled for System-wide keyboard diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardJSHandler.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardJSHandler.java index 2e939d15ba9..6c959b0056c 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardJSHandler.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardJSHandler.java @@ -92,10 +92,6 @@ public void run() { return; } - if (k.subKeysWindow != null) { - return; - } - if (!isInappKMTextViewValid(k.keyboardType)) { return; } @@ -204,10 +200,6 @@ public void run() { return; } - if (k.subKeysWindow != null) { - return; - } - if (!isInappKMTextViewValid(k.keyboardType)) { return; } diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardWebViewClient.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardWebViewClient.java index 7ea366f0d12..e7188a94f96 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardWebViewClient.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardWebViewClient.java @@ -163,78 +163,6 @@ public boolean shouldOverrideUrlLoading(WebView view, String url) { // The user has begun interacting with the keyboard; we'll disable the help bubble // for the rest of the lifetime of this keyboard instance. kmKeyboard.setShouldShowHelpBubble(false); - } else if (url.indexOf("showKeyPreview") >= 0) { - String deviceType = context.getResources().getString(R.string.device_type); - if (deviceType.equals("AndroidTablet")) { - return false; - } - - if (kmKeyboard.subKeysWindow != null) { - return false; - } - - int start = url.indexOf("x=") + 2; - int end = url.indexOf("+y="); - float x = Float.valueOf(url.substring(start, end)); - - start = url.indexOf("y=") + 2; - end = url.indexOf("+w="); - float y = Float.valueOf(url.substring(start, end)); - - start = url.indexOf("w=") + 2; - end = url.indexOf("+h="); - float w = Float.valueOf(url.substring(start, end)); - - start = url.indexOf("h=") + 2; - end = url.indexOf("+t="); - float h = Float.valueOf(url.substring(start, end)); - - start = url.indexOf("t=") + 2; - String t = url.substring(start); - String text = kmKeyboard.convertKeyText(t); - - float left = x - w / 2.0f; - float right = left + w; - float top = y - 1; - float bottom = top + h; - - RectF keyFrame = new RectF(left, top, right, bottom); - kmKeyboard.showKeyPreview(context, (int) x, (int) y, keyFrame, text); - } else if (url.indexOf("dismissKeyPreview") >= 0) { - kmKeyboard.dismissKeyPreview(100); - } else if (url.indexOf("showMore") >= 0) { - if (kmKeyboard.subKeysWindow != null && kmKeyboard.subKeysWindow.isShowing()) { - return false; - } - - int start = url.indexOf("keyPos=") + 7; - int end = url.indexOf("+keys="); - kmKeyboard.subKeysWindowPos = url.substring(start, end).split("\\,"); - - start = end + 6; - end = url.indexOf("+font="); - if (end < 0) { - end = url.length(); - kmKeyboard.specialOskFont = ""; - } else { - kmKeyboard.specialOskFont = KMManager.KMFilename_Osk_Ttf_Font; - } - - String keys = url.substring(start, end); - - String[] keyList = keys.split("\\;"); - int klCount = keyList.length; - kmKeyboard.subKeysList = new ArrayList>(); - for (int i = 0; i < klCount; i++) { - String[] values = keyList[i].split("\\:"); - String keyId = (values.length > 0) ? values[0] : ""; - String keyText = (values.length > 1) ? values[1] : ""; - - HashMap hashMap = new HashMap(); - hashMap.put("keyId", keyId); - hashMap.put("keyText", keyText); - kmKeyboard.subKeysList.add(hashMap); - } } else if (url.indexOf("refreshBannerHeight") >= 0) { int start = url.indexOf("change=") + 7; String change = url.substring(start); diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java index 6777de81339..cbcb28053a1 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java @@ -2153,15 +2153,6 @@ private static boolean isLocked() { * @param keyboardType KeyboardType KEYBOARD_TYPE_INAPP or KEYBOARD_TYPE_SYSTEM */ public static void handleGlobeKeyAction(Context context, boolean globeKeyDown, KeyboardType keyboardType) { - // Clear preview and subkeys - if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) { - InAppKeyboard.dismissKeyPreview(0); - InAppKeyboard.dismissSubKeysWindow(); - } else if (keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM) { - SystemKeyboard.dismissKeyPreview(0); - SystemKeyboard.dismissSubKeysWindow(); - } - // Update globeKeyState if (globeKeyState != GlobeKeyState.GLOBE_KEY_STATE_LONGPRESS) { globeKeyState = globeKeyDown ? GlobeKeyState.GLOBE_KEY_STATE_DOWN : GlobeKeyState.GLOBE_KEY_STATE_UP; diff --git a/android/KMEA/app/src/main/res/layout/subkey_layout.xml b/android/KMEA/app/src/main/res/layout/subkey_layout.xml deleted file mode 100644 index 547400e3d07..00000000000 --- a/android/KMEA/app/src/main/res/layout/subkey_layout.xml +++ /dev/null @@ -1,10 +0,0 @@ - - diff --git a/android/KMEA/app/src/main/res/layout/subkeys_popup_layout.xml b/android/KMEA/app/src/main/res/layout/subkeys_popup_layout.xml deleted file mode 100644 index 4cdd7356fd3..00000000000 --- a/android/KMEA/app/src/main/res/layout/subkeys_popup_layout.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - diff --git a/android/KMEA/app/src/main/res/values/colors.xml b/android/KMEA/app/src/main/res/values/colors.xml index 86ce5e004ec..497d9ca3500 100644 --- a/android/KMEA/app/src/main/res/values/colors.xml +++ b/android/KMEA/app/src/main/res/values/colors.xml @@ -6,9 +6,5 @@ #ff282828 #ff000000 #ff282828 - - #ff838383 - #ff333333 - #ff737373 From 07854ef6116d5acab962add3f62311535e4aa08c Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Tue, 19 Sep 2023 10:35:10 +0700 Subject: [PATCH 23/56] chore(oem/fv/android): Update Gradle to 7.4 --- oem/firstvoices/android/app/build.gradle | 4 ++-- oem/firstvoices/android/build.gradle | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/oem/firstvoices/android/app/build.gradle b/oem/firstvoices/android/app/build.gradle index d03c5634ae7..646152a81a8 100644 --- a/oem/firstvoices/android/app/build.gradle +++ b/oem/firstvoices/android/app/build.gradle @@ -1,7 +1,7 @@ plugins { id 'com.android.application' id 'io.sentry.android.gradle' - id 'com.github.triplet.play' version '3.7.0-agp4.2' apply false + id 'com.github.triplet.play' version '3.8.1' apply false } ext.rootPath = '../../../../android' @@ -121,7 +121,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.6.0-rc01' implementation 'com.google.android.material:material:1.6.0' api(name: 'keyman-engine', ext: 'aar') - implementation 'io.sentry:sentry-android:6.9.0' + implementation 'io.sentry:sentry-android:6.9.2' implementation 'androidx.preference:preference:1.2.0' } diff --git a/oem/firstvoices/android/build.gradle b/oem/firstvoices/android/build.gradle index ecbb2b0fccb..50f3647165c 100644 --- a/oem/firstvoices/android/build.gradle +++ b/oem/firstvoices/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.2.2' + classpath 'com.android.tools.build:gradle:7.4.0' classpath 'io.sentry:sentry-android-gradle-plugin:2.1.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files From d1c12c4e57018cc5ca8df9eb42cc759ffaf741fd Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Tue, 19 Sep 2023 11:37:59 +0700 Subject: [PATCH 24/56] chore(android/engine): Remove key preview layout --- .../main/res/layout/key_preview_layout.xml | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 android/KMEA/app/src/main/res/layout/key_preview_layout.xml diff --git a/android/KMEA/app/src/main/res/layout/key_preview_layout.xml b/android/KMEA/app/src/main/res/layout/key_preview_layout.xml deleted file mode 100644 index bb03d58347b..00000000000 --- a/android/KMEA/app/src/main/res/layout/key_preview_layout.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - From e76936fcecf7680882a3f312abdf799b819200e6 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Tue, 19 Sep 2023 14:58:46 +0700 Subject: [PATCH 25/56] fix(web): Revert buildEmbeddedGestureConfig Per review comments --- web/src/app/webview/src/keymanEngine.ts | 1 + web/src/app/webview/src/oskConfiguration.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/web/src/app/webview/src/keymanEngine.ts b/web/src/app/webview/src/keymanEngine.ts index c22943d6b1d..1cc7f08248a 100644 --- a/web/src/app/webview/src/keymanEngine.ts +++ b/web/src/app/webview/src/keymanEngine.ts @@ -69,6 +69,7 @@ export default class KeymanEngine extends KeymanEngineBase Date: Tue, 19 Sep 2023 10:23:00 +0200 Subject: [PATCH 26/56] chore(linux): make `--report` an option instead of action This addresses code review comments. --- docs/settings/linux/tasks.json | 4 ++-- linux/ibus-keyman/build.sh | 13 +++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/settings/linux/tasks.json b/docs/settings/linux/tasks.json index c5f2d063614..891c8b5d154 100644 --- a/docs/settings/linux/tasks.json +++ b/docs/settings/linux/tasks.json @@ -172,7 +172,7 @@ "command": "./build.sh", "args": [ "test", - "report", + "--report", "--debug", "--coverage", "--no-integration" @@ -181,7 +181,7 @@ "cwd": "${workspaceFolder}/linux/ibus-keyman/", }, "group": "build", - "detail": "create unit test coverage" + "detail": "run tests and create unit test coverage report" }, { "type": "shell", diff --git a/linux/ibus-keyman/build.sh b/linux/ibus-keyman/build.sh index ecb6bd5e089..9f9de96488d 100755 --- a/linux/ibus-keyman/build.sh +++ b/linux/ibus-keyman/build.sh @@ -19,9 +19,9 @@ builder_describe \ "test" \ "install install artifacts" \ "uninstall uninstall artifacts" \ - "report create coverage report" \ "@/core:arch" \ "--no-integration don't run integration tests" \ + "--report create coverage report" \ "--coverage capture test coverage" builder_parse "$@" @@ -76,6 +76,10 @@ if builder_start_action test; then else meson test --print-errorlogs $builder_verbose fi + if builder_has_option --coverage; then + # Note: requires lcov > 1.16 to properly work (see https://github.com/mesonbuild/meson/issues/6747) + ninja coverage-html + fi builder_finish_action success test fi @@ -90,10 +94,3 @@ if builder_start_action uninstall; then ninja uninstall builder_finish_action success uninstall fi - -if builder_start_action report; then - cd "$THIS_SCRIPT_PATH/$MESON_PATH" - # Note: requires lcov > 1.16 to properly work (see https://github.com/mesonbuild/meson/issues/6747) - ninja coverage-html - builder_finish_action success report -fi From 8bf0ac094aae8c27f926f17b5c7c1758a88f5183 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Tue, 19 Sep 2023 15:26:20 +0700 Subject: [PATCH 27/56] chore(web): More cleanup --- web/src/app/webview/src/keymanEngine.ts | 89 -------------- .../app/webview/src/osk/subkeyDelegator.ts | 116 ------------------ 2 files changed, 205 deletions(-) delete mode 100644 web/src/app/webview/src/osk/subkeyDelegator.ts diff --git a/web/src/app/webview/src/keymanEngine.ts b/web/src/app/webview/src/keymanEngine.ts index 1cc7f08248a..5774c4edb62 100644 --- a/web/src/app/webview/src/keymanEngine.ts +++ b/web/src/app/webview/src/keymanEngine.ts @@ -8,7 +8,6 @@ import { WebviewConfiguration, WebviewInitOptionDefaults, WebviewInitOptionSpec import ContextManager from './contextManager.js'; import PassthroughKeyboard from './passthroughKeyboard.js'; import { buildEmbeddedGestureConfig, setupEmbeddedListeners } from './oskConfiguration.js'; -import { SubkeyDelegator } from './osk/subkeyDelegator.js'; export default class KeymanEngine extends KeymanEngineBase { // Ideally, we would be able to auto-detect `sourceUri`: https://stackoverflow.com/a/60244278. @@ -92,53 +91,6 @@ export default class KeymanEngine extends KeymanEngineBase void = null; hideKeyboard?: () => void = null; diff --git a/web/src/app/webview/src/osk/subkeyDelegator.ts b/web/src/app/webview/src/osk/subkeyDelegator.ts deleted file mode 100644 index 30289e8aee5..00000000000 --- a/web/src/app/webview/src/osk/subkeyDelegator.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { type ActiveKey, type KeyEvent } from '@keymanapp/keyboard-processor'; - -import { - type InputEventCoordinate, - type KeyElement, - type OSKKeySpec, - RealizedGesture, - VisualKeyboard -} from 'keyman/engine/osk'; - -/** - * As the subkey popup view is handled by the host app when in embedded mode - * within our Android app, this class represents the fact that KMW has - * "delegated" subkey UI and selection to the host app. Hence, "Delegator", - * rather than "Popup". - * - * The `resolve` method should be triggered, in some fashion, by the host app - * whenever the user has completed their longpress, potentially selecting - * a subkey. - * - * This class will also track the ongoing touch event in case the base key is - * reselected, which _is_ managed by this class, not the host app. - */ -export class SubkeyDelegator implements RealizedGesture { - private resolver: (keyEvent: KeyEvent) => void; - private readonly vkbd: VisualKeyboard; - - public readonly baseKey: KeyElement; - public readonly promise: Promise; - - private movedFromBaseKey: boolean = false; - private baseKeySelected: boolean = false; - - constructor(vkbd: VisualKeyboard, e: KeyElement) { - this.vkbd = vkbd; - - let _this = this; - this.promise = new Promise(function(resolve) { - _this.resolver = resolve; - }); - - this.baseKey = e; - } - - /** - * Resolves the ongoing longpress -> subkey gesture, fulfilling this - * `SubkeyDelegator`'s `promise` of a `KeyEvent`. - * - * If no subkey is selected but the original base key is, `resolve(null)` - * will return a key event corresponding to the base key. - * - * @param keyCoreID {string} The 'core ID' (id + modifier layer) of - * a selected subkey. May be `null`. - */ - public resolve(keyCoreID: string) { - if(this.resolver) { - let keyEvent: KeyEvent = null; - - if(keyCoreID == null && this.baseKeySelected) { - // Handle selection of base key underneath the subkey array. - keyEvent = this.vkbd.keyEventFromSpec(this.baseKey.key.spec as ActiveKey, null); - this.baseKey.key.highlight(false); - } else if(keyCoreID != null) { - // This is set with the base key of our current subkey elsewhere within the engine. - let baseKey: OSKKeySpec = this.baseKey.key.spec; - let selectedKey: OSKKeySpec; - - if(baseKey.coreID == keyCoreID) { - selectedKey = baseKey; - } else { - // ... yeah, there are some funky type shenanigans between the two. - // OSKKeySpec is the OSK's... reinterpretation of the ActiveKey type. - selectedKey = (baseKey as ActiveKey).getSubkey(keyCoreID) as OSKKeySpec; - } - - if(!selectedKey) { - // While we can't complete successfully, the subkey operation is done; we - // should still signal that and update related gesture state management. - this.resolver(null); - console.error("Could not find subkey '" + keyCoreID + "' under base key '" + baseKey.coreID + "'!"); - return; - } - - keyEvent = this.vkbd.keyEventFromSpec(selectedKey as ActiveKey, null); - keyEvent.vkCode=keyEvent.Lcode; - } // else /* if(keyCoreID == null) */ keyEvent = null; // As initialized at the top. - - this.resolver(keyEvent); - } - this.resolver = null; - } - - public isVisible(): boolean { - return true; - } - - public clear() { - // no-op; it's fully controlled on the app side. - } - - /** - * Allows this class to detect if the user may have changed their mind and - * re-selected the base key. - * @param touch - */ - updateTouch(input: InputEventCoordinate) { - this.baseKeySelected = this.baseKey.key.isUnderTouch(input); - - // Prevent highlighting & selection before the touch has moved from the base key. - if(this.movedFromBaseKey) { - this.baseKey.key.highlight(this.baseKeySelected); - } else { - this.movedFromBaseKey = !this.baseKeySelected; - } - } -} \ No newline at end of file From 807a11b0daff57d32979dbdf5e1aeb7240d2687b Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Tue, 19 Sep 2023 14:02:45 -0400 Subject: [PATCH 28/56] auto: increment master version to 17.0.177 --- HISTORY.md | 6 ++++++ VERSION.md | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index f2bd7ab3dff..05c7adad0a2 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,11 @@ # Keyman Version History +## 17.0.176 alpha 2023-09-19 + +* chore(oem/fv/android): Update Gradle to 7.4 (#9590) +* refactor(linux): Rename defines to clarify purpose ️ (#9584) +* (#9560) + ## 17.0.175 alpha 2023-09-18 * chore(linux): Split startup process (#9570) diff --git a/VERSION.md b/VERSION.md index dd9aca5084d..67199519cfa 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -17.0.176 \ No newline at end of file +17.0.177 \ No newline at end of file From 5a0c1a38a09047ff7e45a4bfc0b3b35dcd5b1378 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Wed, 20 Sep 2023 13:51:27 +0700 Subject: [PATCH 29/56] Update android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java Co-authored-by: Marc Durdin --- .../KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java index ca17c879cf1..6471e875101 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java @@ -363,9 +363,7 @@ public boolean onTouchEvent(MotionEvent event) { // Come to think of it, I wonder if suggestionMenuWindow was work being done to link with // suggestion banner longpresses - if so, it's not yet ready for proper integration... // and would need its own rung in this if-else ladder. - if (true) { - gestureDetector.onTouchEvent(event); - } + gestureDetector.onTouchEvent(event); if (action == MotionEvent.ACTION_UP) { // Cleanup popups. #6636 From 20149b6a2ff2fb03e18ce90280ab93bf350efe03 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 20 Sep 2023 08:52:13 +0200 Subject: [PATCH 30/56] chore(linux): Remove obsolete code Addresses code review comment. --- linux/ibus-keyman/build.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/linux/ibus-keyman/build.sh b/linux/ibus-keyman/build.sh index 9f9de96488d..bc136546d63 100755 --- a/linux/ibus-keyman/build.sh +++ b/linux/ibus-keyman/build.sh @@ -26,9 +26,6 @@ builder_describe \ builder_parse "$@" -builder_describe_internal_dependency \ - report:engine test:engine - if builder_is_debug_build; then MESON_TARGET=debug export CPPFLAGS=-DG_MESSAGES_DEBUG From 98660fef562ed2eed904e53b5fca568928a5f74f Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Wed, 20 Sep 2023 14:22:12 +0700 Subject: [PATCH 31/56] chore(web): Cleanup embeddedGestureConfig Remove createKeyTip and startLongpress --- web/src/engine/osk/src/config/embeddedGestureConfig.ts | 2 -- web/src/engine/osk/src/visualKeyboard.ts | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/web/src/engine/osk/src/config/embeddedGestureConfig.ts b/web/src/engine/osk/src/config/embeddedGestureConfig.ts index bf36498b6ee..57f756d7717 100644 --- a/web/src/engine/osk/src/config/embeddedGestureConfig.ts +++ b/web/src/engine/osk/src/config/embeddedGestureConfig.ts @@ -6,6 +6,4 @@ import VisualKeyboard from "../visualKeyboard.js"; export default interface EmbeddedGestureConfig { createGlobeHint?: (vkbd: VisualKeyboard) => GlobeHint; - createKeyTip?: (vkbd: VisualKeyboard) => KeyTip; - startLongpress?: (vkbd: VisualKeyboard, key: KeyElement) => PendingGesture; } \ No newline at end of file diff --git a/web/src/engine/osk/src/visualKeyboard.ts b/web/src/engine/osk/src/visualKeyboard.ts index 2a649d8e313..d450c661a09 100644 --- a/web/src/engine/osk/src/visualKeyboard.ts +++ b/web/src/engine/osk/src/visualKeyboard.ts @@ -1711,10 +1711,6 @@ export default class VisualKeyboard extends EventEmitter implements Ke * @returns */ startLongpress(key: KeyElement): PendingGesture { - if(this.config.embeddedGestureConfig.startLongpress) { - return this.config.embeddedGestureConfig.startLongpress(this, key); - } - // First-level object/Promise: will produce a subkey popup when the longpress gesture completes. // 'Returns' a second-level object/Promise: resolves when a subkey is selected or is cancelled. let pendingLongpress = new InternalPendingLongpress(this, key); @@ -1895,9 +1891,7 @@ export default class VisualKeyboard extends EventEmitter implements Ke * Create a key preview element for phone devices */ createKeyTip() { - if(this.config.embeddedGestureConfig.createKeyTip) { - this.keytip = this.config.embeddedGestureConfig.createKeyTip(this); - } else if (this.device.formFactor == 'phone') { + if(this.device.formFactor == 'phone') { if (this.keytip == null) { // For now, should only be true (in production) when keyman.isEmbedded == true. let constrainPopup = this.isEmbedded; From b764a1c965b488323f4dd461c5aa765470eda4e7 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 20 Sep 2023 11:49:53 +0200 Subject: [PATCH 32/56] fix(linux): Correctly open files linked from help page This works around the issue where browsers installed as snap package can't access files under `$HOME/.local`. Instead we now only open external links with the browser. Local non-html files we open with the default app, and links to local html file we open in webview (like we did previously with `welcome.htm` files). Fixes #9600. --- linux/keyman-config/keyman_config/welcome.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/linux/keyman-config/keyman_config/welcome.py b/linux/keyman-config/keyman_config/welcome.py index cc414df5161..d770a5a4c9c 100644 --- a/linux/keyman-config/keyman_config/welcome.py +++ b/linux/keyman-config/keyman_config/welcome.py @@ -1,6 +1,7 @@ #!/usr/bin/python3 import logging +import os import webbrowser import gi @@ -55,17 +56,25 @@ def __init__(self, parent, welcomeurl, keyboardname, newlyInstalled=False): def doc_policy(self, web_view, decision, decision_type): logging.info("Checking policy") logging.debug("received policy decision request of type: {0}".format(decision_type.value_name)) - if decision_type == WebKit2.PolicyDecisionType.NAVIGATION_ACTION or \ - decision_type == WebKit2.PolicyDecisionType.NEW_WINDOW_ACTION: + if decision_type in [ + WebKit2.PolicyDecisionType.NAVIGATION_ACTION, + WebKit2.PolicyDecisionType.NEW_WINDOW_ACTION, + ]: nav_action = decision.get_navigation_action() request = nav_action.get_request() uri = request.get_uri() logging.debug("nav request is for uri %s", uri) - if "welcome.htm" not in uri: - logging.debug("opening uri %s in webbrowser") + if not uri.startswith("file://"): + logging.debug("opening external uri %s in webbrowser", uri) webbrowser.open(uri) decision.ignore() return True + elif ".htm" not in uri: + cmd = f'xdg-open {uri}' + logging.debug('opening uri in default app: %s', cmd) + os.system(cmd) + decision.ignore() + return True return False def on_openweb_clicked(self, button): From 05063a814d2c5a4acde13a01d6e66360cccbf255 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Wed, 20 Sep 2023 14:02:50 -0400 Subject: [PATCH 33/56] auto: increment master version to 17.0.178 --- HISTORY.md | 5 +++++ VERSION.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 05c7adad0a2..8706ab6d89c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # Keyman Version History +## 17.0.177 alpha 2023-09-20 + +* chore(linux): Add coverage action to `ibus-keyman/build.sh` (#9583) +* docs(common): Fix documentation for `builder_describe_internal_dependency` (#9582) + ## 17.0.176 alpha 2023-09-19 * chore(oem/fv/android): Update Gradle to 7.4 (#9590) diff --git a/VERSION.md b/VERSION.md index 67199519cfa..981cad9c9f9 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -17.0.177 \ No newline at end of file +17.0.178 \ No newline at end of file From 0a8eec113c2ec3dd24bba49f4f140650b1d1092b Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Wed, 20 Sep 2023 17:30:23 -0500 Subject: [PATCH 34/56] =?UTF-8?q?chore(resources):=20ldml=20update=20keybo?= =?UTF-8?q?ard=20->=20keyboard3=20=F0=9F=99=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For: #9604 - unicode-org/cldr:f3daab445e2e3ee88f8b94c6b46d380777035051 - un-deleting pcm, still in progress --- .../ldml-keyboards/techpreview/cldr_info.json | 6 +++--- .../techpreview/dtd/ldmlKeyboard3.dtd | 16 ++++++++-------- .../techpreview/dtd/ldmlKeyboard3.xsd | 4 ++-- .../techpreview/dtd/ldmlKeyboardTest3.dtd | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json b/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json index f0014664bbe..601f341a251 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json +++ b/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json @@ -1,5 +1,5 @@ { - "sha": "bd40148d4c8675d0fb2db8c36cfb9f8e328250a8", - "description": "release-44-alpha3-3-gbd40148d4c", - "date": "Mon, 18 Sep 2023 23:31:25 +0000" + "sha": "f3daab445e2e3ee88f8b94c6b46d380777035051", + "description": "release-44-alpha3-4-gf3daab445e", + "date": "Wed, 20 Sep 2023 22:27:35 +0000" } diff --git a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd index 668aa1740bc..25d03368f86 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd +++ b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd @@ -93,8 +93,8 @@ Please view the subcommittee page for the most recent information. - - + + @@ -115,10 +115,10 @@ Please view the subcommittee page for the most recent information. - - + + - + @@ -139,7 +139,7 @@ Please view the subcommittee page for the most recent information. - + @@ -150,7 +150,7 @@ Please view the subcommittee page for the most recent information. - + @@ -185,7 +185,7 @@ Please view the subcommittee page for the most recent information. - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.xsd b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.xsd index 027abb8a14d..f3a7b8bed8e 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.xsd +++ b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.xsd @@ -181,7 +181,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file - + @@ -217,7 +217,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file - + diff --git a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd index f08d3b8a2b7..992e83a7559 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd +++ b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd @@ -61,7 +61,7 @@ Please see CLDR-15034 for the latest information. --> - + From 9add2cb99ce3e50562c0812b4644e20c19e143c2 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Wed, 20 Sep 2023 18:55:49 -0500 Subject: [PATCH 35/56] =?UTF-8?q?chore(core):=20ldml=20update=20keyboard?= =?UTF-8?q?=20->=20keyboard3=20=F0=9F=99=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For: #9604 - yes, C++ changes also --- core/tests/unit/ldml/ldml_test_source.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/tests/unit/ldml/ldml_test_source.cpp b/core/tests/unit/ldml/ldml_test_source.cpp index 507468efaa1..33a7e1a3d86 100644 --- a/core/tests/unit/ldml/ldml_test_source.cpp +++ b/core/tests/unit/ldml/ldml_test_source.cpp @@ -698,15 +698,15 @@ int LdmlJsonTestSourceFactory::load(const km::kbp::path &compiled, const km::kbp return __LINE__; } - auto conformsTo = data["/keyboardTest/conformsTo"_json_pointer].get(); + auto conformsTo = data["/keyboardTest3/conformsTo"_json_pointer].get(); assert_or_return(std::string(LDML_CLDR_VERSION_LATEST) == conformsTo); - auto info_keyboard = data["/keyboardTest/info/keyboard"_json_pointer].get(); - auto info_author = data["/keyboardTest/info/author"_json_pointer].get(); - auto info_name = data["/keyboardTest/info/name"_json_pointer].get(); + 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(); // TODO-LDML: store these elsewhere? std::cout << "JSON: reading " << info_name << " test of " << info_keyboard << " by " << info_author << std::endl; - auto all_tests = data["/keyboardTest/tests"_json_pointer]; + auto all_tests = data["/keyboardTest3/tests"_json_pointer]; assert_or_return((!all_tests.empty()) && (all_tests.size() > 0)); // TODO-LDML: can be empty if repertoire only? for(auto tests : all_tests) { @@ -724,7 +724,7 @@ int LdmlJsonTestSourceFactory::load(const km::kbp::path &compiled, const km::kbp } #if defined(HAVE_ICU4C) - auto rep_tests = data["/keyboardTest/repertoire"_json_pointer]; + auto rep_tests = data["/keyboardTest3/repertoire"_json_pointer]; assert_or_return((!rep_tests.empty()) && (rep_tests.size() > 0)); // TODO-LDML: can be empty if tests only? for(auto rep : rep_tests) { From 60295cef702905eeb7a2a2996f49fbaa6e79f050 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Wed, 20 Sep 2023 18:56:29 -0500 Subject: [PATCH 36/56] =?UTF-8?q?chore(core):=20ldml=20update=20keyboard?= =?UTF-8?q?=20->=20keyboard3=20=F0=9F=99=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For: #9604 - DOCTYPE fixes (typos) to make the red squiggles go away --- common/web/types/test/fixtures/test-fr.xml | 2 +- core/tests/unit/ldml/keyboards/k_001_tiny-test.xml | 2 +- core/tests/unit/ldml/keyboards/k_007_transform_rgx-test.xml | 2 +- core/tests/unit/ldml/keyboards/k_020_fr-test.xml | 2 +- core/tests/unit/ldml/keyboards/k_200_reorder_nod_Lana-test.xml | 2 +- core/tests/unit/ldml/keyboards/k_210_marker-test.xml | 2 +- developer/src/kmc-ldml/test/fixtures/test-fr.xml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/common/web/types/test/fixtures/test-fr.xml b/common/web/types/test/fixtures/test-fr.xml index e138a1b5d16..cfd63c4f758 100644 --- a/common/web/types/test/fixtures/test-fr.xml +++ b/common/web/types/test/fixtures/test-fr.xml @@ -1,5 +1,5 @@ - + 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 231523458c6..52ca6903c48 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_007_transform_rgx-test.xml b/core/tests/unit/ldml/keyboards/k_007_transform_rgx-test.xml index e6cc5ce387b..8d451467048 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_020_fr-test.xml b/core/tests/unit/ldml/keyboards/k_020_fr-test.xml index 99cbe4bd6f7..f4ac30aa9f6 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_200_reorder_nod_Lana-test.xml b/core/tests/unit/ldml/keyboards/k_200_reorder_nod_Lana-test.xml index d8fc776ac99..c5270ac868c 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_210_marker-test.xml b/core/tests/unit/ldml/keyboards/k_210_marker-test.xml index 5d7fdb51bd6..3286ac11792 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/developer/src/kmc-ldml/test/fixtures/test-fr.xml b/developer/src/kmc-ldml/test/fixtures/test-fr.xml index e138a1b5d16..cfd63c4f758 100644 --- a/developer/src/kmc-ldml/test/fixtures/test-fr.xml +++ b/developer/src/kmc-ldml/test/fixtures/test-fr.xml @@ -1,5 +1,5 @@ - + From 89eab5e0ee098c379697050e50aa56f1115f34e8 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 20 Sep 2023 19:41:13 +0200 Subject: [PATCH 37/56] chore(linux): Don't crash if error is not set --- linux/ibus-keyman/src/KeymanSystemServiceClient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/ibus-keyman/src/KeymanSystemServiceClient.cpp b/linux/ibus-keyman/src/KeymanSystemServiceClient.cpp index 90f459d1a21..635c3ff22dd 100644 --- a/linux/ibus-keyman/src/KeymanSystemServiceClient.cpp +++ b/linux/ibus-keyman/src/KeymanSystemServiceClient.cpp @@ -59,7 +59,7 @@ void KeymanSystemServiceClient::SetCapsLockIndicator(guint32 capsLock) { KEYMAN_INTERFACE_NAME, "SetCapsLockIndicator", error, &msg, "b", capsLock); if (result < 0) { g_error("%s: Failed to call method SetCapsLockIndicator: %s. %s. %s.", - __FUNCTION__, strerror(-result), error->name, error->message); + __FUNCTION__, strerror(-result), error ? error->name : "-", error ? error->message : "-"); return; } } @@ -78,7 +78,7 @@ gint32 KeymanSystemServiceClient::GetCapsLockIndicator() { KEYMAN_INTERFACE_NAME, "GetCapsLockIndicator", error, &msg, ""); if (result < 0) { g_error("%s: Failed to call method GetCapsLockIndicator: %s. %s. %s.", - __FUNCTION__, strerror(-result), error->name, error->message); + __FUNCTION__, strerror(-result), error ? error->name : "-", error ? error->message : "-"); return -1; } From c16b602865f3f8d711f583e26f7caba3c6884117 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 21 Sep 2023 10:24:51 +0200 Subject: [PATCH 38/56] chore(linux): Check existence of `services` directory When running the integration tests, we provide a test service that replaces `keyman-system-service`. DBus needs the updated `.service` files in the `services` directory so that it will use the test service. This change outputs an error and returns an non-zero exit code if it can't find the `services` directory, which usually means that `keyman-system-service` didn't get build. --- linux/ibus-keyman/tests/KmDbusTestServer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux/ibus-keyman/tests/KmDbusTestServer.cpp b/linux/ibus-keyman/tests/KmDbusTestServer.cpp index 1d4746163d5..e64a9354d8b 100644 --- a/linux/ibus-keyman/tests/KmDbusTestServer.cpp +++ b/linux/ibus-keyman/tests/KmDbusTestServer.cpp @@ -139,6 +139,11 @@ void KmDbusTestServer::Loop() int main(int argc, char *argv[]) { + if (!g_file_test(KEYMAN_TEST_SERVICE_PATH, G_FILE_TEST_IS_DIR)) { + std::cerr << "ERROR: Directory " << KEYMAN_TEST_SERVICE_PATH << " doesn't exist! Exiting." << std::endl; + return 1; + } + KmDbusTestServer testServer; testServer.Loop(); From 447bc842ae20daa7f0eba0990b13c484994dc8ea Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 21 Sep 2023 10:25:11 +0200 Subject: [PATCH 39/56] docs(linux): Update readme for ibus-keyman tests --- linux/ibus-keyman/tests/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/ibus-keyman/tests/README.md b/linux/ibus-keyman/tests/README.md index 046333be9d4..a97f85d443e 100644 --- a/linux/ibus-keyman/tests/README.md +++ b/linux/ibus-keyman/tests/README.md @@ -6,7 +6,7 @@ are stored in `~/.config/glib-2.0/settings/keyfile`. ## Running tests -The tests get run as part of building `ibus-keyman`, more specifically when running `make check`. +The tests get run as part of building `ibus-keyman`, more specifically when running `build.sh test`. ### Run all tests From b2084930aff5fd89547344f15244bc9c0a43c64a Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 21 Sep 2023 12:02:33 +0200 Subject: [PATCH 40/56] fix(linux): Fix detection of unit tests When running on Ubuntu 20.04 Focal, one of the Python dependencies loads the `unittest` module so that running `km-config` output the message that Sentry would be disabled because unit tests are running. This change now uses the callstack to check if we're running unit tests. Fixes #9577. --- linux/keyman-config/keyman_config/sentry_handling.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/linux/keyman-config/keyman_config/sentry_handling.py b/linux/keyman-config/keyman_config/sentry_handling.py index 6cff26b1a50..c3bc10e4f41 100644 --- a/linux/keyman-config/keyman_config/sentry_handling.py +++ b/linux/keyman-config/keyman_config/sentry_handling.py @@ -5,6 +5,7 @@ import os import platform import sys +import traceback from keyman_config.version import ( __version__, __versionwithtag__, @@ -47,7 +48,7 @@ def initialize_sentry(self): return (True, '') def is_sentry_enabled(self): - if 'unittest' in sys.modules.keys(): + if self._is_unit_test(): return (False, 'Running unit tests, not reporting to Sentry') elif self._get_environ_nosentry(): return (False, 'Not reporting to Sentry because KEYMAN_NOSENTRY environment variable set') @@ -75,6 +76,14 @@ def _get_environ_nosentry(self): keyman_nosentry = os.environ.get('KEYMAN_NOSENTRY') return keyman_nosentry and (int(keyman_nosentry) == 1) + def _is_unit_test(self): # sourcery skip: use-any, use-next + # The suggested refactorings (using any() or next()) don't work + # when testing on Ubuntu 20.04 + for line in traceback.format_stack(): + if '/unittest/' in line: + return True + return False + def _handle_enabled(self, enabled): if enabled: self.initialize_sentry() From 3d8cf1830bc412ec9cad92d4f7615e3d696467f2 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 20 Sep 2023 20:09:21 +0200 Subject: [PATCH 41/56] chore(linux): Add dependency to build.sh For integration tests ibus-keyman requires keyman-system-service to be built, so we add this as a dependency. --- linux/debian/rules | 12 ++++++------ linux/ibus-keyman/build.sh | 1 + linux/keyman-system-service/meson.build | 2 +- linux/scripts/reconf.sh | 5 +++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/linux/debian/rules b/linux/debian/rules index 44d0cc6dbff..1abfbf004ae 100755 --- a/linux/debian/rules +++ b/linux/debian/rules @@ -30,17 +30,17 @@ override_dh_auto_configure: --wrap-mode=nodownload --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var --libdir=lib/$(DEB_TARGET_MULTIARCH) \ --libexecdir=lib/$(DEB_TARGET_MULTIARCH) - linux/ibus-keyman/build.sh configure -- \ - --wrap-mode=nodownload --prefix=/usr --sysconfdir=/etc --localstatedir=/var linux/keyman-system-service/build.sh configure -- \ --wrap-mode=nodownload --prefix=/usr --sysconfdir=/etc --localstatedir=/var + linux/ibus-keyman/build.sh configure -- \ + --wrap-mode=nodownload --prefix=/usr --sysconfdir=/etc --localstatedir=/var linux/keyman-config/build.sh configure override_dh_auto_build: cp linux/keyman-config/resources/keyman.sharedmimeinfo debian/ core/build.sh --no-tests build:arch - linux/ibus-keyman/build.sh build linux/keyman-system-service/build.sh build + linux/ibus-keyman/build.sh build linux/keyman-config/build.sh build cd linux/keyman-config && \ sed -i -e "s/^__pkgversion__ = \"[^\"]*\"/__pkgversion__ = \"$(DEB_VERSION)\"/g" keyman_config/version.py && \ @@ -49,16 +49,16 @@ override_dh_auto_build: override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) core/build.sh --no-tests test:arch - linux/ibus-keyman/build.sh test linux/keyman-system-service/build.sh test + linux/ibus-keyman/build.sh test linux/keyman-config/build.sh test endif override_dh_auto_install: install -d $(CURDIR)/debian/tmp DESTDIR=$(CURDIR)/debian/tmp core/build.sh --no-tests install:arch - DESTDIR=$(CURDIR)/debian/tmp linux/ibus-keyman/build.sh install DESTDIR=$(CURDIR)/debian/tmp linux/keyman-system-service/build.sh install + DESTDIR=$(CURDIR)/debian/tmp linux/ibus-keyman/build.sh install # keyman-config install -d $(CURDIR)/debian/keyman/usr/share/ cp -r linux/keyman-config/locale/ $(CURDIR)/debian/keyman/usr/share/ @@ -76,8 +76,8 @@ override_dh_missing: override_dh_auto_clean: core/build.sh clean - linux/ibus-keyman/build.sh clean linux/keyman-system-service/build.sh clean + linux/ibus-keyman/build.sh clean linux/keyman-config/build.sh clean rm -rf .pybuild/ dh_auto_clean $@ diff --git a/linux/ibus-keyman/build.sh b/linux/ibus-keyman/build.sh index bc136546d63..c2c45deec15 100755 --- a/linux/ibus-keyman/build.sh +++ b/linux/ibus-keyman/build.sh @@ -20,6 +20,7 @@ builder_describe \ "install install artifacts" \ "uninstall uninstall artifacts" \ "@/core:arch" \ + "@../keyman-system-service:service" \ "--no-integration don't run integration tests" \ "--report create coverage report" \ "--coverage capture test coverage" diff --git a/linux/keyman-system-service/meson.build b/linux/keyman-system-service/meson.build index 596ba48bcd4..66da8f98914 100644 --- a/linux/keyman-system-service/meson.build +++ b/linux/keyman-system-service/meson.build @@ -1,7 +1,7 @@ project('keyman-system-service', 'c', 'cpp', version: run_command('cat', '../../VERSION.md', check: true).stdout().strip(), license: 'GPL-2+', - meson_version: '>=1.0') + meson_version: '>=0.61') evdev = dependency('libevdev', version: '>= 1.9') systemd = dependency('libsystemd') diff --git a/linux/scripts/reconf.sh b/linux/scripts/reconf.sh index 4e4f5c1b115..49dfe21b1d0 100755 --- a/linux/scripts/reconf.sh +++ b/linux/scripts/reconf.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -e +set -eu ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary @@ -17,13 +17,14 @@ echo "Found tier ${TIER}, version ${VERSION}" cd ../core ./build.sh --no-tests clean:arch configure:arch build:arch +# Building ibus-keyman will also build dependency keyman-system-service cd "$BASEDIR/ibus-keyman" ./build.sh clean configure cd "$BASEDIR/keyman-config" ./build.sh clean -cd keyman_config +cd "$BASEDIR/keyman-config/keyman_config" sed \ -e "s/_VERSION_/${VERSION}/g" \ -e "s/_VERSIONWITHTAG_/${VERSION_WITH_TAG}/g" \ From 9a0160746bb70e15a2df2ff7ac2d57e75db416fb Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 21 Sep 2023 16:35:33 +0200 Subject: [PATCH 42/56] chore(linux): Prevent warning during packaging This change updates gha-ubuntu-packaging to a version that creates a non-empty changelog entry. This prevents a warning during package build. --- .github/workflows/deb-packaging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deb-packaging.yml b/.github/workflows/deb-packaging.yml index 7106ed49b3f..2d72e017649 100644 --- a/.github/workflows/deb-packaging.yml +++ b/.github/workflows/deb-packaging.yml @@ -119,7 +119,7 @@ jobs: path: artifacts - name: Build - uses: sillsdev/gha-ubuntu-packaging@4f3a013ec28f4defc2b3d6ecb04c98815cd9de25 # v0.9 + uses: sillsdev/gha-ubuntu-packaging@1f4b7e7eacb8c82a4d874ee2c371b9bfef7e16ea # v1.0 with: dist: "${{ matrix.dist }}" platform: "${{ matrix.arch }}" From 4e4a1215ce93fc554215866bfafb2a17d3bd60c4 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 21 Sep 2023 18:54:13 +0200 Subject: [PATCH 43/56] chore(linux): Fix bug in ibus-keyman `run-tests.sh` script --- linux/ibus-keyman/tests/scripts/run-tests.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux/ibus-keyman/tests/scripts/run-tests.sh b/linux/ibus-keyman/tests/scripts/run-tests.sh index ae58705f110..00f36475776 100755 --- a/linux/ibus-keyman/tests/scripts/run-tests.sh +++ b/linux/ibus-keyman/tests/scripts/run-tests.sh @@ -86,7 +86,7 @@ function run_tests() { #shellcheck disable=SC2086 "${G_TEST_BUILDDIR:-../../build/$(arch)/${CONFIG}/tests}/ibus-keyman-tests" ${ARG_K-} ${ARG_TAP-} \ ${ARG_VERBOSE-} ${ARG_DEBUG-} ${ARG_SURROUNDING_TEXT-} ${ARG_NO_SURROUNDING_TEXT-} \ - --directory "$TESTDIR" --"${DISPLAY_SERVER}" ${TESTFILES[@]} + --directory "$TESTDIR" "${DISPLAY_SERVER}" ${TESTFILES[@]} echo "# Finished tests." cleanup "$PID_FILE" @@ -136,9 +136,9 @@ echo > "$PID_FILE" trap local_cleanup EXIT SIGINT if [ "$USE_WAYLAND" == "1" ]; then - ( run_tests wayland "$@" ) + run_tests --wayland "$@" fi if [ "$USE_X11" == "1" ]; then - ( run_tests x11 "$@" ) + run_tests --x11 "$@" fi From 90627428c4e6772dd44fe5f3bca7b717f8537382 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 21 Sep 2023 18:55:01 +0200 Subject: [PATCH 44/56] chore(linux): Debug test failures This no longer suppresses the output of cleanup. --- linux/ibus-keyman/tests/scripts/test-helper.inc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/ibus-keyman/tests/scripts/test-helper.inc.sh b/linux/ibus-keyman/tests/scripts/test-helper.inc.sh index 9ea5ffe3fc1..ef1baac8786 100755 --- a/linux/ibus-keyman/tests/scripts/test-helper.inc.sh +++ b/linux/ibus-keyman/tests/scripts/test-helper.inc.sh @@ -278,7 +278,7 @@ function cleanup() { if [ -f "$PID_FILE" ]; then echo echo "# Shutting down processes..." - bash "$PID_FILE" > /dev/null 2>&1 + bash "$PID_FILE" # > /dev/null 2>&1 rm "$PID_FILE" echo "# Finished shutdown of processes." fi From 4b8564f9c68a8248c19c77dc6c87d34da610ae4a Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Thu, 21 Sep 2023 14:05:11 -0400 Subject: [PATCH 45/56] auto: increment master version to 17.0.179 --- HISTORY.md | 5 +++++ VERSION.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 8706ab6d89c..57d9e067b14 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # Keyman Version History +## 17.0.178 alpha 2023-09-21 + +* fix(linux): Correctly open files linked from help page (#9601) +* chore(linux): Fix bugs, add dependency and update documentation (#9602) + ## 17.0.177 alpha 2023-09-20 * chore(linux): Add coverage action to `ibus-keyman/build.sh` (#9583) diff --git a/VERSION.md b/VERSION.md index 981cad9c9f9..bf6655df8c0 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -17.0.178 \ No newline at end of file +17.0.179 \ No newline at end of file From 4f8226431cc3544225b3036a54157074c09cea20 Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Fri, 22 Sep 2023 10:37:42 +0700 Subject: [PATCH 46/56] chore(web): builds outputting to publish folder now clean it, too --- web/src/app/browser/build.sh | 7 ++++++- web/src/app/ui/build.sh | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/web/src/app/browser/build.sh b/web/src/app/browser/build.sh index 9c9db68d8c7..56ee6faa8ad 100755 --- a/web/src/app/browser/build.sh +++ b/web/src/app/browser/build.sh @@ -41,6 +41,11 @@ builder_describe_outputs \ #### Build action definitions #### +do_clean() { + rm -rf "$KEYMAN_ROOT/web/build/$SUBPROJECT_NAME" + rm -rf "$KEYMAN_ROOT/web/build/publish" +} + compile_and_copy() { local COMPILE_FLAGS= if builder_has_option --ci; then @@ -61,7 +66,7 @@ compile_and_copy() { } builder_run_action configure verify_npm_setup -builder_run_action clean rm -rf "$KEYMAN_ROOT/web/build/$SUBPROJECT_NAME" +builder_run_action clean do_clean builder_run_action build compile_and_copy # No headless tests for this child project. Currently, DOM-based unit & diff --git a/web/src/app/ui/build.sh b/web/src/app/ui/build.sh index 76efadde830..7d9b2664b58 100755 --- a/web/src/app/ui/build.sh +++ b/web/src/app/ui/build.sh @@ -40,6 +40,11 @@ builder_describe_outputs \ #### Build action definitions #### +do_clean() { + rm -rf "$KEYMAN_ROOT/web/build/$SUBPROJECT_NAME" + rm -rf "$KEYMAN_ROOT/web/build/publish" +} + compile_and_copy() { compile $SUBPROJECT_NAME @@ -51,7 +56,7 @@ compile_and_copy() { } builder_run_action configure verify_npm_setup -builder_run_action clean rm -rf "$KEYMAN_ROOT/web/build/$SUBPROJECT_NAME" +builder_run_action clean do_clean builder_run_action build compile_and_copy # No headless tests for this child project. Currently, DOM-based unit & From 9099b873560c155884f915d86a8f52adbb9c47b7 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Fri, 22 Sep 2023 14:04:53 -0400 Subject: [PATCH 47/56] auto: increment master version to 17.0.180 --- HISTORY.md | 5 +++++ VERSION.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 57d9e067b14..f3d948ec0d2 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # Keyman Version History +## 17.0.179 alpha 2023-09-22 + +* chore(resources): ldml: update to keyboard3 (#9588) +* change(android,web) Use web-based popup key longpresses (#9591) + ## 17.0.178 alpha 2023-09-21 * fix(linux): Correctly open files linked from help page (#9601) diff --git a/VERSION.md b/VERSION.md index bf6655df8c0..f323889514b 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -17.0.179 \ No newline at end of file +17.0.180 \ No newline at end of file From 1b5a86607db8f06b891fc6cdc11704fdb5b04f80 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Mon, 25 Sep 2023 18:54:45 +0200 Subject: [PATCH 48/56] chore(linux): Check that background processes are still running Before we run a test we now check that ibus and the other processes we need are still running. If not we run test setup again. Maybe fix #9570. --- linux/ibus-keyman/src/test/meson.build | 7 +- linux/ibus-keyman/src/test/setup-tests.sh | 2 +- linux/ibus-keyman/tests/meson.build | 13 +- .../tests/scripts/run-single-test.sh | 12 ++ .../ibus-keyman/tests/scripts/setup-tests.sh | 2 +- .../tests/scripts/test-helper.inc.sh | 125 ++++++++++++------ 6 files changed, 110 insertions(+), 51 deletions(-) diff --git a/linux/ibus-keyman/src/test/meson.build b/linux/ibus-keyman/src/test/meson.build index 1ad841c6d6e..3c8c1044c0d 100644 --- a/linux/ibus-keyman/src/test/meson.build +++ b/linux/ibus-keyman/src/test/meson.build @@ -19,7 +19,8 @@ test_include_dirs = [ ] env_file = '/tmp/env-src-test.txt' -pid_file = '/tmp/ibus-keyman-src-test-pids' +cleanup_file = '/tmp/ibus-keyman-src-test-pids' +pid_file = '/tmp/ibus-keyman-src-test-pids.pids' setup_src_test_tests = find_program('setup-tests.sh', dirs: [meson.current_source_dir()]) teardown_tests = find_program('teardown-tests.sh', dirs: [meson.current_source_dir() / '../../tests/scripts']) @@ -64,7 +65,7 @@ bcp47_util_tests = executable( test( 'setup-src-test', setup_src_test_tests, - args: ['--x11', env_file, pid_file], + args: ['--x11', env_file, cleanup_file, pid_file], env: test_env, priority: -1, is_parallel: false, @@ -74,7 +75,7 @@ test( test( 'teardown-src-test', teardown_tests, - args: [pid_file], + args: [cleanup_file], priority: -9, is_parallel: false, protocol: 'exitcode' diff --git a/linux/ibus-keyman/src/test/setup-tests.sh b/linux/ibus-keyman/src/test/setup-tests.sh index 736650270de..07e7d5462b3 100755 --- a/linux/ibus-keyman/src/test/setup-tests.sh +++ b/linux/ibus-keyman/src/test/setup-tests.sh @@ -3,4 +3,4 @@ set -eu . "$(dirname "$0")/../../tests/scripts/test-helper.inc.sh" -setup_display_server_only "$1" "$2" "$3" +setup_display_server_only "$1" "$2" "$3" "$4" diff --git a/linux/ibus-keyman/tests/meson.build b/linux/ibus-keyman/tests/meson.build index 20d82e7e2c4..a26b1268591 100644 --- a/linux/ibus-keyman/tests/meson.build +++ b/linux/ibus-keyman/tests/meson.build @@ -50,7 +50,8 @@ stop_test_server = executable( ) env_file = '/tmp/env.txt' -pid_file = '/tmp/ibus-keyman-test-pids' +cleanup_file = '/tmp/ibus-keyman-test-pids' +pid_file = '/tmp/ibus-keyman-test-pids.pids' setup_tests = find_program('setup-tests.sh', dirs: [meson.current_source_dir() / 'scripts']) teardown_tests = find_program('teardown-tests.sh', dirs: [meson.current_source_dir() / 'scripts']) @@ -64,7 +65,7 @@ can_build_wayland = mutter.found() test( 'setup-x11', setup_tests, - args: ['--x11', env_file, pid_file], + args: ['--x11', env_file, cleanup_file, pid_file], env: test_env, priority: -10, is_parallel: false, @@ -74,7 +75,7 @@ test( test( 'teardown-x11', teardown_tests, - args: [pid_file], + args: [cleanup_file], priority: -19, is_parallel: false, protocol: 'exitcode' @@ -84,7 +85,7 @@ if can_build_wayland test( 'setup-wayland', setup_tests, - args: ['--wayland', env_file, pid_file], + args: ['--wayland', env_file, cleanup_file, pid_file], env: test_env, priority: -20, is_parallel: false, @@ -94,7 +95,7 @@ if can_build_wayland test( 'teardown-wayland', teardown_tests, - args: [pid_file], + args: [cleanup_file], priority: -29, is_parallel: false, protocol: 'exitcode' @@ -113,7 +114,7 @@ foreach kmx: kmxtest_files continue endif testname = filename[1].split('.kmx')[0] - test_args = [ '--tap', '-k', '--env', env_file, '--', filename] + test_args = [ '--tap', '-k', '--env', env_file, '--cleanup', cleanup_file, '--check', pid_file, '--', filename] test( 'X11-' + testname + '__surrounding-text', run_test, diff --git a/linux/ibus-keyman/tests/scripts/run-single-test.sh b/linux/ibus-keyman/tests/scripts/run-single-test.sh index b4660f83689..18c30dc30c3 100755 --- a/linux/ibus-keyman/tests/scripts/run-single-test.sh +++ b/linux/ibus-keyman/tests/scripts/run-single-test.sh @@ -34,6 +34,8 @@ function help() { echo " --wayland run tests with Wayland" echo " --x11 run tests with X11" echo " --env Name of the file containing environment variables to use" + echo " --check Name of the file containing pids to check are running" + echo " --cleanup Name of the file containing cleanup of processes" exit 0 } @@ -65,12 +67,22 @@ while (( $# )); do --verbose|-v) ARG_VERBOSE=--verbose;; --debug) ARG_DEBUG=--debug-log;; --env) shift ; ARG_ENV=$1 ;; + --check) shift; ARG_PIDS=$1 ;; + --cleanup) shift; ARG_CLEANUP=$1 ;; --) shift ; TESTFILE=$1; break ;; *) echo "Error: Unexpected argument \"$1\". Exiting." ; exit 4 ;; esac shift || (echo "Error: The last argument is missing a value. Exiting."; false) || exit 5 done +# shellcheck disable=SC2236 +if [ -n "${ARG_PIDS:-}" ] && [ ! -n "${ARG_CLEANUP:-}" ]; then + echo "Error: '--check' also requires '--cleanup'. Exiting." + exit 6 +fi + +check_processes_running "$ARG_DISPLAY_SERVER" "$ARG_ENV" "$ARG_CLEANUP" "$ARG_PIDS" >&2 + # shellcheck source=/dev/null . "$ARG_ENV" diff --git a/linux/ibus-keyman/tests/scripts/setup-tests.sh b/linux/ibus-keyman/tests/scripts/setup-tests.sh index 67bbcbb1bf5..7ea0070ae82 100755 --- a/linux/ibus-keyman/tests/scripts/setup-tests.sh +++ b/linux/ibus-keyman/tests/scripts/setup-tests.sh @@ -5,4 +5,4 @@ set -eu exit_on_package_build -setup "$1" "$2" "$3" +setup "$1" "$2" "$3" "$4" diff --git a/linux/ibus-keyman/tests/scripts/test-helper.inc.sh b/linux/ibus-keyman/tests/scripts/test-helper.inc.sh index ef1baac8786..292e5c8f2b3 100755 --- a/linux/ibus-keyman/tests/scripts/test-helper.inc.sh +++ b/linux/ibus-keyman/tests/scripts/test-helper.inc.sh @@ -94,9 +94,10 @@ function _link_test_keyboards() { } function _setup_init() { - local ENV_FILE PID_FILE + local ENV_FILE CLEANUP_FILE PID_FILE ENV_FILE=$1 - PID_FILE=$2 + CLEANUP_FILE=$2 + PID_FILE=$3 if [ -z "${TOP_SRCDIR:-}" ]; then TOP_SRCDIR=${G_TEST_SRCDIR:-$(realpath "$(dirname "$0")/..")}/.. @@ -107,14 +108,15 @@ function _setup_init() { echo > "$ENV_FILE" - if [ -f "$PID_FILE" ]; then + if [ -f "$CLEANUP_FILE" ]; then # kill previous instances - "$(dirname "$0")"/teardown-tests.sh "$PID_FILE" || true + "$(dirname "$0")"/teardown-tests.sh "$CLEANUP_FILE" || true fi + echo > "$CLEANUP_FILE" echo > "$PID_FILE" TEMP_DATA_DIR=$(mktemp --directory) - echo "rm -rf ${TEMP_DATA_DIR} || true" >> "$PID_FILE" + echo "rm -rf ${TEMP_DATA_DIR} || true" >> "$CLEANUP_FILE" COMMON_ARCH_DIR= [ -d "${TOP_SRCDIR}"/../../core/build/arch ] && COMMON_ARCH_DIR=${TOP_SRCDIR}/../../core/build/arch @@ -133,27 +135,28 @@ function _setup_init() { } function _setup_test_dbus_server() { - local ENV_FILE PID_FILE + local ENV_FILE CLEANUP_FILE ENV_FILE=$1 - PID_FILE=$2 + CLEANUP_FILE=$2 # Start test dbus server. This will create `/tmp/km-test-server.env`. "${TOP_BINDIR}/tests/km-dbus-test-server" &> /dev/null & sleep 1 cat /tmp/km-test-server.env >> "$ENV_FILE" - cat /tmp/km-test-server.env >> "$PID_FILE" - echo "${TOP_BINDIR}/tests/stop-test-server" >> "$PID_FILE" + cat /tmp/km-test-server.env >> "$CLEANUP_FILE" + echo "${TOP_BINDIR}/tests/stop-test-server" >> "$CLEANUP_FILE" source /tmp/km-test-server.env echo "# DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" } function _setup_display_server() { - local DISPLAY_SERVER ENV_FILE PID_FILE + local DISPLAY_SERVER ENV_FILE CLEANUP_FILE PID_FILE PID ENV_FILE=$1 - PID_FILE=$2 - DISPLAY_SERVER=$3 + CLEANUP_FILE=$2 + PID_FILE=$3 + DISPLAY_SERVER=$4 if [ "$DISPLAY_SERVER" == "--wayland" ]; then if ! can_run_wayland; then @@ -166,7 +169,9 @@ function _setup_display_server() { TMPFILE=$(mktemp) # mutter-Message: 18:56:15.422: Using Wayland display name 'wayland-1' mutter --wayland --headless --no-x11 --virtual-monitor 1024x768 &> "$TMPFILE" & - echo "kill -9 $! || true" >> "$PID_FILE" + PID=$! + echo "kill -9 ${PID} || true" >> "$CLEANUP_FILE" + echo "${PID}" >> "${PID_FILE}" sleep 1s export WAYLAND_DISPLAY WAYLAND_DISPLAY=$(grep "Using Wayland display" "$TMPFILE" | cut -d"'" -f2) @@ -176,15 +181,21 @@ function _setup_display_server() { echo "Running on X11:" echo "Starting Xvfb..." Xvfb -screen 0 1024x768x24 :33 &> /dev/null & - echo "kill -9 $! || true" >> "$PID_FILE" + PID=$! + echo "kill -9 ${PID} || true" >> "$CLEANUP_FILE" + echo "${PID}" >> "${PID_FILE}" sleep 1 echo "Starting Xephyr..." DISPLAY=:33 Xephyr :32 -screen 1024x768 &> /dev/null & - echo "kill -9 $! || true" >> "$PID_FILE" + PID=$! + echo "kill -9 ${PID} || true" >> "$CLEANUP_FILE" + echo "${PID}" >> "${PID_FILE}" sleep 1 echo "Starting metacity" metacity --display=:32 &> /dev/null & - echo "kill -9 $! || true" >> "$PID_FILE" + PID=$! + echo "kill -9 ${PID} || true" >> "$CLEANUP_FILE" + echo "${PID}" >> "${PID_FILE}" export DISPLAY=:32 echo "export DISPLAY=\"$DISPLAY\"" >> "$ENV_FILE" @@ -192,9 +203,9 @@ function _setup_display_server() { } function _setup_schema_and_gsettings() { - local ENV_FILE PID_FILE + local ENV_FILE CLEANUP_FILE ENV_FILE=$1 - PID_FILE=$2 + CLEANUP_FILE=$2 # Install schema to temporary directory. This removes the build dependency on the keyman package. SCHEMA_DIR=$TEMP_DATA_DIR/glib-2.0/schemas @@ -219,13 +230,17 @@ function _setup_schema_and_gsettings() { } function _setup_ibus() { - local ENV_FILE PID_FILE + local ENV_FILE CLEANUP_FILE PID_FILE PID ENV_FILE=$1 - PID_FILE=$2 + CLEANUP_FILE=$2 + PID_FILE=$3 + echo "Starting ibus-daemon..." #shellcheck disable=SC2086 ibus-daemon ${ARG_VERBOSE-} --daemonize --panel=disable --address=unix:abstract="${TEMP_DATA_DIR}/test-ibus" ${IBUS_CONFIG-} &> /tmp/ibus-daemon.log - echo "kill -9 $! || true" >> "$PID_FILE" + PID=$(pgrep -f "${TEMP_DATA_DIR}/test-ibus") + echo "kill -9 ${PID} || true" >> "$CLEANUP_FILE" + echo "${PID}" >> "${PID_FILE}" sleep 1s IBUS_ADDRESS=$(ibus address) @@ -233,19 +248,23 @@ function _setup_ibus() { echo "export IBUS_ADDRESS=\"$IBUS_ADDRESS\"" >> "$ENV_FILE" + echo "Starting ibus-engine-keyman..." #shellcheck disable=SC2086 "${TOP_BINDIR}/src/ibus-engine-keyman" --testing ${ARG_VERBOSE-} &> /tmp/ibus-engine-keyman.log & - echo "kill -9 $! || true" >> "$PID_FILE" + PID=$! + echo "kill -9 ${PID} || true" >> "$CLEANUP_FILE" + echo "${PID}" >> "${PID_FILE}" sleep 1s - } + function setup() { - local DISPLAY_SERVER ENV_FILE PID_FILE TESTBASEDIR TESTDIR + local DISPLAY_SERVER ENV_FILE CLEANUP_FILE PID_FILE TESTBASEDIR TESTDIR DISPLAY_SERVER=$1 ENV_FILE=$2 - PID_FILE=$3 + CLEANUP_FILE=$3 + PID_FILE=$4 - _setup_init "${ENV_FILE}" "${PID_FILE}" + _setup_init "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" TESTBASEDIR=${XDG_DATA_HOME:-$HOME/.local/share}/keyman TESTDIR=${TESTBASEDIR}/test_kmx @@ -254,32 +273,33 @@ function setup() { _generate_kmpjson "$TESTDIR" - _setup_test_dbus_server "${ENV_FILE}" "${PID_FILE}" - _setup_display_server "${ENV_FILE}" "${PID_FILE}" "${DISPLAY_SERVER}" - _setup_schema_and_gsettings "${ENV_FILE}" "${PID_FILE}" - _setup_ibus "${ENV_FILE}" "${PID_FILE}" + _setup_test_dbus_server "${ENV_FILE}" "${CLEANUP_FILE}" + _setup_display_server "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" "${DISPLAY_SERVER}" + _setup_schema_and_gsettings "${ENV_FILE}" "${CLEANUP_FILE}" + _setup_ibus "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" } function setup_display_server_only() { - local DISPLAY_SERVER ENV_FILE PID_FILE TESTBASEDIR TESTDIR + local DISPLAY_SERVER ENV_FILE CLEANUP_FILE PID_FILE TESTBASEDIR TESTDIR DISPLAY_SERVER=$1 ENV_FILE=$2 - PID_FILE=$3 + CLEANUP_FILE=$3 + PID_FILE=$4 - _setup_init "${ENV_FILE}" "${PID_FILE}" - _setup_display_server "${ENV_FILE}" "${PID_FILE}" "${DISPLAY_SERVER}" - _setup_schema_and_gsettings "${ENV_FILE}" "${PID_FILE}" + _setup_init "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" + _setup_display_server "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" "${DISPLAY_SERVER}" + _setup_schema_and_gsettings "${ENV_FILE}" "${CLEANUP_FILE}" } function cleanup() { - local PID_FILE - PID_FILE=$1 + local CLEANUP_FILE + CLEANUP_FILE=$1 - if [ -f "$PID_FILE" ]; then + if [ -f "$CLEANUP_FILE" ]; then echo echo "# Shutting down processes..." - bash "$PID_FILE" # > /dev/null 2>&1 - rm "$PID_FILE" + bash "$CLEANUP_FILE" # > /dev/null 2>&1 + rm "$CLEANUP_FILE" echo "# Finished shutdown of processes." fi } @@ -291,3 +311,28 @@ function exit_on_package_build() { exit 0 fi } + +function check_processes_running() { + local DISPLAY_SERVER ENV_FILE CLEANUP_FILE PID_FILE PID MISSING + DISPLAY_SERVER=$1 + ENV_FILE=$2 + CLEANUP_FILE=$3 + PID_FILE=$4 + MISSING=false + + while read -r PID; do + if [ -z "$PID" ]; then + continue + elif ! ps --no-headers --pid="$PID" > /dev/null; then + MISSING=true + break + fi + done < "${PID_FILE}" + + if $MISSING; then + echo "# Some background processes no longer running. Restarting..." + echo "Some background processes no longer running. Restarting..." > /tmp/debug.output + cleanup "${CLEANUP_FILE}" > /dev/null 2>&1 + setup "${DISPLAY_SERVER}" "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" > /dev/null 2>&1 + fi +} From 9f07c5bc78e19f9a5421c624653d7778a6d9ba09 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Mon, 25 Sep 2023 14:02:36 -0400 Subject: [PATCH 49/56] auto: increment master version to 17.0.181 --- HISTORY.md | 4 ++++ VERSION.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index f3d948ec0d2..542e9a1766a 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,9 @@ # Keyman Version History +## 17.0.180 alpha 2023-09-25 + +* fix(linux): Fix detection of unit tests (#9606) + ## 17.0.179 alpha 2023-09-22 * chore(resources): ldml: update to keyboard3 (#9588) diff --git a/VERSION.md b/VERSION.md index f323889514b..1fb4f1df292 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -17.0.180 \ No newline at end of file +17.0.181 \ No newline at end of file From 4ecaad6ef176e3731740160e48901e6b1ecc5cb0 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Tue, 26 Sep 2023 13:04:33 +0200 Subject: [PATCH 50/56] chore(linux): Address code review comments --- linux/ibus-keyman/tests/scripts/run-single-test.sh | 2 +- linux/ibus-keyman/tests/scripts/test-helper.inc.sh | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/linux/ibus-keyman/tests/scripts/run-single-test.sh b/linux/ibus-keyman/tests/scripts/run-single-test.sh index 18c30dc30c3..e2b17f755f4 100755 --- a/linux/ibus-keyman/tests/scripts/run-single-test.sh +++ b/linux/ibus-keyman/tests/scripts/run-single-test.sh @@ -21,7 +21,7 @@ fi function help() { echo "Usage:" - echo " $0 [--env ] [-k] [--tap] [--surrounding-text] [--no-surrounding-text] [--wayland|--x11] [--] TEST" + echo " $0 [--env ] [-k] [--tap] [--surrounding-text] [--no-surrounding-text] [--wayland|--x11] [--check --cleanup ] [--] TEST" echo echo "Arguments:" echo " --help, -h, -? Display this help" diff --git a/linux/ibus-keyman/tests/scripts/test-helper.inc.sh b/linux/ibus-keyman/tests/scripts/test-helper.inc.sh index 292e5c8f2b3..5d34a1ab487 100755 --- a/linux/ibus-keyman/tests/scripts/test-helper.inc.sh +++ b/linux/ibus-keyman/tests/scripts/test-helper.inc.sh @@ -203,9 +203,8 @@ function _setup_display_server() { } function _setup_schema_and_gsettings() { - local ENV_FILE CLEANUP_FILE + local ENV_FILE ENV_FILE=$1 - CLEANUP_FILE=$2 # Install schema to temporary directory. This removes the build dependency on the keyman package. SCHEMA_DIR=$TEMP_DATA_DIR/glib-2.0/schemas @@ -275,7 +274,7 @@ function setup() { _setup_test_dbus_server "${ENV_FILE}" "${CLEANUP_FILE}" _setup_display_server "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" "${DISPLAY_SERVER}" - _setup_schema_and_gsettings "${ENV_FILE}" "${CLEANUP_FILE}" + _setup_schema_and_gsettings "${ENV_FILE}" _setup_ibus "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" } @@ -288,7 +287,7 @@ function setup_display_server_only() { _setup_init "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" _setup_display_server "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" "${DISPLAY_SERVER}" - _setup_schema_and_gsettings "${ENV_FILE}" "${CLEANUP_FILE}" + _setup_schema_and_gsettings "${ENV_FILE}" } function cleanup() { From 650c04d21cdeb5ffcfba6c2849fb8932c35c2cf3 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Tue, 26 Sep 2023 18:09:13 +0200 Subject: [PATCH 51/56] chore(linux): Dynamically choose display number This improves reliability if some processes are still running from a previous run, which previously caused the tests to fail. Also in the case of failed processes, list which ones are missing. --- .../tests/scripts/test-helper.inc.sh | 62 ++++++++++++------- 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/linux/ibus-keyman/tests/scripts/test-helper.inc.sh b/linux/ibus-keyman/tests/scripts/test-helper.inc.sh index 5d34a1ab487..76dfda91a69 100755 --- a/linux/ibus-keyman/tests/scripts/test-helper.inc.sh +++ b/linux/ibus-keyman/tests/scripts/test-helper.inc.sh @@ -152,7 +152,7 @@ function _setup_test_dbus_server() { } function _setup_display_server() { - local DISPLAY_SERVER ENV_FILE CLEANUP_FILE PID_FILE PID + local DISPLAY_SERVER ENV_FILE CLEANUP_FILE PID_FILE PID DISP_XVFB DISP_XEPHYR ENV_FILE=$1 CLEANUP_FILE=$2 PID_FILE=$3 @@ -171,7 +171,7 @@ function _setup_display_server() { mutter --wayland --headless --no-x11 --virtual-monitor 1024x768 &> "$TMPFILE" & PID=$! echo "kill -9 ${PID} || true" >> "$CLEANUP_FILE" - echo "${PID}" >> "${PID_FILE}" + echo "${PID} mutter" >> "${PID_FILE}" sleep 1s export WAYLAND_DISPLAY WAYLAND_DISPLAY=$(grep "Using Wayland display" "$TMPFILE" | cut -d"'" -f2) @@ -179,25 +179,37 @@ function _setup_display_server() { echo "export WAYLAND_DISPLAY=\"$WAYLAND_DISPLAY\"" >> "$ENV_FILE" else echo "Running on X11:" - echo "Starting Xvfb..." - Xvfb -screen 0 1024x768x24 :33 &> /dev/null & - PID=$! + while true; do + echo "Starting Xvfb..." + DISP_XVFB=$RANDOM + Xvfb -screen 0 1024x768x24 :${DISP_XVFB} &> /dev/null & + PID=$! + sleep 1 + if ps --no-headers --pid="$PID" > /dev/null; then + break + fi + done echo "kill -9 ${PID} || true" >> "$CLEANUP_FILE" - echo "${PID}" >> "${PID_FILE}" - sleep 1 - echo "Starting Xephyr..." - DISPLAY=:33 Xephyr :32 -screen 1024x768 &> /dev/null & - PID=$! + echo "${PID} Xvfb" >> "${PID_FILE}" + while true; do + echo "Starting Xephyr..." + DISP_XEPHYR=$RANDOM + DISPLAY=:${DISP_XVFB} Xephyr :${DISP_XEPHYR} -screen 1024x768 &> /dev/null & + PID=$! + sleep 1 + if ps --no-headers --pid="$PID" > /dev/null; then + break + fi + done echo "kill -9 ${PID} || true" >> "$CLEANUP_FILE" - echo "${PID}" >> "${PID_FILE}" - sleep 1 + echo "${PID} Xephyr" >> "${PID_FILE}" echo "Starting metacity" - metacity --display=:32 &> /dev/null & + metacity --display=:${DISP_XEPHYR} &> /dev/null & PID=$! echo "kill -9 ${PID} || true" >> "$CLEANUP_FILE" - echo "${PID}" >> "${PID_FILE}" + echo "${PID} metacity" >> "${PID_FILE}" - export DISPLAY=:32 + export DISPLAY=:${DISP_XEPHYR} echo "export DISPLAY=\"$DISPLAY\"" >> "$ENV_FILE" fi } @@ -239,7 +251,7 @@ function _setup_ibus() { ibus-daemon ${ARG_VERBOSE-} --daemonize --panel=disable --address=unix:abstract="${TEMP_DATA_DIR}/test-ibus" ${IBUS_CONFIG-} &> /tmp/ibus-daemon.log PID=$(pgrep -f "${TEMP_DATA_DIR}/test-ibus") echo "kill -9 ${PID} || true" >> "$CLEANUP_FILE" - echo "${PID}" >> "${PID_FILE}" + echo "${PID} ibus-daemon" >> "${PID_FILE}" sleep 1s IBUS_ADDRESS=$(ibus address) @@ -252,7 +264,7 @@ function _setup_ibus() { "${TOP_BINDIR}/src/ibus-engine-keyman" --testing ${ARG_VERBOSE-} &> /tmp/ibus-engine-keyman.log & PID=$! echo "kill -9 ${PID} || true" >> "$CLEANUP_FILE" - echo "${PID}" >> "${PID_FILE}" + echo "${PID} ibus-engine-keyman" >> "${PID_FILE}" sleep 1s } @@ -312,25 +324,31 @@ function exit_on_package_build() { } function check_processes_running() { - local DISPLAY_SERVER ENV_FILE CLEANUP_FILE PID_FILE PID MISSING + local DISPLAY_SERVER ENV_FILE CLEANUP_FILE PID_FILE LINE PID MISSING MISSING_PROCS DISPLAY_SERVER=$1 ENV_FILE=$2 CLEANUP_FILE=$3 PID_FILE=$4 MISSING=false + MISSING_PROCS="" - while read -r PID; do - if [ -z "$PID" ]; then + while read -r LINE; do + if [ -z "$LINE" ]; then continue - elif ! ps --no-headers --pid="$PID" > /dev/null; then + fi + PID=$(echo "$LINE" | cut -d' ' -f1) + if ! ps --no-headers --pid="$PID" > /dev/null; then MISSING=true + MISSING_PROCS="${MISSING_PROCS} $(echo "$LINE" | cut -d' ' -f2)\n" break fi done < "${PID_FILE}" if $MISSING; then echo "# Some background processes no longer running. Restarting..." - echo "Some background processes no longer running. Restarting..." > /tmp/debug.output + echo "Some background processes no longer running:" > /tmp/debug.output + echo "$MISSING_PROCS" >> /tmp/debug.output + echo "Restarting..." >> /tmp/debug.output cleanup "${CLEANUP_FILE}" > /dev/null 2>&1 setup "${DISPLAY_SERVER}" "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" > /dev/null 2>&1 fi From 73f0479f81e200fecf2528f38a7961ddce41ceaa Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Tue, 26 Sep 2023 14:02:50 -0400 Subject: [PATCH 52/56] auto: increment master version to 17.0.182 --- HISTORY.md | 5 +++++ VERSION.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 542e9a1766a..1914cb23c31 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # Keyman Version History +## 17.0.181 alpha 2023-09-26 + +* chore: workaround npm/cli#3466 when bundling internal deps (#9536) +* chore(linux): Check and restart background processes (#9608) + ## 17.0.180 alpha 2023-09-25 * fix(linux): Fix detection of unit tests (#9606) diff --git a/VERSION.md b/VERSION.md index 1fb4f1df292..e36fa1243dd 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -17.0.181 \ No newline at end of file +17.0.182 \ No newline at end of file From 43ae210494cd69f9ba3f184cc515b8fa437f5b75 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 27 Sep 2023 12:58:00 +0200 Subject: [PATCH 53/56] chore(linux): Fix run-tests.sh script This passes the new parameter to the `setup` call which got introduced in a previous PR. --- linux/ibus-keyman/tests/scripts/run-tests.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/linux/ibus-keyman/tests/scripts/run-tests.sh b/linux/ibus-keyman/tests/scripts/run-tests.sh index 00f36475776..d06d8898b11 100755 --- a/linux/ibus-keyman/tests/scripts/run-tests.sh +++ b/linux/ibus-keyman/tests/scripts/run-tests.sh @@ -4,13 +4,14 @@ set -eu TOP_SRCDIR=${top_srcdir:-$(realpath "$(dirname "$0")/../..")} TESTBASEDIR=${XDG_DATA_HOME:-$HOME/.local/share}/keyman TESTDIR=${TESTBASEDIR}/test_kmx -PID_FILE=/tmp/ibus-keyman-test-pids +CLEANUP_FILE=/tmp/ibus-keyman-test-cleanup +PID_FILE=/tmp/ibus-keyman-test.pids ENV_FILE=/tmp/keyman-env.txt . "$(dirname "$0")"/test-helper.inc.sh local_cleanup() { - cleanup "$PID_FILE" + cleanup "$CLEANUP_FILE" } if [ -v KEYMAN_PKG_BUILD ]; then @@ -62,7 +63,7 @@ function run_tests() { G_TEST_BUILDDIR="$(dirname "$0")/../../../build/$(arch)/${CONFIG}/tests" - setup "$DISPLAY_SERVER" "$ENV_FILE" "$PID_FILE" + setup "$DISPLAY_SERVER" "$ENV_FILE" "$CLEANUP_FILE" "$PID_FILE" echo "# NOTE: When the tests fail check /tmp/ibus-engine-keyman.log and /tmp/ibus-daemon.log!" echo "" @@ -89,7 +90,7 @@ function run_tests() { --directory "$TESTDIR" "${DISPLAY_SERVER}" ${TESTFILES[@]} echo "# Finished tests." - cleanup "$PID_FILE" + cleanup "$CLEANUP_FILE" } USE_WAYLAND=1 @@ -132,6 +133,7 @@ if [ ! -f "${G_TEST_BUILDDIR}/ibus-keyman-tests" ]; then G_TEST_BUILDDIR="${G_TEST_BUILDDIR:-../../build/$(arch)/release/tests}" fi +echo > "$CLEANUP_FILE" echo > "$PID_FILE" trap local_cleanup EXIT SIGINT From 30b5d9dd647a10afbca93290fbc655ab59eeced6 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 27 Sep 2023 20:10:49 +0200 Subject: [PATCH 54/56] docs(linux): Update sample tasks.json for Linux --- docs/settings/linux/tasks.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/settings/linux/tasks.json b/docs/settings/linux/tasks.json index 891c8b5d154..b4a376b508f 100644 --- a/docs/settings/linux/tasks.json +++ b/docs/settings/linux/tasks.json @@ -101,7 +101,7 @@ "type": "shell", "label": "ibus-keyman: configure", "command": "./build.sh", - "args": ["configure", "--debug"], + "args": ["configure", "--debug", "--coverage"], "options": { "cwd": "${workspaceFolder}/linux/ibus-keyman", "env": { @@ -121,7 +121,7 @@ "type": "shell", "label": "ibus-keyman: build", "command": "./build.sh", - "args": [ "build", "--debug" ], + "args": [ "build", "--debug", "--coverage" ], "options": { "cwd": "${workspaceFolder}/linux/ibus-keyman/", }, @@ -144,7 +144,8 @@ "args": [ "test", "--debug", - "--no-integration" + "--no-integration", + "--coverage" ], "options": { "cwd": "${workspaceFolder}/linux/ibus-keyman/", @@ -158,7 +159,8 @@ "command": "./build.sh", "args": [ "test", - "--debug" + "--debug", + "--coverage" ], "options": { "cwd": "${workspaceFolder}/linux/ibus-keyman/", From 662c850b97e917f9c84dbdaaae74c261b84cdec2 Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Thu, 28 Sep 2023 14:43:35 +1000 Subject: [PATCH 55/56] fix(windows): fix the ellipsis for longer text on btns The buttons already had a property to display ellipsis when the text was to big for the buttons however the other properties such as white-space nowrap needed to be added for it to work in all cases. --- windows/src/desktop/kmshell/xml/splash.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/windows/src/desktop/kmshell/xml/splash.css b/windows/src/desktop/kmshell/xml/splash.css index e54e393413d..413280ce057 100644 --- a/windows/src/desktop/kmshell/xml/splash.css +++ b/windows/src/desktop/kmshell/xml/splash.css @@ -156,6 +156,9 @@ a.button { #config .btn { width: 180px; text-overflow: ellipsis; + overflow: hidden; + display: inline-block; + white-space: nowrap; } #config { @@ -167,6 +170,10 @@ a.button { #exit .btn-small { width: 90px; + text-overflow: ellipsis; + overflow: hidden; + display: inline-block; + white-space: nowrap; } #tasks div#showAtStartupBox { margin-top: 6px; margin-left: 0; } From cea3107521fbf26c7870af8115bce7ede4b2caf4 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Thu, 28 Sep 2023 14:03:18 -0400 Subject: [PATCH 56/56] auto: increment master version to 17.0.183 --- HISTORY.md | 9 +++++++++ VERSION.md | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 1914cb23c31..56e8f96c954 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,14 @@ # Keyman Version History +## 17.0.182 alpha 2023-09-28 + +* chore(web): builds that output to web/build/publish should also clean it (#9613) +* chore(linux): Dynamically choose display number (#9629) +* docs(linux): Update sample tasks.json for Linux (#9634) +* chore(common): Add Crowdin strings for Mon (#9550) +* fix(developer): only include mobile touch platform in basic project (#9549) +* fix(windows): fix the ellipsis for longer text on buttons (#9638) + ## 17.0.181 alpha 2023-09-26 * chore: workaround npm/cli#3466 when bundling internal deps (#9536) diff --git a/VERSION.md b/VERSION.md index e36fa1243dd..8bf382e6d5e 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -17.0.182 \ No newline at end of file +17.0.183 \ No newline at end of file