diff --git a/.github/workflows/deb-packaging.yml b/.github/workflows/deb-packaging.yml index 9c374f5d050..52c485aa658 100644 --- a/.github/workflows/deb-packaging.yml +++ b/.github/workflows/deb-packaging.yml @@ -116,7 +116,7 @@ jobs: strategy: fail-fast: true matrix: - dist: [focal, jammy, noble] + dist: [focal, jammy, noble, oracular] steps: - name: Checkout @@ -142,7 +142,7 @@ jobs: strategy: fail-fast: true matrix: - dist: [oracular] + dist: [plucky] steps: - name: Checkout diff --git a/HISTORY.md b/HISTORY.md index 1ed00fc84bb..4b8b75802f0 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,19 @@ # Keyman Version History +## 18.0.141 alpha 2024-11-15 + +* chore(linux): add support for Ubuntu 25.04 Plucky Puffin (#12675) + +## 18.0.140 alpha 2024-11-13 + +* chore(common): Add 17.0.330 - 17.0.332 to version history (#12663) +* fix(developer): reconnect `--full-test` in kmcmplib build and enable for CI (#12631) +* docs(developer): kmc-generate (#12647) + +## 18.0.139 alpha 2024-11-12 + +* fix(windows): help links updated (#12646) + ## 18.0.138 alpha 2024-11-08 * fix(common): check for invalid markers (#12613) @@ -958,6 +972,27 @@ * chore(common): move to 18.0 alpha (#10713) * chore: move to 18.0 alpha +## 17.0.332 stable 2024-11-06 + +* fix(developer): create Server config directory before options save (#12609) +* fix(developer): handle merge commits when checking git log date (#12628) +* fix(linux): set environment variable for rendering of downloads dialog (#12617) + +## 17.0.331 stable 2024-10-30 + +* fix(android): Hide suggestion banner on password fields (#12466) +* fix(common): declare dep on @keymanapp/ldml-keyboard-constants (#12475) +* fix(oem/fv): Update keyboard versions and names for fv_all.kmp (#12504) +* chore(ios): renew certificate (#12513) +* fix(developer): prevent invalid string ids (#12524) +* fix(developer): ignore excess whitespace in `` attribute (#12523) + +## 17.0.330 stable 2024-09-16 + +* refactor(android): Move Sentry and APK to publish task (#12392) +* fix(developer): rewrite ldml visual keyboard compiler (#12406) +* fix(developer): check vars string usage before definition (#12407) + ## 17.0.329 stable 2024-09-09 * chore(android,ios): Add ojibwa ifinal/rdot keyboards to FirstVoices (#12020) diff --git a/VERSION.md b/VERSION.md index 62b9f406197..e756675b009 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -18.0.139 \ No newline at end of file +18.0.142 \ No newline at end of file diff --git a/developer/docs/help/reference/kmc/cli/reference.md b/developer/docs/help/reference/kmc/cli/reference.md index e15fa344b27..1de0b64c76d 100644 --- a/developer/docs/help/reference/kmc/cli/reference.md +++ b/developer/docs/help/reference/kmc/cli/reference.md @@ -59,6 +59,18 @@ The following parameters are available: : Rewrites On Screen Keyboard files from source mapping +`kmc generate keyman-keyboard [options] ` + +: Generate a .kmn keyboard project + +`kmc generate ldml-keyboard [options] ` + +: Generate an LDML .xml keyboard project + +`kmc generate lexical-model [options] ` + +: Generate a wordlist lexical model project + `kmc copy origin -o target` : Copy and rename a keyboard project @@ -306,6 +318,164 @@ For more information on the purpose of `analyze osk-char-use` and `analyze rewrite-osk-from-char-use`, see [`&displayMap`](/developer/language/reference/displaymap). +## `kmc generate keyman-keyboard` options + +Generates a new keyboard project with .kmn format keyboard. An ID must be +specified for the output of the project, and an output folder (`-o`). A new +folder with the keyboard ID as its name will be created under the output folder, +and the files in that folder will follow the +[standard file layout](../../file-layout). + +`-t, --target ` + +: Target platforms for the project. Use the values from + [`&targets`](/developer/language/reference/targets). Multiple targets may be + specified, each prefixed with `-t`, or space-separated, surrounded by + quotation marks (e.g. `-t windows -t linux` or `-t "windows linux"`) (default: + `any`) + +`-o, --out-path ` + +: Specifies the parent folder for the project; the folder may already exist. The + project will be generated in a new folder named with the ID of the project + under this path, and that project folder must not exist. + +`-n, --name ` + +: Keyboard descriptive name, used in the + [`&name` store](/developer/language/reference/name) (default: the ID of the + project) + +`-c, --copyright ` + +: [`©right`](/developer/language/reference/copyright) holder for the + project. Do not include the '(C)' or '©' prefixes (default: the author + of the keyboard) + +`-v, --version ` + +: [`&version`](/developer/language/reference/version) of the keyboard, (default: + "1.0"). + +`-L, --language-tag ` + +: A BCP-47 language tag with which the keyboard is associated. More than one + tag may be specified, with each tag prefixed with `-L` (default: no languages). + The tags are referenced in the package metadata. + +`-a, --author ` + +: The name of keyboard author (default: blank) + +`-i, --icon` + +: Include a generated icon. The icon will be a 16x16 pixel box with the first + letters of the first language tag (default: true, include an icon) + +`-d, --description ` + +: A short description of the project, in Markdown. (default: keyboard name) + +## `kmc generate ldml-keyboard` options + +Generates a new keyboard project with LDML .xml format keyboard. An ID must be +specified for the output of the project, and an output folder (`-o`). A new +folder with the keyboard ID as its name will be created under the output folder, +and the files in that folder will follow the +[standard file layout](../../file-layout). + +`-t, --target ` + +: Target platforms for the project. Use the values from + [`&targets`](/developer/language/reference/targets). Multiple targets may be + specified, each prefixed with `-t`, or space-separated, surrounded by + quotation marks (e.g. `-t windows -t linux` or `-t "windows linux"`) (default: + `any`) + +`-o, --out-path ` + +: Specifies the parent folder for the project; the folder may already exist. The + project will be generated in a new folder named with the ID of the project + under this path, and that project folder must not exist. + +`-n, --name ` + +: Keyboard descriptive name, referenced in the keyboard `` + +: Copyright holder for the project. Do not include the '(C)' or '©' + prefixes (default: the author of the keyboard) + +`-v, --version ` + +: Version of the keyboard, referenced in the keyboard `` + +: A BCP-47 language tag with which the keyboard is associated. More than one + tag may be specified, with each tag prefixed with `-L` (default: no languages). + The first tag is referenced in the keyboard `` + +: The name of keyboard author, referenced in `` + +: A short description of the project, in Markdown. (default: keyboard name) + +## `kmc generate lexical-model` options + +Generates a new lexical model project with a TSV wordlist. An ID must be +specified for the output of the project, and an output folder (`-o`). The ID +must match the [`author.bcp47.uniq`](/developer/lexical-models) naming pattern. +A new folder with the model ID as its name will be created under the output +folder, and the files in that folder will follow the +[standard file layout](../../file-layout). + +`-o, --out-path ` + +: Specifies the parent folder for the project; the folder may already exist. The + project will be generated in a new folder named with the ID of the project + under this path, and that project folder must not exist. + +`-n, --name ` + +: Lexical model descriptive name, referenced in the package metadata (default: + the ID of the project) + +`-c, --copyright ` + +: Copyright holder for the project. Do not include the '(C)' or '©' + prefixes (default: the author of the model) + +`-v, --version ` + +: Version of the lexical model, referenced in the package metadata (defaults to + "1.0") + +`-L, --language-tag ` + +: A BCP-47 language tag with which the model is associated. More than one + tag may be specified, with each tag prefixed with `-L` (default: no languages). + The tags are referenced in the package metadata. + +`-a, --author ` + +: The name of model author, referenced in package metadata (default: blank) + +`-d, --description ` + +: A short description of the project, in Markdown. (default: lexical model name) + ## `kmc copy` options Copies a keyboard or lexical model project, renaming files matching the original diff --git a/developer/src/kmc-copy/test/fixtures/projects/gff.ti_er.gff_tigrinya_eritrea/source/gff.ti_er.gff_tigrinya_eritrea.model.kps b/developer/src/kmc-copy/test/fixtures/projects/gff.ti_er.gff_tigrinya_eritrea/source/gff.ti_er.gff_tigrinya_eritrea.model.kps index 5e01595a251..6630ce927f5 100644 --- a/developer/src/kmc-copy/test/fixtures/projects/gff.ti_er.gff_tigrinya_eritrea/source/gff.ti_er.gff_tigrinya_eritrea.model.kps +++ b/developer/src/kmc-copy/test/fixtures/projects/gff.ti_er.gff_tigrinya_eritrea/source/gff.ti_er.gff_tigrinya_eritrea.model.kps @@ -20,7 +20,7 @@ © 2023 Geʾez Frontier Foundation Geʾez Frontier Foundation 1.0.1 - The Tigrinya-Eritrea lexical model is based on the content found from 131 issues of the Haddas Eritrea (ሓዳስ ኤርትራ) newspaper. + The Tigrinya-Eritrea lexical model is based on the content found from 131 issues of the Haddas Eritrea (ሓዳስ ኤርትራ) newspaper. diff --git a/developer/src/kmc-copy/test/fixtures/projects/kmhmu_2008/source/kmhmu_2008.kps b/developer/src/kmc-copy/test/fixtures/projects/kmhmu_2008/source/kmhmu_2008.kps index 5c47f473211..1b2688d1002 100644 --- a/developer/src/kmc-copy/test/fixtures/projects/kmhmu_2008/source/kmhmu_2008.kps +++ b/developer/src/kmc-copy/test/fixtures/projects/kmhmu_2008/source/kmhmu_2008.kps @@ -20,7 +20,7 @@ Kmhmu 2008 © 2008-2018 John Durdin - Lao-script Kmhmu language keyboard + Lao-script Kmhmu language keyboard diff --git a/developer/src/kmcmplib/build.bat b/developer/src/kmcmplib/build.bat index 7b5dcf110d8..fd6aa7308d4 100644 --- a/developer/src/kmcmplib/build.bat +++ b/developer/src/kmcmplib/build.bat @@ -80,7 +80,11 @@ shift if "!COMMAND!" == "configure" ( echo === Configuring Keyman KMX Compiler for Windows !ARCH! !BUILDTYPE! === if exist build\!ARCH!\!BUILDTYPE! rd /s/q build\!ARCH!\!BUILDTYPE! - meson setup build\!ARCH!\!BUILDTYPE! !STATIC_LIBRARY! --buildtype !BUILDTYPE! --werror %1 %2 %3 %4 %5 %6 %7 %8 %9 || exit !errorlevel! + if "%1"=="--full-test" ( + meson setup build\!ARCH!\!BUILDTYPE! !STATIC_LIBRARY! --buildtype !BUILDTYPE! --werror -D full_test=true %2 %3 %4 %5 %6 %7 %8 %9 || exit !errorlevel! + ) else ( + meson setup build\!ARCH!\!BUILDTYPE! !STATIC_LIBRARY! --buildtype !BUILDTYPE! --werror %1 %2 %3 %4 %5 %6 %7 %8 %9 || exit !errorlevel! + ) shift ) diff --git a/developer/src/kmcmplib/build.sh b/developer/src/kmcmplib/build.sh index bba19d35558..aaf71846763 100755 --- a/developer/src/kmcmplib/build.sh +++ b/developer/src/kmcmplib/build.sh @@ -7,6 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" . "$THIS_SCRIPT_PATH/checkout-keyboards.inc.sh" . "$THIS_SCRIPT_PATH/commands.inc.sh" @@ -78,7 +79,7 @@ do_action() { done } -if builder_has_option --full-test; then +if should_do_full_test; then locate_keyboards_repo fi @@ -101,7 +102,7 @@ if builder_start_action configure; then # We have to checkout the keyboards repo in a 'configure' action because # otherwise meson will not get the right list of keyboard source files, # even though we only use it in the 'test' action - if builder_has_option --full-test; then + if should_do_full_test; then checkout_keyboards fi diff --git a/developer/src/kmcmplib/commands.inc.sh b/developer/src/kmcmplib/commands.inc.sh index d3647c41dd5..280343853c3 100644 --- a/developer/src/kmcmplib/commands.inc.sh +++ b/developer/src/kmcmplib/commands.inc.sh @@ -33,12 +33,19 @@ do_configure() { STANDARD_MESON_ARGS="--cross-file wasm.defs.build --cross-file wasm.build --default-library static" fi + local FULL_TEST= + local FULL_TEST_WIN= + if should_do_full_test; then + FULL_TEST="-D full_test=true" + FULL_TEST_WIN=--full-test + fi + if [[ $target =~ ^(x86|x64)$ ]]; then - cmd //C build.bat $target $BUILDER_CONFIGURATION configure "${builder_extra_params[@]}" + cmd //C build.bat $target $BUILDER_CONFIGURATION configure $FULL_TEST_WIN "${builder_extra_params[@]}" else pushd "$THIS_SCRIPT_PATH" > /dev/null # Additional arguments are used by Linux build, e.g. -Dprefix=${INSTALLDIR} - meson setup "$MESON_PATH" --werror --buildtype $BUILDER_CONFIGURATION $STANDARD_MESON_ARGS "${builder_extra_params[@]}" + meson setup "$MESON_PATH" --werror --buildtype $BUILDER_CONFIGURATION $STANDARD_MESON_ARGS $FULL_TEST "${builder_extra_params[@]}" popd > /dev/null fi builder_finish_action success configure:$target @@ -78,7 +85,7 @@ do_test() { # Works on a local clone of keyboards repository, to avoid clobbering # user's existing keyboards repo, if present - if builder_has_option --full-test; then + if should_do_full_test; then checkout_keyboards fi @@ -125,4 +132,12 @@ build_meson_cross_file_for_wasm() { local R=$(echo $EMSCRIPTEN_BASE | sed 's_/_\\/_g') fi sed -e "s/\$EMSCRIPTEN_BASE/$R/g" wasm.build.$BUILDER_OS.in > wasm.build +} + +should_do_full_test() { + if builder_has_option --full-test || builder_is_ci_test_build; then + return 0 + fi + + return 1 } \ No newline at end of file diff --git a/developer/src/kmcmplib/src/CompilerInterfaces.cpp b/developer/src/kmcmplib/src/CompilerInterfaces.cpp index ba368028322..0e424c93b00 100644 --- a/developer/src/kmcmplib/src/CompilerInterfaces.cpp +++ b/developer/src/kmcmplib/src/CompilerInterfaces.cpp @@ -13,7 +13,6 @@ EXTERN bool kmcmp_CompileKeyboard( const void* procContext, KMCMP_COMPILER_RESULT& result ) { - FILE_KEYBOARD fk; fk.extra = new KMCMP_COMPILER_RESULT_EXTRA; fk.extra->kmnFilename = pszInfile; diff --git a/developer/src/kmcmplib/tests/get-test-source.sh b/developer/src/kmcmplib/tests/get-test-source.sh index beebce3aca3..a195fc271dc 100755 --- a/developer/src/kmcmplib/tests/get-test-source.sh +++ b/developer/src/kmcmplib/tests/get-test-source.sh @@ -9,5 +9,8 @@ set -eu find "$1" -name '*.kmn' | \ grep -E '(release|experimental)/([a-z0-9_]+)/([a-z0-9_]+)/source/\3\.kmn$' | \ - grep -v masaram_gondi + grep -vE 'masaram_gondi|anii|sil_kmhmu|fv_statimcets|fv_nuucaanul' # #12623: exclude masaram_gondi due to #11806 +# #12631: exclude anii, sil_kmhmu as ico references have mismatching case +# #12631: exclude fv_statimcets, fv_nuucaanul as these include U+2002 which is not +# treated as whitespace on mac arch \ No newline at end of file diff --git a/developer/src/kmcmplib/tests/util_callbacks.cpp b/developer/src/kmcmplib/tests/util_callbacks.cpp index d512463a0b4..47d22b0bb27 100644 --- a/developer/src/kmcmplib/tests/util_callbacks.cpp +++ b/developer/src/kmcmplib/tests/util_callbacks.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include "util_filesystem.h" #include "../src/compfile.h" @@ -29,6 +30,14 @@ void msgproc(const KMCMP_COMPILER_RESULT_MESSAGE &message, void* context) { printf(")\n"); } +void normalizeSlashes(std::string& s) { +#ifdef _WIN32 + std::replace(s.begin(), s.end(), '/', '\\'); +#else + std::replace(s.begin(), s.end(), '\\', '/'); +#endif +} + const std::vector loadfileProc(const std::string& filename, const std::string& baseFilename) { std::string resolvedFilename = filename; if(baseFilename.length() && IsRelativePath(filename.c_str())) { @@ -40,6 +49,8 @@ const std::vector loadfileProc(const std::string& filename, const std:: } } + normalizeSlashes(resolvedFilename); + std::vector buf; FILE* fp = Open_File(resolvedFilename.c_str(), "rb"); diff --git a/docs/CODEOWNERS b/docs/CODEOWNERS index dcf54ce78cc..3316073d520 100644 --- a/docs/CODEOWNERS +++ b/docs/CODEOWNERS @@ -1,18 +1,19 @@ # # Code owners - this lists first the primary dev, then second, the platform advocate for each area +# - in addition, it lists additional reviewers # # @darcywong00 @mcdurdin @ermshiperete @rc-swag @SabineSIL @sgschantz /android/ @darcywong00 @sgschantz -/common/ @mcdurdin @rc-swag -/core/ @mcdurdin @rc-swag +/common/ @mcdurdin @rc-swag @srl295 +/core/ @mcdurdin @rc-swag @srl295 /common/lexical-model-types/ @jahorton @mcdurdin /common/schemas/ @mcdurdin @jahorton /common/test/ @mcdurdin @ermshiperete /common/web/ @jahorton @mcdurdin -/developer/ @mcdurdin @darcywong00 +/developer/ @mcdurdin @darcywong00 @SabineSIL @markcsinclair @srl295 /docs/ @mcdurdin @jahorton /ios/ @sgschantz @jahorton /linux/ @ermshiperete @darcywong00 @@ -22,7 +23,7 @@ /oem/firstvoices/common/ @mcdurdin @rc-swag /oem/firstvoices/ios/ @sgschantz @jahorton /oem/firstvoices/windows/ @rc-swag @ermshiperete -/resources/ @mcdurdin @jahorton +/resources/ @mcdurdin @jahorton @srl295 # Web is currently shared between Eberhard and Joshua: /web/ @ermshiperete @jahorton diff --git a/resources/build/build-utils-ci.inc.sh b/resources/build/build-utils-ci.inc.sh index fd9b25e52aa..a67f285254b 100644 --- a/resources/build/build-utils-ci.inc.sh +++ b/resources/build/build-utils-ci.inc.sh @@ -7,6 +7,38 @@ . "$KEYMAN_ROOT/resources/build/jq.inc.sh" +# +# Returns 0 if current build is running in CI, as a pull request test, or as a +# mainline branch test, or as a release build +# +builder_is_ci_build() { + if builder_is_ci_release_build || builder_is_ci_test_build; then + return 0 + fi + return 1 +} + +# +# Returns 0 if current build is running as a release build in CI +# +builder_is_ci_release_build() { + if [[ "$VERSION_ENVIRONMENT" =~ ^alpha|beta|stable$ ]]; then + return 0 + fi + return 1 +} + +# +# Returns 0 if current build is running in CI, as a pull request test, or as a +# mainline branch test +# +builder_is_ci_test_build() { + if [[ "$VERSION_ENVIRONMENT" == test ]]; then + return 0 + fi + return 1 +} + # # Returns 0 if current build is in CI and triggered from a pull request. If it # returns 0, then a call is made to GitHub to get pull request details, and the diff --git a/windows/src/engine/keyman/viskbd/UfrmVisualKeyboard.pas b/windows/src/engine/keyman/viskbd/UfrmVisualKeyboard.pas index 53b2990b907..c1d1dedaa0a 100644 --- a/windows/src/engine/keyman/viskbd/UfrmVisualKeyboard.pas +++ b/windows/src/engine/keyman/viskbd/UfrmVisualKeyboard.pas @@ -1,4 +1,4 @@ -(* +(* Name: UfrmVisualKeyboard Copyright: Copyright (C) SIL International. Documentation: @@ -638,10 +638,10 @@ function TfrmVisualKeyboard.FormHelp(Command: Word; Data: NativeInt; var CallHel if Command in [HELP_CONTEXT, HELP_CONTEXTPOPUP, HELP_INDEX, HELP_CONTENTS] then begin case ActivePage of - apKeyboard: TKeymanDesktopShell.OpenHelp('context_onscreenkeyboard'); - apCharacterMap: TKeymanDesktopShell.OpenHelp('context_charactermap'); - apFontHelper: TKeymanDesktopShell.OpenHelp('context_fonthelper'); - apEntryHelper: TKeymanDesktopShell.OpenHelp('context_entryhelper'); + apKeyboard: TKeymanDesktopShell.OpenHelp('context/toolbox-onscreenkeyboard'); + apCharacterMap: TKeymanDesktopShell.OpenHelp('context/toolbox-charactermap'); + apFontHelper: TKeymanDesktopShell.OpenHelp('context/toolbox-fonthelper'); + apEntryHelper: TKeymanDesktopShell.OpenHelp('index'); end; end; end; @@ -1546,7 +1546,12 @@ procedure TfrmVisualKeyboard.BtnShowHint(Sender: TObject); procedure TfrmVisualKeyboard.BtnHelpClick(Sender: TObject); begin - TKeymanDesktopShell.OpenHelpJump('context_onscreenkeyboard', frmKeyman7Main.ActiveKeyboard); + case ActivePage of + apKeyboard: TKeymanDesktopShell.OpenHelpJump('context/toolbox-onscreenkeyboard', frmKeyman7Main.ActiveKeyboard); + apCharacterMap: TKeymanDesktopShell.OpenHelpJump('context/toolbox-charactermap', frmKeyman7Main.ActiveKeyboard); + apFontHelper: TKeymanDesktopShell.OpenHelpJump('context/toolbox-fonthelper', frmKeyman7Main.ActiveKeyboard); + apEntryHelper: TKeymanDesktopShell.OpenHelpJump('index', frmKeyman7Main.ActiveKeyboard); + end; end; procedure TfrmVisualKeyboard.BtnHideHint(Sender: TObject);