diff --git a/.github/actions/apt-install/action.yml b/.github/actions/apt-install/action.yml new file mode 100644 index 0000000000..64cb1b91dc --- /dev/null +++ b/.github/actions/apt-install/action.yml @@ -0,0 +1,19 @@ +name: apt-install +description: | + Install debian packages with apt +inputs: + packages: + description: Packages to install + default: devscripts equivs + required: false +runs: + using: "composite" + steps: + - name: Install packages + shell: bash + run: | + export DEBIAN_FRONTEND=noninteractive + export DEBIAN_PRIORITY=critical + export DEBCONF_NOWARNINGS=yes + sudo apt-get update + sudo apt-get install -q -y ${{ inputs.packages }} diff --git a/.github/workflows/deb-packaging.yml b/.github/workflows/deb-packaging.yml new file mode 100644 index 0000000000..76d180e0e6 --- /dev/null +++ b/.github/workflows/deb-packaging.yml @@ -0,0 +1,279 @@ +name: "Ubuntu packaging" +on: + repository_dispatch: + types: ['deb-release-packaging:*', 'deb-pr-packaging:*'] +env: + COLOR_GREEN: "\e[32m" + GH_TOKEN: ${{ github.token }} + STATUS_CONTEXT: 'Debian Packaging' + DEBFULLNAME: 'Keyman GHA packager' + DEBEMAIL: 'support@keyman.com' + +jobs: + sourcepackage: + name: Build source package + runs-on: ubuntu-22.04 + outputs: + VERSION: ${{ steps.version_step.outputs.VERSION }} + PRERELEASE_TAG: ${{ steps.prerelease_tag.outputs.PRERELEASE_TAG }} + GIT_SHA: ${{ steps.set_status.outputs.GIT_SHA }} + steps: + - name: Checkout + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0 + with: + ref: '${{ github.event.client_payload.ref }}' + + - name: Set pending status on PR builds + id: set_status + if: github.event.client_payload.isTestBuild == 'true' + shell: bash + run: | + GIT_SHA="${{ github.event.client_payload.sha }}" + echo "GIT_SHA=$GIT_SHA" >> $GITHUB_OUTPUT + gh api \ + --method POST \ + -H "Accept: application/vnd.github+json" \ + /repos/$GITHUB_REPOSITORY/statuses/$GIT_SHA \ + -f state='pending' \ + -f target_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \ + -f description='Debian packaging started' \ + -f context="$STATUS_CONTEXT" + + - name: Install devscripts + uses: ./.github/actions/apt-install + with: + packages: devscripts equivs + + - name: Install dependencies + run: | + cd linux + ./scripts/deb-packaging.sh --gha dependencies + + - name: Build source package + run: | + TIER=$(cat TIER.md) + export TIER + echo "TIER=$TIER" >> $GITHUB_ENV + cd linux + ./scripts/deb-packaging.sh --gha source + + - name: Set version as output parameter + id: version_step + shell: bash + run: | + THIS_SCRIPT="$GITHUB_WORKSPACE/.github/workflows/deb-packaging.yml" + . "resources/build/build-utils.sh" + echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + + - name: Set prerelease tag as output parameter + id: prerelease_tag + shell: bash + run: | + if [ "${{ github.event.client_payload.isTestBuild }}" == "true" ]; then + PRERELEASE_TAG="~${{ github.event.client_payload.branch }}-$GITHUB_RUN_NUMBER.$GITHUB_RUN_ATTEMPT" + else + PRERELEASE_TAG="" + fi + echo "PRERELEASE_TAG=$PRERELEASE_TAG" >> $GITHUB_OUTPUT + + - name: Output which branch or PR we're building plus name of .dsc file + run: | + if [ "${{ github.event.client_payload.isTestBuild }}" == "true" ]; then + echo ":checkered_flag: **Test build of version ${{ steps.version_step.outputs.VERSION }} for ${{ github.event.client_payload.branch }}**" >> $GITHUB_STEP_SUMMARY + else + echo ":ship: **Release build of ${{ github.event.client_payload.branch }} branch (${{ github.event.client_payload.ref}}), version ${{ steps.version_step.outputs.VERSION }}**" >> $GITHUB_STEP_SUMMARY + fi + echo "" >> $GITHUB_STEP_SUMMARY + echo ":gift: Generated source package:" >> $GITHUB_STEP_SUMMARY + echo "- $(find . -name keyman_\*.dsc)" >> $GITHUB_STEP_SUMMARY + + - name: Store source package + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + with: + name: keyman-srcpkg + path: | + keyman_* + debian/***/* + if: always() + + binary_packages: + name: Build binary packages + needs: sourcepackage + strategy: + fail-fast: true + matrix: + dist: [focal, jammy, kinetic] + arch: [amd64] + + runs-on: ubuntu-latest + steps: + - name: Download Artifacts + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + path: artifacts + + - name: Build + uses: sillsdev/gha-ubuntu-packaging@5b56c86ee78598308d864edc55a1d06b4ba36f92 # v0.3 + with: + dist: "${{ matrix.dist }}" + platform: "${{ matrix.arch }}" + source_dir: "artifacts/keyman-srcpkg" + sourcepackage: "keyman_${{ needs.sourcepackage.outputs.VERSION }}-1.dsc" + deb_fullname: $DEBFULLNAME + deb_email: $DEBEMAIL + prerelease_tag: ${{ needs.sourcepackage.outputs.PRERELEASE_TAG }} + + - name: Output resulting .deb files + run: | + echo '```' >> $GITHUB_STEP_SUMMARY + echo "$(find artifacts/ -name \*.deb)" >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + + - name: Store binary packages + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + with: + name: keyman-binarypkgs + path: | + artifacts/* + !artifacts/keyman-srcpkg/ + if: always() + + deb_signing: + name: Sign source and binary packages + needs: [sourcepackage, binary_packages] + runs-on: ubuntu-latest + environment: "deploy (linux)" + if: github.event.client_payload.isTestBuild == 'false' + + steps: + - name: Sign packages + uses: sillsdev/gha-deb-signing@cd1af3dddf83787f9da20a93fc449d927a63bfbf # v0.4 + with: + src-pkg-path: "artifacts/keyman-srcpkg" + src-pkg-name: "keyman_${{ needs.sourcepackage.outputs.VERSION }}-1_source.changes" + bin-pkg-path: "artifacts/keyman-binarypkgs" + bin-pkg-name: "keyman_${{ needs.sourcepackage.outputs.VERSION }}-1${{ needs.sourcepackage.outputs.PRERELEASE_TAG }}+" + artifacts-name: "keyman-signedpkgs" + gpg-signing-key: "${{ secrets.GPG_SIGNING_KEY }}" + debsign-keyid: "${{ secrets.DEBSIGN_KEYID }}" + + upload-to-llso: + name: Upload packages to llso + needs: deb_signing + runs-on: self-hosted + environment: "deploy (linux)" + if: github.event.client_payload.isTestBuild == 'false' + + steps: + - name: Download Artifacts + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: keyman-signedpkgs + path: artifacts + + - name: Install dput + uses: ./.github/actions/apt-install + with: + packages: dput + + - name: Setup .dput.cf + run: | + echo "${{vars.ENV_DPUT_CONFIG}}" > ~/.dput.cf + + - name: Upload + run: | + case ${{ github.event.client_payload.branch }} in + stable-*) destination='' ;; + beta) destination='-proposed' ;; + *) destination='-experimental' ;; + esac + + cd artifacts/keyman-signedpkgs + ls -R + + echo -e "::group::${COLOR_GREEN}Upload source package" + cd artifacts/keyman-srcpkg + dput -U llso:ubuntu/jammy${destination} *_source.changes + echo "::endgroup::" + + echo -e "::group::${COLOR_GREEN}Uploading binary packages" + cd ../keyman-binarypkgs + pattern="keyman_${{ needs.sourcepackage.outputs.VERSION }}.+\+(.*)[0-9]_[^.]+.changes" + for f in *.changes; do + if [[ $f =~ $pattern ]]; then + dist=${BASH_REMATCH[1]} + dput -U llso:ubuntu/${dist}${destination} $f + fi + done + echo "::endgroup::" + + api_verification: + name: Verify API for libkmnkbp0.so + needs: [sourcepackage, binary_packages] + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0 + with: + ref: '${{ github.event.client_payload.ref }}' + + - name: Download Artifacts + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + path: artifacts + + - name: Install devscripts + uses: ./.github/actions/apt-install + with: + packages: devscripts equivs + + - name: Verify API + run: | + cd linux + SRC_PKG="${GITHUB_WORKSPACE}/artifacts/keyman-srcpkg/keyman_${{ needs.sourcepackage.outputs.VERSION }}-1.debian.tar.xz" \ + BIN_PKG="${GITHUB_WORKSPACE}/artifacts/keyman-binarypkgs/libkmnkbp0-0_${{ needs.sourcepackage.outputs.VERSION }}-1${{ needs.sourcepackage.outputs.PRERELEASE_TAG }}+jammy1_amd64.deb" \ + PKG_VERSION="${{ needs.sourcepackage.outputs.VERSION }}" \ + ./scripts/deb-packaging.sh --gha verify >> $GITHUB_STEP_SUMMARY + + - name: Archive .symbols file + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + with: + name: libkmnkbp0-0.symbols + path: linux/debian/libkmnkbp0-0.symbols + if: always() + + set_status: + name: Set result status on PR builds + needs: [sourcepackage, binary_packages, deb_signing, api_verification] + runs-on: ubuntu-latest + if: ${{ always() && github.event.client_payload.isTestBuild == 'true' }} + steps: + - name: Set success + if: needs.sourcepackage.result == 'success' && needs.binary_packages.result == 'success' && (needs.deb_signing.result == 'success' || needs.deb_signing.result == 'skipped') && needs.api_verification.result == 'success' + run: | + echo "RESULT=success" >> $GITHUB_ENV + echo "MSG=Package build succeeded" >> $GITHUB_ENV + + - name: Set cancelled + if: needs.sourcepackage.result == 'cancelled' || needs.binary_packages.result == 'cancelled' || needs.deb_signing.result == 'cancelled' || needs.api_verification.result == 'cancelled' + run: | + echo "RESULT=error" >> $GITHUB_ENV + echo "MSG=Package build cancelled" >> $GITHUB_ENV + + - name: Set failure + if: needs.sourcepackage.result == 'failure' || needs.binary_packages.result == 'failure' || needs.deb_signing.result == 'failure' || needs.api_verification.result == 'failure' + run: | + echo "RESULT=failure" >> $GITHUB_ENV + echo "MSG=Package build failed" >> $GITHUB_ENV + + - name: Set final status + run: | + gh api \ + --method POST \ + -H "Accept: application/vnd.github+json" \ + /repos/$GITHUB_REPOSITORY/statuses/${{ needs.sourcepackage.outputs.GIT_SHA }} \ + -f state="$RESULT" \ + -f target_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \ + -f description="$MSG" \ + -f context="$STATUS_CONTEXT" diff --git a/HISTORY.md b/HISTORY.md index d46acd0558..0ef9306e22 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,107 @@ # Keyman Version History +## 17.0.51 alpha 2023-02-18 + +* chore(common): Update Fula strings for Sprint A17S6 (#8245) + +## 17.0.50 alpha 2023-02-16 + +* feat(common): parent-child scripts for builder (#8198) +* fix(linux): Another iteration to fix packaging GHA (#8230) +* chore(common): updates Web & Web-related dependencies (#8196) +* fix(linux): Fix syntax for skipping upload in packaging GHA (#8236) + +## 17.0.49 alpha 2023-02-15 + +* feat(linux): Pass PR# in the event type (#8221) +* feat(linux): Implement uploading of packages in packaging GHA (#8223) +* fix(linux): Fix GHA package build (#8225) +* fix(linux): Another fix for GHA package build (#8228) + +## 17.0.48 alpha 2023-02-14 + +* fix(developer): Select BCP47 Code dialog inconsistencies (#8179) +* chore(common): automatically apply _builder_check_color (#8197) +* docs(linux): Update packaging documentation (#8202) +* chore(common): Report status if no platform needs build (#8210) +* chore(linux): Exclude autopkg tests on s390x (#8218) +* fix(linux): Fix path to symbols file in packaging GHA (#8209) + +## 17.0.47 alpha 2023-02-10 + +* fix(linux): Fix autopkgtests (#8201) +* fix(linux): Fix Verify-API step of GHA (#8199) + +## 17.0.46 alpha 2023-02-09 + +* fix(windows): add remove lang id uses correct keyboard id (#8186) +* chore(common): add `builder_term` function (#8187) +* chore(common): builder internal dependencies (#8188) +* chore(linux): Update changelog from Debian (#8192) +* feat(linux): Add debian packaging GHA (#7911) + +## 17.0.45 alpha 2023-02-08 + +* chore(ios): update certificate (#8176) +* fix(linux): Fix autopkgtests (#8181) +* chore(common): Cleanup Kannada locale (#8182) +* chore(windows): Fix Portuguese UI language name (#8184) + +## 17.0.44 alpha 2023-02-07 + +* chore(linux): Set test-helper script executable (#8178) +* chore(linux): Update debian changelog (#8156) + +## 17.0.43 alpha 2023-02-06 + +* chore(linux): Build with meson instead of autotools ️ (#8111) + +## 17.0.42 alpha 2023-02-03 + +* chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 (#8144) +* feat(developer): check for duplicated language codes in package editor and compiler (#8151) +* chore: Fail TC build if triggering Jenkins build fails (#8152) +* chore(linux): Fix lintian warnings (#8154) +* chore(core): Update meson version (#7882) +* refactor(android/engine): Consolidate Keyboard picker intent (#8163) + +## 17.0.41 alpha 2023-02-02 + +* chore(web): main web build & test script rework to our common script format + nomenclature (#7474) +* change(web): conversion to standard filesystem layout: source -> src, intermediate + release -> build (#7513) +* change(web): conversion to standard filesystem layout: testing -> src/test/manual, unit_tests -> src/test/auto (#7515) +* change(web): conversion to standard filesystem layout: tools -> src/tools (#7556) +* chore(web): updates build product references, extracts CI test-build scripts (#7831) +* feat(common): TS-based sourcemap remapping tool (#7894) +* feat(web): implements shell scripting for CI release-build configurations (#8001) + +## 17.0.40 alpha 2023-02-01 + +* chore(developer): kmcmpdll debug src path (#8127) +* chore(common): Merge end of beta from Sprint A17S5 (#8135) +* refactor(android): Change com.tavultesoft.kmea package to com.keyman.engine (#7981) +* refactor(android/engine): Split KMInAppKeyboardWebViewClient to new class (#7983) +* refactor(android/engine): Refactor KMSystemKeyboardWebViewClient (#7993) + +## 17.0.39 alpha 2023-01-31 + +* feat(windows): add additional registry keys to report (#8126) + +## 17.0.38 alpha 2023-01-30 + +* chore(deps): bump ua-parser-js from 0.7.31 to 0.7.33 (#8109) +* fix(linux): Fix CI build (#8121) + +## 17.0.37 alpha 2023-01-27 + +* chore(linux): Fix warnings (#8103) +* chore(linux): Remove legacy projects (#8102) +* Specify the path to the Debian package in the Vcs-Git header (#8104) + +## 17.0.36 alpha 2023-01-26 + +* chore(common): Add crowdin strings for Kannada (#8074) + ## 17.0.35 alpha 2023-01-25 * chore(common): revise tag variable name to VERSION_GIT_TAG (#8063) @@ -111,7 +213,7 @@ ## 17.0.13 alpha 2022-11-29 * fix(windows): lower case filenames for projects (#7837) -* refactor(linux): Refactor setting keyboard options ️ (#7804) +* refactor(linux): Refactor setting keyboard options (#7804) ## 17.0.12 alpha 2022-11-25 @@ -119,7 +221,7 @@ ## 17.0.11 alpha 2022-11-24 -* refactor(linux): Use consts instead of strings ️ (#7803) +* refactor(linux): Use consts instead of strings (#7803) ## 17.0.10 alpha 2022-11-21 @@ -140,14 +242,14 @@ * chore: fix TIER.md for master (#7704) -## 17.0.6 beta 2022-11-12 +## 17.0.6 alpha 2022-11-12 * chore: merge beta to master B16S1 (#7693) * chore(deps): bump minimatch from 3.0.4 to 3.1.2 (#7675) ## 17.0.5 alpha 2022-11-11 -* chore(linux): Update debian changelog :cherries: (#7681) +* chore(linux): Update debian changelog (#7681) ## 17.0.4 alpha 2022-11-10 @@ -168,6 +270,22 @@ * chore: move to 17.0-alpha (#7577) * chore: Move to 17.0 alpha +## 16.0.136 beta 2023-01-31 + +* chore(common): Update crowdin strings for Shuwa (Latin) (#8097) +* chore(common): Check in crowdin for Russian (#8072) +* chore(common): Check in crowdin for Ukrainian (#8073) +* chore(common): Add crowdin for Swedish (#8071) +* chore(common): Add crowdin strings for Czech (#8095) + +## 16.0.135 beta 2023-01-30 + +* chore(linux): Include packaging path in Vcs-Git header (#8110) + +## 16.0.134 beta 2023-01-25 + +* chore(common): Add crowdin strings for Kannada (#7970) + ## 16.0.133 beta 2023-01-19 * fix(linux): Properly set context after changing IP (#8025) diff --git a/VERSION.md b/VERSION.md index e5f493ff27..927bf1a9cc 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -17.0.36 \ No newline at end of file +17.0.52 \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/java/com/keyman/android/CheckInstallReferrer.java b/android/KMAPro/kMAPro/src/main/java/com/keyman/android/CheckInstallReferrer.java index afd0c5e574..62ec9813c3 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/keyman/android/CheckInstallReferrer.java +++ b/android/KMAPro/kMAPro/src/main/java/com/keyman/android/CheckInstallReferrer.java @@ -32,10 +32,10 @@ import com.android.installreferrer.api.InstallReferrerStateListener; import com.android.installreferrer.api.ReferrerDetails; import com.tavultesoft.kmapro.MainActivity; import com.tavultesoft.kmapro.R; -import com.tavultesoft.kmea.KmpInstallMode; -import com.tavultesoft.kmea.util.KMLog; -import com.tavultesoft.kmea.util.KMString; -import com.tavultesoft.kmea.util.VersionUtils; +import com.keyman.engine.KmpInstallMode; +import com.keyman.engine.util.KMLog; +import com.keyman.engine.util.KMString; +import com.keyman.engine.util.VersionUtils; public class CheckInstallReferrer { private static final String TAG = "CheckInstallReferrer"; diff --git a/android/KMAPro/kMAPro/src/main/java/com/keyman/android/DownloadIntentService.java b/android/KMAPro/kMAPro/src/main/java/com/keyman/android/DownloadIntentService.java index 7d7a801acf..d1f2eee7bb 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/keyman/android/DownloadIntentService.java +++ b/android/KMAPro/kMAPro/src/main/java/com/keyman/android/DownloadIntentService.java @@ -5,9 +5,9 @@ import android.content.Intent; import android.os.Bundle; import android.os.ResultReceiver; -import com.tavultesoft.kmea.KmpInstallMode; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.KmpInstallMode; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.KMLog; public class DownloadIntentService extends IntentService { private static final String TAG = "DownloadIntentSvc"; diff --git a/android/KMAPro/kMAPro/src/main/java/com/keyman/android/SystemKeyboard.java b/android/KMAPro/kMAPro/src/main/java/com/keyman/android/SystemKeyboard.java index 2d07b6fbf8..697825094b 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/keyman/android/SystemKeyboard.java +++ b/android/KMAPro/kMAPro/src/main/java/com/keyman/android/SystemKeyboard.java @@ -6,14 +6,14 @@ package com.keyman.android; import com.tavultesoft.kmapro.BuildConfig; import com.tavultesoft.kmapro.KeymanSettingsActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KMManager.KeyboardType; -import com.tavultesoft.kmea.KMHardwareKeyboardInterpreter; -import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardEventListener; -import com.tavultesoft.kmea.R; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.util.DependencyUtil; -import com.tavultesoft.kmea.util.DependencyUtil.LibraryType; +import com.keyman.engine.KMManager; +import com.keyman.engine.KMManager.KeyboardType; +import com.keyman.engine.KMHardwareKeyboardInterpreter; +import com.keyman.engine.KeyboardEventHandler.OnKeyboardEventListener; +import com.keyman.engine.R; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.util.DependencyUtil; +import com.keyman.engine.util.DependencyUtil.LibraryType; import android.content.Context; import android.content.SharedPreferences; diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/AdjustKeyboardHeightActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/AdjustKeyboardHeightActivity.java index 24527abbce..bc3e7929cd 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/AdjustKeyboardHeightActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/AdjustKeyboardHeightActivity.java @@ -19,8 +19,8 @@ import androidx.appcompat.app.ActionBar; import androidx.appcompat.widget.Toolbar; import androidx.core.content.ContextCompat; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.KMManager; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.KMManager; /** * Settings menu for adjusting the keyboard height. The value for the current device orientation diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/BookmarksActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/BookmarksActivity.java index 6cf3f468b4..6c1e2eb90d 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/BookmarksActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/BookmarksActivity.java @@ -37,8 +37,8 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.util.KMLog; public class BookmarksActivity extends BaseActivity { private static final String TAG = "BookmarksActivity"; diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/DownloadResultReceiver.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/DownloadResultReceiver.java index 64f5eaa911..14297aa87e 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/DownloadResultReceiver.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/DownloadResultReceiver.java @@ -10,9 +10,9 @@ import android.os.Handler; import android.os.ResultReceiver; import android.widget.Toast; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.KmpInstallMode; -import com.tavultesoft.kmea.util.FileUtils; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.KmpInstallMode; +import com.keyman.engine.util.FileUtils; import java.io.File; diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/GetStartedActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/GetStartedActivity.java index c10acadbfd..59558fdb1f 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/GetStartedActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/GetStartedActivity.java @@ -8,9 +8,9 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.data.Keyboard; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.data.Keyboard; import android.os.Bundle; import android.provider.Settings; diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/InfoActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/InfoActivity.java index 25af3f9f77..250e18ac9c 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/InfoActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/InfoActivity.java @@ -4,7 +4,7 @@ package com.tavultesoft.kmapro; -import com.tavultesoft.kmea.BaseActivity; +import com.keyman.engine.BaseActivity; import android.content.Context; import android.graphics.Bitmap; diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KMPBrowserActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KMPBrowserActivity.java index fe217c57e4..bb770ef5b2 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KMPBrowserActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KMPBrowserActivity.java @@ -21,11 +21,11 @@ import android.webkit.WebViewClient; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.util.KMPLink; -import com.tavultesoft.kmea.util.KMString; -import com.tavultesoft.kmea.util.WebViewUtils; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.util.KMPLink; +import com.keyman.engine.util.KMString; +import com.keyman.engine.util.WebViewUtils; import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeyboardSettingsActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeyboardSettingsActivity.java index 9b3b68f0f9..0989bf0d08 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeyboardSettingsActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeyboardSettingsActivity.java @@ -28,21 +28,21 @@ import android.widget.SimpleAdapter; import android.widget.TextView; import android.widget.Toast; -import com.tavultesoft.kmea.ConfirmDialogFragment; -import com.tavultesoft.kmea.KMHelpFileActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.data.KeyboardController; -import com.tavultesoft.kmea.util.DependencyUtil; -import com.tavultesoft.kmea.util.DependencyUtil.LibraryType; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.FileProviderUtils; -import com.tavultesoft.kmea.util.KMString; -import com.tavultesoft.kmea.util.MapCompat; -import com.tavultesoft.kmea.util.QRCodeUtil; +import com.keyman.engine.ConfirmDialogFragment; +import com.keyman.engine.KMHelpFileActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.KMKeyboardDownloaderActivity; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.data.KeyboardController; +import com.keyman.engine.util.DependencyUtil; +import com.keyman.engine.util.DependencyUtil.LibraryType; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.FileProviderUtils; +import com.keyman.engine.util.KMString; +import com.keyman.engine.util.MapCompat; +import com.keyman.engine.util.QRCodeUtil; -import static com.tavultesoft.kmea.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DELETE_KEYBOARD; +import static com.keyman.engine.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DELETE_KEYBOARD; // Public access is necessary to avoid IllegalAccessException public final class KeyboardSettingsActivity extends AppCompatActivity { diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsActivity.java index 7eb7919bec..86494e929b 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsActivity.java @@ -2,7 +2,7 @@ package com.tavultesoft.kmapro; import android.os.Bundle; -import com.tavultesoft.kmea.BaseActivity; +import com.keyman.engine.BaseActivity; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsFragment.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsFragment.java index de33bfd9ae..72c54aa0d0 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsFragment.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsFragment.java @@ -17,9 +17,9 @@ import androidx.preference.PreferenceFragmentCompat; import androidx.preference.PreferenceScreen; import androidx.preference.SwitchPreference; -import com.tavultesoft.kmea.DisplayLanguages; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.data.Dataset; +import com.keyman.engine.DisplayLanguages; +import com.keyman.engine.KMManager; +import com.keyman.engine.data.Dataset; import java.util.HashMap; diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsInstallActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsInstallActivity.java index b933f7306c..71a8f7c355 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsInstallActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsInstallActivity.java @@ -24,9 +24,9 @@ import android.os.Bundle; import android.widget.SimpleAdapter; import android.widget.TextView; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.data.KeyboardController; -import com.tavultesoft.kmea.util.MapCompat; +import com.keyman.engine.KMManager; +import com.keyman.engine.data.KeyboardController; +import com.keyman.engine.util.MapCompat; public class KeymanSettingsInstallActivity extends AppCompatActivity { private static final String TAG = "SettingsInstallActivity"; @@ -51,7 +51,7 @@ public class KeymanSettingsInstallActivity extends AppCompatActivity { getSupportActionBar().setDisplayShowHomeEnabled(true); getSupportActionBar().setDisplayShowTitleEnabled(false); - final ListView listView = findViewById(com.tavultesoft.kmea.R.id.listView); + final ListView listView = findViewById(com.keyman.engine.R.id.listView); Bundle bundle = getIntent().getExtras(); @@ -96,9 +96,9 @@ public class KeymanSettingsInstallActivity extends AppCompatActivity { installOptionList.add(hashMap); String[] from = new String[]{titleKey, subtitleKey, iconKey}; - int[] to = new int[]{com.tavultesoft.kmea.R.id.text1, com.tavultesoft.kmea.R.id.text2, com.tavultesoft.kmea.R.id.image1}; + int[] to = new int[]{com.keyman.engine.R.id.text1, com.keyman.engine.R.id.text2, com.keyman.engine.R.id.image1}; - ListAdapter adapter = new SimpleAdapter(context, installOptionList, com.tavultesoft.kmea.R.layout.list_row_layout2, from, to) { + ListAdapter adapter = new SimpleAdapter(context, installOptionList, com.keyman.engine.R.layout.list_row_layout2, from, to) { @Override public boolean isEnabled(int position) { HashMap hashMap = installOptionList.get(position); diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsLocalizeActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsLocalizeActivity.java index 0c6ea5b1ef..2402d7b109 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsLocalizeActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsLocalizeActivity.java @@ -21,7 +21,7 @@ import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import androidx.preference.PreferenceManager; -import com.tavultesoft.kmea.DisplayLanguages; +import com.keyman.engine.DisplayLanguages; import java.util.ArrayList; import java.util.HashMap; @@ -48,7 +48,7 @@ public class KeymanSettingsLocalizeActivity extends AppCompatActivity { getSupportActionBar().setDisplayShowHomeEnabled(true); getSupportActionBar().setDisplayShowTitleEnabled(false); - final ListView listView = findViewById(com.tavultesoft.kmea.R.id.listView); + final ListView listView = findViewById(com.keyman.engine.R.id.listView); Bundle bundle = getIntent().getExtras(); @@ -69,9 +69,9 @@ public class KeymanSettingsLocalizeActivity extends AppCompatActivity { } String[] from = new String[]{titleKey, subtitleKey, iconKey}; - int[] to = new int[]{com.tavultesoft.kmea.R.id.text1, com.tavultesoft.kmea.R.id.image1}; + int[] to = new int[]{com.keyman.engine.R.id.text1, com.keyman.engine.R.id.image1}; - ListAdapter adapter = new SimpleAdapter(context, localizeOptionList, com.tavultesoft.kmea.R.layout.list_row_layout1, from, to) { + ListAdapter adapter = new SimpleAdapter(context, localizeOptionList, com.keyman.engine.R.layout.list_row_layout1, from, to) { }; listView.setAdapter(adapter); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/LanguageSettingsActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/LanguageSettingsActivity.java index 335de4da3e..004d096bac 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/LanguageSettingsActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/LanguageSettingsActivity.java @@ -25,13 +25,13 @@ import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.SwitchCompat; import androidx.appcompat.widget.Toolbar; -import com.tavultesoft.kmea.KeyboardPickerActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.ModelPickerActivity; -import com.tavultesoft.kmea.data.Dataset; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.data.adapters.NestedAdapter; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.KeyboardPickerActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.ModelPickerActivity; +import com.keyman.engine.data.Dataset; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.data.adapters.NestedAdapter; +import com.keyman.engine.util.KMLog; import java.util.HashMap; @@ -315,7 +315,7 @@ public final class LanguageSettingsActivity extends AppCompatActivity { } // Fully details the building of this Activity's list view items. - static private class FilteredKeyboardsAdapter extends NestedAdapter { + static private class FilteredKeyboardsAdapter extends NestedAdapter { static final int RESOURCE = R.layout.list_row_layout1; private static class ViewHolder { diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/LanguagesSettingsActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/LanguagesSettingsActivity.java index 0cf396f635..8cc4ae8070 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/LanguagesSettingsActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/LanguagesSettingsActivity.java @@ -22,11 +22,11 @@ import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; -import com.tavultesoft.kmea.data.Dataset; -import com.tavultesoft.kmea.data.adapters.AdapterFilter; -import com.tavultesoft.kmea.data.adapters.NestedAdapter; -import com.tavultesoft.kmea.KeyboardPickerActivity; -import com.tavultesoft.kmea.KMManager; +import com.keyman.engine.data.Dataset; +import com.keyman.engine.data.adapters.AdapterFilter; +import com.keyman.engine.data.adapters.NestedAdapter; +import com.keyman.engine.KeyboardPickerActivity; +import com.keyman.engine.KMManager; import java.util.ArrayList; import java.util.HashMap; diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java index 789844db53..96c0d3edfe 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java @@ -18,29 +18,29 @@ import java.util.List; import java.util.Map; import com.keyman.android.CheckInstallReferrer; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.KMHelpFileActivity; -import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KMManager.KeyboardType; -import com.tavultesoft.kmea.KmpInstallMode; -import com.tavultesoft.kmea.KMTextView; -import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardDownloadEventListener; -import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardEventListener; -import com.tavultesoft.kmea.cloud.CloudApiTypes; -import com.tavultesoft.kmea.cloud.CloudDownloadMgr; -import com.tavultesoft.kmea.cloud.impl.CloudLexicalModelMetaDataDownloadCallback; -import com.tavultesoft.kmea.data.CloudRepository; -import com.tavultesoft.kmea.data.Dataset; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.data.LexicalModel; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.DownloadFileUtils; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.KMHelpFileActivity; +import com.keyman.engine.KMKeyboardDownloaderActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.KMManager.KeyboardType; +import com.keyman.engine.KmpInstallMode; +import com.keyman.engine.KMTextView; +import com.keyman.engine.KeyboardEventHandler.OnKeyboardDownloadEventListener; +import com.keyman.engine.KeyboardEventHandler.OnKeyboardEventListener; +import com.keyman.engine.cloud.CloudApiTypes; +import com.keyman.engine.cloud.CloudDownloadMgr; +import com.keyman.engine.cloud.impl.CloudLexicalModelMetaDataDownloadCallback; +import com.keyman.engine.data.CloudRepository; +import com.keyman.engine.data.Dataset; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.data.LexicalModel; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.DownloadFileUtils; import com.keyman.android.DownloadIntentService; -import com.tavultesoft.kmea.util.KMLog; -import com.tavultesoft.kmea.util.KMPLink; -import com.tavultesoft.kmea.util.KMString; -import com.tavultesoft.kmea.util.WebViewUtils.EngineWebViewVersionStatus; +import com.keyman.engine.util.KMLog; +import com.keyman.engine.util.KMPLink; +import com.keyman.engine.util.KMString; +import com.keyman.engine.util.WebViewUtils.EngineWebViewVersionStatus; import android.Manifest; import android.app.ProgressDialog; diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/PackageActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/PackageActivity.java index 86e1008e54..a99019fe2e 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/PackageActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/PackageActivity.java @@ -18,14 +18,14 @@ import android.widget.Toast; import com.stepstone.stepper.StepperLayout; import com.stepstone.stepper.VerificationError; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KeyboardEventHandler; -import com.tavultesoft.kmea.KmpInstallMode; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.packages.PackageProcessor; -import com.tavultesoft.kmea.packages.LexicalModelPackageProcessor; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.KMManager; +import com.keyman.engine.KeyboardEventHandler; +import com.keyman.engine.KmpInstallMode; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.packages.PackageProcessor; +import com.keyman.engine.packages.LexicalModelPackageProcessor; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.KMLog; import org.json.JSONObject; diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SelectLanguageActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SelectLanguageActivity.java index ab8776bc64..892ac820cf 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SelectLanguageActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SelectLanguageActivity.java @@ -13,10 +13,10 @@ import androidx.fragment.app.Fragment; import com.stepstone.stepper.StepperLayout; import com.stepstone.stepper.VerificationError; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.packages.PackageProcessor; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.KMManager; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.packages.PackageProcessor; +import com.keyman.engine.util.KMLog; import org.json.JSONObject; diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SelectLanguageFragment.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SelectLanguageFragment.java index da53c2000f..03d053e469 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SelectLanguageFragment.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SelectLanguageFragment.java @@ -23,11 +23,11 @@ import androidx.fragment.app.Fragment; import com.stepstone.stepper.BlockingStep; import com.stepstone.stepper.StepperLayout; import com.stepstone.stepper.VerificationError; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.data.KeyboardController; -import com.tavultesoft.kmea.packages.PackageProcessor; -import com.tavultesoft.kmea.util.BCP47; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.data.KeyboardController; +import com.keyman.engine.packages.PackageProcessor; +import com.keyman.engine.util.BCP47; +import com.keyman.engine.util.KMLog; import org.json.JSONObject; @@ -179,7 +179,7 @@ public final class SelectLanguageFragment extends Fragment implements BlockingSt } String[] from = new String[]{titleKey, subtitleKey, iconKey}; - int[] to = new int[]{R.id.text1, R.id.text2, com.tavultesoft.kmea.R.id.image1}; + int[] to = new int[]{R.id.text1, R.id.text2, com.keyman.engine.R.id.image1}; adapter = new KMListAdapter(context, list, R.layout.list_row_layout2, from, to); listView.setAdapter(adapter); diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SelectPackageActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SelectPackageActivity.java index bd298a42ad..46bc68ca1a 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SelectPackageActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SelectPackageActivity.java @@ -19,10 +19,10 @@ import android.widget.TextView; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.data.KeyboardController; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.KMManager; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.data.KeyboardController; +import com.keyman.engine.util.KMLog; import java.io.File; import java.util.ArrayList; @@ -87,9 +87,9 @@ public final class SelectPackageActivity extends AppCompatActivity { } String[] from = new String[]{titleKey, subtitleKey, iconKey}; - int[] to = new int[]{com.tavultesoft.kmea.R.id.text1, com.tavultesoft.kmea.R.id.text2, com.tavultesoft.kmea.R.id.image1}; + int[] to = new int[]{com.keyman.engine.R.id.text1, com.keyman.engine.R.id.text2, com.keyman.engine.R.id.image1}; - ListAdapter adapter = new SimpleAdapter(context, list, com.tavultesoft.kmea.R.layout.list_row_layout2, from, to) { + ListAdapter adapter = new SimpleAdapter(context, list, com.keyman.engine.R.layout.list_row_layout2, from, to) { }; listView.setAdapter(adapter); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SplashScreenActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SplashScreenActivity.java index 7dda328be9..60d26d7508 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SplashScreenActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SplashScreenActivity.java @@ -8,7 +8,7 @@ import android.app.Activity; import android.content.Intent; import android.widget.TextView; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.util.KMLog; import java.util.Calendar; diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/StepperAdapter.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/StepperAdapter.java index 26fdbca2a6..86b3d366d4 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/StepperAdapter.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/StepperAdapter.java @@ -13,9 +13,9 @@ import androidx.fragment.app.FragmentManager; import com.stepstone.stepper.Step; import com.stepstone.stepper.adapter.AbstractFragmentStepAdapter; import com.stepstone.stepper.viewmodel.StepViewModel; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.packages.PackageProcessor; -import com.tavultesoft.kmea.util.FileUtils; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.packages.PackageProcessor; +import com.keyman.engine.util.FileUtils; import java.io.File; diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/WebBrowserActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/WebBrowserActivity.java index eeff8d75bb..3308caff9a 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/WebBrowserActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/WebBrowserActivity.java @@ -10,9 +10,9 @@ import java.net.URL; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.util.KMPLink; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.util.KMPLink; import android.annotation.SuppressLint; import android.content.Context; diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/WebViewFragment.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/WebViewFragment.java index d844a06996..5e7aed9dd2 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/WebViewFragment.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/WebViewFragment.java @@ -12,9 +12,9 @@ import androidx.fragment.app.Fragment; import com.stepstone.stepper.BlockingStep; import com.stepstone.stepper.StepperLayout; import com.stepstone.stepper.VerificationError; -import com.tavultesoft.kmea.packages.PackageProcessor; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.WebViewUtils; +import com.keyman.engine.packages.PackageProcessor; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.WebViewUtils; import android.graphics.Bitmap; import android.os.Bundle; diff --git a/android/KMAPro/kMAPro/src/main/res/layout/activity_main.xml b/android/KMAPro/kMAPro/src/main/res/layout/activity_main.xml index fb960c8473..87c7fe16f9 100644 --- a/android/KMAPro/kMAPro/src/main/res/layout/activity_main.xml +++ b/android/KMAPro/kMAPro/src/main/res/layout/activity_main.xml @@ -17,7 +17,7 @@ android:layout_height="wrap_content" android:layout_below="@id/titlebar"/> - - + diff --git a/android/KMAPro/kMAPro/src/main/res/values-b+shu+latn/strings.xml b/android/KMAPro/kMAPro/src/main/res/values-b+shu+latn/strings.xml index 0ae4064ffd..bfd4f8b6d5 100644 --- a/android/KMAPro/kMAPro/src/main/res/values-b+shu+latn/strings.xml +++ b/android/KMAPro/kMAPro/src/main/res/values-b+shu+latn/strings.xml @@ -1,5 +1,6 @@ + Gassuma diff --git a/android/KMAPro/kMAPro/src/main/res/values-ff-rZA/strings.xml b/android/KMAPro/kMAPro/src/main/res/values-ff-rZA/strings.xml index a14154d449..c5780766f0 100644 --- a/android/KMAPro/kMAPro/src/main/res/values-ff-rZA/strings.xml +++ b/android/KMAPro/kMAPro/src/main/res/values-ff-rZA/strings.xml @@ -1,5 +1,6 @@ + Lollin @@ -82,7 +83,7 @@ Hoto hollu cifol e palal boowe - Vibrate when typing + Yerɓu tuma tappugol Hollu beywal sahaa kala @@ -156,5 +157,5 @@ Tappirde ena naamndii yamre Keyman ɓurnde hesɗude - Unable to launch web browser + Horiima hurminde wanngorde geese diff --git a/android/KMAPro/kMAPro/src/main/res/values-kn-rIN/strings.xml b/android/KMAPro/kMAPro/src/main/res/values-kn-rIN/strings.xml index a3e30849d1..21ec6f216b 100644 --- a/android/KMAPro/kMAPro/src/main/res/values-kn-rIN/strings.xml +++ b/android/KMAPro/kMAPro/src/main/res/values-kn-rIN/strings.xml @@ -36,7 +36,7 @@ \nಎಲ್ಲಾ ಪಠ್ಯವನ್ನು ತೆರವುಗೊಳಿಸಲಾಗುತ್ತದೆ\n - ಶುರುಮಾಡಿ + ಪ್ರಾರಂಭಿಕ ಪರದೆ ನಿಮ್ಮ ಭಾಷೆಗೆ ಕೀಲಿಮಣೆಯನ್ನು ಸೇರಿಸಿ diff --git a/android/KMAPro/kMAPro/src/main/res/values-ru-rRU/strings.xml b/android/KMAPro/kMAPro/src/main/res/values-ru-rRU/strings.xml new file mode 100644 index 0000000000..a42578425d --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/res/values-ru-rRU/strings.xml @@ -0,0 +1,163 @@ + + + + + Поделиться + + Веб-браузер + + Размер текста + + Больше + + Очистить текст + + Инф. + + Настройки + + Установить обновления + + Версия: %1$s + + Keyman требует Chrome версии 57 или новее. + + Обновить Chrome + + Начните вводить здесь… + + + + Размер текста: %1$d + + Размер текста вверх + + Размер текста вниз + + \nВесь текст будет очищен\n + + Начать работу + + Добавить клавиатуру для вашего языка + + Включить клавиатуру как системную клавиатуру + + Установить клавиатуру по умолчанию + + Подробнее + + Показать \"%1$s\" при запуске + + Для установки пакетов клавиатуры разрешите разрешение на чтение внешнего накопителя. + + Запрос на доступ к хранилищу отклонен. Может не установить пакет клавиатуры + + Настройки + + + Установленные языки (%1$d) + Установленные языки (%1$d) + Установленные языки (%1$d) + Установленные языки (%1$d) + + + Установить клавиатуру или словарь + + Показать язык + + Настройка высоты клавиатуры + + Заголовок пробела + + Клавиатура + + Язык + + Язык + клавиатура + + Пустой + + Показывать имя клавиатуры на пробеле + + Показывать название языка в пробеле + + Язык и клавиатура на пробеле + + Не показывать заголовок в пробеле + + Vibrate when typing + + Всегда показывать баннер + + Будет реализовано + + Если выключен, отображается только при включенном предиктивном тексте + + Разрешить отправку отчетов об ошибках по сети + + Когда включено, отчеты о сбоях будут отправлены + + Отчеты о сбое не будут отправлены + + Установить с keyman.com + + Установить из локального файла + + Установить с другого устройства + + Добавить языки на установленную клавиатуру + + (из пакета клавиатуры) + + Выберите набор клавиатуры + + Выберите языки для %1$s + + Язык %1$s добавлен в %2$s + + Все языки уже установлены + + Перетащите клавиатуру для изменения высоты + + Повернуть устройство для настройки портрета и ландшафта + + Сброс по умолчанию + + Поиск или введите URL + + Закладки + + Нет закладок + + Добавить закладку + + Заглавие + + Url + + Не удалось установить пакет %1$s + + Загрузка пакета клавиатуры\n%1$s… + + Не удалось извлечь + + Установить клавиатуру + + Установить словарь + + %1$s не является допустимым файлом пакета Keyman.\n%2$s\" + + В пакете клавиатуры нет сенсорных клавиатур для установки + + Нет нового предиктивного текста для установки + + Нет клавиатуры или предиктивного текста для установки + + Пакет клавиатуры не имеет связанных языков для установки + + Невалидные/отсутствующие метаданные в пакете + + Keyboard requires a newer version of Keyman + + Unable to launch web browser + diff --git a/android/KMAPro/kMAPro/src/main/res/values-sv-rSE/strings.xml b/android/KMAPro/kMAPro/src/main/res/values-sv-rSE/strings.xml new file mode 100644 index 0000000000..1ad77c2919 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/res/values-sv-rSE/strings.xml @@ -0,0 +1,161 @@ + + + + + Dela + + Webbläsare + + Textstorlek + + Mer + + Rensa text + + Information + + Inställningar + + Installera uppdateringar + + Version: %1$s + + Keyman kräver Chrome version 57 eller senare. + + Uppdatera Chrome + + Börja skriva här… + + + + Textstorlek: %1$d + + Textstorlek upp + + Textstorlek ner + + \nAll text kommer att rensas\n + + Kom igång + + Lägg till ett tangentbord för ditt språk + + Aktivera Keyman som tangentbord i hela systemet + + Sätt Keyman som standardtangentbord + + Mer information + + Visa \"%1$s\" vid uppstart + + För att installera tangentbordspaket, tillåt Keyman tillåtelse att läsa extern lagring. + + Begäran om lagringsbehörighet nekades. Kan misslyckas med att installera tangentbordspaket + + Inställningar + + + Installerade språk (%1$d) + Installerade språk (%1$d) + + + Installera tangentbord eller ordbok + + Visa språk + + Justera tangentbordshöjd + + Mellanslag bildtext + + Keyboard + + Språk + + Språk + Tangentbord + + Tom + + Visa tangentbordsnamn på mellanslag + + Visa språknamn på mellanslag + + Språk och tangentbord på mellanslagstangenten + + Visa inte bildtext på mellanslagstangenten + + Vibrate when typing + + Visa alltid banner + + Att implementeras + + När du är avstängd, visas endast när prediktiv text är aktiverad + + Tillåt skicka kraschrapporter över nätverk + + När den är aktiverad kommer kraschrapporter att skickas + + När du är avstängd skickas inte kraschrapporter + + Installera från keyman.com + + Installera från lokal fil + + Installera från annan enhet + + Lägg till språk till installerat tangentbord + + (från tangentbordspaket) + + Välj tangentbordspaket + + Välj språk för %1$s + + Lade till språk %1$s till %2$s + + Alla språk är redan installerade + + Dra tangentbordet för att ändra storlek på höjden + + Rotera enheten för att justera stående och liggande + + Återställ till standard + + Sök eller skriv URL + + Bokmärken + + Inga bokmärken + + Lägg till bokmärke + + Titel + + URL + + Paketet %1$s kunde inte installeras + + Laddar ner tangentbordspaket\n%1$s… + + Det gick inte att extrahera + + Installera tangentbord + + Installera ordbok + + %1$s är inte en giltig Keyman-fil.\n%2$s\" + + Tangentbordspaketet har inga touch-optimerade tangentbord att installera + + Ingen ny prediktiv text att installera + + Inga tangentbord eller prediktiv text att installera + + Tangentbordspaket har inga associerade språk att installera + + Ogiltiga/saknade metadata i paketet + + Keyboard requires a newer version of Keyman + + Unable to launch web browser + diff --git a/android/KMAPro/kMAPro/src/main/res/values-uk-rUA/strings.xml b/android/KMAPro/kMAPro/src/main/res/values-uk-rUA/strings.xml new file mode 100644 index 0000000000..0b9abbf394 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/res/values-uk-rUA/strings.xml @@ -0,0 +1,163 @@ + + + + + Поділитись + + Веб-переглядач + + Розмір тексту + + Більше + + Очистити текст + + Інформація + + Налаштування + + Встановити оновлення + + Версія: %1$s + + Keyman вимагає Chrome версії 57 або новіше. + + Оновлення Chrome + + Почніть вводити тут… + + + + Розмір тексту: %1$d + + Розмір тексту вгору + + Розмір тексту вниз + + \nВесь текст буде очищено\n + + Початок роботи + + Додайте клавіатуру для вашої мови + + Увімкнути Keyman як системну клавіатуру + + Встановити Keyman як типова клавіатура + + Детальніше + + Показувати \"%1$s\" під час запуску + + Щоб встановити пакунки клавіатури, дозвольте Keyman читати зовнішнє сховище. + + Запит на дозвіл на зберігання даних було відхилено. Може не вдалося встановити пакет клавіатури + + Налаштування + + + Встановлені мови (%1$d) + Встановлені мови (%1$d) + Встановлені мови (%1$d) + Встановлені мови (%1$d) + + + Встановлення клавіатури або словника + + Мова інтерфейсу + + Відрегулюйте висоту клавіатури + + Заголовок до панелі + + Keyboard + + Мова: + + Мова + Клавіатура + + Пустий + + Показувати назву клавіатури на пробілі + + Показувати назву мови на пробілі + + Мова і клавіатура на пробілі + + Не показувати підпис на пробілі + + Vibrate when typing + + Завжди показувати банер + + Для реалізування + + Коли вимкнено, відображається лише коли включений прогнозований текст + + Дозволити надсилання звітів про аварії через мережу + + Коли увімкнено, звіти про збої будуть надіслані + + Коли вимкнено, звіти про помилки не надсилатимуться + + Встановити з keyman.com + + Встановити з локального файлу + + Встановити з іншого пристрою + + Додати мови до встановленої клавіатури + + (із пакета клавіатури) + + Виберіть пакунок клавіатури + + Вибрати мову для %1$s + + Додано мову %1$s до %2$s + + Всі мови вже встановлені + + Перетягніть клавіатуру, щоб змінити розмір висоти + + Поверніть пристрій, щоб змінити портретну та альбомну орієнтацію + + Відновити параметри за замовчуванням + + Пошук або введення URL + + Закладки + + Немає закладок + + Додати закладку + + Найменування + + URL-адреса + + Не вдалося встановити пакунок %1$s + + Завантаження пакета клавіатури\n%1$s… + + Не вдалося витягти + + Встановлення клавіатури + + Установіть словник + + %1$s не є коректним файлом пакету Keyman.\n%2$s\" + + Пакет клавіатури не має сенсорних клавіатур для встановлення + + Немає нового предикатного тексту для встановлення + + Немає клавіатур чи прогнозованого тексту для встановлення + + У пакунку клавіатури немає пов\'язаних мов для встановлення + + Невірні/відсутні метадані в пакеті + + Keyboard requires a newer version of Keyman + + Unable to launch web browser + diff --git a/android/KMEA/app/src/main/AndroidManifest.xml b/android/KMEA/app/src/main/AndroidManifest.xml index 3ba6d1a835..b880992618 100644 --- a/android/KMEA/app/src/main/AndroidManifest.xml +++ b/android/KMEA/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="com.keyman.engine" > @@ -22,7 +22,7 @@ implements OnClickListener { private final static int KEYBOARD_LAYOUT_RESOURCE = R.layout.list_row_layout3; 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 new file mode 100644 index 0000000000..6b6503828d --- /dev/null +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardWebViewClient.java @@ -0,0 +1,280 @@ +/** + * Copyright (C) 2023 SIL International. All rights reserved. + */ +package com.keyman.engine; + +import android.content.Context; +import android.content.SharedPreferences; +import android.graphics.Bitmap; +import android.graphics.RectF; +import android.net.Uri; +import android.util.Log; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import android.widget.RelativeLayout; + +import com.keyman.engine.KeyboardEventHandler.EventType; +import com.keyman.engine.KMManager; +import com.keyman.engine.KMManager.KeyboardType; +import com.keyman.engine.util.KMLog; +import com.keyman.engine.data.Keyboard; + +import org.json.JSONObject; + +import java.util.ArrayList; +import java.util.HashMap; + +public final class KMKeyboardWebViewClient extends WebViewClient { + public static final String TAG = "KMKeyboardWebViewClient"; + + public static Context context; + private static KeyboardType keyboardType; + private static boolean keyboardLoaded; + + KMKeyboardWebViewClient(Context context, KeyboardType keyboardType) { + KMKeyboardWebViewClient.context = context; + KMKeyboardWebViewClient.keyboardType = keyboardType; + KMKeyboardWebViewClient.keyboardLoaded = false; + + if (keyboardType != KeyboardType.KEYBOARD_TYPE_INAPP && keyboardType != KeyboardType.KEYBOARD_TYPE_SYSTEM) { + KMLog.LogError(TAG, String.format("Cannot initialize: Invalid keyboard type: %s", keyboardType.toString())); + } + } + + public void setContext(Context context) { + KMKeyboardWebViewClient.context = context; + } + + public boolean getKeyboardLoaded() { + return keyboardLoaded; + } + + public void setKeyboardLoaded(boolean keyboardLoaded) { + KMKeyboardWebViewClient.keyboardLoaded = keyboardLoaded; + } + + @Override + public void onPageStarted(WebView view, String url, Bitmap favicon) { + } + + @Override + public void onPageFinished(WebView view, String url) { + Log.d("KMEA", String.format("onPageFinished: [%s] %s", keyboardType.toString(), url)); + shouldOverrideUrlLoading(view, url); + } + + private void pageLoaded(WebView view, String url) { + Log.d("KMEA", String.format("pageLoaded: [%s] %s", keyboardType.toString(), url)); + KMKeyboard kmKeyboard = KMManager.getKMKeyboard(keyboardType); + if (kmKeyboard == null) { + KMLog.LogError(TAG, String.format("pageLoaded and %s keyboard null", keyboardType.toString())); + return; + } + kmKeyboard.keyboardSet = false; + KMManager.currentLexicalModel = null; + + if (url.startsWith("file")) { // TODO: is this test necessary? + KMKeyboardWebViewClient.keyboardLoaded = true; + + SharedPreferences prefs = context.getSharedPreferences(context.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); + int index = prefs.getInt(KMManager.KMKey_UserKeyboardIndex, 0); + if (index < 0) { + index = 0; + } + Keyboard keyboardInfo = KMManager.getKeyboardInfo(context, index); + String langId = null; + if (keyboardInfo != null) { + langId = keyboardInfo.getLanguageID(); + kmKeyboard.setKeyboard(keyboardInfo); + } else { + // Revert to default (index 0) or fallback keyboard + keyboardInfo = KMManager.getKeyboardInfo(context, 0); + if (keyboardInfo == null) { + // Only log SystemKeyboard to Sentry because some keyboard apps like FV don't install keyboards until the user chooses + if (keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM) { + KMLog.LogError(TAG, "No keyboards installed. Reverting to fallback"); + } + keyboardInfo = KMManager.getDefaultKeyboard(context); + } + if (keyboardInfo != null) { + langId = keyboardInfo.getLanguageID(); + kmKeyboard.setKeyboard(keyboardInfo); + } + } + + KMManager.registerAssociatedLexicalModel(langId); + + kmKeyboard.showHelpBubbleAfterDelay(2000, true); // check if it should be shown at that time! + + kmKeyboard.callJavascriptAfterLoad(); + kmKeyboard.setSpacebarText(KMManager.getSpacebarText()); + + KeyboardEventHandler.notifyListeners(KMTextView.kbEventListeners, keyboardType, EventType.KEYBOARD_LOADED, null); + + // Special handling for in-app TextView context keymanapp/keyman#3809 + if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP && + KMTextView.activeView != null && KMTextView.activeView.getClass() == KMTextView.class) { + KMTextView.updateTextContext(); + } + } + } + + @Override + public boolean shouldOverrideUrlLoading(WebView view, String url) { + Log.d("KMEA", String.format("shouldOverrideUrlLoading [%s]: %s", keyboardType.toString(), url)); + KMKeyboard kmKeyboard = KMManager.getKMKeyboard(keyboardType); + if (kmKeyboard == null) { + KMLog.LogError(TAG, String.format("shouldOverrideUrlLoading and %s null", keyboardType.toString())); + return false; + } + + // URL has actual path to the keyboard.html file as a prefix! We need to replace + // just the first intended '#' to get URI-based query param processing. + + // At some point, other parts of the function should be redone to allow use of ? instead + // of # in our WebView command "queries" entirely. + String cmd = url.replace("keyboard.html#", "keyboard.html?"); + Uri urlCommand = Uri.parse(cmd); + if (url.indexOf("pageLoaded") >= 0) { + pageLoaded(view, url); + } else if (url.indexOf("hideKeyboard") >= 0) { + // Dismiss help bubble - though it should only ever display with KEYBOARD_TYPE_INAPP + kmKeyboard.dismissHelpBubble(); + if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) { + if (KMTextView.activeView != null && KMTextView.activeView.getClass() == KMTextView.class) { + KMTextView textView = (KMTextView) KMTextView.activeView; + textView.dismissKeyboard(); + } + } else if (keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM) { + if (KMManager.IMService != null) { + KMManager.IMService.requestHideSelf(0); + } + } + } else if (urlCommand.getQueryParameter("globeKeyAction") != null) { + kmKeyboard.dismissHelpBubble(); + kmKeyboard.setShouldShowHelpBubble(false); + + // Globe key has been used; disable the internal preference setting. + KMManager.setPersistentShouldShowHelpBubble(false); + + KMManager.handleGlobeKeyAction(context, urlCommand.getBooleanQueryParameter("keydown", false), + keyboardType); + } else if (urlCommand.getQueryParameter("helpBubbleDismissed") != null) { + // 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); + boolean isModelActive = change.equals("active"); + // appContext instead of context? + SharedPreferences prefs = context.getSharedPreferences(context.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); + boolean modelPredictionPref = false; + if (KMManager.currentLexicalModel != null) { + modelPredictionPref = prefs.getBoolean(KMManager.getLanguagePredictionPreferenceKey(KMManager.currentLexicalModel.get(KMManager.KMKey_LanguageID)), true); + } + KMManager.currentBanner = (isModelActive && modelPredictionPref) ? + KMManager.KM_BANNER_STATE_SUGGESTION : KMManager.KM_BANNER_STATE_BLANK; + RelativeLayout.LayoutParams params = KMManager.getKeyboardLayoutParams(); + kmKeyboard.setLayoutParams(params); + } else if (url.indexOf("suggestPopup") >= 0) { + double x = Float.parseFloat(urlCommand.getQueryParameter("x")); + double y = Float.parseFloat(urlCommand.getQueryParameter("y")); + double width = Float.parseFloat(urlCommand.getQueryParameter("w")); + double height = Float.parseFloat(urlCommand.getQueryParameter("h")); + String suggestionJSON = urlCommand.getQueryParameter("suggestion"); + + JSONParser parser = new JSONParser(); + JSONObject obj = parser.getJSONObjectFromURIString(suggestionJSON); + + /* // For future implementation + InAppKeyboard.suggestionWindowPos = new double[]{x, y}; + InAppKeyboard.suggestionJSON = suggestionJSON; + + try { + Log.v("KMEA", "Suggestion display: " + obj.getString("displayAs")); + Log.v("KMEA", "Suggestion's banner coords: " + x + ", " + y + ", " + width + ", " + height); + Log.v("KMEA", "Is a suggestion: "); // likely outdated now that tags exist. + } catch (JSONException e) { + //e.printStackTrace(); + Log.v("KMEA", "JSON parsing error: " + e.getMessage()); + } + */ + } else if (url.indexOf("reloadAfterError") >= 0) { + kmKeyboard.reloadAfterError(); + } + return false; + } +} diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMManager.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java similarity index 80% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMManager.java rename to android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java index e7bab6f722..b8e115f3e8 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMManager.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java @@ -2,7 +2,7 @@ * Copyright (C) 2017 SIL International. All rights reserved. */ -package com.tavultesoft.kmea; +package com.keyman.engine; import java.io.File; import java.io.FileFilter; @@ -12,7 +12,6 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -34,7 +33,6 @@ import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; import android.os.Build; -import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Looper; @@ -62,27 +60,25 @@ import io.sentry.Breadcrumb; import io.sentry.Sentry; import io.sentry.SentryLevel; -import com.tavultesoft.kmea.KeyboardEventHandler.EventType; -import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardDownloadEventListener; -import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardEventListener; -import com.tavultesoft.kmea.cloud.CloudDataJsonUtil; -import com.tavultesoft.kmea.cloud.CloudDownloadMgr; -import com.tavultesoft.kmea.data.Dataset; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.data.KeyboardController; -import com.tavultesoft.kmea.logic.ResourcesUpdateTool; -import com.tavultesoft.kmea.packages.JSONUtils; -import com.tavultesoft.kmea.packages.LexicalModelPackageProcessor; -import com.tavultesoft.kmea.packages.PackageProcessor; -import com.tavultesoft.kmea.util.BCP47; -import com.tavultesoft.kmea.util.CharSequenceUtil; -import com.tavultesoft.kmea.util.DependencyUtil; -import com.tavultesoft.kmea.util.DependencyUtil.LibraryType; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.KMLog; -import com.tavultesoft.kmea.util.KMString; -import com.tavultesoft.kmea.util.MapCompat; -import com.tavultesoft.kmea.util.WebViewUtils; +import com.keyman.engine.KeyboardEventHandler.OnKeyboardDownloadEventListener; +import com.keyman.engine.KeyboardEventHandler.OnKeyboardEventListener; +import com.keyman.engine.cloud.CloudDownloadMgr; +import com.keyman.engine.data.Dataset; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.data.KeyboardController; +import com.keyman.engine.logic.ResourcesUpdateTool; +import com.keyman.engine.packages.JSONUtils; +import com.keyman.engine.packages.LexicalModelPackageProcessor; +import com.keyman.engine.packages.PackageProcessor; +import com.keyman.engine.util.BCP47; +import com.keyman.engine.util.CharSequenceUtil; +import com.keyman.engine.util.DependencyUtil; +import com.keyman.engine.util.DependencyUtil.LibraryType; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.KMLog; +import com.keyman.engine.util.KMString; +import com.keyman.engine.util.MapCompat; +import com.keyman.engine.util.WebViewUtils; import org.json.JSONArray; import org.json.JSONException; @@ -161,7 +157,7 @@ public final class KMManager { } }; - private static InputMethodService IMService; + protected static InputMethodService IMService; private static boolean debugMode = false; private static boolean shouldAllowSetKeyboard = true; private static boolean didCopyAssets = false; @@ -178,14 +174,14 @@ public final class KMManager { private static KMManager.SpacebarText spacebarText = KMManager.SpacebarText.LANGUAGE_KEYBOARD; // must match default given in kmwbase.ts - protected static boolean InAppKeyboardLoaded = false; - protected static boolean SystemKeyboardLoaded = false; protected static boolean InAppKeyboardShouldIgnoreTextChange = false; protected static boolean InAppKeyboardShouldIgnoreSelectionChange = false; protected static boolean SystemKeyboardShouldIgnoreTextChange = false; protected static boolean SystemKeyboardShouldIgnoreSelectionChange = false; protected static KMKeyboard InAppKeyboard = null; protected static KMKeyboard SystemKeyboard = null; + protected static KMKeyboardWebViewClient InAppKeyboardWebViewClient = null; + protected static KMKeyboardWebViewClient SystemKeyboardWebViewClient = null; protected static HashMap currentLexicalModel = null; protected static WebViewUtils.EngineWebViewVersionStatus engineWebViewVersionStatus = WebViewUtils.EngineWebViewVersionStatus.UNDETERMINED; @@ -336,12 +332,12 @@ public final class KMManager { /** * Extract KMEA tier from versionName. Uses parameter so we can unit test. * @param versionName String - If not provided, determine tier from - * com.tavultesoft.kmea.BuildConfig.KEYMAN_ENGINE_VERSION_NAME + * com.keyman.engine.BuildConfig.KEYMAN_ENGINE_VERSION_NAME * @return Tier (ALPHA, BETA, STABLE) */ public static Tier getTier(String versionName) { if (versionName == null || versionName.isEmpty()) { - versionName = com.tavultesoft.kmea.BuildConfig.KEYMAN_ENGINE_VERSION_NAME; + versionName = com.keyman.engine.BuildConfig.KEYMAN_ENGINE_VERSION_NAME; } Pattern pattern = Pattern.compile("^(\\d+\\.\\d+\\.\\d+)-(alpha|beta|stable).*"); Matcher matcher = pattern.matcher(versionName); @@ -362,7 +358,7 @@ public final class KMManager { */ public static String getMajorVersion() { // Regex needs to match the entire string - String appVersion = com.tavultesoft.kmea.BuildConfig.KEYMAN_ENGINE_VERSION_NAME; + String appVersion = com.keyman.engine.BuildConfig.KEYMAN_ENGINE_VERSION_NAME; Pattern pattern = Pattern.compile("^(\\d+\\.\\d+)\\.\\d+.*"); Matcher matcher = pattern.matcher(appVersion); if (matcher.matches() && matcher.groupCount() >= 1) { @@ -378,7 +374,7 @@ public final class KMManager { */ public static String getVersion() { // Regex needs to match the entire string - String appVersion = com.tavultesoft.kmea.BuildConfig.KEYMAN_ENGINE_VERSION_NAME; + String appVersion = com.keyman.engine.BuildConfig.KEYMAN_ENGINE_VERSION_NAME; Pattern pattern = Pattern.compile("^(\\d+\\.\\d+\\.\\d+).*"); Matcher matcher = pattern.matcher(appVersion); if (matcher.matches() && matcher.groupCount() >= 1) { @@ -620,7 +616,8 @@ public final class KMManager { InAppKeyboard.setLayoutParams(params); InAppKeyboard.setVerticalScrollBarEnabled(false); InAppKeyboard.setHorizontalScrollBarEnabled(false); - InAppKeyboard.setWebViewClient(new KMInAppKeyboardWebViewClient(appContext)); + InAppKeyboardWebViewClient = new KMKeyboardWebViewClient(appContext, KeyboardType.KEYBOARD_TYPE_INAPP); + InAppKeyboard.setWebViewClient(InAppKeyboardWebViewClient); InAppKeyboard.addJavascriptInterface(new KMInAppKeyboardJSHandler(appContext, InAppKeyboard), "jsInterface"); InAppKeyboard.loadKeyboard(); @@ -635,7 +632,8 @@ public final class KMManager { SystemKeyboard.setLayoutParams(params); SystemKeyboard.setVerticalScrollBarEnabled(false); SystemKeyboard.setHorizontalScrollBarEnabled(false); - SystemKeyboard.setWebViewClient(new KMSystemKeyboardWebViewClient(appContext)); + SystemKeyboardWebViewClient = new KMKeyboardWebViewClient(appContext, KeyboardType.KEYBOARD_TYPE_SYSTEM); + SystemKeyboard.setWebViewClient(SystemKeyboardWebViewClient); SystemKeyboard.addJavascriptInterface(new KMSystemKeyboardJSHandler(appContext, SystemKeyboard), "jsInterface"); SystemKeyboard.loadKeyboard(); @@ -665,9 +663,15 @@ public final class KMManager { public static boolean isKeyboardLoaded(KeyboardType type) { if (type == KeyboardType.KEYBOARD_TYPE_INAPP) { - return InAppKeyboardLoaded; + if (InAppKeyboardWebViewClient != null) { + return InAppKeyboardWebViewClient.getKeyboardLoaded(); + } + return false; } else if (type == KeyboardType.KEYBOARD_TYPE_SYSTEM) { - return SystemKeyboardLoaded; + if (SystemKeyboardWebViewClient != null) { + return SystemKeyboardWebViewClient.getKeyboardLoaded(); + } + return false; } else { String msg = "Keyboard type undefined"; KMLog.LogError(TAG, msg); @@ -1327,12 +1331,12 @@ public final class KMManager { boolean mayCorrect = prefs.getBoolean(getLanguageCorrectionPreferenceKey(languageID), true); RelativeLayout.LayoutParams params; - if (InAppKeyboard != null && InAppKeyboardLoaded && !InAppKeyboardShouldIgnoreTextChange && modelFileExists) { + if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded() && !InAppKeyboardShouldIgnoreTextChange && modelFileExists) { params = getKeyboardLayoutParams(); InAppKeyboard.setLayoutParams(params); InAppKeyboard.loadJavascript(KMString.format("enableSuggestions(%s, %s, %s)", model, mayPredict, mayCorrect)); } - if (SystemKeyboard != null && SystemKeyboardLoaded && !SystemKeyboardShouldIgnoreTextChange && modelFileExists) { + if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded() && !SystemKeyboardShouldIgnoreTextChange && modelFileExists) { params = getKeyboardLayoutParams(); SystemKeyboard.setLayoutParams(params); SystemKeyboard.loadJavascript(KMString.format("enableSuggestions(%s, %s, %s)", model, mayPredict, mayCorrect)); @@ -1347,11 +1351,11 @@ public final class KMManager { } String url = KMString.format("deregisterModel('%s')", modelID); - if (InAppKeyboard != null) { // && InAppKeyboardLoaded) { + if (InAppKeyboard != null) { InAppKeyboard.loadJavascript(url); } - if (SystemKeyboard != null) { // && SystemKeyboardLoaded) { + if (SystemKeyboard != null) { SystemKeyboard.loadJavascript(url); } return true; @@ -1497,10 +1501,10 @@ public final class KMManager { boolean result1 = false; boolean result2 = false; - if (InAppKeyboard != null && InAppKeyboardLoaded) + if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded()) result1 = InAppKeyboard.setKeyboard(packageID, keyboardID, languageID); - if (SystemKeyboard != null && SystemKeyboardLoaded) + if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded()) result2 = SystemKeyboard.setKeyboard(packageID, keyboardID, languageID); return (result1 || result2); @@ -1510,11 +1514,11 @@ public final class KMManager { boolean result1 = false; boolean result2 = false; - if (InAppKeyboard != null && InAppKeyboardLoaded && keyboardInfo != null) { + if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded() && keyboardInfo != null) { result1 = InAppKeyboard.setKeyboard(keyboardInfo); } - if (SystemKeyboard != null && SystemKeyboardLoaded && keyboardInfo != null) + if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded() && keyboardInfo != null) result2 = SystemKeyboard.setKeyboard(keyboardInfo); if (keyboardInfo != null) { @@ -1540,11 +1544,11 @@ public final class KMManager { boolean result1 = false; boolean result2 = false; - if (InAppKeyboard != null && InAppKeyboardLoaded) + if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded()) { result1 = InAppKeyboard.prepareKeyboardSwitch(packageID, keyboardID, languageID,keyboardName); } - if (SystemKeyboard != null && SystemKeyboardLoaded) + if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded()) { result2 = SystemKeyboard.prepareKeyboardSwitch(packageID, keyboardID, languageID,keyboardName); } @@ -1559,10 +1563,10 @@ public final class KMManager { boolean result1 = false; boolean result2 = false; - if (InAppKeyboard != null && (InAppKeyboardLoaded || isTestMode())) + if (InAppKeyboard != null && (InAppKeyboardWebViewClient.getKeyboardLoaded() || isTestMode())) result1 = InAppKeyboard.setKeyboard(packageID, keyboardID, languageID, keyboardName, languageName, kFont, kOskFont); - if (SystemKeyboard != null && SystemKeyboardLoaded) + if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded()) result2 = SystemKeyboard.setKeyboard(packageID, keyboardID, languageID, keyboardName, languageName, kFont, kOskFont); registerAssociatedLexicalModel(languageID); @@ -1602,11 +1606,11 @@ public final class KMManager { } public static void clearKeyboardCache() { - if (InAppKeyboard != null && InAppKeyboardLoaded) { + if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded()) { InAppKeyboard.clearCache(true); InAppKeyboard.loadKeyboard(); } - if (SystemKeyboard != null && SystemKeyboardLoaded) { + if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded()) { SystemKeyboard.clearCache(true); SystemKeyboard.loadKeyboard(); } @@ -1854,19 +1858,19 @@ public final class KMManager { } public static void applyKeyboardHeight(Context context, int height) { - if (InAppKeyboard != null && InAppKeyboardLoaded) { + if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded()) { InAppKeyboard.loadJavascript(KMString.format("setOskHeight('%s')", height)); RelativeLayout.LayoutParams params = getKeyboardLayoutParams(); InAppKeyboard.setLayoutParams(params); } - if (SystemKeyboard != null && SystemKeyboardLoaded) { + if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded()) { SystemKeyboard.loadJavascript(KMString.format("setOskHeight('%s')", height)); RelativeLayout.LayoutParams params = getKeyboardLayoutParams(); SystemKeyboard.setLayoutParams(params); } } - private static void setPersistentShouldShowHelpBubble(boolean flag) { + protected static void setPersistentShouldShowHelpBubble(boolean flag) { SharedPreferences prefs = appContext.getSharedPreferences(appContext.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean(KMManager.KMKey_ShouldShowHelpBubble, flag); @@ -1901,21 +1905,22 @@ public final class KMManager { } public static void showKeyboardPicker(Context context, KeyboardType kbType) { - if (kbType == KeyboardType.KEYBOARD_TYPE_INAPP) { - Intent i = new Intent(context, KeyboardPickerActivity.class); - i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); - i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - i.putExtra(KMKey_DisplayKeyboardSwitcher, false); - context.startActivity(i); - } else if (kbType == KeyboardType.KEYBOARD_TYPE_SYSTEM) { - Intent i = new Intent(context, KeyboardPickerActivity.class); - i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); + if (kbType == KeyboardType.KEYBOARD_TYPE_UNDEFINED) { + KMLog.LogError(TAG, String.format("showKeyboardPicker with invalid %s", kbType.toString())); + return; + } + + Intent i = new Intent(context, KeyboardPickerActivity.class); + i.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT); // Replaces FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET + i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // Required to call startActivity() from outside of an Activity context + + if (kbType == KeyboardType.KEYBOARD_TYPE_SYSTEM) { i.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK); - i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - i.putExtra(KMKey_DisplayKeyboardSwitcher, true); - context.startActivity(i); } + + i.putExtra(KMKey_DisplayKeyboardSwitcher, kbType == KeyboardType.KEYBOARD_TYPE_SYSTEM); + context.startActivity(i); } public static void setKeyboardPickerFont(Typeface typeface) { @@ -1929,11 +1934,11 @@ public final class KMManager { public static void setNumericLayer(KeyboardType kbType) { if (kbType == KeyboardType.KEYBOARD_TYPE_INAPP) { - if (InAppKeyboard != null && InAppKeyboardLoaded && !InAppKeyboardShouldIgnoreTextChange) { + if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded() && !InAppKeyboardShouldIgnoreTextChange) { InAppKeyboard.loadJavascript("setNumericLayer()"); } } else if (kbType == KeyboardType.KEYBOARD_TYPE_SYSTEM) { - if (SystemKeyboard != null && SystemKeyboardLoaded && !SystemKeyboardShouldIgnoreTextChange) { + if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded() && !SystemKeyboardShouldIgnoreTextChange) { SystemKeyboard.loadJavascript("setNumericLayer()"); } } @@ -1947,14 +1952,14 @@ public final class KMManager { } if (kbType == KeyboardType.KEYBOARD_TYPE_INAPP) { - if (InAppKeyboard != null && InAppKeyboardLoaded && !InAppKeyboardShouldIgnoreTextChange) { + if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded() && !InAppKeyboardShouldIgnoreTextChange) { InAppKeyboard.loadJavascript(KMString.format("updateKMText('%s')", kmText)); result = true; } InAppKeyboardShouldIgnoreTextChange = false; } else if (kbType == KeyboardType.KEYBOARD_TYPE_SYSTEM) { - if (SystemKeyboard != null && SystemKeyboardLoaded && !SystemKeyboardShouldIgnoreTextChange) { + if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded() && !SystemKeyboardShouldIgnoreTextChange) { SystemKeyboard.loadJavascript(KMString.format("updateKMText('%s')", kmText)); result = true; } @@ -1968,14 +1973,14 @@ public final class KMManager { public static boolean updateSelectionRange(KeyboardType kbType, int selStart, int selEnd) { boolean result = false; if (kbType == KeyboardType.KEYBOARD_TYPE_INAPP) { - if (InAppKeyboard != null && InAppKeyboardLoaded && !InAppKeyboardShouldIgnoreSelectionChange) { + if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded() && !InAppKeyboardShouldIgnoreSelectionChange) { InAppKeyboard.loadJavascript(KMString.format("updateKMSelectionRange(%d,%d)", selStart, selEnd)); result = true; } InAppKeyboardShouldIgnoreSelectionChange = false; } else if (kbType == KeyboardType.KEYBOARD_TYPE_SYSTEM) { - if (SystemKeyboard != null && SystemKeyboardLoaded && !SystemKeyboardShouldIgnoreSelectionChange) { + if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded() && !SystemKeyboardShouldIgnoreSelectionChange) { InputConnection ic = (IMService != null ? IMService.getCurrentInputConnection() : null); if (ic != null) { ExtractedText icText = ic.getExtractedText(new ExtractedTextRequest(), 0); @@ -1996,11 +2001,11 @@ public final class KMManager { public static void resetContext(KeyboardType kbType) { if (kbType == KeyboardType.KEYBOARD_TYPE_INAPP) { - if (InAppKeyboard != null && InAppKeyboardLoaded) { + if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded()) { InAppKeyboard.loadJavascript("resetContext()"); } } else if (kbType == KeyboardType.KEYBOARD_TYPE_SYSTEM) { - if (SystemKeyboard != null && SystemKeyboardLoaded) { + if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded()) { SystemKeyboard.loadJavascript("resetContext()"); } } @@ -2222,435 +2227,6 @@ public final class KMManager { } } - protected static final class KMInAppKeyboardWebViewClient extends WebViewClient { - public static Context context; - - KMInAppKeyboardWebViewClient(Context context) { - KMInAppKeyboardWebViewClient.context = context; - } - - @Override - public void onPageStarted(WebView view, String url, Bitmap favicon) { - } - - @Override - public void onPageFinished(WebView view, String url) { - Log.d("KMEA", "onPageFinished: [inapp] " + url); - shouldOverrideUrlLoading(view, url); - } - - private void pageLoaded(WebView view, String url) { - Log.d("KMEA", "pageLoaded: [inapp] " + url); - if (InAppKeyboard == null) { - KMLog.LogError(TAG, "pageLoaded and InAppKeyboard null"); - return; - } - InAppKeyboard.keyboardSet = false; - currentLexicalModel = null; - - if (url.startsWith("file")) { // TODO: is this test necessary? - InAppKeyboardLoaded = true; - - SharedPreferences prefs = context.getSharedPreferences(context.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); - int index = prefs.getInt(KMManager.KMKey_UserKeyboardIndex, 0); - if (index < 0) { - index = 0; - } - Keyboard keyboardInfo = KMManager.getKeyboardInfo(context, index); - String langId = null; - if (keyboardInfo != null) { - langId = keyboardInfo.getLanguageID(); - InAppKeyboard.setKeyboard(keyboardInfo); - } else { - // Revert to default (index 0) or fallback keyboard - keyboardInfo = KMManager.getKeyboardInfo(context, 0); - if (keyboardInfo == null) { - // Not logging to Sentry because some keyboard apps like FV don't install keyboards until the user chooses - keyboardInfo = KMManager.getDefaultKeyboard(context); - } - if (keyboardInfo != null) { - langId = keyboardInfo.getLanguageID(); - InAppKeyboard.setKeyboard(keyboardInfo); - } - } - - registerAssociatedLexicalModel(langId); - - InAppKeyboard.showHelpBubbleAfterDelay(2000, true); // check if it should be shown at that time! - - InAppKeyboard.callJavascriptAfterLoad(); - InAppKeyboard.setSpacebarText(spacebarText); - - KeyboardEventHandler.notifyListeners(KMTextView.kbEventListeners, KeyboardType.KEYBOARD_TYPE_INAPP, EventType.KEYBOARD_LOADED, null); - - // Special handling for in-app TextView context keymanapp/keyman#3809 - if (KMTextView.activeView != null && KMTextView.activeView.getClass() == KMTextView.class) { - KMTextView.updateTextContext(); - } - } - } - - @Override - public boolean shouldOverrideUrlLoading(WebView view, String url) { - Log.d("KMEA", "shouldOverrideUrlLoading [inapp]: " + url); - if (InAppKeyboard == null) { - KMLog.LogError(TAG, "shouldOverrideUrlLoading and InAppKeyboard null"); - return false; - } - - // URL has actual path to the keyboard.html file as a prefix! We need to replace - // just the first intended '#' to get URI-based query param processing. - // At some point, other parts of the function should be redone to allow use of ? instead - // of # in our WebView command "queries" entirely. - String cmd = url.replace("keyboard.html#", "keyboard.html?"); - Uri urlCommand = Uri.parse(cmd); - if (url.indexOf("pageLoaded") >= 0) { - pageLoaded(view, url); - } else if (url.indexOf("hideKeyboard") >= 0) { - if (KMTextView.activeView != null && KMTextView.activeView.getClass() == KMTextView.class) { - InAppKeyboard.dismissHelpBubble(); - KMTextView textView = (KMTextView) KMTextView.activeView; - textView.dismissKeyboard(); - } - } else if (urlCommand.getQueryParameter("globeKeyAction") != null) { - InAppKeyboard.dismissHelpBubble(); - InAppKeyboard.setShouldShowHelpBubble(false); - - // Globe key has been used; disable the internal preference setting. - KMManager.setPersistentShouldShowHelpBubble(false); - - handleGlobeKeyAction(context, urlCommand.getBooleanQueryParameter("keydown", false), - KeyboardType.KEYBOARD_TYPE_INAPP); - } else if (url.indexOf("helpBubbleDismissed") >= 0) { - // The user has begun interacting with the keyboard; we'll disable the help bubble - // for the rest of the lifetime of this keyboard instance. - InAppKeyboard.setShouldShowHelpBubble(false); - } else if (url.indexOf("showKeyPreview") >= 0) { - String deviceType = context.getResources().getString(R.string.device_type); - if (deviceType.equals("AndroidTablet")) { - return false; - } - - if (InAppKeyboard.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 = InAppKeyboard.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); - InAppKeyboard.showKeyPreview(context, (int) x, (int) y, keyFrame, text); - } else if (url.indexOf("dismissKeyPreview") >= 0) { - InAppKeyboard.dismissKeyPreview(100); - } else if (url.indexOf("showMore") >= 0) { - if (InAppKeyboard.subKeysWindow != null && InAppKeyboard.subKeysWindow.isShowing()) { - return false; - } - - int start = url.indexOf("keyPos=") + 7; - int end = url.indexOf("+keys="); - InAppKeyboard.subKeysWindowPos = url.substring(start, end).split("\\,"); - - start = end + 6; - end = url.indexOf("+font="); - if (end < 0) { - end = url.length(); - InAppKeyboard.specialOskFont = ""; - } else { - InAppKeyboard.specialOskFont = KMFilename_Osk_Ttf_Font; - } - - String keys = url.substring(start, end); - - String[] keyList = keys.split("\\;"); - int klCount = keyList.length; - InAppKeyboard.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); - InAppKeyboard.subKeysList.add(hashMap); - } - } else if (url.indexOf("refreshBannerHeight") >= 0) { - int start = url.indexOf("change=") + 7; - String change = url.substring(start); - boolean isModelActive = change.equals("active"); - SharedPreferences prefs = appContext.getSharedPreferences(appContext.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); - boolean modelPredictionPref = false; - if (currentLexicalModel != null) { - modelPredictionPref = prefs.getBoolean(getLanguagePredictionPreferenceKey(currentLexicalModel.get(KMManager.KMKey_LanguageID)), true); - } - currentBanner = (isModelActive && modelPredictionPref) ? - KM_BANNER_STATE_SUGGESTION : KM_BANNER_STATE_BLANK; - RelativeLayout.LayoutParams params = getKeyboardLayoutParams(); - InAppKeyboard.setLayoutParams(params); - } else if (url.indexOf("suggestPopup") >= 0) { - double x = Float.parseFloat(urlCommand.getQueryParameter("x")); - double y = Float.parseFloat(urlCommand.getQueryParameter("y")); - double width = Float.parseFloat(urlCommand.getQueryParameter("w")); - double height = Float.parseFloat(urlCommand.getQueryParameter("h")); - String suggestionJSON = urlCommand.getQueryParameter("suggestion"); - - JSONParser parser = new JSONParser(); - JSONObject obj = parser.getJSONObjectFromURIString(suggestionJSON); - - /* // For future implementation - InAppKeyboard.suggestionWindowPos = new double[]{x, y}; - InAppKeyboard.suggestionJSON = suggestionJSON; - - try { - Log.v("KMEA", "Suggestion display: " + obj.getString("displayAs")); - Log.v("KMEA", "Suggestion's banner coords: " + x + ", " + y + ", " + width + ", " + height); - Log.v("KMEA", "Is a suggestion: "); // likely outdated now that tags exist. - } catch (JSONException e) { - //e.printStackTrace(); - Log.v("KMEA", "JSON parsing error: " + e.getMessage()); - } - */ - } else if (url.indexOf("reloadAfterError") >= 0) { - InAppKeyboard.reloadAfterError(); - } - return false; - } - } - - protected static final class KMSystemKeyboardWebViewClient extends WebViewClient { - public static Context context; - - KMSystemKeyboardWebViewClient(Context context) { - KMSystemKeyboardWebViewClient.context = context; - } - - @Override - public void onPageStarted(WebView view, String url, Bitmap favicon) { - } - - @Override - public void onPageFinished(WebView view, String url) { - Log.d("KMEA", "onPageFinished: [system] " + url); - shouldOverrideUrlLoading(view, url); - } - - private void pageLoaded(WebView view, String url) { - Log.d("KMEA", "pageLoaded: [system] " + url); - if (SystemKeyboard == null) { - KMLog.LogError(TAG, "pageLoaded and SystemKeyboard null"); - return; - } - - SystemKeyboard.keyboardSet = false; - currentLexicalModel = null; - - if (url.startsWith("file:")) { // TODO: is this test necessary? - SystemKeyboardLoaded = true; - - SharedPreferences prefs = context.getSharedPreferences(context.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); - int index = prefs.getInt(KMManager.KMKey_UserKeyboardIndex, 0); - if (index < 0) { - index = 0; - } - Keyboard keyboardInfo = KMManager.getKeyboardInfo(context, index); - String langId = null; - if (keyboardInfo != null) { - langId = keyboardInfo.getLanguageID(); - SystemKeyboard.setKeyboard(keyboardInfo); - } else { - // Revert to default (index 0) or fallback keyboard - keyboardInfo = KMManager.getKeyboardInfo(context, 0); - if (keyboardInfo == null) { - KMLog.LogError(TAG, "No keyboards installed. Reverting to fallback"); - keyboardInfo = KMManager.getDefaultKeyboard(context); - } - if (keyboardInfo != null) { - langId = keyboardInfo.getLanguageID(); - SystemKeyboard.setKeyboard(keyboardInfo); - } - } - - registerAssociatedLexicalModel(langId); - - SystemKeyboard.showHelpBubbleAfterDelay(2000, true); // check if it should be shown at that time! - - KeyboardEventHandler.notifyListeners(KMTextView.kbEventListeners, KeyboardType.KEYBOARD_TYPE_SYSTEM, EventType.KEYBOARD_LOADED, null); - - SystemKeyboard.callJavascriptAfterLoad(); - SystemKeyboard.setSpacebarText(spacebarText); - } - } - - @Override - public boolean shouldOverrideUrlLoading(WebView view, String url) { - if (SystemKeyboard == null) { - KMLog.LogError(TAG, "shouldOverrideUrlLoading and SystemKeyboard null"); - return false; - } - - // URL has actual path to the keyboard.html file as a prefix! We need to replace - // just the first intended '#' to get URI-based query param processing. - - // At some point, other parts of the function should be redone to allow use of ? instead - // of # in our WebView command "queries" entirely. - String cmd = url.replace("keyboard.html#", "keyboard.html?"); - Uri urlCommand = Uri.parse(cmd); - if(url.indexOf("pageLoaded") >= 0) { - pageLoaded(view, url); - } else if (url.indexOf("hideKeyboard") >= 0) { - SystemKeyboard.dismissHelpBubble(); - IMService.requestHideSelf(0); - } else if (urlCommand.getQueryParameter("globeKeyAction") != null) { - SystemKeyboard.dismissHelpBubble(); - SystemKeyboard.setShouldShowHelpBubble(false); - - // Globe key has been used; disable the internal preference setting. - KMManager.setPersistentShouldShowHelpBubble(false); - - handleGlobeKeyAction(context, urlCommand.getBooleanQueryParameter("keydown", false), - KeyboardType.KEYBOARD_TYPE_SYSTEM); - } else if (urlCommand.getQueryParameter("helpBubbleDismissed") != null) { - // The user has begun interacting with the keyboard; we'll disable the help bubble - // for the rest of the lifetime of this keyboard instance. - SystemKeyboard.setShouldShowHelpBubble(false); - } else if (url.indexOf("showKeyPreview") >= 0) { - String deviceType = context.getString(R.string.device_type); - if (deviceType.equals("AndroidTablet")) { - return false; - } - - if (SystemKeyboard.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 = SystemKeyboard.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); - SystemKeyboard.showKeyPreview(context, (int) x, (int) y, keyFrame, text); - } else if (url.indexOf("dismissKeyPreview") >= 0) { - SystemKeyboard.dismissKeyPreview(100); - } else if (url.indexOf("showMore") >= 0) { - if (SystemKeyboard.subKeysWindow != null && SystemKeyboard.subKeysWindow.isShowing()) { - return false; - } - - int start = url.indexOf("keyPos=") + 7; - int end = url.indexOf("+keys="); - SystemKeyboard.subKeysWindowPos = url.substring(start, end).split("\\,"); - - start = end + 6; - end = url.indexOf("+font="); - if (end < 0) { - end = url.length(); - SystemKeyboard.specialOskFont = ""; - } else { - SystemKeyboard.specialOskFont = KMFilename_Osk_Ttf_Font; - } - - String keys = url.substring(start, end); - - String[] keyList = keys.split("\\;"); - int klCount = keyList.length; - SystemKeyboard.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); - SystemKeyboard.subKeysList.add(hashMap); - } - } else if (url.indexOf("refreshBannerHeight") >= 0) { - int start = url.indexOf("change=") + 7; - String change = url.substring(start); - boolean isModelActive = change.equals("active"); - SharedPreferences prefs = appContext.getSharedPreferences(appContext.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); - boolean modelPredictionPref = false; - if(currentLexicalModel != null) { - modelPredictionPref = prefs.getBoolean(getLanguagePredictionPreferenceKey(currentLexicalModel.get(KMManager.KMKey_LanguageID)), true); - } - currentBanner = (isModelActive && modelPredictionPref) ? - KM_BANNER_STATE_SUGGESTION : KM_BANNER_STATE_BLANK; - RelativeLayout.LayoutParams params = getKeyboardLayoutParams(); - SystemKeyboard.setLayoutParams(params); - } else if (url.indexOf("suggestPopup") >= 0) { - double x = Float.parseFloat(urlCommand.getQueryParameter("x")); - double y = Float.parseFloat(urlCommand.getQueryParameter("y")); - double width = Float.parseFloat(urlCommand.getQueryParameter("w")); - double height = Float.parseFloat(urlCommand.getQueryParameter("h")); - String suggestionJSON = urlCommand.getQueryParameter("suggestion"); - - JSONParser parser = new JSONParser(); - JSONObject obj = parser.getJSONObjectFromURIString(suggestionJSON); - - /* // For future implementation - SystemKeyboard.suggestionWindowPos = new double[]{x, y}; - SystemKeyboard.suggestionJSON = suggestionJSON; - - try { - Log.v("KMEA", "Suggestion display: " + obj.getString("displayAs")); - Log.v("KMEA", "Suggestion's banner coords: " + x + ", " + y + ", " + width + ", " + height); - Log.v("KMEA", "Is a suggestion: "); // likely outdated now that tags exist. - } catch (JSONException e) { - //e.printStackTrace(); - Log.v("KMEA", "JSON parsing error: " + e.getMessage()); - } - */ - } else if (url.indexOf("reloadAfterError") >= 0) { - SystemKeyboard.reloadAfterError(); - } - return false; - } - } - private static final class KMInAppKeyboardJSHandler extends KMKeyboardJSHandler { KMInAppKeyboardJSHandler(Context context, KMKeyboard k) { diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMModifierCodes.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMModifierCodes.java similarity index 96% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMModifierCodes.java rename to android/KMEA/app/src/main/java/com/keyman/engine/KMModifierCodes.java index e7f823c070..85a174d04d 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMModifierCodes.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMModifierCodes.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea; +package com.keyman.engine; import java.util.HashMap; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMPopoverView.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMPopoverView.java similarity index 99% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMPopoverView.java rename to android/KMEA/app/src/main/java/com/keyman/engine/KMPopoverView.java index bfbc87a0d8..498739c334 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMPopoverView.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMPopoverView.java @@ -2,7 +2,7 @@ * Copyright (C) 2017 SIL International. All rights reserved. */ -package com.tavultesoft.kmea; +package com.keyman.engine; import android.content.Context; import android.graphics.Canvas; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMScanCodeMap.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMScanCodeMap.java similarity index 99% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMScanCodeMap.java rename to android/KMEA/app/src/main/java/com/keyman/engine/KMScanCodeMap.java index 3ad32fee47..ca103816cd 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMScanCodeMap.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMScanCodeMap.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea; +package com.keyman.engine; public final class KMScanCodeMap { diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMTextView.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMTextView.java similarity index 95% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMTextView.java rename to android/KMEA/app/src/main/java/com/keyman/engine/KMTextView.java index c637cdb76d..70774a4e2c 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMTextView.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMTextView.java @@ -2,14 +2,15 @@ * Copyright (C) 2017 SIL International. All rights reserved. */ -package com.tavultesoft.kmea; +package com.keyman.engine; import java.util.ArrayList; -import com.tavultesoft.kmea.KMManager.KeyboardType; -import com.tavultesoft.kmea.KeyboardEventHandler.EventType; -import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardEventListener; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.KMKeyboardWebViewClient; +import com.keyman.engine.KMManager.KeyboardType; +import com.keyman.engine.KeyboardEventHandler.EventType; +import com.keyman.engine.KeyboardEventHandler.OnKeyboardEventListener; +import com.keyman.engine.util.KMLog; import android.view.ContextThemeWrapper; import androidx.appcompat.app.AppCompatActivity; @@ -120,7 +121,7 @@ public final class KMTextView extends AppCompatEditText { public void onFocusChange(View v, boolean hasFocus) { if (hasFocus) { activeView = v; - if (KMManager.InAppKeyboardLoaded) { + if (KMManager.InAppKeyboardWebViewClient.getKeyboardLoaded()) { updateTextContext(); } showKeyboard(); @@ -178,7 +179,7 @@ public final class KMTextView extends AppCompatEditText { Window mainWindow = activity.getWindow(); if (hasWindowFocus) { - KMManager.KMInAppKeyboardWebViewClient.context = context; + KMManager.InAppKeyboardWebViewClient.setContext(context); activeView = mainWindow.getCurrentFocus(); Typeface font = KMManager.getFontTypeface(context, KMKeyboard.textFontFilename()); @@ -189,7 +190,7 @@ public final class KMTextView extends AppCompatEditText { } if (activeView != null && activeView.equals(this)) { - if (KMManager.InAppKeyboardLoaded) { + if (KMManager.InAppKeyboardWebViewClient.getKeyboardLoaded()) { updateTextContext(); } diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardEventHandler.java b/android/KMEA/app/src/main/java/com/keyman/engine/KeyboardEventHandler.java similarity index 97% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardEventHandler.java rename to android/KMEA/app/src/main/java/com/keyman/engine/KeyboardEventHandler.java index a92e4d6c1c..e992ba3e74 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardEventHandler.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KeyboardEventHandler.java @@ -2,14 +2,14 @@ * Copyright (C) 2017 SIL International. All rights reserved. */ -package com.tavultesoft.kmea; +package com.keyman.engine; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import com.tavultesoft.kmea.KMManager.KeyboardType; +import com.keyman.engine.KMManager.KeyboardType; public final class KeyboardEventHandler { diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardInfoActivity.java b/android/KMEA/app/src/main/java/com/keyman/engine/KeyboardInfoActivity.java similarity index 93% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardInfoActivity.java rename to android/KMEA/app/src/main/java/com/keyman/engine/KeyboardInfoActivity.java index 1176182762..c2daaea303 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardInfoActivity.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KeyboardInfoActivity.java @@ -2,7 +2,7 @@ * Copyright (C) 2017-2021 SIL International. All rights reserved. */ -package com.tavultesoft.kmea; +package com.keyman.engine; import java.util.ArrayList; import java.util.HashMap; @@ -28,15 +28,15 @@ import android.widget.SimpleAdapter; import android.widget.TextView; import android.widget.Toast; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.util.DependencyUtil; -import com.tavultesoft.kmea.util.DependencyUtil.LibraryType; -import com.tavultesoft.kmea.util.FileProviderUtils; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.KMString; -import com.tavultesoft.kmea.util.MapCompat; -import com.tavultesoft.kmea.util.QRCodeUtil; -import com.tavultesoft.kmea.KMHelpFileActivity; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.util.DependencyUtil; +import com.keyman.engine.util.DependencyUtil.LibraryType; +import com.keyman.engine.util.FileProviderUtils; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.KMString; +import com.keyman.engine.util.MapCompat; +import com.keyman.engine.util.QRCodeUtil; +import com.keyman.engine.KMHelpFileActivity; // Public access is necessary to avoid IllegalAccessException public final class KeyboardInfoActivity extends BaseActivity { diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardPickerActivity.java b/android/KMEA/app/src/main/java/com/keyman/engine/KeyboardPickerActivity.java similarity index 98% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardPickerActivity.java rename to android/KMEA/app/src/main/java/com/keyman/engine/KeyboardPickerActivity.java index 19f34d5f19..fff24c3b56 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardPickerActivity.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KeyboardPickerActivity.java @@ -2,7 +2,7 @@ * Copyright (C) 2017 SIL International. All rights reserved. */ -package com.tavultesoft.kmea; +package com.keyman.engine; import java.io.File; import java.io.FileInputStream; @@ -13,15 +13,15 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import com.tavultesoft.kmea.data.CloudRepository; -import com.tavultesoft.kmea.data.Dataset; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.data.KeyboardController; -import com.tavultesoft.kmea.data.LexicalModel; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.KMLog; -import com.tavultesoft.kmea.util.KMString; -import com.tavultesoft.kmea.util.MapCompat; +import com.keyman.engine.data.CloudRepository; +import com.keyman.engine.data.Dataset; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.data.KeyboardController; +import com.keyman.engine.data.LexicalModel; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.KMLog; +import com.keyman.engine.util.KMString; +import com.keyman.engine.util.MapCompat; import android.content.ComponentName; import android.content.Context; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KmpInstallMode.java b/android/KMEA/app/src/main/java/com/keyman/engine/KmpInstallMode.java similarity index 95% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/KmpInstallMode.java rename to android/KMEA/app/src/main/java/com/keyman/engine/KmpInstallMode.java index 63f7c7be40..2452dcaefa 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KmpInstallMode.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KmpInstallMode.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea; +package com.keyman.engine; public enum KmpInstallMode { Silent, // Show no UI while installing a package. Errors may be shown as toasts diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/ModelInfoActivity.java b/android/KMEA/app/src/main/java/com/keyman/engine/ModelInfoActivity.java similarity index 94% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/ModelInfoActivity.java rename to android/KMEA/app/src/main/java/com/keyman/engine/ModelInfoActivity.java index 8fc641deb7..ef1b180c52 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/ModelInfoActivity.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/ModelInfoActivity.java @@ -1,7 +1,7 @@ /* * Copyright (C) 2017-2021 SIL International. All rights reserved. */ -package com.tavultesoft.kmea; +package com.keyman.engine; import java.util.ArrayList; import java.util.HashMap; @@ -19,13 +19,13 @@ import android.widget.ListView; import android.widget.SimpleAdapter; import android.widget.TextView; -import com.tavultesoft.kmea.data.LexicalModel; -import com.tavultesoft.kmea.util.FileProviderUtils; -import com.tavultesoft.kmea.util.KMString; -import com.tavultesoft.kmea.util.MapCompat; -import com.tavultesoft.kmea.KMHelpFileActivity; +import com.keyman.engine.data.LexicalModel; +import com.keyman.engine.util.FileProviderUtils; +import com.keyman.engine.util.KMString; +import com.keyman.engine.util.MapCompat; +import com.keyman.engine.KMHelpFileActivity; -import static com.tavultesoft.kmea.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DELETE_MODEL; +import static com.keyman.engine.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DELETE_MODEL; // Public access is necessary to avoid IllegalAccessException public final class ModelInfoActivity extends BaseActivity { diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/ModelPickerActivity.java b/android/KMEA/app/src/main/java/com/keyman/engine/ModelPickerActivity.java similarity index 95% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/ModelPickerActivity.java rename to android/KMEA/app/src/main/java/com/keyman/engine/ModelPickerActivity.java index 2ce2ca80e2..8207c6e6d5 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/ModelPickerActivity.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/ModelPickerActivity.java @@ -1,5 +1,5 @@ -package com.tavultesoft.kmea; +package com.keyman.engine; import android.content.Context; import android.content.Intent; @@ -20,15 +20,15 @@ import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; -import com.tavultesoft.kmea.cloud.CloudApiTypes; -import com.tavultesoft.kmea.cloud.CloudDownloadMgr; -import com.tavultesoft.kmea.cloud.impl.CloudLexicalModelMetaDataDownloadCallback; -import com.tavultesoft.kmea.data.CloudRepository; -import com.tavultesoft.kmea.data.Dataset; -import com.tavultesoft.kmea.data.LexicalModel; -import com.tavultesoft.kmea.data.adapters.NestedAdapter; -import com.tavultesoft.kmea.util.BCP47; -import com.tavultesoft.kmea.util.MapCompat; +import com.keyman.engine.cloud.CloudApiTypes; +import com.keyman.engine.cloud.CloudDownloadMgr; +import com.keyman.engine.cloud.impl.CloudLexicalModelMetaDataDownloadCallback; +import com.keyman.engine.data.CloudRepository; +import com.keyman.engine.data.Dataset; +import com.keyman.engine.data.LexicalModel; +import com.keyman.engine.data.adapters.NestedAdapter; +import com.keyman.engine.util.BCP47; +import com.keyman.engine.util.MapCompat; import java.io.File; import java.util.ArrayList; @@ -209,7 +209,7 @@ public final class ModelPickerActivity extends BaseActivity { if(immediateRegister) { // Register associated lexical model if it matches the active keyboard's language code; // it's safe since we're on the same thread. Needs to be called AFTER deinstalling the old one. - com.tavultesoft.kmea.data.Keyboard kbInfo = KMManager.getCurrentKeyboardInfo(context); + com.keyman.engine.data.Keyboard kbInfo = KMManager.getCurrentKeyboardInfo(context); if(kbInfo != null) { String kbdLgCode = kbInfo.getLanguageID(); if(BCP47.languageEquals(kbdLgCode, languageID)) { diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/CloudApiTypes.java b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/CloudApiTypes.java similarity index 97% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/CloudApiTypes.java rename to android/KMEA/app/src/main/java/com/keyman/engine/cloud/CloudApiTypes.java index b6dc0e6f54..805f682367 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/CloudApiTypes.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/CloudApiTypes.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.cloud; +package com.keyman.engine.cloud; import android.app.DownloadManager; import android.content.Context; @@ -7,9 +7,9 @@ import android.widget.Toast; import androidx.annotation.NonNull; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.R; -import com.tavultesoft.kmea.util.DownloadFileUtils; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.R; +import com.keyman.engine.util.DownloadFileUtils; import org.json.JSONArray; import org.json.JSONObject; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/CloudDataJsonUtil.java b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/CloudDataJsonUtil.java similarity index 96% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/CloudDataJsonUtil.java rename to android/KMEA/app/src/main/java/com/keyman/engine/cloud/CloudDataJsonUtil.java index c93e3b6635..46eb51f558 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/CloudDataJsonUtil.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/CloudDataJsonUtil.java @@ -1,22 +1,22 @@ -package com.tavultesoft.kmea.cloud; +package com.keyman.engine.cloud; import android.content.Context; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import com.tavultesoft.kmea.JSONParser; -import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KeyboardPickerActivity; -import com.tavultesoft.kmea.R; -import com.tavultesoft.kmea.cloud.CloudApiTypes; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.data.KeyboardController; -import com.tavultesoft.kmea.data.LexicalModel; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.KMLog; -import com.tavultesoft.kmea.util.MapCompat; +import com.keyman.engine.JSONParser; +import com.keyman.engine.KMKeyboardDownloaderActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.KeyboardPickerActivity; +import com.keyman.engine.R; +import com.keyman.engine.cloud.CloudApiTypes; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.data.KeyboardController; +import com.keyman.engine.data.LexicalModel; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.KMLog; +import com.keyman.engine.util.MapCompat; import org.json.JSONArray; import org.json.JSONException; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/CloudDownloadMgr.java b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/CloudDownloadMgr.java similarity index 99% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/CloudDownloadMgr.java rename to android/KMEA/app/src/main/java/com/keyman/engine/cloud/CloudDownloadMgr.java index 99c86d6c2c..87e96353df 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/CloudDownloadMgr.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/CloudDownloadMgr.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.cloud; +package com.keyman.engine.cloud; import android.app.DownloadManager; import android.content.BroadcastReceiver; @@ -8,7 +8,7 @@ import android.content.IntentFilter; import android.net.Uri; import android.util.Log; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.util.KMLog; import java.io.File; import java.util.HashMap; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/ICloudDownloadCallback.java b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/ICloudDownloadCallback.java similarity index 87% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/ICloudDownloadCallback.java rename to android/KMEA/app/src/main/java/com/keyman/engine/cloud/ICloudDownloadCallback.java index c49cff8754..537653a3f7 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/ICloudDownloadCallback.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/ICloudDownloadCallback.java @@ -1,9 +1,9 @@ -package com.tavultesoft.kmea.cloud; +package com.keyman.engine.cloud; import android.content.Context; -import com.tavultesoft.kmea.cloud.CloudApiTypes; -import com.tavultesoft.kmea.cloud.CloudDownloadMgr; +import com.keyman.engine.cloud.CloudApiTypes; +import com.keyman.engine.cloud.CloudDownloadMgr; /** * Interface for {@link CloudDownloadMgr} as callback to do use case specific task. diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudCatalogDownloadCallback.java b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudCatalogDownloadCallback.java similarity index 89% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudCatalogDownloadCallback.java rename to android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudCatalogDownloadCallback.java index ca99c2f0c6..21769f76dd 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudCatalogDownloadCallback.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudCatalogDownloadCallback.java @@ -1,24 +1,24 @@ -package com.tavultesoft.kmea.cloud.impl; +package com.keyman.engine.cloud.impl; import android.content.Context; import android.os.Bundle; import android.util.Log; import android.widget.Toast; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.KeyboardPickerActivity; -import com.tavultesoft.kmea.R; -import com.tavultesoft.kmea.cloud.CloudApiTypes; -import com.tavultesoft.kmea.cloud.CloudDataJsonUtil; -import com.tavultesoft.kmea.cloud.ICloudDownloadCallback; -import com.tavultesoft.kmea.data.CloudRepository; -import com.tavultesoft.kmea.data.Dataset; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.data.KeyboardController; -import com.tavultesoft.kmea.data.LanguageResource; -import com.tavultesoft.kmea.data.LexicalModel; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.VersionUtils; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.KeyboardPickerActivity; +import com.keyman.engine.R; +import com.keyman.engine.cloud.CloudApiTypes; +import com.keyman.engine.cloud.CloudDataJsonUtil; +import com.keyman.engine.cloud.ICloudDownloadCallback; +import com.keyman.engine.data.CloudRepository; +import com.keyman.engine.data.Dataset; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.data.KeyboardController; +import com.keyman.engine.data.LanguageResource; +import com.keyman.engine.data.LexicalModel; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.VersionUtils; import org.json.JSONArray; import org.json.JSONObject; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudCatalogDownloadReturns.java b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudCatalogDownloadReturns.java similarity index 92% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudCatalogDownloadReturns.java rename to android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudCatalogDownloadReturns.java index 3febc1c486..80e5445be6 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudCatalogDownloadReturns.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudCatalogDownloadReturns.java @@ -1,6 +1,6 @@ -package com.tavultesoft.kmea.cloud.impl; +package com.keyman.engine.cloud.impl; -import com.tavultesoft.kmea.cloud.CloudApiTypes; +import com.keyman.engine.cloud.CloudApiTypes; import org.json.JSONArray; import org.json.JSONObject; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudKeyboardDownloadReturns.java b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudKeyboardDownloadReturns.java similarity index 92% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudKeyboardDownloadReturns.java rename to android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudKeyboardDownloadReturns.java index 97caad0854..668bb5f49b 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudKeyboardDownloadReturns.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudKeyboardDownloadReturns.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.cloud.impl; +package com.keyman.engine.cloud.impl; import java.util.List; import java.util.Map; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudKeyboardPackageDownloadCallback.java b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudKeyboardPackageDownloadCallback.java similarity index 87% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudKeyboardPackageDownloadCallback.java rename to android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudKeyboardPackageDownloadCallback.java index e9b5c6e5c3..67c8efae71 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudKeyboardPackageDownloadCallback.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudKeyboardPackageDownloadCallback.java @@ -1,21 +1,21 @@ -package com.tavultesoft.kmea.cloud.impl; +package com.keyman.engine.cloud.impl; import android.content.Context; import android.net.Uri; import android.widget.Toast; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KeyboardEventHandler; -import com.tavultesoft.kmea.KmpInstallMode; -import com.tavultesoft.kmea.R; -import com.tavultesoft.kmea.cloud.CloudApiTypes; -import com.tavultesoft.kmea.cloud.ICloudDownloadCallback; -import com.tavultesoft.kmea.packages.LexicalModelPackageProcessor; -import com.tavultesoft.kmea.packages.PackageProcessor; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.KMKeyboardDownloaderActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.KeyboardEventHandler; +import com.keyman.engine.KmpInstallMode; +import com.keyman.engine.R; +import com.keyman.engine.cloud.CloudApiTypes; +import com.keyman.engine.cloud.ICloudDownloadCallback; +import com.keyman.engine.packages.LexicalModelPackageProcessor; +import com.keyman.engine.packages.PackageProcessor; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.KMLog; import org.json.JSONException; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudLexicalModelMetaDataDownloadCallback.java b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudLexicalModelMetaDataDownloadCallback.java similarity index 94% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudLexicalModelMetaDataDownloadCallback.java rename to android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudLexicalModelMetaDataDownloadCallback.java index 95b2af0461..c3315c2d67 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudLexicalModelMetaDataDownloadCallback.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudLexicalModelMetaDataDownloadCallback.java @@ -1,19 +1,19 @@ /** * Copyright (C) 2020 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.cloud.impl; +package com.keyman.engine.cloud.impl; import android.content.Context; import android.os.Bundle; import android.widget.Toast; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.R; -import com.tavultesoft.kmea.cloud.CloudApiTypes; -import com.tavultesoft.kmea.cloud.CloudDataJsonUtil; -import com.tavultesoft.kmea.cloud.CloudDownloadMgr; -import com.tavultesoft.kmea.cloud.ICloudDownloadCallback; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.R; +import com.keyman.engine.cloud.CloudApiTypes; +import com.keyman.engine.cloud.CloudDataJsonUtil; +import com.keyman.engine.cloud.CloudDownloadMgr; +import com.keyman.engine.cloud.ICloudDownloadCallback; +import com.keyman.engine.util.KMLog; import org.json.JSONArray; import org.json.JSONException; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudLexicalPackageDownloadCallback.java b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudLexicalPackageDownloadCallback.java similarity index 87% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudLexicalPackageDownloadCallback.java rename to android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudLexicalPackageDownloadCallback.java index 093d99161f..dac380b8cb 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/cloud/impl/CloudLexicalPackageDownloadCallback.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/cloud/impl/CloudLexicalPackageDownloadCallback.java @@ -1,19 +1,19 @@ -package com.tavultesoft.kmea.cloud.impl; +package com.keyman.engine.cloud.impl; import android.content.Context; import android.net.Uri; import android.widget.Toast; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; -import com.tavultesoft.kmea.KeyboardEventHandler; -import com.tavultesoft.kmea.R; -import com.tavultesoft.kmea.cloud.CloudApiTypes; -import com.tavultesoft.kmea.cloud.ICloudDownloadCallback; -import com.tavultesoft.kmea.packages.LexicalModelPackageProcessor; -import com.tavultesoft.kmea.packages.PackageProcessor; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.KMKeyboardDownloaderActivity; +import com.keyman.engine.KeyboardEventHandler; +import com.keyman.engine.R; +import com.keyman.engine.cloud.CloudApiTypes; +import com.keyman.engine.cloud.ICloudDownloadCallback; +import com.keyman.engine.packages.LexicalModelPackageProcessor; +import com.keyman.engine.packages.PackageProcessor; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.KMLog; import org.json.JSONException; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/CloudRepository.java b/android/KMEA/app/src/main/java/com/keyman/engine/data/CloudRepository.java similarity index 95% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/CloudRepository.java rename to android/KMEA/app/src/main/java/com/keyman/engine/data/CloudRepository.java index b992e86e4b..4aad0a4e9f 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/CloudRepository.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/data/CloudRepository.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.data; +package com.keyman.engine.data; import android.content.Context; import android.os.Bundle; @@ -6,21 +6,21 @@ import android.widget.Toast; import androidx.annotation.NonNull; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.BuildConfig; -import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KeyboardPickerActivity; -import com.tavultesoft.kmea.R; -import com.tavultesoft.kmea.cloud.CloudApiTypes; -import com.tavultesoft.kmea.cloud.impl.CloudCatalogDownloadCallback; -import com.tavultesoft.kmea.cloud.impl.CloudCatalogDownloadReturns; -import com.tavultesoft.kmea.cloud.CloudDataJsonUtil; -import com.tavultesoft.kmea.cloud.CloudDownloadMgr; -import com.tavultesoft.kmea.packages.JSONUtils; -import com.tavultesoft.kmea.util.BCP47; -import com.tavultesoft.kmea.util.KMLog; -import com.tavultesoft.kmea.util.VersionUtils; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.BuildConfig; +import com.keyman.engine.KMKeyboardDownloaderActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.KeyboardPickerActivity; +import com.keyman.engine.R; +import com.keyman.engine.cloud.CloudApiTypes; +import com.keyman.engine.cloud.impl.CloudCatalogDownloadCallback; +import com.keyman.engine.cloud.impl.CloudCatalogDownloadReturns; +import com.keyman.engine.cloud.CloudDataJsonUtil; +import com.keyman.engine.cloud.CloudDownloadMgr; +import com.keyman.engine.packages.JSONUtils; +import com.keyman.engine.util.BCP47; +import com.keyman.engine.util.KMLog; +import com.keyman.engine.util.VersionUtils; import org.json.JSONArray; import org.json.JSONException; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/Dataset.java b/android/KMEA/app/src/main/java/com/keyman/engine/data/Dataset.java similarity index 98% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/Dataset.java rename to android/KMEA/app/src/main/java/com/keyman/engine/data/Dataset.java index 45e87a7c00..0baff02cf8 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/Dataset.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/data/Dataset.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.data; +package com.keyman.engine.data; import android.content.Context; import android.widget.ArrayAdapter; @@ -6,8 +6,8 @@ import android.widget.ArrayAdapter; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import com.tavultesoft.kmea.data.adapters.AdapterFilter; -import com.tavultesoft.kmea.data.adapters.ListBacked; +import com.keyman.engine.data.adapters.AdapterFilter; +import com.keyman.engine.data.adapters.ListBacked; import java.util.ArrayList; import java.util.Arrays; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/Keyboard.java b/android/KMEA/app/src/main/java/com/keyman/engine/data/Keyboard.java similarity index 95% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/Keyboard.java rename to android/KMEA/app/src/main/java/com/keyman/engine/data/Keyboard.java index ffebdc49ae..984284fe09 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/Keyboard.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/data/Keyboard.java @@ -1,20 +1,20 @@ /** * Copyright (C) 2020 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.data; +package com.keyman.engine.data; import android.content.Context; import android.os.Bundle; import androidx.annotation.NonNull; -import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KeyboardPickerActivity; -import com.tavultesoft.kmea.util.BCP47; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.KMLog; -import com.tavultesoft.kmea.util.KMString; +import com.keyman.engine.KMKeyboardDownloaderActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.KeyboardPickerActivity; +import com.keyman.engine.util.BCP47; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.KMLog; +import com.keyman.engine.util.KMString; import org.json.JSONException; import org.json.JSONObject; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/KeyboardController.java b/android/KMEA/app/src/main/java/com/keyman/engine/data/KeyboardController.java similarity index 96% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/KeyboardController.java rename to android/KMEA/app/src/main/java/com/keyman/engine/data/KeyboardController.java index 0676306c87..0eb56eb042 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/KeyboardController.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/data/KeyboardController.java @@ -2,19 +2,19 @@ * Copyright (C) 2020 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.data; +package com.keyman.engine.data; import android.content.Context; import android.util.Log; -import com.tavultesoft.kmea.JSONParser; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.KeyboardPickerActivity; -import com.tavultesoft.kmea.util.BCP47; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.MapCompat; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.JSONParser; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.KeyboardPickerActivity; +import com.keyman.engine.util.BCP47; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.MapCompat; +import com.keyman.engine.KMManager; +import com.keyman.engine.util.KMLog; import org.json.JSONArray; import org.json.JSONObject; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/LanguageResource.java b/android/KMEA/app/src/main/java/com/keyman/engine/data/LanguageResource.java similarity index 96% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/LanguageResource.java rename to android/KMEA/app/src/main/java/com/keyman/engine/data/LanguageResource.java index 36c9f8bdfe..90e633ae99 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/LanguageResource.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/data/LanguageResource.java @@ -1,15 +1,15 @@ /** * Copyright (C) 2020 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.data; +package com.keyman.engine.data; import android.net.Uri; import android.os.Bundle; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.KMLog; -import com.tavultesoft.kmea.util.KMString; +import com.keyman.engine.KMManager; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.KMLog; +import com.keyman.engine.util.KMString; import org.json.JSONException; import org.json.JSONObject; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/LexicalModel.java b/android/KMEA/app/src/main/java/com/keyman/engine/data/LexicalModel.java similarity index 95% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/LexicalModel.java rename to android/KMEA/app/src/main/java/com/keyman/engine/data/LexicalModel.java index f636fa9c76..cb7b889bd4 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/LexicalModel.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/data/LexicalModel.java @@ -1,18 +1,18 @@ /** * Copyright (C) 2020 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.data; +package com.keyman.engine.data; import android.content.Context; import android.net.Uri; import android.os.Bundle; -import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.util.BCP47; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.KMLog; -import com.tavultesoft.kmea.util.KMString; +import com.keyman.engine.KMKeyboardDownloaderActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.util.BCP47; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.KMLog; +import com.keyman.engine.util.KMString; import org.json.JSONArray; import org.json.JSONException; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/AdapterFilter.java b/android/KMEA/app/src/main/java/com/keyman/engine/data/adapters/AdapterFilter.java similarity index 93% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/AdapterFilter.java rename to android/KMEA/app/src/main/java/com/keyman/engine/data/adapters/AdapterFilter.java index 3cba3874e7..a673ff278d 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/AdapterFilter.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/data/adapters/AdapterFilter.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.data.adapters; +package com.keyman.engine.data.adapters; import android.widget.ArrayAdapter; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/ListBacked.java b/android/KMEA/app/src/main/java/com/keyman/engine/data/adapters/ListBacked.java similarity index 64% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/ListBacked.java rename to android/KMEA/app/src/main/java/com/keyman/engine/data/adapters/ListBacked.java index e928ef6745..b6f1df8c66 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/ListBacked.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/data/adapters/ListBacked.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.data.adapters; +package com.keyman.engine.data.adapters; import java.util.List; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/NestedAdapter.java b/android/KMEA/app/src/main/java/com/keyman/engine/data/adapters/NestedAdapter.java similarity index 98% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/NestedAdapter.java rename to android/KMEA/app/src/main/java/com/keyman/engine/data/adapters/NestedAdapter.java index 679b9f381d..67118f3689 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/NestedAdapter.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/data/adapters/NestedAdapter.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.data.adapters; +package com.keyman.engine.data.adapters; import android.content.Context; import android.database.DataSetObserver; @@ -7,7 +7,7 @@ import android.widget.ArrayAdapter; import androidx.annotation.NonNull; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.util.KMLog; import java.lang.ref.WeakReference; import java.util.ArrayList; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/logic/ResourcesUpdateTool.java b/android/KMEA/app/src/main/java/com/keyman/engine/logic/ResourcesUpdateTool.java similarity index 97% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/logic/ResourcesUpdateTool.java rename to android/KMEA/app/src/main/java/com/keyman/engine/logic/ResourcesUpdateTool.java index 6f72741819..0e1db6847f 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/logic/ResourcesUpdateTool.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/logic/ResourcesUpdateTool.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.logic; +package com.keyman.engine.logic; import android.app.NotificationChannel; import android.app.NotificationManager; @@ -20,15 +20,15 @@ import androidx.core.app.NotificationCompat; import androidx.core.app.NotificationCompat.Builder; import androidx.core.app.NotificationManagerCompat; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; -import com.tavultesoft.kmea.KeyboardPickerActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KeyboardEventHandler; -import com.tavultesoft.kmea.R; -import com.tavultesoft.kmea.data.CloudRepository; -import com.tavultesoft.kmea.util.KMLog; -import com.tavultesoft.kmea.util.VersionUtils; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.KMKeyboardDownloaderActivity; +import com.keyman.engine.KeyboardPickerActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.KeyboardEventHandler; +import com.keyman.engine.R; +import com.keyman.engine.data.CloudRepository; +import com.keyman.engine.util.KMLog; +import com.keyman.engine.util.VersionUtils; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/packages/JSONUtils.java b/android/KMEA/app/src/main/java/com/keyman/engine/packages/JSONUtils.java similarity index 98% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/packages/JSONUtils.java rename to android/KMEA/app/src/main/java/com/keyman/engine/packages/JSONUtils.java index 1d36e9c580..d764505217 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/packages/JSONUtils.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/packages/JSONUtils.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.packages; +package com.keyman.engine.packages; import android.util.Log; @@ -7,10 +7,10 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Map; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.JSONParser; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.KMManager; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.JSONParser; +import com.keyman.engine.util.KMLog; import org.json.JSONArray; import org.json.JSONException; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/packages/LexicalModelPackageProcessor.java b/android/KMEA/app/src/main/java/com/keyman/engine/packages/LexicalModelPackageProcessor.java similarity index 97% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/packages/LexicalModelPackageProcessor.java rename to android/KMEA/app/src/main/java/com/keyman/engine/packages/LexicalModelPackageProcessor.java index 77373e3485..1cdf356b37 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/packages/LexicalModelPackageProcessor.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/packages/LexicalModelPackageProcessor.java @@ -1,7 +1,7 @@ -package com.tavultesoft.kmea.packages; +package com.keyman.engine.packages; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.util.FileUtils; +import com.keyman.engine.KMManager; +import com.keyman.engine.util.FileUtils; import org.json.JSONArray; import org.json.JSONException; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/packages/PackageProcessor.java b/android/KMEA/app/src/main/java/com/keyman/engine/packages/PackageProcessor.java similarity index 98% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/packages/PackageProcessor.java rename to android/KMEA/app/src/main/java/com/keyman/engine/packages/PackageProcessor.java index 599ea5dc79..1e3bff4a76 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/packages/PackageProcessor.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/packages/PackageProcessor.java @@ -1,19 +1,19 @@ /** * Copyright (C) 2017-2020 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.packages; +package com.keyman.engine.packages; import android.widget.Toast; import androidx.annotation.NonNull; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.JSONParser; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.data.KeyboardController; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.KMLog; -import com.tavultesoft.kmea.util.ZipUtils; +import com.keyman.engine.KMManager; +import com.keyman.engine.JSONParser; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.data.KeyboardController; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.KMLog; +import com.keyman.engine.util.ZipUtils; import java.io.File; import java.io.FileFilter; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/BCP47.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/BCP47.java similarity index 97% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/BCP47.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/BCP47.java index 81542ca86d..bf3b38a993 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/BCP47.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/BCP47.java @@ -2,7 +2,7 @@ * Copyright (C) 2020 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import java.util.ArrayList; import java.security.InvalidParameterException; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/CharSequenceUtil.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/CharSequenceUtil.java similarity index 98% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/CharSequenceUtil.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/CharSequenceUtil.java index a356656f54..45199fe684 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/CharSequenceUtil.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/CharSequenceUtil.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import java.lang.CharSequence; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/Connection.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/Connection.java similarity index 98% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/Connection.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/Connection.java index 2fcc449df0..1a02ccf66f 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/Connection.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/Connection.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import java.io.InputStream; import java.io.IOException; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/ContextUtils.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/ContextUtils.java similarity index 97% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/ContextUtils.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/ContextUtils.java index efae405166..ab41731cc4 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/ContextUtils.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/ContextUtils.java @@ -1,7 +1,7 @@ /** * Copyright (C) 2021 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import android.content.Context; import android.content.ContextWrapper; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/DependencyUtil.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/DependencyUtil.java similarity index 97% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/DependencyUtil.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/DependencyUtil.java index 82d03cf934..4d414184a5 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/DependencyUtil.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/DependencyUtil.java @@ -2,7 +2,7 @@ * Copyright (C) 2022 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; public final class DependencyUtil { private static final String TAG = "DependencyUtil"; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/DownloadFileUtils.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/DownloadFileUtils.java similarity index 98% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/DownloadFileUtils.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/DownloadFileUtils.java index a59bbee0b9..c16d3d381d 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/DownloadFileUtils.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/DownloadFileUtils.java @@ -1,7 +1,7 @@ /** * Copyright (C) 2020 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import android.content.Context; import android.database.Cursor; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/FileProviderUtils.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/FileProviderUtils.java similarity index 93% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/FileProviderUtils.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/FileProviderUtils.java index a4a9918ac8..825ebb8b7d 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/FileProviderUtils.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/FileProviderUtils.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import android.content.Context; import android.content.ContentProviderClient; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/FileUtils.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/FileUtils.java similarity index 99% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/FileUtils.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/FileUtils.java index 9da485f780..d5610dedec 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/FileUtils.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/FileUtils.java @@ -1,7 +1,7 @@ /** * Copyright (C) 2020 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import android.content.Context; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/HelpFile.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/HelpFile.java similarity index 88% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/HelpFile.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/HelpFile.java index a2a3024d2d..c2da3aa05a 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/HelpFile.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/HelpFile.java @@ -2,7 +2,7 @@ * Copyright (C) 2021 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import android.content.ClipData; import android.content.ClipDescription; @@ -13,11 +13,11 @@ import android.widget.Toast; import androidx.core.content.FileProvider; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.R; -import com.tavultesoft.kmea.util.FileProviderUtils; -import com.tavultesoft.kmea.util.FileUtils; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.R; +import com.keyman.engine.util.FileProviderUtils; +import com.keyman.engine.util.FileUtils; import java.io.File; import java.io.FileFilter; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/KMLog.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/KMLog.java similarity index 91% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/KMLog.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/KMLog.java index 1a8610cf26..3eeabdcbdf 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/KMLog.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/KMLog.java @@ -2,16 +2,16 @@ * Copyright (C) 2020 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import android.util.Log; import android.widget.Toast; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.BuildConfig; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.util.DependencyUtil; -import com.tavultesoft.kmea.util.DependencyUtil.LibraryType; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.BuildConfig; +import com.keyman.engine.KMManager; +import com.keyman.engine.util.DependencyUtil; +import com.keyman.engine.util.DependencyUtil.LibraryType; import io.sentry.Sentry; import io.sentry.SentryLevel; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/KMPLink.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/KMPLink.java similarity index 96% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/KMPLink.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/KMPLink.java index 19ad4aaa72..c26b64776d 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/KMPLink.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/KMPLink.java @@ -1,16 +1,16 @@ /** * Copyright (C) 2020 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import android.net.Uri; import android.os.Build; -import com.tavultesoft.kmea.BuildConfig; -import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KMManager.Tier; -import com.tavultesoft.kmea.util.KMString; +import com.keyman.engine.BuildConfig; +import com.keyman.engine.KMKeyboardDownloaderActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.KMManager.Tier; +import com.keyman.engine.util.KMString; import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/KMString.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/KMString.java similarity index 92% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/KMString.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/KMString.java index 361632ee02..18b3dd0288 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/KMString.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/KMString.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import java.util.Locale; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/MapCompat.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/MapCompat.java similarity index 96% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/MapCompat.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/MapCompat.java index 7db5128356..badf6798d0 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/MapCompat.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/MapCompat.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import android.os.Build; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/QRCodeUtil.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/QRCodeUtil.java similarity index 95% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/QRCodeUtil.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/QRCodeUtil.java index 04dec4c4c1..f01d443ae8 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/QRCodeUtil.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/QRCodeUtil.java @@ -2,7 +2,7 @@ * Copyright (C) 2022 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import android.graphics.Bitmap; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/VersionUtils.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/VersionUtils.java similarity index 89% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/VersionUtils.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/VersionUtils.java index 311cc4c642..58e80399f5 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/VersionUtils.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/VersionUtils.java @@ -1,9 +1,9 @@ /** * Copyright (C) 2022 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; -import com.tavultesoft.kmea.BuildConfig; +import com.keyman.engine.BuildConfig; /** * Utilities to determine if a build is local or a test (PR) build. diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/WebViewUtils.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/WebViewUtils.java similarity index 98% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/WebViewUtils.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/WebViewUtils.java index e31b8860a1..1c60193dc7 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/WebViewUtils.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/WebViewUtils.java @@ -1,12 +1,12 @@ /** * Keyman is copyright (C) SIL International. MIT License. */ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import android.content.Context; import android.view.ViewGroup; import android.webkit.WebView; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.util.KMLog; import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/ZipUtils.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/ZipUtils.java similarity index 98% rename from android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/ZipUtils.java rename to android/KMEA/app/src/main/java/com/keyman/engine/util/ZipUtils.java index 3344534956..e707ba64b2 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/util/ZipUtils.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/ZipUtils.java @@ -2,7 +2,7 @@ * Copyright (C) 2021 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import java.io.BufferedInputStream; import java.io.File; diff --git a/android/KMEA/app/src/main/res/layout/help_bubble_layout.xml b/android/KMEA/app/src/main/res/layout/help_bubble_layout.xml index ef36e81bc8..953c74e692 100644 --- a/android/KMEA/app/src/main/res/layout/help_bubble_layout.xml +++ b/android/KMEA/app/src/main/res/layout/help_bubble_layout.xml @@ -3,7 +3,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" > - 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 index 0fc2a96701..bb03d58347 100644 --- a/android/KMEA/app/src/main/res/layout/key_preview_layout.xml +++ b/android/KMEA/app/src/main/res/layout/key_preview_layout.xml @@ -3,7 +3,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" > - 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 index 8979ad9218..4cdd7356fd 100644 --- a/android/KMEA/app/src/main/res/layout/subkeys_popup_layout.xml +++ b/android/KMEA/app/src/main/res/layout/subkeys_popup_layout.xml @@ -3,7 +3,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" > - diff --git a/android/KMEA/app/src/main/res/values-b+shu+latn/strings.xml b/android/KMEA/app/src/main/res/values-b+shu+latn/strings.xml index f726144cf2..58be85253b 100644 --- a/android/KMEA/app/src/main/res/values-b+shu+latn/strings.xml +++ b/android/KMEA/app/src/main/res/values-b+shu+latn/strings.xml @@ -11,10 +11,10 @@ - Other Input Method - Other Input Methods - Other Input Methods - Other Input Methods + Darb gadey hana dassasan + Durub gadey hana dassasan + Durub gadey hana dassasan + Durub gadey hana dassasan Zyd Keyboard jadid diff --git a/android/KMEA/app/src/main/res/values-ff-rZA/strings.xml b/android/KMEA/app/src/main/res/values-ff-rZA/strings.xml index f0e9ce3d2c..7d52d61f6b 100644 --- a/android/KMEA/app/src/main/res/values-ff-rZA/strings.xml +++ b/android/KMEA/app/src/main/res/values-ff-rZA/strings.xml @@ -45,7 +45,7 @@ Hesɗitin - No internet connection + Alaa ceŋol Enternet Horiima seŋaade e Sarworde Keyman! @@ -128,11 +128,11 @@ Aɗa yiɗnoo momtude ndee saggitorde? - Dictionary deleted + Saggitorde momtaama Tappirde %1$s aafaama - Keyboard deleted + Tappirde momtaama Hurmin caatagol @@ -168,5 +168,5 @@ Tappu ɗoo ngam waylude tappirde - Unable to launch web browser + Horiima hurminde wanngorde geese diff --git a/android/KMEA/app/src/main/res/values-ru-rRU/strings.xml b/android/KMEA/app/src/main/res/values-ru-rRU/strings.xml new file mode 100644 index 0000000000..678a22dc1b --- /dev/null +++ b/android/KMEA/app/src/main/res/values-ru-rRU/strings.xml @@ -0,0 +1,180 @@ + + + + + + + Клавиатура + Клавиатуры + Клавиатуры + Клавиатуры + + + + Другой метод ввода + Другие методы ввода + Другие методы ввода + Другие методы ввода + + + Добавить новую клавиатуру + + Установленные языки + + Настройки %1$s + + Добавить + + Назад + + Отменить + + Закрыть + + Закрыть Клавиатуру + + Вперед + + Метод следующего ввода + + Скачать + + Установить + + Позже + + Следующий + + ОК + + Обновить + + No internet connection + + Не удается подключиться к серверу Keyman! + + Вы хотите удалить эту клавиатуру? + + Хотите загрузить последнюю версию этой клавиатуры? + + Вы хотите обновить клавиатуры и словари сейчас? + + Обновления ресурсов + + Доступно обновление ресурсов + + %1$s (Доступно обновление) + + Доступны обновления для клавиатуры %1$s: %2$s + + Доступные обновления для словаря %1$s: %2$s + + Версия клавиатуры + + Справка + + Удалить клавиатуру + + [new] %1$s + + Отсканируйте этот код, чтобы загрузить эту клавиатуру\nна другом устройстве + + Добро пожаловать в %1$s + + Библиотека файлового провайдера необходима для просмотра файла справки: %1$s + + Неустранимая ошибка клавиатуры %1$s:%2$s для %3$s языка. Загрузка по умолчанию клавиатуры. + + Ошибка в клавиатуре %1$s:%2$s для языка %3$s. + + Проверка соответствующего словаря для загрузки + Cannot connect to Keyman server to check for associated dictionary to download + + Загрузить последнюю версию этого словаря? + + Нет словаря для загрузки + + Каталог ресурсов недоступен + + Обновление каталога запущено в фоновом режиме + + Каталог все еще загружается; Пожалуйста, повторите попытку через некоторое время! + + Проверка ресурса + + Загрузка клавиатуры началась в фоновом режиме + + Выбранная клавиатура уже загружается; Пожалуйста, попробуйте еще раз через некоторое время! + + Загрузка клавиатуры завершена! + + Загрузка словаря началась в фоновом режиме + + Выбранный словарь уже загружается; Пожалуйста, попробуйте еще раз через некоторое время! + + Загрузка словаря завершена. + + Ошибка загрузки + + Не удалось получить скачанный файл + + Не удалось получить доступ к серверу! + + "Все ресурсы актуальны!" + + Не удалось обновить один или несколько ресурсов! + + Ресурсы успешно обновлены! + + Версия словаря + + Удалить словарь + + Вы хотите удалить этот словарь? + + Dictionary deleted + + Установлена клавиатура %1$s + + Keyboard deleted + + Включить исправления + + Включить прогнозы + + Словарь + + Dictionary + Dictionaries + Dictionaries + Dictionaries + + + Проверить доступный словарь + Check for dictionaries online + + Словарь: %1$s + + словари %1$s + + + Словарь установлен + + + (%1$d клавиатура) + (%1$d клавиатура) + (%1$d клавиатура) + (%1$d клавиатура) + + + Язык по умолчанию + + + + Удалить + + + Нажмите здесь, чтобы изменить клавиатуру + + Unable to launch web browser + diff --git a/android/KMEA/app/src/main/res/values-sv-rSE/strings.xml b/android/KMEA/app/src/main/res/values-sv-rSE/strings.xml new file mode 100644 index 0000000000..ca9e0ba02a --- /dev/null +++ b/android/KMEA/app/src/main/res/values-sv-rSE/strings.xml @@ -0,0 +1,172 @@ + + + + + + + Keyboard + Tangentbord + + + + Annan inmatningsmetod + Andra inmatningsmetoder + + + Lägg till nytt tangentbord + + Installerade språk + + %1$s Inställningar + + Lägg till + + Tillbaka + + Avbryt + + Stäng + + Stäng Keyman + + Framåt + + Nästa inmatningsmetod + + Hämta + + Installera + + Senare + + Nästa + + Ok + + Uppdatera + + No internet connection + + Kan inte ansluta till Keyman-servern! + + Vill du ta bort det här tangentbordet? + + Vill du ladda ner den senaste versionen av detta tangentbord? + + Vill du uppdatera tangentbord och ordböcker nu? + + Uppdateringar av resurs + + Uppdateringar av resurs tillgängliga + + %1$s (Uppdatering tillgänglig) + + Uppdateringar tillgängliga för tangentbord %1$s: %2$s + + Uppdateringar tillgängliga för ordbok %1$s: %2$s + + Tangentbord version + + Hjälp länk + + Avinstallera tangentbordet + + [new] %1$s + + Skanna koden för att ladda detta\ntangentbord på en annan enhet + + Välkommen till %1$s + + Filleverantörsbibliotek behövs för att visa hjälpfilen: %1$s + + Kritiskt tangentbordsfel med %1$s:%2$s för %3$s språk. Laddar standardtangentbordet. + + Fel i tangentbordet %1$s:%2$s för %3$s språk. + + Söker efter tillhörande ordbok att ladda ner + Cannot connect to Keyman server to check for associated dictionary to download + + Vill du ladda ner den senaste versionen av denna ordbok? + + Ingen ordbok att ladda ner + + Resurskatalogen är inte tillgänglig + + Kataloguppdatering startad i bakgrunden + + Katalogen laddas fortfarande ner; försök igen om ett ögonblick! + + Söker efter resurs + + Nedladdning av tangentbord startat i bakgrunden + + Det valda tangentbordet laddas redan ner; försök igen om ett ögonblick! + + Tangentbords nedladdning är klar! + + Nedladdning av ordbok startad i bakgrunden + + Den valda ordboken laddas redan ner; försök igen om en stund! + + Nedladdning av ordbok är klar. + + Nedladdning misslyckades + + Det gick inte att hämta den hämtade filen + + Det gick inte att komma åt servern! + + "Alla resurser är uppdaterade!" + + En eller flera resurser kunde inte uppdateras! + + Resurser har uppdaterats! + + Ordbok version + + Avinstallera ordbok + + Vill du ta bort denna ordbok? + + Dictionary deleted + + %1$s tangentbord installerat + + Keyboard deleted + + Aktivera korrigeringar + + Aktivera förutsägelser + + Ordbok + + Dictionary + Dictionaries + + + Sök efter tillgänglig ordbok + Check for dictionaries online + + Ordbok: %1$s + + %1$s ordböcker + + + Ordbok installerad + + + (%1$d tangentbord) + (%1$d tangentbord) + + + Standard språk + + + + Radera + + + Tryck här för att ändra tangentbordet + + Unable to launch web browser + diff --git a/android/KMEA/app/src/main/res/values-uk-rUA/strings.xml b/android/KMEA/app/src/main/res/values-uk-rUA/strings.xml new file mode 100644 index 0000000000..bc53218a87 --- /dev/null +++ b/android/KMEA/app/src/main/res/values-uk-rUA/strings.xml @@ -0,0 +1,180 @@ + + + + + + + Keyboard + Клавіатури + Клавіатури + Клавіатури + + + + Інший метод введення + Інші Методи вводу + Інші Методи вводу + Інші Методи вводу + + + Додати нову клавіатуру + + Встановлені мови + + %1$s Налаштування + + Додати + + Відмінити + + Скасувати + + Закрити + + Закрити Keyman + + Переслати + + Спосіб наступного введення + + Звантажити + + Інсталювати + + Пізніше + + Уперед + + Гаразд + + Оновити + + No internet connection + + Не вдається підключитися до сервера Keyman! + + Ви хотіли б видалити цю клавіатуру? + + Завантажити останню версію цієї клавіатури? + + Оновити клавіатури та словники? + + Оновлення ресурсів + + Доступні оновлення для ресурсів + + %1$s (Оновити доступне) + + Доступні оновлення для клавіатури %1$s: %2$s + + Доступні оновлення для словника %1$s: %2$s + + Версія клавіатури + + Посилання допомоги + + Видалити клавіатуру + + [new] %1$s + + Відскануйте цей код, щоб завантажити цю\nклавіатуру на іншому пристрої + + Ласкаво просимо до %1$s + + Бібліотека FileProvider необхідна для перегляду файлу довідки: %1$s + + Критична помилка в клавіатурі з %1$s:%2$s для мови %3$s . Завантаження клавіатури за замовчуванням. + + Помилка в клавіатурі %1$s:%2$s для мови %3$s. + + Перевірка пов\'язаного словника для завантаження + Cannot connect to Keyman server to check for associated dictionary to download + + Бажаєте завантажити останню версію цього словника? + + Немає словника для завантаження + + Каталог ресурсів недоступний + + Оновлення каталогу розпочате у фоновому режимі + + Каталог ще завантажується; будь ласка, спробуйте ще раз! + + Перевірка ресурсу + + Завантаження клавіатури почнеться у фоновому режимі + + Обрана клавіатура вже завантажується; будь ласка, спробуйте ще раз за хвилину! + + Завантаження клавіатури завершено! + + Завантаження словника розпочато в фоновому режимі + + Обраний словник вже завантажується; будь ласка, спробуйте ще раз! + + Словник завантаження завершено. + + Не вдалося завантажити + + Не вдалося отримати завантажений файл + + Не вдалося отримати доступ до сервера! + + "Усі ресурси найновіші!" + + Один або кілька ресурсів не вдалося оновити! + + Ресурси успішно оновлено! + + Версія словника + + Видалити словник + + Видалити цей словник? + + Dictionary deleted + + %1$s встановлено клавіатуру + + Keyboard deleted + + Увімкнути виправлення + + Увімкнути передбачення + + Словник + + Dictionary + Dictionaries + Dictionaries + Dictionaries + + + Перевірка доступного словника + Check for dictionaries online + + Словник: %1$s + + %1$s словників + + + Словник встановлено + + + (%1$d клавіатура) + (%1$d клавіатури) + (%1$d клавіатури) + (%1$d клавіатури) + + + Мова за замовчуванням + + + + Видалити + + + Натисніть тут для зміни клавіатури + + Unable to launch web browser + diff --git a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/KMManagerTest.java b/android/KMEA/app/src/test/java/com/keyman/engine/KMManagerTest.java similarity index 98% rename from android/KMEA/app/src/test/java/com/tavultesoft/kmea/KMManagerTest.java rename to android/KMEA/app/src/test/java/com/keyman/engine/KMManagerTest.java index 418d446c9f..97515b7190 100644 --- a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/KMManagerTest.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/KMManagerTest.java @@ -1,9 +1,9 @@ -package com.tavultesoft.kmea; +package com.keyman.engine; import android.util.Log; import androidx.test.core.app.ApplicationProvider; -import com.tavultesoft.kmea.data.Keyboard; +import com.keyman.engine.data.Keyboard; import org.junit.Assert; import org.junit.Before; @@ -97,7 +97,7 @@ public class KMManagerTest { tier = KMManager.getTier(versionName); Assert.assertEquals(KMManager.Tier.STABLE, tier); - // If versionName is null or blank, tier based on com.tavultesoft.kmea.BuildConfig.KEYMAN_ENGINE_VERSION_NAME + // If versionName is null or blank, tier based on com.keyman.engine.BuildConfig.KEYMAN_ENGINE_VERSION_NAME // But we can't test for it. // If regex fails, tier is stable diff --git a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/cloud/CloudDataJsonUtilTest.java b/android/KMEA/app/src/test/java/com/keyman/engine/cloud/CloudDataJsonUtilTest.java similarity index 94% rename from android/KMEA/app/src/test/java/com/tavultesoft/kmea/cloud/CloudDataJsonUtilTest.java rename to android/KMEA/app/src/test/java/com/keyman/engine/cloud/CloudDataJsonUtilTest.java index d80c6516c3..b2c45ebbb6 100644 --- a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/cloud/CloudDataJsonUtilTest.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/cloud/CloudDataJsonUtilTest.java @@ -1,9 +1,9 @@ -package com.tavultesoft.kmea.cloud; +package com.keyman.engine.cloud; -import com.tavultesoft.kmea.JSONParser; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.data.LexicalModel; -import com.tavultesoft.kmea.packages.JSONUtils; +import com.keyman.engine.JSONParser; +import com.keyman.engine.KMManager; +import com.keyman.engine.data.LexicalModel; +import com.keyman.engine.packages.JSONUtils; import org.json.JSONArray; import org.junit.Assert; diff --git a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/logic/ResourcesUpdateToolTest.java b/android/KMEA/app/src/test/java/com/keyman/engine/logic/ResourcesUpdateToolTest.java similarity index 97% rename from android/KMEA/app/src/test/java/com/tavultesoft/kmea/logic/ResourcesUpdateToolTest.java rename to android/KMEA/app/src/test/java/com/keyman/engine/logic/ResourcesUpdateToolTest.java index 8a96b3d6df..ecda7ba17a 100644 --- a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/logic/ResourcesUpdateToolTest.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/logic/ResourcesUpdateToolTest.java @@ -1,11 +1,11 @@ -package com.tavultesoft.kmea.logic; +package com.keyman.engine.logic; import android.content.Context; import android.content.SharedPreferences; import androidx.test.core.app.ApplicationProvider; -import com.tavultesoft.kmea.R; +import com.keyman.engine.R; import org.junit.Assert; import org.junit.Assume; diff --git a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/packages/JSONUtilsTest.java b/android/KMEA/app/src/test/java/com/keyman/engine/packages/JSONUtilsTest.java similarity index 97% rename from android/KMEA/app/src/test/java/com/tavultesoft/kmea/packages/JSONUtilsTest.java rename to android/KMEA/app/src/test/java/com/keyman/engine/packages/JSONUtilsTest.java index 4a425d9ba1..cf8ddadfbe 100644 --- a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/packages/JSONUtilsTest.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/packages/JSONUtilsTest.java @@ -1,8 +1,8 @@ -package com.tavultesoft.kmea.packages; +package com.keyman.engine.packages; import android.util.Log; -import com.tavultesoft.kmea.JSONParser; +import com.keyman.engine.JSONParser; import org.json.JSONArray; import org.json.JSONException; diff --git a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/packages/LexicalModelPackageProcessorTest.java b/android/KMEA/app/src/test/java/com/keyman/engine/packages/LexicalModelPackageProcessorTest.java similarity index 97% rename from android/KMEA/app/src/test/java/com/tavultesoft/kmea/packages/LexicalModelPackageProcessorTest.java rename to android/KMEA/app/src/test/java/com/keyman/engine/packages/LexicalModelPackageProcessorTest.java index 543b6d1cb8..c28c68374b 100644 --- a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/packages/LexicalModelPackageProcessorTest.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/packages/LexicalModelPackageProcessorTest.java @@ -1,6 +1,6 @@ -package com.tavultesoft.kmea.packages; +package com.keyman.engine.packages; -import com.tavultesoft.kmea.KMManager; +import com.keyman.engine.KMManager; import org.apache.commons.io.FileUtils; import org.json.JSONObject; diff --git a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/packages/PackageProcessorTest.java b/android/KMEA/app/src/test/java/com/keyman/engine/packages/PackageProcessorTest.java similarity index 99% rename from android/KMEA/app/src/test/java/com/tavultesoft/kmea/packages/PackageProcessorTest.java rename to android/KMEA/app/src/test/java/com/keyman/engine/packages/PackageProcessorTest.java index 3969b6f5e7..f43f9de175 100644 --- a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/packages/PackageProcessorTest.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/packages/PackageProcessorTest.java @@ -1,6 +1,6 @@ -package com.tavultesoft.kmea.packages; +package com.keyman.engine.packages; -import com.tavultesoft.kmea.KMManager; +import com.keyman.engine.KMManager; import org.apache.commons.io.FileUtils; import org.json.JSONObject; diff --git a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/BCP47Test.java b/android/KMEA/app/src/test/java/com/keyman/engine/util/BCP47Test.java similarity index 92% rename from android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/BCP47Test.java rename to android/KMEA/app/src/test/java/com/keyman/engine/util/BCP47Test.java index b5d68f2250..4dc7b09c5e 100644 --- a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/BCP47Test.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/util/BCP47Test.java @@ -1,11 +1,11 @@ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; -import com.tavultesoft.kmea.util.BCP47; +import com.keyman.engine.util.BCP47; @RunWith(RobolectricTestRunner.class) public class BCP47Test { diff --git a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/CharSequenceUtilTest.java b/android/KMEA/app/src/test/java/com/keyman/engine/util/CharSequenceUtilTest.java similarity index 98% rename from android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/CharSequenceUtilTest.java rename to android/KMEA/app/src/test/java/com/keyman/engine/util/CharSequenceUtilTest.java index 4e70517838..6feb49feb1 100644 --- a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/CharSequenceUtilTest.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/util/CharSequenceUtilTest.java @@ -1,11 +1,11 @@ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; -import com.tavultesoft.kmea.util.CharSequenceUtil; +import com.keyman.engine.util.CharSequenceUtil; @RunWith(RobolectricTestRunner.class) public class CharSequenceUtilTest { diff --git a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/FileUtilsTest.java b/android/KMEA/app/src/test/java/com/keyman/engine/util/FileUtilsTest.java similarity index 97% rename from android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/FileUtilsTest.java rename to android/KMEA/app/src/test/java/com/keyman/engine/util/FileUtilsTest.java index 64df232d02..5118159c9b 100644 --- a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/FileUtilsTest.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/util/FileUtilsTest.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import androidx.test.core.app.ApplicationProvider; @@ -23,13 +23,13 @@ public class FileUtilsTest { List logs = ShadowLog.getLogs(); // The logs contain type 4, but we only care about type 6 for connection messages - Assert.assertEquals(3, logs.size()); + Assert.assertEquals(2, logs.size()); - Assert.assertEquals("Connection", logs.get(1).tag); - Assert.assertEquals("Initialization failed:\njava.net.MalformedURLException: no protocol: invalidURL", logs.get(1).msg); + Assert.assertEquals("Connection", logs.get(0).tag); + Assert.assertEquals("Initialization failed:\njava.net.MalformedURLException: no protocol: invalidURL", logs.get(0).msg); - Assert.assertEquals("FileUtils", logs.get(2).tag); - Assert.assertEquals("Could not download filename ", logs.get(2).msg); + Assert.assertEquals("FileUtils", logs.get(1).tag); + Assert.assertEquals("Could not download filename ", logs.get(1).msg); } @Test diff --git a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/KMPLinkTest.java b/android/KMEA/app/src/test/java/com/keyman/engine/util/KMPLinkTest.java similarity index 97% rename from android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/KMPLinkTest.java rename to android/KMEA/app/src/test/java/com/keyman/engine/util/KMPLinkTest.java index 56743502ed..81e8ccf30a 100644 --- a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/KMPLinkTest.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/util/KMPLinkTest.java @@ -1,9 +1,9 @@ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import org.junit.Assert; import org.junit.Test; -import com.tavultesoft.kmea.util.KMPLink; +import com.keyman.engine.util.KMPLink; import org.junit.Assert; import org.junit.Test; diff --git a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/MapCompatTest.java b/android/KMEA/app/src/test/java/com/keyman/engine/util/MapCompatTest.java similarity index 97% rename from android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/MapCompatTest.java rename to android/KMEA/app/src/test/java/com/keyman/engine/util/MapCompatTest.java index 3ef80d7daf..58ac484b73 100644 --- a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/MapCompatTest.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/util/MapCompatTest.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import org.junit.Assert; import org.junit.Before; diff --git a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/WebViewUtilsTest.java b/android/KMEA/app/src/test/java/com/keyman/engine/util/WebViewUtilsTest.java similarity index 95% rename from android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/WebViewUtilsTest.java rename to android/KMEA/app/src/test/java/com/keyman/engine/util/WebViewUtilsTest.java index ec70707392..344b01879a 100644 --- a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/WebViewUtilsTest.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/util/WebViewUtilsTest.java @@ -1,7 +1,7 @@ /** * Keyman is copyright (C) SIL International. MIT License. */ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; import android.content.Context; @@ -12,7 +12,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; -import com.tavultesoft.kmea.util.WebViewUtils; +import com.keyman.engine.util.WebViewUtils; @RunWith(RobolectricTestRunner.class) public class WebViewUtilsTest { diff --git a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/ZipUtilsTest.java b/android/KMEA/app/src/test/java/com/keyman/engine/util/ZipUtilsTest.java similarity index 93% rename from android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/ZipUtilsTest.java rename to android/KMEA/app/src/test/java/com/keyman/engine/util/ZipUtilsTest.java index 41c0f36818..47ff5dc4e6 100644 --- a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/util/ZipUtilsTest.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/util/ZipUtilsTest.java @@ -2,9 +2,9 @@ * Copyright (C) 2021 SIL International. All rights reserved. */ -package com.tavultesoft.kmea.util; +package com.keyman.engine.util; -import com.tavultesoft.kmea.util.ZipUtils; +import com.keyman.engine.util.ZipUtils; import org.junit.Assert; import org.junit.Assume; diff --git a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/view/FunctionalTestHelper.java b/android/KMEA/app/src/test/java/com/keyman/engine/view/FunctionalTestHelper.java similarity index 89% rename from android/KMEA/app/src/test/java/com/tavultesoft/kmea/view/FunctionalTestHelper.java rename to android/KMEA/app/src/test/java/com/keyman/engine/view/FunctionalTestHelper.java index 412b0eaa2d..b56a4063eb 100644 --- a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/view/FunctionalTestHelper.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/view/FunctionalTestHelper.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.view; +package com.keyman.engine.view; import android.Manifest; import android.app.Application; @@ -8,10 +8,10 @@ import android.util.Log; import androidx.test.core.app.ApplicationProvider; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.packages.PackageProcessor; -import com.tavultesoft.kmea.util.FileUtils; +import com.keyman.engine.KMManager; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.packages.PackageProcessor; +import com.keyman.engine.util.FileUtils; import org.json.JSONException; import org.junit.Assert; diff --git a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/view/KeyboardPickerTest.java b/android/KMEA/app/src/test/java/com/keyman/engine/view/KeyboardPickerTest.java similarity index 94% rename from android/KMEA/app/src/test/java/com/tavultesoft/kmea/view/KeyboardPickerTest.java rename to android/KMEA/app/src/test/java/com/keyman/engine/view/KeyboardPickerTest.java index f6ce2366ad..8162e8afc9 100644 --- a/android/KMEA/app/src/test/java/com/tavultesoft/kmea/view/KeyboardPickerTest.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/view/KeyboardPickerTest.java @@ -1,4 +1,4 @@ -package com.tavultesoft.kmea.view; +package com.keyman.engine.view; import android.content.Intent; import android.util.Log; @@ -7,11 +7,11 @@ import android.widget.ListView; import androidx.test.core.app.ApplicationProvider; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KeyboardInfoActivity; -import com.tavultesoft.kmea.KeyboardPickerActivity; -import com.tavultesoft.kmea.R; -import com.tavultesoft.kmea.data.Keyboard; +import com.keyman.engine.KMManager; +import com.keyman.engine.KeyboardInfoActivity; +import com.keyman.engine.KeyboardPickerActivity; +import com.keyman.engine.R; +import com.keyman.engine.data.Keyboard; import org.json.JSONException; import org.junit.After; @@ -184,7 +184,7 @@ public class KeyboardPickerTest { // check result intent to be a weblink to open Intent actual2 = Shadows.shadowOf(_info).getNextStartedActivity(); Assert.assertNotNull(actual2); - Assert.assertEquals("com.tavultesoft.kmea.KMHelpFileActivity", actual2.getComponent().getClassName()); + Assert.assertEquals("com.keyman.engine.KMHelpFileActivity", actual2.getComponent().getClassName()); } finally { if(_controller2!=null) diff --git a/android/KMEA/build.sh b/android/KMEA/build.sh index 4004f88482..5cd3205922 100755 --- a/android/KMEA/build.sh +++ b/android/KMEA/build.sh @@ -45,7 +45,6 @@ SHLVL=0 KMA_ROOT="$KEYMAN_ROOT/android" KMW_ROOT="$KEYMAN_ROOT/web" -KMW_SOURCE="$KMW_ROOT/source" KMEA_ASSETS="$KMA_ROOT/KMEA/app/src/main/assets" warn ( ) { @@ -65,8 +64,8 @@ DO_COPY=true DO_TEST=true NO_DAEMON=false DEBUG_BUILD=false -KMWFLAGS=-embed -KMW_PATH= +KMWFLAGS="build:embed" +KMW_CONFIG=release # Parse args while [[ $# -gt 0 ]] ; do @@ -89,8 +88,8 @@ while [[ $# -gt 0 ]] ; do ;; -debug) DEBUG_BUILD=true - KMWFLAGS=-debug_embedded - KMW_PATH=unminified + KMWFLAGS="$KMWFLAGS --debug" + KMW_CONFIG=debug ;; -h|-\?) display_usage @@ -106,6 +105,7 @@ done # by developer. As it's not CI, the Web artifacts won't exist otherwise... # unless the developer manually runs the correct build configuration accordingly. if [[ $VERSION_ENVIRONMENT == "local" ]] && [[ $UPLOAD_SENTRY == true ]]; then + # TODO: handle the -upload-sentry in its eventual new form KMWFLAGS="$KMWFLAGS -upload-sentry" fi @@ -116,7 +116,7 @@ echo "DO_TEST: $DO_TEST" echo "NO_DAEMON: $NO_DAEMON" echo "DEBUG_BUILD: $DEBUG_BUILD" echo "KMWFLAGS: $KMWFLAGS" -echo "KMW_PATH: $KMW_PATH" +echo "KMW_CONFIG: $KMW_CONFIG" echo if [ "$NO_DAEMON" = true ]; then @@ -131,9 +131,8 @@ PLATFORM=`uname -s` if [ "$DO_BUILD" = true ]; then echo "Building keyman web engine" - cd $KMW_SOURCE - ./build.sh $KMWFLAGS + "$KMW_ROOT/build.sh" $KMWFLAGS if [ $? -ne 0 ]; then die "ERROR: keymanweb build failed. Exiting" @@ -141,12 +140,12 @@ if [ "$DO_BUILD" = true ]; then fi if [ "$DO_COPY" = true ]; then echo "Copying KMW artifacts" - cp $KMW_ROOT/release/$KMW_PATH/embedded/resources/osk/ajax-loader.gif $KMEA_ASSETS/ajax-loader.gif - cp $KMW_ROOT/release/$KMW_PATH/embedded/keyman.js $KMEA_ASSETS/keymanandroid.js - cp $KMW_ROOT/release/$KMW_PATH/embedded/keyman.js.map $KMEA_ASSETS/keyman.js.map - cp $KMW_ROOT/release/$KMW_PATH/embedded/resources/osk/kmwosk.css $KMEA_ASSETS/kmwosk.css - cp $KMW_ROOT/release/$KMW_PATH/embedded/resources/osk/globe-hint.css $KMEA_ASSETS/globe-hint.css - cp $KMW_ROOT/release/$KMW_PATH/embedded/resources/osk/keymanweb-osk.ttf $KMEA_ASSETS/keymanweb-osk.ttf + cp $KMW_ROOT/build/app/embed/$KMW_CONFIG/osk/ajax-loader.gif $KMEA_ASSETS/ajax-loader.gif + cp $KMW_ROOT/build/app/embed/$KMW_CONFIG/keyman.js $KMEA_ASSETS/keymanandroid.js + cp $KMW_ROOT/build/app/embed/$KMW_CONFIG/keyman.js.map $KMEA_ASSETS/keyman.js.map + cp $KMW_ROOT/build/app/embed/$KMW_CONFIG/osk/kmwosk.css $KMEA_ASSETS/kmwosk.css + cp $KMW_ROOT/build/app/embed/$KMW_CONFIG/osk/globe-hint.css $KMEA_ASSETS/globe-hint.css + cp $KMW_ROOT/build/app/embed/$KMW_CONFIG/osk/keymanweb-osk.ttf $KMEA_ASSETS/keymanweb-osk.ttf cp $KEYMAN_ROOT/common/web/sentry-manager/build/index.js $KMEA_ASSETS/keyman-sentry.js diff --git a/android/README.md b/android/README.md index 07aa1e37af..067f3667be 100644 --- a/android/README.md +++ b/android/README.md @@ -150,4 +150,4 @@ dependencies { } ```` -5. include `import com.tavultesoft.kmea.*;` to use Keyman Engine in a class. +5. include `import com.keyman.engine.*;` to use Keyman Engine in a class. diff --git a/android/Samples/KMSample1/app/src/main/java/com/keyman/kmsample1/MainActivity.java b/android/Samples/KMSample1/app/src/main/java/com/keyman/kmsample1/MainActivity.java index 4134348d9c..f56064b459 100644 --- a/android/Samples/KMSample1/app/src/main/java/com/keyman/kmsample1/MainActivity.java +++ b/android/Samples/KMSample1/app/src/main/java/com/keyman/kmsample1/MainActivity.java @@ -8,13 +8,13 @@ import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KMTextView; -import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardEventListener; -import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardDownloadEventListener; -import com.tavultesoft.kmea.KMManager.KeyboardType; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.KMKeyboardDownloaderActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.KMTextView; +import com.keyman.engine.KeyboardEventHandler.OnKeyboardEventListener; +import com.keyman.engine.KeyboardEventHandler.OnKeyboardDownloadEventListener; +import com.keyman.engine.KMManager.KeyboardType; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/android/Samples/KMSample1/app/src/main/res/layout/activity_main.xml b/android/Samples/KMSample1/app/src/main/res/layout/activity_main.xml index 37613d7e25..06de0d7f24 100644 --- a/android/Samples/KMSample1/app/src/main/res/layout/activity_main.xml +++ b/android/Samples/KMSample1/app/src/main/res/layout/activity_main.xml @@ -4,7 +4,7 @@ android:layout_height="match_parent" tools:context=".MainActivity"> - - + diff --git a/android/Samples/KMSample2/app/src/main/java/com/keyman/kmsample2/SystemKeyboard.java b/android/Samples/KMSample2/app/src/main/java/com/keyman/kmsample2/SystemKeyboard.java index 6f9a1e23a0..e4ab04e50f 100644 --- a/android/Samples/KMSample2/app/src/main/java/com/keyman/kmsample2/SystemKeyboard.java +++ b/android/Samples/KMSample2/app/src/main/java/com/keyman/kmsample2/SystemKeyboard.java @@ -1,10 +1,10 @@ package com.keyman.kmsample2; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KMManager.KeyboardType; -import com.tavultesoft.kmea.KMHardwareKeyboardInterpreter; -import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardEventListener; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.KMManager; +import com.keyman.engine.KMManager.KeyboardType; +import com.keyman.engine.KMHardwareKeyboardInterpreter; +import com.keyman.engine.KeyboardEventHandler.OnKeyboardEventListener; import android.content.Context; import android.content.res.Configuration; diff --git a/android/Tests/KeyboardHarness/app/src/main/java/com/keyman/android/tests/keyboardHarness/MainActivity.java b/android/Tests/KeyboardHarness/app/src/main/java/com/keyman/android/tests/keyboardHarness/MainActivity.java index c09a70c0fe..bea32f2198 100644 --- a/android/Tests/KeyboardHarness/app/src/main/java/com/keyman/android/tests/keyboardHarness/MainActivity.java +++ b/android/Tests/KeyboardHarness/app/src/main/java/com/keyman/android/tests/keyboardHarness/MainActivity.java @@ -6,13 +6,13 @@ import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KMTextView; -import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardEventListener; -import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardDownloadEventListener; -import com.tavultesoft.kmea.KMManager.KeyboardType; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.KMKeyboardDownloaderActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.KMTextView; +import com.keyman.engine.KeyboardEventHandler.OnKeyboardEventListener; +import com.keyman.engine.KeyboardEventHandler.OnKeyboardDownloadEventListener; +import com.keyman.engine.KMManager.KeyboardType; import java.util.HashMap; import java.util.List; diff --git a/android/Tests/KeyboardHarness/app/src/main/res/layout/activity_main.xml b/android/Tests/KeyboardHarness/app/src/main/res/layout/activity_main.xml index 317c86c320..70cea91bfb 100644 --- a/android/Tests/KeyboardHarness/app/src/main/res/layout/activity_main.xml +++ b/android/Tests/KeyboardHarness/app/src/main/res/layout/activity_main.xml @@ -4,7 +4,7 @@ android:layout_height="match_parent" tools:context=".MainActivity"> - - + diff --git a/common/models/templates/package.json b/common/models/templates/package.json index b9b84c6492..67699e342a 100644 --- a/common/models/templates/package.json +++ b/common/models/templates/package.json @@ -47,7 +47,7 @@ "@types/node": "^14.0.4", "chai": "^4.3.4", "mocha": "^10.0.0", - "typescript": "^4.5.4" + "typescript": "^4.9.5" }, "dependencies": { "@keymanapp/models-wordbreakers": "*" diff --git a/common/models/types/package.json b/common/models/types/package.json index 9cdff83231..c3005a8eb5 100644 --- a/common/models/types/package.json +++ b/common/models/types/package.json @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/keymanapp/keyman/tree/master/common/models/types#readme", "devDependencies": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" }, "files": [ "README.md", diff --git a/common/models/wordbreakers/package.json b/common/models/wordbreakers/package.json index a4b97fc973..3c2eaa1028 100644 --- a/common/models/wordbreakers/package.json +++ b/common/models/wordbreakers/package.json @@ -44,8 +44,8 @@ "@types/mocha": "^7.0.2", "chai": "^4.3.4", "mocha": "^10.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" }, "dependencies": { "@types/node": "^14.0.3" diff --git a/common/predictive-text/build.sh b/common/predictive-text/build.sh index 7d1f3ff92b..cad512b32b 100755 --- a/common/predictive-text/build.sh +++ b/common/predictive-text/build.sh @@ -22,8 +22,6 @@ cd "$(dirname "$THIS_SCRIPT")" ################################ Main script ################################ -builder_check_color "$@" - # TODO: once these modules are builder-based, reference here too: # "@../models/templates" \ # "@../models/types" \ @@ -38,9 +36,10 @@ builder_describe "Builds the lm-layer module" \ "test" \ ":headless A headless, Node-oriented version of the module useful for unit tests" \ ":browser The standard version of the module for in-browser use" \ - "--ci Sets ${BUILDER_TERM_START}test${BUILDER_TERM_END} action to use CI-based test configurations & reporting" + "--ci Sets $(builder_term test) action to use CI-based test configurations & reporting" builder_describe_outputs \ + configure /node_modules \ configure:headless /node_modules \ configure:browser /node_modules \ build:headless build/headless.js \ diff --git a/common/predictive-text/package.json b/common/predictive-text/package.json index f8d380132c..fda9b5bfb2 100644 --- a/common/predictive-text/package.json +++ b/common/predictive-text/package.json @@ -40,8 +40,8 @@ "mocha": "^10.0.0", "mocha-teamcity-reporter": "^4.0.0", "sinon": "^14.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" }, "dependencies": { "@keymanapp/models-templates": "*", diff --git a/common/predictive-text/unit_tests/test.sh b/common/predictive-text/unit_tests/test.sh index 2718483505..261a02f472 100755 --- a/common/predictive-text/unit_tests/test.sh +++ b/common/predictive-text/unit_tests/test.sh @@ -43,7 +43,7 @@ if builder_start_action test:libraries; then # addition to fair bit of `pushd` and `popd`. pushd "$KEYMAN_ROOT/common/models/wordbreakers" echo - echo "### Running ${BUILDER_TERM_START}common/models/wordbreaker${BUILDER_TERM_END} tests" + echo "### Running $(builder_term common/models/wordbreakers) tests" # NPM doesn't seem to parse the post `--` part if specified via script variable. # So... a simple if-else will do the job for now. if builder_has_option --ci; then @@ -55,7 +55,7 @@ if builder_start_action test:libraries; then pushd "$KEYMAN_ROOT/common/models/templates" echo - echo "### Running ${BUILDER_TERM_START}common/models/templates${BUILDER_TERM_END} tests" + echo "### Running $builder_term common/models/templates) tests" if builder_has_option --ci; then npm run test -- -reporter mocha-teamcity-reporter else @@ -65,7 +65,7 @@ if builder_start_action test:libraries; then pushd "$KEYMAN_ROOT/common/models/types" echo - echo "### Running ${BUILDER_TERM_START}common/models/types${BUILDER_TERM_END} tests" + echo "### Running $builder_term common/models/types) tests" # Is not mocha-based; it's TSC-based instead, as we're just ensuring that the .d.ts # file is a proper TS declaration file. npm run test @@ -97,7 +97,7 @@ if [[ $VERSION_ENVIRONMENT == test ]] && builder_has_action test :browser; then if builder_pull_get_details; then if ! ([[ $builder_pull_title =~ \(web\) ]] || builder_pull_has_label test-browserstack); then - echo "Auto-skipping ${BUILDER_TERM_START}test:browser${BUILDER_TERM_END} for unrelated CI test build" + echo "Auto-skipping $builder_term test:browser) for unrelated CI test build" exit 0 fi fi @@ -123,7 +123,7 @@ if builder_start_action test:browser; then KARMA_INFO_LEVEL="--log-level=debug" if builder_has_option --debug; then - echo "${BUILDER_TERM_START}--ci${BUILDER_TERM_END} option set; ignoring ${BUILDER_TERM_START}--debug${BUILDER_TERM_END} option" + echo "$(builder_term --ci) option set; ignoring $(builder_term --debug) option" fi else KARMA_CONFIG="manual.conf.js" diff --git a/web/source/build_kill_browserstack.sh b/common/test/resources/test_kill_browserstack.sh similarity index 87% rename from web/source/build_kill_browserstack.sh rename to common/test/resources/test_kill_browserstack.sh index 1e15ade0c4..59a75be627 100755 --- a/web/source/build_kill_browserstack.sh +++ b/common/test/resources/test_kill_browserstack.sh @@ -1,5 +1,5 @@ #! /usr/bin/env bash -# +# # CI script to kill BrowserStack testing tunnel (Windows only) # @@ -8,7 +8,7 @@ set -eu ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")" -. "$(dirname "$THIS_SCRIPT")/../../resources/build/build-utils.sh" +. "$(dirname "$THIS_SCRIPT")/../../../resources/build/build-utils.sh" . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" ## END STANDARD BUILD SCRIPT INCLUDE diff --git a/common/tools/sourcemap-path-remapper/.gitignore b/common/tools/sourcemap-path-remapper/.gitignore new file mode 100644 index 0000000000..07ed7069a2 --- /dev/null +++ b/common/tools/sourcemap-path-remapper/.gitignore @@ -0,0 +1 @@ +build/* \ No newline at end of file diff --git a/common/tools/sourcemap-path-remapper/build.sh b/common/tools/sourcemap-path-remapper/build.sh new file mode 100755 index 0000000000..1550cdd872 --- /dev/null +++ b/common/tools/sourcemap-path-remapper/build.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +# +# Compile our sourcemap-path remapping module for use by Web builds, releases, etc. +# +set -eu + +## START STANDARD BUILD SCRIPT INCLUDE +# adjust relative paths as necessary +THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")" +. "$(dirname "$THIS_SCRIPT")/../../../resources/build/build-utils.sh" +## END STANDARD BUILD SCRIPT INCLUDE + +. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" + +# This script runs from its own folder +cd "$THIS_SCRIPT_PATH" + +################################ Main script ################################ + +# TODO: for predictive-text, we only need :headless, perhaps we should be splitting modules? +# TODO: remove :tools once kmlmc is a dependency for test:module + +builder_describe "Builds a sourcemap manipulation ES module for use in Web-related builds" \ + "clean" \ + "configure" \ + "build" + +builder_describe_outputs \ + configure /node_modules \ + build build/index.js + +builder_parse "$@" + +### CONFIGURE ACTIONS + +if builder_start_action configure; then + verify_npm_setup + builder_finish_action success configure +fi + +### CLEAN ACTIONS + +if builder_start_action clean; then + rm -rf build/ + builder_finish_action success clean +fi + +### BUILD ACTIONS + +if builder_start_action build; then + npm run tsc + + builder_finish_action success build +fi \ No newline at end of file diff --git a/common/tools/sourcemap-path-remapper/package.json b/common/tools/sourcemap-path-remapper/package.json new file mode 100644 index 0000000000..552d60989b --- /dev/null +++ b/common/tools/sourcemap-path-remapper/package.json @@ -0,0 +1,32 @@ +{ + "name": "@keymanapp/sourcemap-path-remapper", + "description": "Sourcemap-path remapper utility", + "main": "build/index.js", + "type": "module", + "scripts": { + "tsc": "tsc" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/keymanapp/keyman.git" + }, + "author": "Joshua A. Horton ", + "license": "MIT", + "bugs": { + "url": "https://github.com/keymanapp/keyman/issues" + }, + "homepage": "https://github.com/keymanapp/keyman#readme", + "devDependencies": { + "@keymanapp/resources-gosh": "*", + "@types/node": "^10.17.21", + "chai": "^4.3.4", + "mocha": "^10.0.0", + "mocha-teamcity-reporter": "^4.0.0", + "sinon": "^7.1.1", + "ts-node": "^10.9.1", + "typescript": "^4.9.5" + }, + "dependencies": { + "convert-source-map": "^2.0.0" + } +} diff --git a/common/tools/sourcemap-path-remapper/src/index.ts b/common/tools/sourcemap-path-remapper/src/index.ts new file mode 100644 index 0000000000..de54a3499b --- /dev/null +++ b/common/tools/sourcemap-path-remapper/src/index.ts @@ -0,0 +1,137 @@ +import * as fs from 'fs'; +import convertSourcemap from 'convert-source-map'; // Transforms sourcemaps among various common formats. + // Base64, stringified-JSON, end-of-file comment... + +// Because we're compiling the main project based on its TS build outputs, and our cross-module references +// also link to build outputs, we need to clean up the sourcemap-paths. Also, the individual module sourcemaps. + +export interface Mapping { + readonly from: RegExp | string; + readonly to: string; +} + +/** + * An intermediate state for sourcemap source path remapping operations + functions to + * mutate it. + */ +class RemappingState { + constructor(srcmap: Object) { + this.sourcemap = srcmap; + this.resetChangedSourcepathTracking(); + } + + public readonly sourcemap: any; + private _unchangedSourcepaths: string[] = []; + + public get unchangedSourcepaths() { + return this._unchangedSourcepaths; + } + + public resetChangedSourcepathTracking() { + this._unchangedSourcepaths = [...this.sourcemap.sources]; + } + + /** + * The sourcemap's `sourceRoot` property. + */ + public get sourceRoot() { + return this.sourcemap.sourceRoot; + } + + /** + * The sourcemap's `sourceRoot` property. + */ + public set sourceRoot(path: string) { + this.sourcemap.sourceRoot = path; + } + + /** + * Searches for source-file paths that match specified path-remapping rules and remaps them + * accordingly. + * @param transforms Path-remapping rules to apply. For each remappable path, only the first + * matching rule in the specified set will be applied. + * @returns `this` - the original instance - in order to facilitate function-call chaining. + */ + remapPaths(transforms: Mapping | Mapping[], logger?: (from: string, to: string) => void) { + if(!(transforms instanceof Array)) { + transforms = [transforms]; + } + + const unusedTransforms = [...transforms]; + + const sourcePaths = this.sourcemap.sources; + for(let i = 0; i < sourcePaths.length; i++) { + for(const transform of transforms) { + if(sourcePaths[i].match(transform.from)) { + // Note that this source path has been remapped (if it wasn't previously) + if(this.unchangedSourcepaths.includes(sourcePaths[i])) { + this.unchangedSourcepaths.splice(this.unchangedSourcepaths.indexOf(sourcePaths[i]), 1); + } + + // Note that this transform has been used. + if(unusedTransforms.includes(transform)) { + unusedTransforms.splice(unusedTransforms.indexOf(transform), 1); + } + + let startPath = sourcePaths[i]; + sourcePaths[i] = sourcePaths[i].replace(transform.from, transform.to); + if(logger) { + logger(startPath, sourcePaths[i]); + } + break; + } + } + } + + if(unusedTransforms.length > 0) { + console.warn(); + console.warn("Unused sourcemath mappings:"); + for(const transform of unusedTransforms) { + let isRegex = transform.from instanceof RegExp; + let delim = isRegex ? '' : '"'; + console.warn(`* ${delim}${transform.from.toString()}${delim} => "${transform.to}"`); + } + } + + return this; + } + + /** + * Writes the current state of the remapped sourcemap out to the specified file. + * @param file + */ + public toFile(file: fs.PathLike) { + fs.writeFileSync(file, convertSourcemap.fromObject(this.sourcemap).toJSON()); + } +} + +export default class SourcemapRemapper { + private constructor() {} + + /** + * Starts sourcemap source path remapping from a pre-loaded JSON sourcemap instance. + * @param obj + * @returns + */ + public static fromObject(obj: Object) { + return new RemappingState(obj); + } + + /** + * Starts sourcemap source path remapping from the specified .js.map file. + * @param file + * @returns + */ + public static fromFile(file: fs.PathLike) { + return this.fromBuffer(fs.readFileSync(file)); + } + + /** + * Starts sourcemap source path remapping from a loaded but unparsed file. + * @param buffer + * @returns + */ + public static fromBuffer(buffer: Buffer) { + return this.fromObject(convertSourcemap.fromJSON(buffer).toObject()); + } +} \ No newline at end of file diff --git a/common/tools/sourcemap-path-remapper/tsconfig.json b/common/tools/sourcemap-path-remapper/tsconfig.json new file mode 100644 index 0000000000..f9b531b311 --- /dev/null +++ b/common/tools/sourcemap-path-remapper/tsconfig.json @@ -0,0 +1,25 @@ +{ + "extends": "../../../tsconfig-base.json", + + "compilerOptions": { + "allowJs": false, + "allowSyntheticDefaultImports": true, + "declaration": true, + "module": "es6", + "moduleResolution": "node", + "inlineSourceMap": true, + "inlineSources": true, + "sourceRoot": "/common/tools/sourcemap-path-remapper/src", + "lib": ["dom", "es6"], + "target": "es5", + "types": ["node"], + "downlevelIteration": true, + "baseUrl": "./", + "outDir": "build/", + "tsBuildInfoFile": "build/tsconfig.tsbuildinfo", + "rootDir": "./src/" + }, + "include": [ + "src/**/*.ts" + ] +} diff --git a/common/web/input-processor/build.sh b/common/web/input-processor/build.sh index 70e0cc7398..0639772c07 100755 --- a/common/web/input-processor/build.sh +++ b/common/web/input-processor/build.sh @@ -16,8 +16,6 @@ cd "$(dirname "$THIS_SCRIPT")" ################################ Main script ################################ -builder_check_color "$@" - # TODO: for predictive-text, we only need :headless, perhaps we should be splitting modules? # TODO: remove :tools once kmlmc is a dependency for test:module @@ -31,9 +29,10 @@ builder_describe "Builds the standalone, headless form of Keyman Engine for Web' "test" \ ":module A headless, Node-oriented version of the module useful for unit tests" \ ":tools Related tools useful for development and testing of this module" \ - "--ci Sets ${BUILDER_TERM_START}test${BUILDER_TERM_END} action to use CI-based test configurations & reporting" + "--ci Sets $(builder_term test) action to use CI-based test configurations & reporting" builder_describe_outputs \ + configure /node_modules \ configure:module /node_modules \ configure:tools /node_modules \ build:module build/index.js \ diff --git a/common/web/input-processor/package.json b/common/web/input-processor/package.json index bf9e13cd41..c83090ee86 100644 --- a/common/web/input-processor/package.json +++ b/common/web/input-processor/package.json @@ -23,8 +23,8 @@ "chai": "^4.3.4", "mocha": "^10.0.0", "mocha-teamcity-reporter": "^4.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" }, "scripts": { "tsc": "tsc", diff --git a/common/web/keyboard-processor/build.sh b/common/web/keyboard-processor/build.sh index 86c02f9806..d46cc5bc1b 100755 --- a/common/web/keyboard-processor/build.sh +++ b/common/web/keyboard-processor/build.sh @@ -17,10 +17,6 @@ cd "$THIS_SCRIPT_PATH" ################################ Main script ################################ -# Ensures color var use in `builder_describe`'s argument respects the specified -# --color/--no-color option. -builder_check_color "$@" - builder_describe \ "Compiles the web-oriented utility function module." \ "@../recorder test" \ @@ -30,7 +26,7 @@ builder_describe \ clean \ build \ test \ - "--ci For use with action ${BUILDER_TERM_START}test${BUILDER_TERM_END} - emits CI-friendly test reports" + "--ci For use with action $(builder_term test) - emits CI-friendly test reports" builder_describe_outputs \ configure /node_modules \ diff --git a/common/web/keyboard-processor/package.json b/common/web/keyboard-processor/package.json index 437f358dba..c93d6f124d 100644 --- a/common/web/keyboard-processor/package.json +++ b/common/web/keyboard-processor/package.json @@ -21,8 +21,8 @@ "chai": "^4.3.4", "mocha": "^10.0.0", "mocha-teamcity-reporter": "^4.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" }, "scripts": { "tsc": "tsc", diff --git a/common/web/keyman-version/package.json b/common/web/keyman-version/package.json index 01cc5689c4..4d300e8dc2 100644 --- a/common/web/keyman-version/package.json +++ b/common/web/keyman-version/package.json @@ -9,6 +9,6 @@ }, "license": "MIT", "devDependencies": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" } } diff --git a/common/web/lm-message-types/package.json b/common/web/lm-message-types/package.json index 1941d69ab3..01e880c9b2 100644 --- a/common/web/lm-message-types/package.json +++ b/common/web/lm-message-types/package.json @@ -7,7 +7,7 @@ }, "license": "MIT", "devDependencies": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" }, "files": [ "message.d.ts" diff --git a/common/web/lm-worker/package.json b/common/web/lm-worker/package.json index 80d7da78d7..e93ad16306 100644 --- a/common/web/lm-worker/package.json +++ b/common/web/lm-worker/package.json @@ -32,8 +32,8 @@ "mocha": "^10.0.0", "mocha-teamcity-reporter": "^4.0.0", "sinon": "^14.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" }, "dependencies": { "@keymanapp/models-templates": "*", diff --git a/common/web/recorder/build.sh b/common/web/recorder/build.sh index 969453f37c..fb566a18c8 100755 --- a/common/web/recorder/build.sh +++ b/common/web/recorder/build.sh @@ -27,6 +27,7 @@ builder_describe \ ":proctor Builds headless-testing, node-oriented 'proctor' component" builder_describe_outputs \ + configure "/node_modules" \ configure:module "/node_modules" \ configure:proctor "/node_modules" \ build:module "build/index.js" \ diff --git a/common/web/recorder/package.json b/common/web/recorder/package.json index fe645fb57b..ecc8c43818 100644 --- a/common/web/recorder/package.json +++ b/common/web/recorder/package.json @@ -24,6 +24,6 @@ "@types/node": "^11.9.4" }, "devDependencies": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" } } diff --git a/common/web/sentry-manager/package.json b/common/web/sentry-manager/package.json index 2170a6a06c..dd3ccdbaba 100644 --- a/common/web/sentry-manager/package.json +++ b/common/web/sentry-manager/package.json @@ -16,7 +16,7 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" }, "dependencies": { "@keymanapp/keyman-version": "*", diff --git a/common/web/utils/package.json b/common/web/utils/package.json index 01673ffeac..fbe518e2b8 100644 --- a/common/web/utils/package.json +++ b/common/web/utils/package.json @@ -22,6 +22,6 @@ "@keymanapp/resources-gosh": "*", "@keymanapp/keyman-version": "*", "@types/node": "^14.0.5", - "typescript": "^4.5.4" + "typescript": "^4.9.5" } } diff --git a/common/windows/delphi/general/BCP47Tag.pas b/common/windows/delphi/general/BCP47Tag.pas index 4da813ec43..43a6f142cc 100644 --- a/common/windows/delphi/general/BCP47Tag.pas +++ b/common/windows/delphi/general/BCP47Tag.pas @@ -124,7 +124,20 @@ var begin if not FIsValid and FIsValidated then begin - msg := '''' + OriginalTag + ''' is not a valid BCP 47 tag'; + if OriginalTag = '' then + begin + msg := 'A valid BCP 47 tag must contain at least a language subtag'; + end + else + begin + msg := '''' + OriginalTag + ''' is not a valid BCP 47 tag'; + end; + Exit(False); + end; + + if Tag = '' then + begin + msg := 'A valid BCP 47 tag must contain at least a language subtag'; Exit(False); end; diff --git a/common/windows/delphi/packages/PackageInfo.pas b/common/windows/delphi/packages/PackageInfo.pas index 81e633fe53..dd4dbcd110 100644 --- a/common/windows/delphi/packages/PackageInfo.pas +++ b/common/windows/delphi/packages/PackageInfo.pas @@ -337,6 +337,8 @@ type procedure SaveJSON(ARoot: TJSONObject); virtual; procedure LoadXML(ARoot: IXMLNode); virtual; procedure SaveXML(ARoot: IXMLNode); virtual; + function ContainsID(const id: string): Boolean; + function IndexOfID(const id: string): Integer; end; TPackageLexicalModel = class(TPackageBaseObject) @@ -2262,6 +2264,21 @@ end; { TPackageKeyboardLanguageList } +function TPackageKeyboardLanguageList.ContainsID(const id: string): Boolean; +begin + Result := IndexOfID(id) >= 0; +end; + +function TPackageKeyboardLanguageList.IndexOfID(const id: string): Integer; +var + i: Integer; +begin + for i := 0 to Count - 1 do + if SameText(Items[i].ID, id) then + Exit(i); + Result := -1; +end; + procedure TPackageKeyboardLanguageList.LoadJSON(ARoot: TJSONObject); var j: Integer; diff --git a/core/meson.build b/core/meson.build index cad35decec..5f530aae3d 100644 --- a/core/meson.build +++ b/core/meson.build @@ -12,19 +12,14 @@ project('keyboardprocessor', 'cpp', 'c', 'cpp_std=c++14', 'b_vscrt=static_from_buildtype', 'warning_level=2'], - meson_version: '>=0.45.0') + meson_version: '>=0.53.0') compiler = meson.get_compiler('cpp') lib_version = '0.0.0' -if meson.version().version_compare('>=0.46') - py = import('python') - python = py.find_installation() -else - py = import('python3') - python = py.find_python() -endif +py = import('python') +python = py.find_installation() # Once we can assume meson 0.60 we can delete this # (https://mesonbuild.com/Release-notes-for-0-60-0.html#msvc-compiler-now-assumes-utf8-source-code-by-default) diff --git a/core/src/meson.build b/core/src/meson.build index cbf2f8c6da..79f06a9706 100644 --- a/core/src/meson.build +++ b/core/src/meson.build @@ -58,18 +58,7 @@ if compiler.get_id() == 'emscripten' links = [] endif -lib = library('kmnkbp0', - 'option.cpp', - 'keyboard.cpp', - 'state.cpp', - 'km_kbp_context_api.cpp', - 'km_kbp_keyboard_api.cpp', - 'km_kbp_options_api.cpp', - 'km_kbp_state_api.cpp', - 'km_kbp_debug_api.cpp', - 'km_kbp_processevent_api.cpp', - 'jsonpp.cpp', - 'mock/mock_processor.cpp', +kmx_files = files( 'kmx/kmx_consts.cpp', 'kmx/kmx_processevent.cpp', 'kmx/kmx_actions.cpp', @@ -84,14 +73,58 @@ lib = library('kmnkbp0', 'kmx/kmx_options.cpp', 'kmx/kmx_processor.cpp', 'kmx/kmx_xstring.cpp', +) + +api_files = files( + 'km_kbp_context_api.cpp', + 'km_kbp_keyboard_api.cpp', + 'km_kbp_options_api.cpp', + 'km_kbp_state_api.cpp', + 'km_kbp_debug_api.cpp', + 'km_kbp_processevent_api.cpp', +) + +core_files = files( + 'option.cpp', + 'keyboard.cpp', + 'state.cpp', + 'jsonpp.cpp', 'utfcodec.cpp', +) + +mock_files = files( + 'mock/mock_processor.cpp', +) + +lib = library('kmnkbp0', + api_files, + core_files, + kmx_files, + mock_files, version_res, cpp_args: defns + warns + flags, link_args: links, version: lib_version, include_directories: inc, + pic: true, install: true) +if host_machine.system() == 'linux' + # on Linux we need the static lib for ibus-keyman tests + static_library('kmnkbp0-static', + api_files, + core_files, + kmx_files, + mock_files, + version_res, + cpp_args: defns + warns + flags, + link_args: links, + include_directories: inc, + pic: true, + install: false + ) +endif + headerdirs = [ '.', 'keyman' ] # subdirectories of ${prefix}/include to add to header path kmnkbp = declare_dependency(link_with: lib, include_directories: inc) diff --git a/core/tests/meson.build b/core/tests/meson.build index 3b33c1ef23..be58e6975c 100644 --- a/core/tests/meson.build +++ b/core/tests/meson.build @@ -8,7 +8,7 @@ # Note: this version of cmpfiles ignores line endings, which is better for platform independence cmpfiles = ['-c', 'import sys; a = open(sys.argv[1], \'r\').read(); b = open(sys.argv[2], \'r\').read(); exit(not (a==b))'] -stnds = join_paths(meson.source_root(), 'tests', 'standards') +stnds = join_paths(meson.current_source_dir(), 'standards') libsrc = include_directories(join_paths('../', 'src')) diff --git a/core/tests/unit/kmx/meson.build b/core/tests/unit/kmx/meson.build index 63188c764a..c347b2e8fd 100644 --- a/core/tests/unit/kmx/meson.build +++ b/core/tests/unit/kmx/meson.build @@ -25,14 +25,28 @@ else test_path = meson.current_build_dir() endif +coretest_files = files( + 'kmx_test_source.cpp', +) + kmx = executable('kmx', 'kmx.cpp', - 'kmx_test_source.cpp', + coretest_files, cpp_args: defns + warns, include_directories: [inc, libsrc], link_args: links + tests_flags, objects: lib.extract_all_objects()) +test_lib = static_library('kmnkbp-tests', + coretest_files, + cpp_args: defns + warns + flags, + include_directories: [inc, libsrc], + link_args: links + tests_flags, + objects: lib.extract_all_objects(), + pic: true, + install: false +) + tests = [ '000 - null keyboard', '001 - basic input UnicodeI', @@ -87,7 +101,7 @@ tests = [ ] if build_machine.system() == 'windows' - kmcomp = find_program(join_paths(meson.source_root(),'..','..','..','windows','bin','developer','kmcomp.exe'), 'kmcomp.exe', required: false) + kmcomp = find_program(join_paths(meson.current_source_dir(),'..','..','..','..','windows','bin','developer','kmcomp.exe'), 'kmcomp.exe', required: false) kmcomp_cmd = [kmcomp] copy_cmd = [find_program('cmd.exe', required: true), '/c', 'copy'] cat_cmd = [find_program('cmd.exe', required: true), '/c', 'type'] diff --git a/crowdin.yml b/crowdin.yml index 704e88bddf..f8b9785bc3 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -59,6 +59,7 @@ files: locale: de: de fr: fr + kn: kn - source: /windows/src/desktop/setup/locale/en/strings.xml dest: /windows/setup/strings.xml @@ -68,6 +69,7 @@ files: locale: de: de fr: fr + kn: kn # iOS files diff --git a/developer/src/common/delphi/compiler/CompilePackage.pas b/developer/src/common/delphi/compiler/CompilePackage.pas index 1e711169dd..c7c5e07123 100644 --- a/developer/src/common/delphi/compiler/CompilePackage.pas +++ b/developer/src/common/delphi/compiler/CompilePackage.pas @@ -27,7 +27,9 @@ unit CompilePackage; interface uses - kpsfile, kmpinffile, PackageInfo, + kpsfile, + kmpinffile, + PackageInfo, Keyman.Developer.System.Project.ProjectLog; function DoCompilePackage(pack: TKPSFile; AMessageEvent: TCompilePackageMessageEvent; ASilent, ACheckFilenameConventions: Boolean; const AOutputFileName: string): Boolean; // I4688 @@ -37,6 +39,7 @@ implementation uses Winapi.Windows, System.Classes, + System.Generics.Collections, System.SysUtils, System.IniFiles, System.Zip, @@ -85,6 +88,7 @@ type procedure CheckKeyboardLanguages; procedure CheckFilenameConventions; function CheckLexicalModels: Boolean; + procedure CheckForDuplicatedLanguages(const resourceType, id: string; languages: TPackageKeyboardLanguageList); end; function DoCompilePackage(pack: TKPSFile; AMessageEvent: TCompilePackageMessageEvent; ASilent, ACheckFilenameConventions: Boolean; const AOutputFileName: string): Boolean; // I4688 @@ -141,6 +145,8 @@ begin end; function TCompilePackage.CheckLexicalModels: Boolean; +var + model: TPackageLexicalModel; begin if pack.LexicalModels.Count > 0 then begin @@ -151,6 +157,12 @@ begin end; end; + for model in pack.LexicalModels do + begin + CheckForDuplicatedLanguages('model', model.id, model.Languages); + end; + + Exit(True); end; @@ -487,6 +499,7 @@ end; const SKKeyboardPackageLanguageNonCanonical = 'The keyboard %0:s has a non-canonical language tag "%1:s" (%2:s), should be "%3:s".'; SKKeyboardShouldHaveAtLeastOneLanguage = 'The keyboard %0:s has no language tags. It should have at least one language tag.'; + SKPackageShouldNotRepeatLanguages = 'The %0:s %1:s has a repeated language "%2:s".'; procedure TCompilePackage.CheckKeyboardLanguages; var @@ -496,6 +509,30 @@ begin begin if k.Languages.Count = 0 then WriteMessage(plsWarning, Format(SKKeyboardShouldHaveAtLeastOneLanguage, [k.ID])); + CheckForDuplicatedLanguages('keyboard', k.ID, k.Languages); + end; +end; + +procedure TCompilePackage.CheckForDuplicatedLanguages(const resourceType, id: string; languages: TPackageKeyboardLanguageList); +var + tags: TDictionary; + lang: TPackageKeyboardLanguage; +begin + tags := TDictionary.Create; + try + for lang in languages do + begin + if tags.ContainsKey(lang.ID.ToLower) then + begin + WriteMessage(plsWarning, Format(SKPackageShouldNotRepeatLanguages, [resourceType, id, lang.ID])); + end + else + begin + tags.Add(lang.ID.ToLower, 0); + end; + end; + finally + tags.Free; end; end; diff --git a/developer/src/kmlmc/package.json b/developer/src/kmlmc/package.json index a126590840..c6ab80198f 100644 --- a/developer/src/kmlmc/package.json +++ b/developer/src/kmlmc/package.json @@ -39,7 +39,7 @@ "@keymanapp/models-types": "*", "@keymanapp/keyman-version": "*", "commander": "^3.0.0", - "typescript": "^4.5.4", + "typescript": "^4.9.5", "xml2js": "^0.4.19" }, "devDependencies": { @@ -53,7 +53,7 @@ "chalk": "^2.4.2", "jszip": "^3.7.0", "mocha": "^10.0.0", - "ts-node": "^9.1.1" + "ts-node": "^10.9.1" }, "mocha": { "spec": "dist-tests/**/test-*.js" diff --git a/developer/src/server/build.sh b/developer/src/server/build.sh index ab31b34e1f..f250684582 100755 --- a/developer/src/server/build.sh +++ b/developer/src/server/build.sh @@ -123,21 +123,23 @@ fi # ---------------------------------------- if (( build_keymanweb )); then - pushd "$KEYMAN_ROOT/web/source" - ./build.sh -no_minify + pushd "$KEYMAN_ROOT/web/" + ./build.sh --no-minify popd fi if (( copy_keymanweb )); then - SRC="$KEYMAN_ROOT/web/release/unminified" + WEB_SRC="$KEYMAN_ROOT/web/build/app/web/debug" + UI_SRC="$KEYMAN_ROOT/web/build/app/ui/debug" DST="$(dirname "$THIS_SCRIPT")/src/site/resource" rm -rf "$DST" mkdir -p "$DST/osk" mkdir -p "$DST/ui" - cp "$SRC/web/"*.js "$SRC/web/"*.js.map "$DST/" - cp -R "$SRC/web/osk/"* "$DST/osk/" - cp -R "$SRC/web/ui/"* "$DST/ui/" + cp "$WEB_SRC/"*.js "$WEB_SRC/"*.js.map "$DST/" + cp "$UI_SRC/"*.js "$UI_SRC/"*.js.map "$DST/" + cp -R "$WEB_SRC/osk/"* "$DST/osk/" + cp -R "$WEB_SRC/ui/"* "$DST/ui/" cp "$KEYMAN_ROOT/web/LICENSE" "$DST/" cp "$KEYMAN_ROOT/web/README.md" "$DST/" fi diff --git a/developer/src/server/package.json b/developer/src/server/package.json index 16898edaeb..dd779db1a4 100644 --- a/developer/src/server/package.json +++ b/developer/src/server/package.json @@ -35,9 +35,9 @@ "chai": "^4.3.4", "copyfiles": "^2.4.1", "mocha": "^10.0.0", - "ts-node": "^10.4.0", + "ts-node": "^10.9.1", "tsc-watch": "^4.5.0", - "typescript": "^4.5.4" + "typescript": "^4.9.5" }, "mocha": { "require": "ts-node/register", diff --git a/developer/src/server/tsconfig.json b/developer/src/server/tsconfig.json index 14932564aa..280b535dd9 100644 --- a/developer/src/server/tsconfig.json +++ b/developer/src/server/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "module": "commonjs", - "target": "es2017", + "target": "es2022", "moduleResolution": "node", "sourceMap": true, "outDir": "dist/", @@ -15,7 +15,8 @@ "noImplicitAny": true, "strictBindCallApply": true, "strictFunctionTypes": true, - "noUnusedLocals": true + "noUnusedLocals": true, + "lib": ["es2022"] }, "include": [ "src/**/*.ts" diff --git a/developer/src/tike/child/UfrmPackageEditor.pas b/developer/src/tike/child/UfrmPackageEditor.pas index 22b94a4835..4b36d67170 100644 --- a/developer/src/tike/child/UfrmPackageEditor.pas +++ b/developer/src/tike/child/UfrmPackageEditor.pas @@ -314,8 +314,7 @@ type procedure EnableLexicalModelTabControls; procedure ShowEditLanguageForm(grid: TStringGrid; langs: TPackageKeyboardLanguageList; lang: TPackageKeyboardLanguage); - function ShowAddLanguageForm(grid: TStringGrid; - langs: TPackageKeyboardLanguageList): Boolean; + procedure ShowAddLanguageForm(grid: TStringGrid; langs: TPackageKeyboardLanguageList); procedure RefreshLexicalModelList; procedure UpdateQRCode; @@ -1624,6 +1623,8 @@ procedure TfrmPackageEditor.EnableControls; begin EnableStartMenuControls; EnableDetailsTabControls; + EnableKeyboardTabControls; + EnableLexicalModelTabControls; EnableCompileTabControls; end; @@ -1686,35 +1687,16 @@ end; procedure TfrmPackageEditor.cmdKeyboardAddLanguageClick(Sender: TObject); var k: TPackageKeyboard; - lang: TPackageKeyboardLanguage; - frm: TfrmSelectBCP47Language; begin k := SelectedKeyboard; Assert(Assigned(k)); - - frm := TfrmSelectBCP47Language.Create(Application.MainForm); - try - if frm.ShowModal = mrOk then - begin - lang := TPackageKeyboardLanguage.Create(pack); - lang.ID := frm.LanguageID; - lang.Name := frm.LanguageName; - k.Languages.Add(lang); - RefreshKeyboardLanguageList(k); - gridKeyboardLanguages.Row := gridKeyboardLanguages.RowCount - 1; - gridKeyboardLanguagesClick(gridKeyboardLanguages); - Modified := True; - end; - finally - frm.Free; - end; + ShowAddLanguageForm(gridKeyboardLanguages, k.Languages); end; procedure TfrmPackageEditor.cmdKeyboardEditLanguageClick(Sender: TObject); var k: TPackageKeyboard; lang: TPackageKeyboardLanguage; - frm: TfrmSelectBCP47Language; begin k := SelectedKeyboard; Assert(Assigned(k)); @@ -1722,20 +1704,7 @@ begin lang := SelectedKeyboardLanguage; Assert(Assigned(lang)); - frm := TfrmSelectBCP47Language.Create(Application.MainForm); - try - frm.LanguageID := lang.ID; - frm.LanguageName := lang.Name; - if frm.ShowModal = mrOk then - begin - lang.ID := frm.LanguageID; - lang.Name := frm.LanguageName; - RefreshKeyboardLanguageList(k); - Modified := True; - end; - finally - frm.Free; - end; + ShowEditLanguageForm(gridKeyboardLanguages, k.Languages, lang); end; procedure TfrmPackageEditor.cmdKeyboardRemoveLanguageClick(Sender: TObject); @@ -1819,16 +1788,25 @@ begin end; end; -function TfrmPackageEditor.ShowAddLanguageForm(grid: TStringGrid; langs: TPackageKeyboardLanguageList): Boolean; +procedure TfrmPackageEditor.ShowAddLanguageForm(grid: TStringGrid; langs: TPackageKeyboardLanguageList); var lang: TPackageKeyboardLanguage; frm: TfrmSelectBCP47Language; + n: Integer; begin - Result := False; frm := TfrmSelectBCP47Language.Create(Application.MainForm); try if frm.ShowModal = mrOk then begin + n := langs.IndexOfID(frm.LanguageID); + if n >= 0 then + begin + // Duplicate - we won't re-add the item, just select the existing item + grid.Row := n + 1; + EnableControls; + Exit; + end; + lang := TPackageKeyboardLanguage.Create(pack); lang.ID := frm.LanguageID; lang.Name := frm.LanguageName; @@ -1836,7 +1814,7 @@ begin RefreshLanguageList(grid, langs); grid.Row := grid.RowCount - 1; Modified := True; - Result := True; + EnableControls; end; finally frm.Free; @@ -1846,6 +1824,7 @@ end; procedure TfrmPackageEditor.ShowEditLanguageForm(grid: TStringGrid; langs: TPackageKeyboardLanguageList; lang: TPackageKeyboardLanguage); var frm: TfrmSelectBCP47Language; + n: Integer; begin frm := TfrmSelectBCP47Language.Create(Application.MainForm); try @@ -1853,9 +1832,30 @@ begin frm.LanguageName := lang.Name; if frm.ShowModal = mrOk then begin + if not SameText(frm.LanguageID, lang.ID) then + begin + // If the id has changed, check for duplicates + n := langs.IndexOfID(frm.LanguageID); + if n >= 0 then + begin + // Duplicate - we will delete the edited one and select the existing + // one + langs.Remove(lang); + RefreshLanguageList(grid, langs); + + // The index may have changed, search again + n := langs.IndexOfID(frm.LanguageID); + grid.Row := n + 1; + EnableControls; + Modified := True; + Exit; + end; + end; + lang.ID := frm.LanguageID; lang.Name := frm.LanguageName; RefreshLanguageList(grid, langs); + EnableControls; Modified := True; end; finally @@ -2005,10 +2005,7 @@ var begin lm := SelectedLexicalModel; Assert(Assigned(lm)); - - if ShowAddLanguageForm(gridLexicalModelLanguages, lm.Languages) then - gridLexicalModelLanguagesClick(gridLexicalModelLanguages); - EnableLexicalModelTabControls; + ShowAddLanguageForm(gridLexicalModelLanguages, lm.Languages); end; procedure TfrmPackageEditor.cmdLexicalModelLanguageEditClick(Sender: TObject); diff --git a/developer/src/tike/dialogs/languages/Keyman.Developer.UI.UfrmSelectBCP47Language.pas b/developer/src/tike/dialogs/languages/Keyman.Developer.UI.UfrmSelectBCP47Language.pas index 282f12bc84..9a80f0ffe1 100644 --- a/developer/src/tike/dialogs/languages/Keyman.Developer.UI.UfrmSelectBCP47Language.pas +++ b/developer/src/tike/dialogs/languages/Keyman.Developer.UI.UfrmSelectBCP47Language.pas @@ -55,6 +55,7 @@ type private tag: TBCP47Tag; FCustomLanguageName: Boolean; + procedure EnableControls; function GetLanguageID: string; function GetLanguageName: string; procedure RefreshLanguageName; @@ -106,6 +107,8 @@ begin PopulateComboBoxFromDict(cbLanguageTag, TLanguageCodeUtils.BCP47Languages); PopulateComboBoxFromDict(cbScriptTag, TLanguageCodeUtils.BCP47Scripts); PopulateComboBoxFromDict(cbRegionTag, TLanguageCodeUtils.BCP47Regions); + RefreshLanguageName; + EnableControls; end; procedure TfrmSelectBCP47Language.FormDestroy(Sender: TObject); @@ -144,11 +147,18 @@ procedure TfrmSelectBCP47Language.cmdResetLanguageNameClick(Sender: TObject); begin editLanguageName.Text := LookupLanguageName; FCustomLanguageName := False; + EnableControls; end; procedure TfrmSelectBCP47Language.editLanguageNameChange(Sender: TObject); begin FCustomLanguageName := True; + EnableControls; +end; + +procedure TfrmSelectBCP47Language.EnableControls; +begin + cmdResetLanguageName.Enabled := FCustomLanguageName; end; procedure TfrmSelectBCP47Language.cbLanguageTagChange(Sender: TObject); @@ -175,6 +185,7 @@ begin end; FCustomLanguageName := False; // Always reset when entering a language tag. RefreshLanguageName; + EnableControls; end; procedure TfrmSelectBCP47Language.cbRegionTagChange(Sender: TObject); @@ -213,6 +224,7 @@ begin begin editLanguageName.Text := LookupLanguageName; FCustomLanguageName := False; + EnableControls; end; cmdOK.Enabled := tag.IsValid(True, msg); if not cmdOK.Enabled @@ -228,12 +240,14 @@ begin cbScriptTag.Text := tag.Script; RefreshLanguageName; FCustomLanguageName := editLanguageName.Text <> LookupLanguageName; + EnableControls; end; procedure TfrmSelectBCP47Language.SetLanguageName(const Value: string); begin editLanguageName.Text := Value; FCustomLanguageName := editLanguageName.Text <> LookupLanguageName; + EnableControls; end; end. diff --git a/developer/src/tike/main/RedistFiles.pas b/developer/src/tike/main/RedistFiles.pas index 998878e962..b02c956679 100644 --- a/developer/src/tike/main/RedistFiles.pas +++ b/developer/src/tike/main/RedistFiles.pas @@ -139,12 +139,17 @@ function GetDebugKMCmpDllPath: string; var root: string; const + DevPlatform={$IFDEF WIN64}'x64'{$ELSE}'Win32'{$ENDIF}; + DevConfig={$IFDEF DEBUG}'Debug'{$ELSE}'Release'{$ENDIF}; + DevSrcCompilerPath = 'developer\src\kmcmpdll\bin\'+DevPlatform+'\'+DevConfig; DevCompilerPath = 'developer\bin'; begin - if TKeymanPaths.RunningFromSource(root) and - FileExists(root + DevCompilerPath + '\kmcmpdll.dll') - then Result := root + DevCompilerPath - else Result := ExtractFilePath(ParamStr(0)); + if TKeymanPaths.RunningFromSource(root) and FileExists(root + DevSrcCompilerPath + '\kmcmpdll.dll') then + Result := root + DevSrcCompilerPath + else if TKeymanPaths.RunningFromSource(root) and FileExists(root + DevCompilerPath + '\kmcmpdll.dll') then + Result := root + DevCompilerPath + else + Result := ExtractFilePath(ParamStr(0)); Result := GetDebugPath('Debug_KMCMPDLLPath', Result); end; diff --git a/docs/linux/README.md b/docs/linux/README.md index 39f7f3e3f4..9c90ad85b3 100644 --- a/docs/linux/README.md +++ b/docs/linux/README.md @@ -6,9 +6,6 @@ and view information about Keyman keyboard packages. - [ibus-keyman](../../linux/ibus-keyman) - IBUS integration to use .kmp Keyman keyboards - [core](../../core) - common keyboardprocessor library -- [legacy/kmflcomp](../../linux/legacy/kmflcomp) - KMFL keyboard compiler -- [legacy/libkmfl](../../linux/legacy/libkmfl) - older KMFL core library -- [legacy/ibus-kmfl](../../linux/legacy/ibus-kmfl) - IBUS integration to use KMFL See [license information](../../linux/LICENSE.md) about licensing. diff --git a/docs/linux/keyman-config.md b/docs/linux/keyman-config.md index c12db30c94..f050fd96ad 100644 --- a/docs/linux/keyman-config.md +++ b/docs/linux/keyman-config.md @@ -13,7 +13,8 @@ sudo apt install python3-lxml python3-magic python3-numpy python3-qrcode python3 python3-setuptools python3-pip python3-dbus ibus libglib2.0-bin liblocale-gettext-perl ``` -Either `python3-raven` or `python3-sentry-sdk` (>= 1.4) is required as well. On Ubuntu 22.04 and later run: +Either `python3-raven` or `python3-sentry-sdk` (>= 1.4) is required as well. +On Ubuntu 22.04 and later run: ```bash sudo apt install python3-sentry-sdk @@ -34,8 +35,8 @@ or install it with pip: pip3 install sentry-sdk ``` -Run the script `./createkeymandirs.sh` to create the directories for these programs to -install the packages to. +Run the script `./createkeymandirs.sh` to create the directories for these +programs to install the packages to. Also copy and compile the GSettings schema: @@ -65,7 +66,8 @@ To uninstall you can run `sudo make uninstall`. `./km-config` -This displays a configuration panel that shows the currently installed Keyman keyboard packages and can download and install additional keyboards. +This displays a configuration panel that shows the currently installed Keyman +keyboard packages and can download and install additional keyboards. #### Buttons diff --git a/docs/linux/packaging.md b/docs/linux/packaging.md index 8beb476d12..91154934b4 100644 --- a/docs/linux/packaging.md +++ b/docs/linux/packaging.md @@ -92,8 +92,7 @@ are scattered over several source repos: gets called from `lsdev-pipeline-library` to create a source package. - [linux/debian](https://github.com/keymanapp/keyman/tree/master/linux/debian) - this is the `debian` - subdirectory for Keyman for Linux with the meta data for the Linux package. The legacy - kmfl-related packages have separate debian subdirectories under `linux/*/debian`. + subdirectory for Keyman for Linux with the meta data for the Linux package. See [Debian New Maintainers' Guide](https://www.debian.org/doc/manuals/maint-guide/) for details to the various files. @@ -170,39 +169,81 @@ Building packages happen in the [Keyman source tree](https://github.com/keymanap The Keyman [`linux/scripts/jenkins.sh`](https://github.com/keymanapp/keyman/blob/master/linux/scripts/jenkins.sh) -script can be used to create a source package (replace `packageName` with the name of the package, -i.e. one of keyman, kmflcomp, libkmfl, and ibus-kmfl). +script can be used to create a source package. ```bash cd linux -./scripts/jenkins.sh ${packageName} ${DEBSIGNKEY} +./scripts/jenkins.sh keyman ${DEBSIGNKEY} ``` -This creates a source package (`_-1.dsc`) and some `*.tar.?z` files in the -`linux/legacy/` subdirectory, respective in the source root directory for `keyman`. +This creates a source package (`keyman_-1.dsc`) and some `*.tar.?z` +files in the source root directory for `keyman`. ci-builder-script's [`build-package`](https://github.com/sillsdev/ci-builder-scripts/blob/master/bash/build-package) script creates the binary packages: ```bash -cd linux/legacy/${packageName} +cd $KEYMAN_ROOT ~/ci-builder-scripts/bash/build-package \ --dists "focal bionic" --arches "amd64 i386" \ --debkeyid ${DEBSIGNKEY} --build-in-place --no-upload ``` -This will create the binary package `_-1+1_.deb`. +This will create the binary package `keyman_-1+1_.deb`. To speed up package building you might want to limit the build to a single dist (e.g. `--dists "bionic"`) and arch (e.g. `--arches "amd64"`). -After building packages it might be a good idea to clean up the source tree before doing further -work: +After building packages it might be a good idea to clean up the source tree +before doing further work: ```bash git clean -dxf ``` +### Local package builds (Docker) + +It is possible to use the usual Debian/Ubuntu tools to create the package locally. +For someone who only occasionally deals with packaging it might be easier to use +the scripts that run on GitHub actions: + +#### Prerequisites for local package builds with Docker + +You'll have to create the docker image. + +- clone [gha-ubuntu-packaging](https://github.com/sillsdev/gha-ubuntu-packaging) + repo +- create the image: + + ```bash + cd /path/to/gha-ubuntu-packaging + docker build --build-arg DIST=jammy --build-arg PLATFORM=amd64 -t sillsdev/jammy . + ``` + +#### Building packages with Docker + +- create the source package + + ```bash + cd $KEYMAN_ROOT + TIER=$(cat TIER.md) + export TIER + cd linux + ./scripts/deb-packaging.sh source + ``` + + This will create the source package in $KEYMAN_ROOT directory. + +- Create the binary packages with Docker: + + ```bash + cd $KEYMAN_ROOT + docker run -v $(pwd):/source -i -t -w /source --platform=linux/amd64 \ + sillsdev/jammy keyman_*.dsc /source + ``` + + This will create the binary packages in `$KEYMAN_ROOT/artifacts`. + ## Package builds on Launchpad Package builds on Launchpad are triggered manually by running the Keyman script @@ -212,10 +253,10 @@ Package builds on Launchpad are triggered manually by running the Keyman script 1. If you don't have one, create an account at [launchpad.net](https://launchpad.net) 2. Request to join the ["Keyman for Linux"](https://launchpad.net/~keymanapp) team. -3. Create a [GPG](https://help.ubuntu.com/community/GnuPrivacyGuardHowto) key and associate it - to your launchpad account -4. Set the following environment variables in your `~/.profile` or `~/.bashrc` (so you don't have - to set them every time) +3. Create a [GPG](https://help.ubuntu.com/community/GnuPrivacyGuardHowto) key + and associate it to your launchpad account +4. Set the following environment variables in your `~/.profile` or `~/.bashrc` + (so you don't have to set them every time) ```bash export GPGKEY=[key_id] # using the `key_id` of your GPG key @@ -226,8 +267,9 @@ Package builds on Launchpad are triggered manually by running the Keyman script ### Building packages on Launchpad The `launchpad.sh` script downloads the current source code (beta or stable) from -[downloads.keyman.com](https://downloads.keyman.com/linux/stable/), creates a Debian source package -and uploads this to launchpad. Launchpad then rebuilds for the different distros and architectures. +[downloads.keyman.com](https://downloads.keyman.com/linux/stable/), creates a +Debian source package and uploads this to launchpad. Launchpad then rebuilds +for the different distros and architectures. To upload the packages to launchpad, run the following script from the `linux/` directory: @@ -241,14 +283,15 @@ To upload the packages to launchpad, run the following script from the `linux/` - `TIER=""` - alpha, beta, or stable, default from `../TIER.md` - `PROJECT=""` - only upload this package - `DIST=""` - only upload for this distribution -- `PACKAGEVERSION=""` - normally use the default so don't specify it. But if you - change packaging and run another upload you need to increment the number at the end of - `PACKAGEVERSION`. e.g. next one is `1~sil2` then `1~sil3`… +- `PACKAGEVERSION=""` - normally use the default so don't specify + it. But if you change packaging and run another upload you need to increment + the number at the end of `PACKAGEVERSION`. e.g. next one is `1~sil2` then + `1~sil3`… ### Releasing a new version -As part of releasing a new version it might be good to do some local testing first before uploading -to Launchpad: +As part of releasing a new version it might be good to do some local testing +first before uploading to Launchpad: - Run `launchpad.sh` with `UPLOAD="no"` to build the packages - Then install them on a clean VM and make sure no glaring bugs @@ -270,11 +313,12 @@ accepted. The Keyman packages are maintained on the Debian side by the [Debian Input Method Team](https://wiki.debian.org/Teams/IMEPackagingTeam). -**NOTE:** All `changelog` files should contain the exact same entry that was previously -accepted into the Debian repo (plus the new entry for the new update). This means that -when your upload got accepted into Debian (not ) you'll have to -update the `changelog` files to match what got accepted (sometimes the Debian maintainers -will create additional package versions). +**NOTE:** All `changelog` files should contain the exact same entry that was +previously accepted into the Debian repo (plus the new entry for the new +update). This means that when your upload got accepted into Debian (not +) you'll have to update the `changelog` files to match +what got accepted (sometimes the Debian maintainers will create additional +package versions). ### Prerequisites @@ -292,30 +336,41 @@ will create additional package versions). allowed_distributions = .* ``` -- subscribe to the [debian-input-method](debian-input-method@lists.debian.org) mailing list +- subscribe to the [debian-input-method](https://lists.debian.org/debian-input-method/) + mailing list -### Updating and uploading Debian package +### Updating and uploading a stable release to Debian -This is done in several steps: - -1. Download the source code from and create the source package by running - `scripts/debian.sh` -2. sign the source package (you might be able to omit this step if the source package already - got signed with the correct key in the previous step) -3. upload to mentors -4. file a RFS bug (Request For Sponsorship) against the `sponsorship-requests` pseudo-package, - cc'ing `debian-input-method`, or just send an email to the `debian-input-method` list. - -After the package got published in Debian you should update the `linux/debian/changelog` file -with the exact same information that the changelog in Debian has. - -The first three steps above and updating the changelog file can be done by running -the following script: +To do this you can run the `linux/scripts/upload-to-debian.sh` script: ```bash -linux/scripts/upload-to-debian.sh -k $DEBSIGN_KEYID --push +linux/scripts/upload-to-debian.sh -k ${DEBSIGNKEY} --push ``` +This does several steps: + +1. Download the source code from and create the source + package by running `scripts/debian.sh` +2. sign the source package +3. upload to mentors (unless `-n` is passed) +4. Create a branch with the updated `linux/debian/changelog` file based on the + stable branch +5. Cherry-pick the change on a new branch based on `master` +6. If `--push` is passed, the two branches will be pushed to GitHub + +There are a few additional manual required steps: + +1. Create a draft-PR for the change against stable branch +2. Create a draft PR for the cherry-picked change against `master` +3. file a RFS bug (Request For Sponsorship) against the `sponsorship-requests` + pseudo-package, cc'ing `debian-input-method`, or just send an email to the + `debian-input-method` list. + +After the package got published in Debian you can mark the PRs as ready +for review. This should only be done after the package got published in +Debian because the changelog file needs to contain the exact same +information that the changelog in Debian has. + ## Reference See the [Linux readme](https://github.com/keymanapp/keyman/blob/master/docs/linux/README.md) diff --git a/docs/settings/linux/extensions.json b/docs/settings/linux/extensions.json index 55b5ccd393..bd790bd97e 100644 --- a/docs/settings/linux/extensions.json +++ b/docs/settings/linux/extensions.json @@ -9,5 +9,6 @@ "timonwong.shellcheck", "maelvalais.autoconf", "webfreak.debug", + "dawidd6.debian-vscode", ] } diff --git a/ios/engine/KMEI/KeymanEngine.xcodeproj/project.pbxproj b/ios/engine/KMEI/KeymanEngine.xcodeproj/project.pbxproj index 375720e0fb..4f21ff9830 100644 --- a/ios/engine/KMEI/KeymanEngine.xcodeproj/project.pbxproj +++ b/ios/engine/KMEI/KeymanEngine.xcodeproj/project.pbxproj @@ -308,12 +308,21 @@ 2949146F2738DA6700400732 /* ff-NG */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "ff-NG"; path = "ff-NG.lproj/ResourceInfoView.strings"; sourceTree = ""; }; 294914702738DD7400400732 /* ff-NG */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "ff-NG"; path = "ff-NG.lproj/Localizable.strings"; sourceTree = ""; }; 294914712738DD9700400732 /* ff-NG */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "ff-NG"; path = "ff-NG.lproj/Localizable.stringsdict"; sourceTree = ""; }; - 297810FE297FAEDF007C886D /* kn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = kn; path = kn.lproj/ResourceInfoView.strings; sourceTree = ""; }; - 297810FF297FAEF8007C886D /* kn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = kn; path = kn.lproj/Localizable.strings; sourceTree = ""; }; - 29781100297FAF06007C886D /* kn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = kn; path = kn.lproj/Localizable.stringsdict; sourceTree = ""; }; 298566B929802892004ACA95 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/ResourceInfoView.strings; sourceTree = ""; }; 298566BA298028A8004ACA95 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = ""; }; 298566BB298028AC004ACA95 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = cs; path = cs.lproj/Localizable.stringsdict; sourceTree = ""; }; + 297810FE297FAEDF007C886D /* kn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = kn; path = kn.lproj/ResourceInfoView.strings; sourceTree = ""; }; + 297810FF297FAEF8007C886D /* kn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = kn; path = kn.lproj/Localizable.strings; sourceTree = ""; }; + 29781100297FAF06007C886D /* kn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = kn; path = kn.lproj/Localizable.stringsdict; sourceTree = ""; }; + 298566C52980C5BB004ACA95 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/ResourceInfoView.strings; sourceTree = ""; }; + 298566C62980C5C7004ACA95 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = ""; }; + 298566C72980C5CC004ACA95 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = sv; path = sv.lproj/Localizable.stringsdict; sourceTree = ""; }; + 298566D12980D390004ACA95 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/ResourceInfoView.strings; sourceTree = ""; }; + 298566D22980D39A004ACA95 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/Localizable.strings; sourceTree = ""; }; + 298566D32980D39F004ACA95 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = uk; path = uk.lproj/Localizable.stringsdict; sourceTree = ""; }; + 298566DD2980E477004ACA95 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/ResourceInfoView.strings; sourceTree = ""; }; + 298566DE2980E486004ACA95 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = ""; }; + 298566DF2980E48C004ACA95 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = ru; path = ru.lproj/Localizable.stringsdict; sourceTree = ""; }; 29B27FEF29062CF50036917E /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/ResourceInfoView.strings; sourceTree = ""; }; 29B27FF029062D100036917E /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = ""; }; 29B27FF129062D190036917E /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = nl; path = nl.lproj/Localizable.stringsdict; sourceTree = ""; }; @@ -1201,8 +1210,11 @@ it, pl, nl, - kn, cs, + kn, + sv, + uk, + ru, ); mainGroup = F243887314BBD43000A3E055; productRefGroup = F243887F14BBD43000A3E055 /* Products */; @@ -1596,8 +1608,11 @@ 29BFA760282934BB009FCCC3 /* it */, 29BFA76C28294833009FCCC3 /* pl */, 29B27FF129062D190036917E /* nl */, - 29781100297FAF06007C886D /* kn */, 298566BB298028AC004ACA95 /* cs */, + 29781100297FAF06007C886D /* kn */, + 298566C72980C5CC004ACA95 /* sv */, + 298566D32980D39F004ACA95 /* uk */, + 298566DF2980E48C004ACA95 /* ru */, ); name = Localizable.stringsdict; sourceTree = ""; @@ -1620,8 +1635,11 @@ 29BFA75F282934B4009FCCC3 /* it */, 29BFA76B28294813009FCCC3 /* pl */, 29B27FF029062D100036917E /* nl */, - 297810FF297FAEF8007C886D /* kn */, 298566BA298028A8004ACA95 /* cs */, + 297810FF297FAEF8007C886D /* kn */, + 298566C62980C5C7004ACA95 /* sv */, + 298566D22980D39A004ACA95 /* uk */, + 298566DE2980E486004ACA95 /* ru */, ); name = Localizable.strings; sourceTree = ""; @@ -1645,8 +1663,11 @@ 29BFA75E28293287009FCCC3 /* it */, 29BFA76A28294746009FCCC3 /* pl */, 29B27FEF29062CF50036917E /* nl */, - 297810FE297FAEDF007C886D /* kn */, 298566B929802892004ACA95 /* cs */, + 297810FE297FAEDF007C886D /* kn */, + 298566C52980C5BB004ACA95 /* sv */, + 298566D12980D390004ACA95 /* uk */, + 298566DD2980E477004ACA95 /* ru */, ); name = ResourceInfoView.xib; sourceTree = ""; diff --git a/ios/engine/KMEI/KeymanEngine/Classes/ru.lproj/ResourceInfoView.strings b/ios/engine/KMEI/KeymanEngine/Classes/ru.lproj/ResourceInfoView.strings new file mode 100644 index 0000000000..3622f14d7c --- /dev/null +++ b/ios/engine/KMEI/KeymanEngine/Classes/ru.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/Classes/sv.lproj/ResourceInfoView.strings b/ios/engine/KMEI/KeymanEngine/Classes/sv.lproj/ResourceInfoView.strings new file mode 100644 index 0000000000..4ad462fd6f --- /dev/null +++ b/ios/engine/KMEI/KeymanEngine/Classes/sv.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" = "Skanna den här koden för att ladda tangentbordet på en annan enhet"; diff --git a/ios/engine/KMEI/KeymanEngine/Classes/uk.lproj/ResourceInfoView.strings b/ios/engine/KMEI/KeymanEngine/Classes/uk.lproj/ResourceInfoView.strings new file mode 100644 index 0000000000..1d9dfc9b81 --- /dev/null +++ b/ios/engine/KMEI/KeymanEngine/Classes/uk.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/ff.lproj/Localizable.strings b/ios/engine/KMEI/KeymanEngine/ff.lproj/Localizable.strings index d46bd61d9b..f27d7c36bc 100644 --- a/ios/engine/KMEI/KeymanEngine/ff.lproj/Localizable.strings +++ b/ios/engine/KMEI/KeymanEngine/ff.lproj/Localizable.strings @@ -83,7 +83,7 @@ "info-command-help-keyboard" = "Ballal tappirde"; /* Text for the command to open the help page of a lexical model, as shown on resource information views */ -"info-command-help-lexical-model" = "Ballal tappirde"; +"info-command-help-lexical-model" = "Ballal Saggitorde"; /* Text label for displaying a keyboard's version, as shown on resource information views */ "info-label-version-keyboard" = "Yamre tappirde"; diff --git a/ios/engine/KMEI/KeymanEngine/kn.lproj/Localizable.strings b/ios/engine/KMEI/KeymanEngine/kn.lproj/Localizable.strings index 5635331a50..ec935717de 100644 --- a/ios/engine/KMEI/KeymanEngine/kn.lproj/Localizable.strings +++ b/ios/engine/KMEI/KeymanEngine/kn.lproj/Localizable.strings @@ -191,7 +191,7 @@ "menu-settings-show-banner" = "ಬ್ಯಾನರ್ ತೋರಿಸು"; /* Label for the "Get Started" automatic display toggle seen in the Settings menu */ -"menu-settings-startup-get-started" = "ಆರಂಭದಲ್ಲಿ 'Get Started' ತೋರಿಸು"; +"menu-settings-startup-get-started" = "ಆರಂಭದಲ್ಲಿ \"ಪ್ರಾರಂಭಿಕ ಪರದೆ\" ತೋರಿಸು"; /* Title for the main Settings menu */ "menu-settings-title" = "ಕೀಮ್ಯಾನ್ ಸೆಟ್ಟಿಂಗ್‌ಗಳು"; diff --git a/ios/engine/KMEI/KeymanEngine/ru.lproj/Localizable.strings b/ios/engine/KMEI/KeymanEngine/ru.lproj/Localizable.strings new file mode 100644 index 0000000000..c71eb67ea7 --- /dev/null +++ b/ios/engine/KMEI/KeymanEngine/ru.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" = "Не удалось подключиться к серверу Keyman. Пожалуйста, повторите попытку позже."; + +/* 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" = "Невозможно обновить ресурс, не управляемый движком Keyman"; + +/* 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" = "This package requires a newer version of Keyman."; + +/* 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" = "Настройки Keyman"; + +/* Secondary text showing current setting for spacebar caption - blank */ +"menu-settings-spacebar-hint-blank" = "Не показывать заголовок в пробеле"; + +/* Secondary text showing current setting for spacebar caption - keyboard */ +"menu-settings-spacebar-hint-keyboard" = "Показывать имя клавиатуры на пробеле"; + +/* Secondary text showing current setting for spacebar caption - language */ +"menu-settings-spacebar-hint-language" = "Показывать название языка в пробеле"; + +/* Secondary text showing current setting for spacebar caption - language + keyboard */ +"menu-settings-spacebar-hint-languageKeyboard" = "Показывать язык и название клавиатуры на пробеле"; + +/* Label for the "Spacebar Caption" item on the main settings screen */ +"menu-settings-spacebar-text" = "Заголовок пробела"; + +/* Title for the "Spacebar Caption" settings screen */ +"menu-settings-spacebar-title" = "Заголовок пробела"; + +/* 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/ru.lproj/Localizable.stringsdict b/ios/engine/KMEI/KeymanEngine/ru.lproj/Localizable.stringsdict new file mode 100644 index 0000000000..49d78157bb --- /dev/null +++ b/ios/engine/KMEI/KeymanEngine/ru.lproj/Localizable.stringsdict @@ -0,0 +1,146 @@ + + + + + menu-langsettings-lexical-model-count + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + %u словарь установлен + few + Установлено %u словарей + many + Установлено %u словарей + other + Установлено %u словарей + + + notification-update-failed + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + Сбой обновления %u + few + %u обновлений не удалось + many + %u обновлений не удалось + other + %u обновлений не удалось + + + notification-update-success + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + %u успешно обновлено + few + %u обновлений успешно + many + %u обновлений успешно + other + %u обновлений успешно + + + settings-keyboards-installed-count + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + Установлена %u клавиатура + few + %u клавиатуры установлены + many + %u клавиатуры установлены + other + %u клавиатуры установлены + + + settings-languages-installed-count + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + Установлен %u язык + few + Установлено %u языков + many + Установлено %u языков + other + Установлено %u языков + + + package-default-found-keyboards + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + %u клавиатура найдена: + few + Найдено %u клавиатур в пакете: + many + Найдено %u клавиатур в пакете: + other + Найдено %u клавиатур в пакете: + + + package-default-found-lexical-models + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + Найден %u словарь в пакете: + few + Найдено %u словарей в пакете: + many + Найдено %u словарей в пакете: + other + Найдено %u словарей в пакете: + + + + diff --git a/ios/engine/KMEI/KeymanEngine/shu-latn-n.lproj/Localizable.strings b/ios/engine/KMEI/KeymanEngine/shu-latn-n.lproj/Localizable.strings index f9a094c3c5..f5a97d6119 100644 --- a/ios/engine/KMEI/KeymanEngine/shu-latn-n.lproj/Localizable.strings +++ b/ios/engine/KMEI/KeymanEngine/shu-latn-n.lproj/Localizable.strings @@ -119,7 +119,7 @@ "kmp-error-invalid" = "Alshu'ul maknus."; /* Error opening a Keyman package - it does not exist / the specified location is wrong */ -"kmp-error-missing" = "The specified package does not exist."; +"kmp-error-missing" = "Al package alkhassa da mafi."; /* Error installing a Keyman package - expected resource (keyboard or dictionary) is missing */ "kmp-error-missing-resource" = "Alshu'ul da ma leya gudura layl keyboard walla kakkad hanal kalimat da."; @@ -131,7 +131,7 @@ "kmp-error-no-metadata" = "Ma sawwol shu'ul da zayn - shu'ul alfiya ma mil'araf."; /* Error opening a Keyman package - package's contents are for desktop platforms only */ -"kmp-error-unsupported" = "This package does not include support for your device."; +"kmp-error-unsupported" = "Al package da ma bikun bidukhul ley shu'ulak."; /* Error opening a Keyman package - package contains unexpected resource (keyboard or dictionary) type */ "kmp-error-wrong-type" = "Alshu'ul da ma leya shu'ul albinadawar minna."; diff --git a/ios/engine/KMEI/KeymanEngine/sv.lproj/Localizable.strings b/ios/engine/KMEI/KeymanEngine/sv.lproj/Localizable.strings new file mode 100644 index 0000000000..e8ceafa04d --- /dev/null +++ b/ios/engine/KMEI/KeymanEngine/sv.lproj/Localizable.strings @@ -0,0 +1,257 @@ +/* A descriptive message used for errors when the app is already busy downloading */ +"alert-download-error-busy" = "Redan upptagen med nedladdning."; + +/* A descriptive message used when a download fails */ +"alert-download-error-detail" = "Fel uppstod under nedladdning eller installation."; + +/* Title for a "download failed" alert */ +"alert-download-error-title" = "Fel vid hämtning"; + +/* Title for a general alert about errors */ +"alert-error-title" = "Fel"; + +/* A descriptive message used when no internet connection is detected */ +"alert-no-connection-detail" = "Kunde inte nå Keyman-servern. Försök igen senare."; + +/* Title for a "no connection" alert */ +"alert-no-connection-title" = "Anslutningsfel"; + +/* Short text for a 'back' navigational command. Used to return to the previous screen */ +"command-back" = "Tillbaka"; + +/* Short text for a 'cancel' command. Used to back out of a menu or install process without making changes */ +"command-cancel" = "Avbryt"; + +/* Short text for a 'done' command. Used to back out of settings menus after changes have been made */ +"command-done" = "Klar"; + +/* Short text for an 'install' command. Used to confirm installation of a package. */ +"command-install" = "Installera"; + +/* Short text for a 'next' navigational command. Used to advance to the next screen */ +"command-next" = "Nästa"; + +/* Short text for an 'OK' command. Used for some error alerts */ +"command-ok" = "Ok"; + +/* Short text for confirmining 'uninstall' commands. */ +"command-uninstall" = "Avinstallera"; + +/* Text for the command to uninstall a keyboard */ +"command-uninstall-keyboard" = "Avinstallera tangentbordet"; + +/* Confirmation text to display before uninstalling a keyboard */ +"command-uninstall-keyboard-confirm" = "Vill du avinstallera det här tangentbordet?"; + +/* Text for the command to uninstall a lexical model */ +"command-uninstall-lexical-model" = "Avinstallera ordbok"; + +/* Confirmation text to display before uninstalling a lexical model */ +"command-uninstall-lexical-model-confirm" = "Vill du avinstallera det här lexikonet?"; + +/* Text for error when a keyboard cannot load properly */ +"error-loading-keyboard" = "Det gick inte att ladda det begärda tangentbordet"; + +/* Text for error when a lexical model cannot load properly */ +"error-loading-lexical-model" = "Det går inte att ladda den begärda ordboken"; + +/* Text for error when an installed file is unexpectedly missing */ +"error-missing-file" = "Det gick inte att hitta en obligatorisk fil."; + +/* Text for error when an installed file is unexpectedly missing */ +"error-missing-file-critical" = "Det gick inte att hitta en kritisk fil. Försök att installera om appen."; + +/* Text for errors in data received from search queries */ +"error-query-decoding" = "Servern upplever för närvarande tekniska svårigheter"; + +/* A descriptive message used when a download fails */ +"error-query-general" = "Fel vid kommunikation med servern"; + +/* Text for error when a search query is unexpectedly empty */ +"error-query-no-data" = "Servern kunde inte svara"; + +/* Text for general errors where not much information is known */ +"error-unknown" = "Ett oväntat fel har inträffat"; + +/* Text for error when updating a resource: cannot download because no source is available */ +"error-update-no-link" = "Ingen källa för uppdateringar är tillgänglig för detta paket"; + +/* Text for error when updating a resource: Keyman does not know how to update the resource */ +"error-update-not-managed" = "Kan inte uppdatera resursen som inte hanteras av Keyman-motorn"; + +/* Text for the command to open the help page of a keyboard, as shown on resource information views */ +"info-command-help-keyboard" = "Tangentbord hjälp"; + +/* Text for the command to open the help page of a lexical model, as shown on resource information views */ +"info-command-help-lexical-model" = "Hjälp med ordbok"; + +/* Text label for displaying a keyboard's version, as shown on resource information views */ +"info-label-version-keyboard" = "Tangentbord version"; + +/* Text label for displaying a lexical model's version, as shown on resource information views */ +"info-label-version-lexical-model" = "Ordbok version"; + +/* Label used for the "package info" / readme tab with the package installation prompt on phones. */ +"installer-label-package-info" = "Paketinformation"; + +/* Label used for the language-selection tab with the package installation prompt on phones. */ +"installer-label-select-languages" = "Välj språk"; + +/* Label used with a package's version, as seen within the package installation prompt. Example: "Version: 14.0.0" */ +"installer-label-version" = "Version: %@"; + +/* Section header for languages supported by a package, as seen within the package installation prompt */ +"installer-section-available-languages" = "Tillgängliga språk"; + +/* Text for the help popup for changing keyboards with the globe key */ +"keyboard-help-change" = "Tryck här för att ändra tangentbordet"; + +/* Text for the command to exit the Keyman keyboard in favor of other keyboards installed on the system */ +"keyboard-menu-exit" = "Stäng %@"; + +/* Error installing a Keyman package - could not allocate a location to install it */ +"kmp-error-file-system" = "Fel vid installation av paket - fel i filsystemet"; + +/* Error installing a Keyman package - could not copy package files */ +"kmp-error-file-copying" = "Fel vid installation av paket - kunde inte kopiera obligatoriska filer"; + +/* Error opening a Keyman package - package is not valid */ +"kmp-error-invalid" = "Paketets fil är skadad."; + +/* Error opening a Keyman package - it does not exist / the specified location is wrong */ +"kmp-error-missing" = "Det angivna paketet finns inte."; + +/* Error installing a Keyman package - expected resource (keyboard or dictionary) is missing */ +"kmp-error-missing-resource" = "Detta paket innehåller inte det begärda tangentbordet eller ordboken."; + +/* Error installing a Keyman package with a version of Keyman that does not support it */ +"kmp-error-unsupported-keyman-version" = "This package requires a newer version of Keyman."; + +/* Error opening a Keyman package - cannot parse contents */ +"kmp-error-no-metadata" = "Paketet byggdes inte ordentligt - innehållet är okänt."; + +/* Error opening a Keyman package - package's contents are for desktop platforms only */ +"kmp-error-unsupported" = "Det här paketet innehåller inte stöd för din enhet."; + +/* Error opening a Keyman package - package contains unexpected resource (keyboard or dictionary) type */ +"kmp-error-wrong-type" = "Detta paket innehåller inte den förväntade resurstypen."; + +/* Title for the Installed Languages menu */ +"menu-installed-languages-title" = "Installerade språk"; + +/* Section header for lexical models within a language-specific settings menu */ +"menu-langsettings-label-lexical-models" = "Ordböcker"; + +/* Section header for keyboards within a language-specific settings menu */ +"menu-langsettings-section-keyboards" = "Tangentbord"; + +/* Section header for the settings toggles within a language-specific settings menu */ +"menu-langsettings-section-settings" = "Inställningar för språk"; + +/* Title for the language-specific settings menus */ +"menu-langsettings-title" = "%@ Inställningar"; + +/* Label for the toggle that enables corrections that is displayed within a language-specific settings menu */ +"menu-langsettings-toggle-correct" = "Aktivera korrigeringar"; + +/* Label for the toggle that enables predictions that is displayed within a language-specific settings menu */ +"menu-langsettings-toggle-predict" = "Aktivera förutsägelser"; + +/* 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" = "Vill du installera denna ordbok?"; + +/* 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" = "Inga ordböcker tillgängliga"; + +/* Title for the lexical model menu, a submenu of the language-specific settings menus */ +"menu-lexical-model-title" = "%@ ordböcker"; + +/* Title for the keyboard picker */ +"menu-picker-title" = "Tangentbord"; + +/* Primary text for the Settings menu option to report keyboard crashes */ +"menu-settings-error-report" = "Tillåt felrapportering"; + +/* Secondary text for the Settings menu option to report keyboard crashes */ +"menu-settings-error-report-description" = "Kan kräva \"full åtkomst\""; + +/* Primary text for the Settings menu local-file package installation option */ +"menu-settings-install-from-file" = "Installera från fil"; + +/* Secondary text for the Settings menu local-file package installation option */ +"menu-settings-install-from-file-description" = "Bläddra efter .kmp-filer"; + +/* Primary text for the Settings menu option that displays the iOS system menu options for the app's keyboard */ +"menu-settings-system-keyboard-menu" = "Systeminställningar för tangentbord"; + +/* Label for the "Show Banner" toggle on the main settings screen */ +"menu-settings-show-banner" = "Visa banner"; + +/* Label for the "Get Started" automatic display toggle seen in the Settings menu */ +"menu-settings-startup-get-started" = "Visa 'Kom igång' vid start"; + +/* Title for the main Settings menu */ +"menu-settings-title" = "Keyman inställningar"; + +/* Secondary text showing current setting for spacebar caption - blank */ +"menu-settings-spacebar-hint-blank" = "Visa inte bildtext på mellanslagstangenten"; + +/* Secondary text showing current setting for spacebar caption - keyboard */ +"menu-settings-spacebar-hint-keyboard" = "Visa tangentbordsnamn på mellanslag"; + +/* Secondary text showing current setting for spacebar caption - language */ +"menu-settings-spacebar-hint-language" = "Visa språknamn på mellanslag"; + +/* Secondary text showing current setting for spacebar caption - language + keyboard */ +"menu-settings-spacebar-hint-languageKeyboard" = "Visa språk och tangentbordsnamn på mellanslag"; + +/* Label for the "Spacebar Caption" item on the main settings screen */ +"menu-settings-spacebar-text" = "Bildtext för mellanslag"; + +/* Title for the "Spacebar Caption" settings screen */ +"menu-settings-spacebar-title" = "Bildtext för mellanslag"; + +/* Text showing name of spacebar caption - blank */ +"menu-settings-spacebar-item-blank" = "Tom"; + +/* Text showing name of spacebar caption - keyboard */ +"menu-settings-spacebar-item-keyboard" = "Keyboard"; + +/* Text showing name of spacebar caption - language */ +"menu-settings-spacebar-item-language" = "Språk"; + +/* Text showing name of spacebar caption - language + keyboard */ +"menu-settings-spacebar-item-languageKeyboard" = "Språk och tangentbord"; + +/* Short text for notification: download failure for keyboard */ +"notification-download-failure-keyboard" = "Tangentbords nedladdning misslyckades"; + +/* Short text for notification: download failure for lexical model */ +"notification-download-failure-lexical-model" = "Nedladdning av ordbok misslyckades"; + +/* Short text for notification: download success for keyboard */ +"notification-download-success-keyboard" = "Tangentbordet har laddats ner"; + +/* Short text for notification: download success for lexical model */ +"notification-download-success-lexical-model" = "Lexikal modell har laddats ner"; + +/* Short text for notification: downloading a keyboard */ +"notification-downloading-keyboard" = "Laddar ner tangentbord\U2026"; + +/* Short text for notification: downloading a lexical model */ +"notification-downloading-lexical-model" = "Laddar ner ordbok\U2026"; + +/* Short text for notification: an update is available */ +"notification-update-available" = "Uppdatering tillgänglig"; + +/* Short text for notification: currently updating */ +"notification-update-processing" = "Uppdaterar\U2026"; + +/* Text indicating success at installing new keyboards or dictionaries */ +"success-install" = "Installationen lyckades."; + +/* A title to use in alerts indicating 'success' at whatever task the user requested */ +"success-title" = "Klart"; diff --git a/ios/engine/KMEI/KeymanEngine/sv.lproj/Localizable.stringsdict b/ios/engine/KMEI/KeymanEngine/sv.lproj/Localizable.stringsdict new file mode 100644 index 0000000000..1e7a6785f2 --- /dev/null +++ b/ios/engine/KMEI/KeymanEngine/sv.lproj/Localizable.stringsdict @@ -0,0 +1,118 @@ + + + + + menu-langsettings-lexical-model-count + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + %u ordbok installerad + other + %u ordböcker installerade + + + notification-update-failed + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + %u uppdatering misslyckades + other + %u uppdateringar misslyckades + + + notification-update-success + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + %u uppdatering slutförd + other + %u uppdateringar lyckade + + + settings-keyboards-installed-count + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + %u tangentbord installerat + other + %u tangentbord installerade + + + settings-languages-installed-count + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + %u språk installerat + other + %u språk installerade + + + package-default-found-keyboards + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + Hittade %u tangentbord i paketet: + other + Hittade %u tangentbord i paketet: + + + package-default-found-lexical-models + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + Hittade %u ordbok i paketet: + other + Hittade %u ordböcker i paketet: + + + + diff --git a/ios/engine/KMEI/KeymanEngine/uk.lproj/Localizable.strings b/ios/engine/KMEI/KeymanEngine/uk.lproj/Localizable.strings new file mode 100644 index 0000000000..4d9ff33cb5 --- /dev/null +++ b/ios/engine/KMEI/KeymanEngine/uk.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" = "Не вдалося зв’язатися з сервером Keyman. Будь ласка, спробуйте ще раз пізніше."; + +/* 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" = "Неможливо оновити ресурс яким керує рушій Keyman"; + +/* 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" = "This package requires a newer version of Keyman."; + +/* 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" = "Налаштування Keyman"; + +/* Secondary text showing current setting for spacebar caption - blank */ +"menu-settings-spacebar-hint-blank" = "Не показувати підпис на пробілі"; + +/* Secondary text showing current setting for spacebar caption - keyboard */ +"menu-settings-spacebar-hint-keyboard" = "Показувати назву клавіатури на пробілі"; + +/* Secondary text showing current setting for spacebar caption - language */ +"menu-settings-spacebar-hint-language" = "Показувати назву мови на пробілі"; + +/* Secondary text showing current setting for spacebar caption - language + keyboard */ +"menu-settings-spacebar-hint-languageKeyboard" = "Показати мову і назву клавіатури на пробілі"; + +/* Label for the "Spacebar Caption" item on the main settings screen */ +"menu-settings-spacebar-text" = "Заголовок до пробілу"; + +/* Title for the "Spacebar Caption" settings screen */ +"menu-settings-spacebar-title" = "Заголовок до пробілу"; + +/* Text showing name of spacebar caption - blank */ +"menu-settings-spacebar-item-blank" = "Пустий"; + +/* Text showing name of spacebar caption - keyboard */ +"menu-settings-spacebar-item-keyboard" = "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/uk.lproj/Localizable.stringsdict b/ios/engine/KMEI/KeymanEngine/uk.lproj/Localizable.stringsdict new file mode 100644 index 0000000000..27ce4f3c75 --- /dev/null +++ b/ios/engine/KMEI/KeymanEngine/uk.lproj/Localizable.stringsdict @@ -0,0 +1,146 @@ + + + + + menu-langsettings-lexical-model-count + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + %u словник встановлено + few + %u словників встановлено + many + %u словників встановлено + other + %u словників встановлено + + + notification-update-failed + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + %u оновлення не вдалося + few + %u оновлення не вдалося + many + %u оновлення не вдалося + other + %u оновлення не вдалося + + + notification-update-success + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + %u оновлено успішно + few + %u оновлення успішно + many + %u оновлення успішно + other + %u оновлення успішно + + + settings-keyboards-installed-count + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + %u встановлено клавіатуру + few + %u установлено клавіатури + many + %u установлено клавіатури + other + %u установлено клавіатури + + + settings-languages-installed-count + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + %u мова встановлена + few + %u мов встановлено + many + %u мов встановлено + other + %u мов встановлено + + + package-default-found-keyboards + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + Знайдено %u клавіатуру в пакеті: + few + Знайдено %u клавіатур у пакеті: + many + Знайдено %u клавіатур у пакеті: + other + Знайдено %u клавіатур у пакеті: + + + package-default-found-lexical-models + + NSStringLocalizedFormatKey + %#@count@ + count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + u + one + Знайдено %u словник в пакеті: + few + Знайдено %u словників у пакеті: + many + Знайдено %u словників у пакеті: + other + Знайдено %u словників у пакеті: + + + + diff --git a/ios/exportAppStore.plist b/ios/exportAppStore.plist index 585577ec2d..6393f3c4cb 100644 --- a/ios/exportAppStore.plist +++ b/ios/exportAppStore.plist @@ -7,9 +7,9 @@ teamID 3YE4W86L3G signingCertificate - 3F2AB892E24387929F51C36E7A03EF33502D341A + 05473BF50CCD4B78B304656FB4D93FDC7EE7ACD0 installerSigningCertificate - 3F2AB892E24387929F51C36E7A03EF33502D341A + 05473BF50CCD4B78B304656FB4D93FDC7EE7ACD0 provisioningProfiles Tavultesoft.Keyman diff --git a/ios/keyman/Keyman/Keyman.xcodeproj/project.pbxproj b/ios/keyman/Keyman/Keyman.xcodeproj/project.pbxproj index 9895576b1b..012d3ba08f 100644 --- a/ios/keyman/Keyman/Keyman.xcodeproj/project.pbxproj +++ b/ios/keyman/Keyman/Keyman.xcodeproj/project.pbxproj @@ -205,8 +205,11 @@ 16A9229D20325253003CC98E /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Keyman/Info.plist; sourceTree = SOURCE_ROOT; }; 293EA3E027059C6900545EED /* ha */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ha; path = ha.lproj/Localizable.strings; sourceTree = ""; }; 294914742738DF7700400732 /* ff-NG */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "ff-NG"; path = "ff-NG.lproj/Localizable.strings"; sourceTree = ""; }; - 297810FD297FA818007C886D /* kn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = kn; path = kn.lproj/Localizable.strings; sourceTree = ""; }; 298566B829802828004ACA95 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = ""; }; + 297810FD297FA818007C886D /* kn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = kn; path = kn.lproj/Localizable.strings; sourceTree = ""; }; + 298566C42980C493004ACA95 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = ""; }; + 298566D02980D354004ACA95 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/Localizable.strings; sourceTree = ""; }; + 298566DC2980E416004ACA95 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = ""; }; 29B27FEE29062BBC0036917E /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = ""; }; 29BFA75D282931F8009FCCC3 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = ""; }; 29BFA769282946EC009FCCC3 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = ""; }; @@ -796,8 +799,11 @@ it, pl, nl, - kn, cs, + kn, + sv, + uk, + ru, ); mainGroup = 98ABADA7176935E400B62590; productRefGroup = 98ABADB1176935E400B62590 /* Products */; @@ -1105,8 +1111,11 @@ 29BFA75D282931F8009FCCC3 /* it */, 29BFA769282946EC009FCCC3 /* pl */, 29B27FEE29062BBC0036917E /* nl */, - 297810FD297FA818007C886D /* kn */, 298566B829802828004ACA95 /* cs */, + 297810FD297FA818007C886D /* kn */, + 298566C42980C493004ACA95 /* sv */, + 298566D02980D354004ACA95 /* uk */, + 298566DC2980E416004ACA95 /* ru */, ); name = Localizable.strings; sourceTree = ""; diff --git a/ios/keyman/Keyman/Keyman/kn.lproj/Localizable.strings b/ios/keyman/Keyman/Keyman/kn.lproj/Localizable.strings index e2a5b724cd..fdecb30040 100644 --- a/ios/keyman/Keyman/Keyman/kn.lproj/Localizable.strings +++ b/ios/keyman/Keyman/Keyman/kn.lproj/Localizable.strings @@ -42,7 +42,7 @@ underneath the app's name within the app-specific keyboard menu.) */ "menu-clear-text" = "ಪಠ್ಯವನ್ನು ತೆರವುಗೊಳಿಸಿ"; /* Menu option that displays a list designed to help users start using the app */ -"menu-get-started" = "ಶುರುಮಾಡಿ"; +"menu-get-started" = "ಪ್ರಾರಂಭಿಕ ಪರದೆ"; /* Menu option that displays help for the app */ "menu-help" = "ಮಾಹಿತಿ"; diff --git a/ios/keyman/Keyman/Keyman/ru.lproj/Localizable.strings b/ios/keyman/Keyman/Keyman/ru.lproj/Localizable.strings new file mode 100644 index 0000000000..a95a279c20 --- /dev/null +++ b/ios/keyman/Keyman/Keyman/ru.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" = "%@ 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/ios/keyman/Keyman/Keyman/sv.lproj/Localizable.strings b/ios/keyman/Keyman/Keyman/sv.lproj/Localizable.strings new file mode 100644 index 0000000000..c2e7509aa6 --- /dev/null +++ b/ios/keyman/Keyman/Keyman/sv.lproj/Localizable.strings @@ -0,0 +1,81 @@ +/* Title for the bookmarks menu within the embedded browser */ +"browser-bookmarks-add-title" = "Lägg till bokmärke"; + +/* Title for the bookmarks menu within the embedded browser */ +"browser-bookmarks-none" = "Inga bokmärken"; + +/* Title for the bookmarks menu within the embedded browser */ +"browser-bookmarks-title" = "Bokmärken"; + +/* Used to confirm a user's desire to install a package */ +"confirm-install" = "Installera"; + +/* The label for the toggle to stop automatically showing the "Get Started" tutorial popup. */ +"disable-get-started" = "Visa inte igen"; + +/* Indicates an error opening a web page requested by a user */ +"error-opening-page" = "Kan inte öppna sidan"; + +/* Long-form used when installing a font in order to display a language properly. */ +"font-install-description" = "Tryck på Installera för att få %@ att visas korrekt i alla appar"; + +/* The name of the iOS Settings menu option for keyboards */ +"ios-settings-keyboards" = "Tangentbord"; + +/* 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" = "Tillåt full åtkomst"; + +/* Short-form used when installing a font in order to display a language properly. */ +"language-for-font" = "%@ Font"; + +/* Used for 'add' options within menus */ +"menu-add" = "Lägg till"; + +/* 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" = "Avbryt"; + +/* Menu option that erases all previously-typed text. */ +"menu-clear-text" = "Rensa text"; + +/* Menu option that displays a list designed to help users start using the app */ +"menu-get-started" = "Kom igång"; + +/* Menu option that displays help for the app */ +"menu-help" = "Information"; + +/* Menu option that displays the main screen's drop-down menu */ +"menu-more" = "Mer"; + +/* Menu option used to edit keyboard and dictionary settings */ +"menu-settings" = "Inställningar"; + +/* Menu option that displays the iOS Share menu */ +"menu-share" = "Dela"; + +/* Menu option that displays an embedded web browser. */ +"menu-show-browser" = "Webbläsare"; + +/* Menu option used to control in-app font size. */ +"menu-text-size" = "Textstorlek"; + +/* Used to describe the current font size */ +"text-size-label" = "Textstorlek: %i"; + +/* Text to indicate that a user should set a toggle within iOS Settings to 'active'. */ +"toggle-to-enable" = "Aktivera %@"; + +/* First option on the Get Started tutorial - Add a keyboard for your language */ +"tutorial-add-keyboard" = "Lägg till ett tangentbord för ditt språk"; + +/* Third option on the Get Started tutorial - Displays app help. */ +"tutorial-show-help" = "Mer information"; + +/* Second option on the Get Started tutorial - Set up Keyman as system-wide keyboard */ +"tutorial-system-keyboard" = "Ställ in Keyman som tangentbord i hela systemet"; + +/* Used to display app version (as in \"Version: 1.0.2\" */ +"version-label" = "Version: %@"; diff --git a/ios/keyman/Keyman/Keyman/uk.lproj/Localizable.strings b/ios/keyman/Keyman/Keyman/uk.lproj/Localizable.strings new file mode 100644 index 0000000000..856fd1f08a --- /dev/null +++ b/ios/keyman/Keyman/Keyman/uk.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" = "%@ 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" = "Встановити Keyman як цілочисельна клавіатура"; + +/* Used to display app version (as in \"Version: 1.0.2\" */ +"version-label" = "Версія: %@"; diff --git a/ios/kmbuild.sh b/ios/kmbuild.sh index 75aff1e1ab..401e2c483e 100755 --- a/ios/kmbuild.sh +++ b/ios/kmbuild.sh @@ -116,7 +116,7 @@ done # Extended path definitions KMEI_RESOURCES=engine/KMEI/KeymanEngine/resources BUNDLE_PATH=$KMEI_RESOURCES/Keyman.bundle/contents/resources -KMW_SOURCE=../web/source +KMW_ROOT=../web DEFAULT_KBD_ID="sil_euro_latin" DEFAULT_LM_ID="nrc.en.mtnt" @@ -137,7 +137,7 @@ if [ $CLEAN_ONLY = true ]; then fi echo -echo "KMW_SOURCE: $KMW_SOURCE" +echo "KMW_ROOT: $KMW_ROOT" echo "DO_KMW_BUILD: $DO_KMW_BUILD" echo "DO_KMP_DOWNLOADS: $DO_KMP_DOWNLOADS" echo "CONFIGURATION: $CONFIG" @@ -148,48 +148,46 @@ update_bundle ( ) { mkdir -p "$BUNDLE_PATH" fi - base_dir="$(pwd)" + local base_dir="$(pwd)" if [ $DO_KMW_BUILD = true ]; then - echo Building KeymanWeb from $KMW_SOURCE - - cd $KMW_SOURCE + echo Building KeymanWeb from $KMW_ROOT + KMW_PRODUCT=web/build/app/embed/ if [ "$CONFIG" == "Debug" ]; then - KMWFLAGS="-debug_embedded" + KMWFLAGS="configure:embed build:embed --debug" + KMW_PRODUCT="$KMW_PRODUCT/debug" else - KMWFLAGS="-embed" + KMWFLAGS="configure:embed build:embed" + KMW_PRODUCT="$KMW_PRODUCT/release" fi # Local development optimization - cross-target Sentry uploading when requested # by developer. As it's not CI, the Web artifacts won't exist otherwise... # unless the developer manually runs the correct build configuration accordingly. if [[ $VERSION_ENVIRONMENT == "local" ]] && [[ $UPLOAD_SENTRY == true ]]; then + # TODO: handle the -upload-sentry in its eventual new form KMWFLAGS="$KMWFLAGS -upload-sentry" fi - ./build.sh $KMWFLAGS + "$KEYMAN_ROOT/web/build.sh" $KMWFLAGS if [ $? -ne 0 ]; then fail "ERROR: KeymanWeb's build.sh failed." fi #Copy over the relevant resources! It's easiest to do if we navigate to the resulting folder. - cd ../release/embedded - cp resources/osk/kmwosk.css "$base_dir/$BUNDLE_PATH/kmwosk.css" - cp resources/osk/keymanweb-osk.ttf "$base_dir/$BUNDLE_PATH/keymanweb-osk.ttf" - cp keyman.js "$base_dir/$BUNDLE_PATH/keymanios.js" + cp "$KEYMAN_ROOT/$KMW_PRODUCT/osk/kmwosk.css" "$base_dir/$BUNDLE_PATH/kmwosk.css" + cp "$KEYMAN_ROOT/$KMW_PRODUCT/osk/keymanweb-osk.ttf" "$base_dir/$BUNDLE_PATH/keymanweb-osk.ttf" + cp "$KEYMAN_ROOT/$KMW_PRODUCT/keyman.js" "$base_dir/$BUNDLE_PATH/keymanios.js" if [ "$CONFIG" == "Debug" ]; then - cp keyman.js.map "$base_dir/$BUNDLE_PATH/keyman.js.map" + cp "$KEYMAN_ROOT/$KMW_PRODUCT/keyman.js.map" "$base_dir/$BUNDLE_PATH/keyman.js.map" elif [ -f "$base_dir/$BUNDLE_PATH/keyman.js.map" ]; then rm "$base_dir/$BUNDLE_PATH/keyman.js.map" fi - cd "$KEYMAN_ROOT/common/web/sentry-manager/build" + cp "$KEYMAN_ROOT/common/web/sentry-manager/build/index.js" "$base_dir/$BUNDLE_PATH/keyman-sentry.js" - cp index.js "$base_dir/$BUNDLE_PATH/keyman-sentry.js" - - cd "$base_dir" fi # Our default resources are part of the bundle, so let's check on them. diff --git a/linux/.gitignore b/linux/.gitignore index cf78b5ab49..bb6ad7a741 100644 --- a/linux/.gitignore +++ b/linux/.gitignore @@ -92,7 +92,6 @@ test.sh debianpackage/ *.deb *.ddeb -*.build *.buildinfo *.changes *.tar.xz diff --git a/linux/Makefile b/linux/Makefile index b0f3fafb39..af2a83a69c 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -16,8 +16,8 @@ fullbuild: # configure and build ./scripts/build.sh tmpinstall: reconf - INSTALLDIR="/tmp/kmfl" ./scripts/build.sh - INSTALLDIR="/tmp/kmfl" ./scripts/install.sh + INSTALLDIR="/tmp/keyman" ./scripts/build.sh + INSTALLDIR="/tmp/keyman" ./scripts/install.sh install: # run as sudo SUDOINSTALL="yes" ./scripts/install.sh diff --git a/linux/debian/changelog b/linux/debian/changelog index 981ded657c..3eef5dcfa7 100644 --- a/linux/debian/changelog +++ b/linux/debian/changelog @@ -1,3 +1,35 @@ +keyman (16.0.138-4) unstable; urgency=medium + + * Team upload + * debian/tests/control: Don't run autopkgtest on s390x + + -- Gunnar Hjalmarsson Sat, 11 Feb 2023 18:39:13 +0100 + +keyman (16.0.138-3) unstable; urgency=medium + + * debian/tests/test-build: Fix autopkgtests + + -- Eberhard Beilharz Thu, 09 Feb 2023 12:18:47 +0100 + +keyman (16.0.138-2) unstable; urgency=medium + + * Team upload + * debian/tests/control: Added missing autopkgtest dependency on + pkg-config (closes: #1030815). + + -- Gunnar Hjalmarsson Tue, 07 Feb 2023 20:34:35 +0100 + +keyman (16.0.138-1) unstable; urgency=medium + + [ Jelmer Vernooij ] + * Include packaging path in Vcs-Git header. + + [ Eberhard Beilharz ] + * New upstream release. + * Re-release to Debian + + -- Eberhard Beilharz Thu, 02 Feb 2023 10:53:17 +0100 + keyman (15.0.274-1) unstable; urgency=medium * New upstream release diff --git a/linux/debian/control b/linux/debian/control index 0a0446cb1a..33f50a90dc 100644 --- a/linux/debian/control +++ b/linux/debian/control @@ -26,7 +26,7 @@ Build-Depends: python3-requests, python3-requests-cache, python3-setuptools, - meson (>= 0.45), + meson (>= 0.53), ninja-build, libgtk-3-dev, libibus-1.0-dev (>= 1.2), @@ -37,8 +37,8 @@ Build-Depends: metacity, gawk, Standards-Version: 4.6.1 -Vcs-Git: https://github.com/keymanapp/keyman.git -Vcs-Browser: https://github.com/keymanapp/keyman +Vcs-Git: https://github.com/keymanapp/keyman.git -b stable-16.0 [linux/debian] +Vcs-Browser: https://github.com/keymanapp/keyman/tree/stable-16.0/linux/debian Homepage: https://www.keyman.com Rules-Requires-Root: binary-targets diff --git a/linux/debian/copyright b/linux/debian/copyright index 5c7c5e9189..292f45bd75 100644 --- a/linux/debian/copyright +++ b/linux/debian/copyright @@ -4,24 +4,24 @@ Upstream-Contact: Keyman team Source: https://github.com/keymanapp/keyman Files: * -Copyright: 2018-2022 SIL International +Copyright: 2018-2023 SIL International License: MIT Files: linux/ibus-keyman/* -Copyright: 2004-2022 SIL International +Copyright: 2004-2023 SIL International License: GPL-2+ Files: linux/ibus-keyman/src/keymanutil.c linux/ibus-keyman/src/keymanutil.h linux/ibus-keyman/src/kmpdetails.c linux/ibus-keyman/src/kmpdetails.h -Copyright: 2009-2022 SIL International +Copyright: 2009-2023 SIL International License: GPL-2+ or MIT Files: linux/ibus-keyman/src/keyman-service.c linux/ibus-keyman/src/keyman-service.h linux/keyman-config/buildtools/help2md -Copyright: 2018-2022 SIL International +Copyright: 2018-2023 SIL International License: GPL-3+ Files: linux/ibus-keyman/config.rpath @@ -49,7 +49,7 @@ Files: linux/ibus-keyman/Makefile.am linux/ibus-keyman/tests/Makefile.am linux/ibus-keyman/tests/Makefile.in Copyright: 1994-2017, Free Software Foundation, Inc. - 2009-2022, SIL International + 2009-2023, SIL International License: GPL-2+ Files: linux/ibus-keyman/m4/gettext.m4 @@ -87,7 +87,7 @@ Copyright: 2008-2010, Peng Huang 2008-2013, Peng Huang 2008-2021, Red Hat, Inc. 2015-2021, Takao Fujiwara - 2021-2022, SIL International + 2021-2023, SIL International License: LGPL-2.1+ Files: linux/keyman-config/buildtools/help2man @@ -97,7 +97,7 @@ License: GPL-3+ Files: debian/com.keyman.config.appdata.xml debian/com.keyman.ibus_keyman.metainfo.xml Copyright: 2019 Daniel Glassey - 2022 SIL International + 2022-2023 SIL International License: MIT License: MIT diff --git a/linux/debian/source/lintian-overrides b/linux/debian/source/lintian-overrides deleted file mode 100644 index 18c8d38d04..0000000000 --- a/linux/debian/source/lintian-overrides +++ /dev/null @@ -1,10 +0,0 @@ -# Lintian overrides -keyman source: very-long-line-length-in-source-file CONTRIBUTING.md * -keyman source: very-long-line-length-in-source-file linux/ibus-keyman/configure * -keyman source: very-long-line-length-in-source-file linux/ibus-keyman/m4/* * -keyman source: very-long-line-length-in-source-file linux/ibus-keyman/tests/Makefile.in * -keyman source: very-long-line-length-in-source-file resources/standards-data/langtags/langtags.json * - -# Looks like /usr/libexec/ibus-engine-keyman is not recognized as binary for the man page, -# so ignore that rule -spare-manual-page diff --git a/linux/debian/tests/README.md b/linux/debian/tests/README.md index 03e4b619b5..9327defb8b 100644 --- a/linux/debian/tests/README.md +++ b/linux/debian/tests/README.md @@ -7,3 +7,28 @@ See and **NOTE:** Runtime test names are only allowed to contain decimal digits, lowercase ASCII letters, plus or minus signs, dots or slashes. + +## Manually run the tests + +- build source and binary packages (see [packaging.md](../../../docs/linux/packaging.md)) + +- install dependencies + + ```bash + sudo apt install autopkgtest qemu-system qemu-utils autodep8 + ``` + +- create environment. Several different options are available, see + [README.running-tests](https://salsa.debian.org/ci-team/autopkgtest/blob/master/doc/README.running-tests.rst) + + For example: + + ```bash + autopkgtest-buildvm-ubuntu-cloud -v --release=jammy + ``` + +- Run tests + + ```bash + autopkgtest -B *.deb keyman_*.dsc -- qemu autopkgtest-jammy-amd64.img + ``` diff --git a/linux/debian/tests/control b/linux/debian/tests/control index 32cf9dac3f..c1164c9c8e 100644 --- a/linux/debian/tests/control +++ b/linux/debian/tests/control @@ -1,2 +1,5 @@ Tests: test-build -Depends: @, build-essential +Depends: @, + build-essential, + pkg-config, +Architecture: amd64 arm64 armel armhf i386 mips64el mipsel ppc64el riscv64 diff --git a/linux/debian/tests/test-build b/linux/debian/tests/test-build index f53496e17a..db0a343849 100644 --- a/linux/debian/tests/test-build +++ b/linux/debian/tests/test-build @@ -7,22 +7,24 @@ set -e WORKDIR=$(mktemp -d) trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM -cd $WORKDIR +cd "$WORKDIR" # Test all include files are available cat < keymantest.c #include -km_kbp_context c; +km_kbp_context* c; EOF -gcc keymantest.c `pkg-config --cflags --libs keyman_kmn_processor` +# shellcheck disable=SC2046 +gcc -c keymantest.c $(pkg-config --cflags --libs keyman_kmn_processor) echo "build 1: OK" # Test pkg-config file - include without path cat < keymantest.c #include -km_kbp_context c; +km_kbp_context* c; EOF -gcc keymantest.c `pkg-config --cflags --libs keyman_kmn_processor` +# shellcheck disable=SC2046 +gcc -c keymantest.c $(pkg-config --cflags --libs keyman_kmn_processor) echo "build 2: OK" diff --git a/linux/ibus-keyman/icons/meson.build b/linux/ibus-keyman/icons/meson.build new file mode 100644 index 0000000000..dce1d23614 --- /dev/null +++ b/linux/ibus-keyman/icons/meson.build @@ -0,0 +1,6 @@ +icons = files('default.png') + +install_data( + icons, + install_dir: '{datadir}/keyman/icons' +) diff --git a/linux/ibus-keyman/meson.build b/linux/ibus-keyman/meson.build new file mode 100644 index 0000000000..689cf5a5ec --- /dev/null +++ b/linux/ibus-keyman/meson.build @@ -0,0 +1,44 @@ +project('ibus-keyman', 'c', 'cpp', + version: run_command('cat', '../../VERSION.md', check: true).stdout().strip(), + license: 'GPL-2+', + # default_options : ['buildtype=release', + # 'cpp_std=c++14', + # 'b_vscrt=static_from_buildtype', + # 'warning_level=2'], + meson_version: '>=0.53.0') +cc = meson.get_compiler('c') +conf = configuration_data() + +ibus = dependency('ibus-1.0', version: '>= 1.2.0') +gtk = dependency('gtk+-3.0', version: '>= 2.4') +x11 = dependency('x11', version: '>= 1.6') +json_glib = dependency('json-glib-1.0', version: '>= 1.0') + +core_dir = meson.current_source_dir() / '../../core' +common_dir = meson.current_source_dir() / '../../common' + +kmnkbp_lib = cc.find_library( + 'libkmnkbp0', + dirs: [ core_dir / 'build/arch' / get_option('buildtype') / 'src' ] +) + +env = find_program('env') + +# Check if we have patched ibus (https://github.com/ibus/ibus/pull/2440) +if cc.has_header_symbol('ibus.h', 'IBUS_CAP_PREFILTER', dependencies: [ibus], required: false) + conf.set('IBUS_HAS_PREFILTER', 1) +endif + +conf.set('HAVE_CONFIG_H', 1) +configure_file(output : 'config.h', + configuration : conf) + +core_include_dirs = [ + include_directories('../../core/src'), + include_directories('../../core/src/kmx'), + include_directories('../../common/include'), +] + +subdir('icons') +subdir('src') +subdir('tests') diff --git a/linux/ibus-keyman/src/Makefile.am b/linux/ibus-keyman/src/Makefile.am index 95361020c5..ce9f72640a 100644 --- a/linux/ibus-keyman/src/Makefile.am +++ b/linux/ibus-keyman/src/Makefile.am @@ -50,11 +50,11 @@ TESTS = \ $(NULL) print_kmp_SOURCES = \ - print_kmp.c + test/print_kmp.c print_kmpdetails_SOURCES = \ kmpdetails.c \ - print_kmpdetails.c \ + test/print_kmpdetails.c \ $(NULL) print_kmpdetails_CFLAGS = \ $(AM_CFLAGS) \ diff --git a/linux/ibus-keyman/src/engine.c b/linux/ibus-keyman/src/engine.c index 43b3f01213..368fe94182 100644 --- a/linux/ibus-keyman/src/engine.c +++ b/linux/ibus-keyman/src/engine.c @@ -449,8 +449,6 @@ ibus_keyman_engine_constructor( IBusEngine *engine; const gchar *engine_name; gchar *p, *abs_kmx_path; - guint cursor_pos, anchor_pos; - km_kbp_context_item *context_items; g_debug("DAR: %s", __FUNCTION__); @@ -958,7 +956,7 @@ ibus_keyman_engine_process_key_event( km_kbp_context *context = km_kbp_state_context(keyman->state); g_free(get_current_context_text(context)); g_message("DAR: %s - km_mod_state=0x%x", __FUNCTION__, km_mod_state); - km_kbp_status event_status = km_kbp_process_event(keyman->state, keycode_to_vk[keycode], km_mod_state, isKeyDown); + km_kbp_process_event(keyman->state, keycode_to_vk[keycode], km_mod_state, isKeyDown); context = km_kbp_state_context(keyman->state); g_message("%s: after process key event", __FUNCTION__); g_free(get_current_context_text(context)); diff --git a/linux/ibus-keyman/src/keyman-service.c b/linux/ibus-keyman/src/keyman-service.c index 5d33032203..b5a30e9599 100644 --- a/linux/ibus-keyman/src/keyman-service.c +++ b/linux/ibus-keyman/src/keyman-service.c @@ -1,9 +1,9 @@ /* vim:set et sts=4: */ /* - * KMFL Input Method for IBUS (The Input Bus) + * Keyman Input Method for IBUS (The Input Bus) * - * Copyright (C) 2018 SIL International + * Copyright (C) 2018-2023 SIL International * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public diff --git a/linux/ibus-keyman/src/keyman-service.h b/linux/ibus-keyman/src/keyman-service.h index d71def126b..34c4c6d324 100644 --- a/linux/ibus-keyman/src/keyman-service.h +++ b/linux/ibus-keyman/src/keyman-service.h @@ -1,9 +1,9 @@ /* vim:set et sts=4: */ /* - * KMFL Input Method for IBUS (The Input Bus) + * Keyman Input Method for IBUS (The Input Bus) * - * Copyright (C) 2018 SIL International + * Copyright (C) 2018-2023 SIL International * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public diff --git a/linux/ibus-keyman/src/keyman.xml.in b/linux/ibus-keyman/src/keyman.xml.in new file mode 100644 index 0000000000..d41cc8021c --- /dev/null +++ b/linux/ibus-keyman/src/keyman.xml.in @@ -0,0 +1,17 @@ + + + org.freedesktop.IBus.Keyman + Keyman Component + @libexecdir@/ibus-engine-keyman --ibus + @VERSION@ + Keyman Team <support@keyman.com> + GPL + https://keyman.com + ibus-keyman + + /usr/share/keyman/ + /usr/local/share/keyman/ + ~/.local/share/keyman/ + + + diff --git a/linux/ibus-keyman/src/keymanutil.h b/linux/ibus-keyman/src/keymanutil.h index 479d89476c..1c455dd167 100644 --- a/linux/ibus-keyman/src/keymanutil.h +++ b/linux/ibus-keyman/src/keymanutil.h @@ -3,9 +3,9 @@ /* * Keyman Input Method for IBUS (The Input Bus) * - * Copyright (C) 2018, 2020 SIL International + * Copyright (C) 2018-2023 SIL International * - * kmflutil is dual licensed under the MIT or GPL licenses as described below. + * keymanutil is dual licensed under the MIT or GPL licenses as described below. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/linux/ibus-keyman/src/kmpdetails.c b/linux/ibus-keyman/src/kmpdetails.c index bedd68dfd3..a6b7fbb189 100644 --- a/linux/ibus-keyman/src/kmpdetails.c +++ b/linux/ibus-keyman/src/kmpdetails.c @@ -235,7 +235,6 @@ kmp_json_status get_keyboard_details(const char *kmp_dir, const char *id, keyboa JsonParser *parser; JsonObject *object; JsonNode *root; - const gchar *value = NULL; gchar *json_file; GError *error = NULL; @@ -281,11 +280,10 @@ kmp_json_status get_keyboard_details(const char *kmp_dir, const char *id, keyboa kmp_json_status get_kmp_details(const char *kmp_dir, kmp_details *details) { JsonParser *parser; - JsonNode *root, *member_node; + JsonNode *root; JsonObject *root_object, *object; JsonArray *array; JsonNode *kmp_system, *kmp_info, *kmp_options, *kmp_files, *kmp_keyboards; - const gchar *value = NULL; gchar *kmp_json; GError *error = NULL; diff --git a/linux/ibus-keyman/src/meson.build b/linux/ibus-keyman/src/meson.build new file mode 100644 index 0000000000..708c4751ea --- /dev/null +++ b/linux/ibus-keyman/src/meson.build @@ -0,0 +1,49 @@ +util_files = files( + 'keymanutil.c', + 'keymanutil.h', + 'kmpdetails.c', + 'kmpdetails.h', +) + +engine_files = files( + 'main.c', + 'engine.c', + 'engine.h', + 'keycodes.h', + 'keyman-service.c', + 'keyman-service.h', +) + +include_dirs = [ + core_include_dirs, + include_directories('..'), + include_directories(meson.current_build_dir() / '..'), +] + +deps = [ibus, gtk, x11, json_glib, kmnkbp_lib] + +prefix = get_option('prefix') +cfg = configuration_data() +cfg.set('VERSION', meson.project_version()) +cfg.set('libexecdir', prefix / get_option('libexecdir')) + +configure_file( + configuration: cfg, + input: 'keyman.xml.in', + output: 'keyman.xml' +) + +configure_file( + configuration: cfg, + input: 'keyman-version.h.in', + output: 'keyman-version.h' +) + +exe = executable( + 'ibus-engine-keyman', + sources: [engine_files, util_files], + dependencies: deps, + include_directories: include_dirs, +) + +subdir('test') diff --git a/linux/ibus-keyman/src/test/meson.build b/linux/ibus-keyman/src/test/meson.build new file mode 100644 index 0000000000..c652d8f783 --- /dev/null +++ b/linux/ibus-keyman/src/test/meson.build @@ -0,0 +1,62 @@ +keymanutil_sources = [ + 'keymanutil_tests.c', + util_files, +] + +keymanutil_deps = [ibus, gtk, x11, json_glib, kmnkbp_lib] + +test_env = [ + 'G_TEST_SRCDIR=' + meson.current_source_dir(), + 'G_TEST_BUILDDIR=' + meson.current_build_dir(), +] + +test_include_dirs = [ + include_dirs, + include_directories('..'), + include_directories(meson.current_build_dir() / '..'), +] + +executable( + 'keymanutil-tests', + sources: keymanutil_sources, + dependencies: keymanutil_deps, + include_directories : test_include_dirs +) + +test( + 'keymanutil-tests', + find_program('run-tests.sh'), + env: test_env, + protocol: 'tap', +) + +test( + 'print-kmpdetails-test', + executable( + 'print_kmpdetails', + sources: [ + 'print_kmpdetails.c', + '../kmpdetails.c' + ], + dependencies: [ json_glib ], + include_directories: test_include_dirs + ), + args: [ meson.current_source_dir() ], + env: test_env, + protocol: 'exitcode', +) + +test( + 'print-kmp-test', + executable( + 'print_kmp', + sources: [ + 'print_kmp.c', + ], + dependencies: [ json_glib ], + include_directories: test_include_dirs + ), + args: [ meson.current_source_dir() / 'kmp.json' ], + env: test_env, + protocol: 'exitcode', +) diff --git a/linux/ibus-keyman/src/print_kmp.c b/linux/ibus-keyman/src/test/print_kmp.c similarity index 99% rename from linux/ibus-keyman/src/print_kmp.c rename to linux/ibus-keyman/src/test/print_kmp.c index e98c45b35b..80891de371 100644 --- a/linux/ibus-keyman/src/print_kmp.c +++ b/linux/ibus-keyman/src/test/print_kmp.c @@ -131,7 +131,6 @@ main (gint argc, gchar **argv) struct stat filestat; JsonParser *parser; JsonNode *root; - JsonReader *reader; JsonObject *object; JsonArray *array; JsonNode *kmp_system, *kmp_info, *kmp_options, *kmp_files, *kmp_keyboards; diff --git a/linux/ibus-keyman/src/print_kmpdetails.c b/linux/ibus-keyman/src/test/print_kmpdetails.c similarity index 100% rename from linux/ibus-keyman/src/print_kmpdetails.c rename to linux/ibus-keyman/src/test/print_kmpdetails.c diff --git a/linux/ibus-keyman/src/test/run-tests.sh b/linux/ibus-keyman/src/test/run-tests.sh index 04b78a95fe..932f64b886 100755 --- a/linux/ibus-keyman/src/test/run-tests.sh +++ b/linux/ibus-keyman/src/test/run-tests.sh @@ -1,6 +1,6 @@ #!/bin/bash -SRCDIR=${top_srcdir:-$(realpath $(dirname $0)/../..)} +SRCDIR=${top_srcdir:-$(realpath "$(dirname $0)/../..")} PID_FILE=/tmp/keymanutil-tests-pids if [ -v KEYMAN_PKG_BUILD ]; then @@ -12,19 +12,20 @@ if [ -v KEYMAN_PKG_BUILD ]; then exit 0 fi + if ! which Xvfb > /dev/null || ! which Xephyr > /dev/null || ! which metacity > /dev/null; then - echo "Please install Xvfb, Xephyr and metacity before running these tests!" + echo "# Please install Xvfb, Xephyr and metacity before running these tests!" exit 1 fi function cleanup() { if [ -f $PID_FILE ]; then echo - echo "Shutting down processes..." + echo "# Shutting down processes..." bash $PID_FILE > /dev/null 2>&1 rm $PID_FILE - rm -rf $TEMP_DATA_DIR - echo "Finished shutdown of processes." + rm -rf "$TEMP_DATA_DIR" + echo "# Finished shutdown of processes." fi } @@ -32,15 +33,15 @@ echo > $PID_FILE trap cleanup EXIT SIGINT -echo "Starting Xvfb..." +echo "# Starting Xvfb..." Xvfb -screen 0 1024x768x24 :33 &> /dev/null & echo "kill -9 $!" >> $PID_FILE sleep 1 -echo "Starting Xephyr..." +echo "# Starting Xephyr..." DISPLAY=:33 Xephyr :32 -screen 1024x768 &> /dev/null & echo "kill -9 $!" >> $PID_FILE sleep 1 -echo "Starting metacity" +echo "# Starting metacity" metacity --display=:32 &> /dev/null & echo "kill -9 $!" >> $PID_FILE @@ -51,10 +52,10 @@ TEMP_DATA_DIR=$(mktemp --directory) SCHEMA_DIR=$TEMP_DATA_DIR/glib-2.0/schemas export XDG_DATA_DIRS=$TEMP_DATA_DIR:$XDG_DATA_DIRS -mkdir -p $SCHEMA_DIR -cp $SRCDIR/../keyman-config/com.keyman.gschema.xml $SCHEMA_DIR/ -glib-compile-schemas $SCHEMA_DIR +mkdir -p "$SCHEMA_DIR" +cp "$SRCDIR/../keyman-config/com.keyman.gschema.xml" "$SCHEMA_DIR/" +glib-compile-schemas "$SCHEMA_DIR" export GSETTINGS_BACKEND=memory -./keymanutil-tests $@ +${G_TEST_BUILDDIR:-.}/keymanutil-tests "$@" diff --git a/linux/ibus-keyman/tests/README.md b/linux/ibus-keyman/tests/README.md index 8088f2f534..f7537a79fd 100644 --- a/linux/ibus-keyman/tests/README.md +++ b/linux/ibus-keyman/tests/README.md @@ -13,7 +13,7 @@ The tests get run as part of building `ibus-keyman`, more specifically when runn All tests can be run with the test script: ```bash -./run-tests.sh +scripts/run-tests.sh ``` ### Run specific tests @@ -22,5 +22,5 @@ To run a single test you pass the testname (as found in `core/build/arch/*/tests/unit/kmx`). Multiple tests should be separated by space. ```bash -./run-tests.sh -- k_000___null_keyboard k_005___nul_with_initial_context +scripts/run-tests.sh -- k_000___null_keyboard k_005___nul_with_initial_context ``` diff --git a/linux/ibus-keyman/tests/ibusimcontext.c b/linux/ibus-keyman/tests/ibusimcontext.c index 1585879aa8..dc83cf8b97 100644 --- a/linux/ibus-keyman/tests/ibusimcontext.c +++ b/linux/ibus-keyman/tests/ibusimcontext.c @@ -28,9 +28,7 @@ // simplyfying the code a bit by replacing async calls with direct synchronous // method calls. -#ifdef HAVE_CONFIG_H #include -#endif #ifndef IBUS_HAS_PREFILTER #warning Compiling against ibus version that does not include prefilter mask patch (https://github.com/ibus/ibus/pull/2440). Output ordering guarantees will be disabled. @@ -97,7 +95,6 @@ typedef struct _timeout_data { static GtkIMContext *_focus_im_context = NULL; static IBusInputContext *_fake_context = NULL; static GdkWindow *_input_window = NULL; -static GtkWidget *_input_widget = NULL; /* functions prototype */ static void ibus_im_context_class_init(IBusIMContextClass *class); @@ -185,22 +182,6 @@ ibus_im_context_new(void) { return IBUS_IM_CONTEXT(obj); } -static gboolean -_focus_in_cb(GtkWidget *widget, GdkEventFocus *event, gpointer user_data) { - if (_focus_im_context == NULL && _fake_context != NULL) { - ibus_input_context_focus_in(_fake_context); - } - return FALSE; -} - -static gboolean -_focus_out_cb(GtkWidget *widget, GdkEventFocus *event, gpointer user_data) { - if (_focus_im_context == NULL && _fake_context != NULL) { - ibus_input_context_focus_out(_fake_context); - } - return FALSE; -} - static gboolean ibus_im_context_commit_event(IBusIMContext *ibusimcontext, GdkEventKey *event) { IDEBUG("%s", __FUNCTION__); @@ -333,20 +314,6 @@ _set_content_type(IBusIMContext *context) { return TRUE; } -static gboolean -_get_boolean_env(const gchar *name, gboolean defval) { - const gchar *value = g_getenv(name); - - if (value == NULL) - return defval; - - if (g_strcmp0(value, "") == 0 || g_strcmp0(value, "0") == 0 || g_strcmp0(value, "false") == 0 || - g_strcmp0(value, "False") == 0 || g_strcmp0(value, "FALSE") == 0) - return FALSE; - - return TRUE; -} - static void daemon_name_appeared(GDBusConnection *connection, const gchar *name, const gchar *owner, gpointer data) { if (!g_strcmp0(ibus_bus_get_service_name(_bus), IBUS_SERVICE_PORTAL)) { diff --git a/linux/ibus-keyman/tests/meson.build b/linux/ibus-keyman/tests/meson.build new file mode 100644 index 0000000000..1e5db19573 --- /dev/null +++ b/linux/ibus-keyman/tests/meson.build @@ -0,0 +1,142 @@ +test_files = [ + 'ibusimcontext.c', + 'ibusimcontext.h', + 'testfixture.cpp', + 'testmodule.c', + 'testmodule.h', +] + +kmx_dir = [ + core_dir / 'build/arch' / get_option('buildtype') / 'tests/unit/kmx' +] + +kmnkbp_tests_lib = cc.find_library( + 'libkmnkbp-tests', + dirs: kmx_dir +) + +deps = [ibus, gtk, x11, json_glib, kmnkbp_lib, kmnkbp_tests_lib] + +test_env = [ + 'G_TEST_SRCDIR=' + meson.current_source_dir(), + 'G_TEST_BUILDDIR=' + meson.current_build_dir(), +] + +test_include_dirs = [ + core_include_dirs, + include_directories('../../../core/tests/unit/kmx'), + include_directories('../src'), + include_directories('..'), +] + +test_exe = executable( + 'ibus-keyman-tests', + test_files, util_files, + dependencies: deps, + include_directories: test_include_dirs, +) + +env_file = '/tmp/env.txt' +pid_file = '/tmp/ibus-keyman-test-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']) +run_test = find_program('run-single-test.sh', dirs: [meson.current_source_dir() / 'scripts']) +find_tests = find_program('find-tests.sh', dirs: [meson.current_source_dir() / 'scripts']) + +test( + 'setup-x11', + setup_tests, + args: ['--x11', env_file, pid_file], + env: test_env, + priority: -10, + is_parallel: false, + protocol: 'exitcode' +) + +test( + 'setup-wayland', + setup_tests, + args: ['--wayland', env_file, pid_file], + env: test_env, + priority: -20, + is_parallel: false, + protocol: 'exitcode' +) + +test( + 'teardown-x11', + teardown_tests, + args: [pid_file], + priority: -19, + is_parallel: false, + protocol: 'exitcode' +) + +test( + 'teardown-wayland', + teardown_tests, + args: [pid_file], + priority: -29, + is_parallel: false, + protocol: 'exitcode' +) + +kmxtest_files = run_command( + find_tests, + kmx_dir, + check: true, +).stdout().split('\n') + +foreach kmx: kmxtest_files + filename = kmx.split('\t') + if filename[0] == '' + continue + endif + testname = filename[1].split('.kmx')[0] + test_args = [ '--tap', '-k', '--env', env_file, '--', filename] + test( + 'X11-' + testname + '__surrounding-text', + run_test, + args: [ '--x11', '--surrounding-text', test_args], + env: test_env, + depends: [test_exe], + priority: -11, + is_parallel: false, + timeout: 120, + protocol: 'tap', + ) + test( + 'X11-' + testname + '__no-surrounding-text', + run_test, + args: [ '--x11', '--no-surrounding-text', test_args], + env: test_env, + depends: [test_exe], + priority: -12, + is_parallel: false, + timeout: 120, + protocol: 'tap', + ) + test( + 'Wayland-' + testname + '__surrounding-text', + run_test, + args: [ '--wayland', '--surrounding-text', test_args], + env: test_env, + depends: [test_exe], + priority: -21, + is_parallel: false, + timeout: 120, + protocol: 'tap', + ) + test( + 'Wayland-' + testname + '__no-surrounding-text', + run_test, + args: [ '--wayland', '--no-surrounding-text', test_args], + env: test_env, + depends: [test_exe], + priority: -22, + is_parallel: false, + timeout: 120, + protocol: 'tap', + ) +endforeach diff --git a/linux/ibus-keyman/tests/scripts/find-tests.sh b/linux/ibus-keyman/tests/scripts/find-tests.sh new file mode 100755 index 0000000000..502cbab55f --- /dev/null +++ b/linux/ibus-keyman/tests/scripts/find-tests.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -eu +while [ -n "$1" ]; do + if [ ! -d "$1" ]; then + shift + continue + fi + pushd "$1" > /dev/null + while IFS= read -r -d '' file; do + testname=$(basename "$file" .kmx) + #shellcheck disable=SC2059 + printf "$(basename "$file")\t${testname#k_}\n" + done < <(find . -name \*.kmx -print0 | sort -z) + popd > /dev/null + exit 0 +done diff --git a/linux/ibus-keyman/tests/scripts/run-single-test.sh b/linux/ibus-keyman/tests/scripts/run-single-test.sh new file mode 100755 index 0000000000..c265c27ccd --- /dev/null +++ b/linux/ibus-keyman/tests/scripts/run-single-test.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +TESTDIR=${XDG_DATA_HOME:-$HOME/.local/share}/keyman/test_kmx + +. "$(dirname "$0")"/test-helper.sh + +if [ -v KEYMAN_PKG_BUILD ]; then + # During package builds we skip these tests that require to start ibus because + # ibus requires to find /var/lib/dbus/machine-id or /etc/machine-id, otherwise it fails with: + # "Bail out! IBUS-FATAL-WARNING: Unable to load /var/lib/dbus/machine-id: Failed to open file + # “/var/lib/dbus/machine-id”: No such file or directory" + echo "1..1" + echo "ok 1 - Integration tests # SKIP on package build" + exit 0 +fi + +if ! which Xvfb > /dev/null || ! which Xephyr > /dev/null || ! which metacity > /dev/null || ! which mutter > /dev/null; then + echo "Please install Xvfb, Xephyr, metacity and mutter before running these tests!" + exit 1 +fi + +function help() { + echo "Usage:" + echo " $0 [--env ] [-k] [--tap] [--surrounding-text] [--no-surrounding-text] [--wayland|--x11] [--] TEST" + echo + echo "Arguments:" + echo " --help, -h, -? Display this help" + echo " --verbose, -v Run tests verbosely" + echo " --debug debug test logging output" + echo " -k passed to GLib testing framework" + echo " --tap output in TAP format. Passed to GLib testing framework" + echo " --surrounding-text run tests with surrounding texts enabled" + echo " --no-surrounding-text run tests without support for surrounding text" + echo " --wayland run tests with Wayland" + echo " --x11 run tests with X11" + echo " --env Name of the file containing environment variables to use" + exit 0 +} + +function run_tests() { + echo "# NOTE: When the tests fail check /tmp/ibus-engine-keyman.log and /tmp/ibus-daemon.log!" + echo "" + + echo "# Starting tests..." + # Note: -k and --tap are consumed by the GLib testing framework + # shellcheck disable=SC2086 + "${G_TEST_BUILDDIR:-.}"/ibus-keyman-tests ${ARG_K-} ${ARG_TAP-} \ + ${ARG_VERBOSE-} ${ARG_DEBUG-} ${ARG_SURROUNDING_TEXT-} ${ARG_NO_SURROUNDING_TEXT-} \ + --directory "$TESTDIR" ${ARG_DISPLAY_SERVER} "$TESTFILE" + echo "# Finished tests." +} + +while (( $# )); do + case $1 in + --help|-h|-\?) help ;; + -k) ARG_K=$1 ;; + --tap) ARG_TAP=$1 ;; + --surrounding-text) ARG_SURROUNDING_TEXT=$1 ;; + --no-surrounding-text) ARG_NO_SURROUNDING_TEXT=$1 ;; + --wayland) ARG_DISPLAY_SERVER=$1 ;; + --x11) ARG_DISPLAY_SERVER=$1 ;; + --verbose|-v) ARG_VERBOSE=--verbose;; + --debug) ARG_DEBUG=--debug-log;; + --env) shift ; ARG_ENV=$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 source=/dev/null +. "$ARG_ENV" + +run_tests diff --git a/linux/ibus-keyman/tests/scripts/run-tests.sh b/linux/ibus-keyman/tests/scripts/run-tests.sh new file mode 100755 index 0000000000..b80dd1a5f4 --- /dev/null +++ b/linux/ibus-keyman/tests/scripts/run-tests.sh @@ -0,0 +1,206 @@ +#!/usr/bin/env bash + +TOP_SRCDIR=${top_srcdir:-$(realpath "$(dirname "$0")/..")} +TESTDIR=${XDG_DATA_HOME:-$HOME/.local/share}/keyman/test_kmx + +. "$(dirname "$0")"/test-helper.sh + +if [ -v KEYMAN_PKG_BUILD ]; then + # During package builds we skip these tests that require to start ibus because + # ibus requires to find /var/lib/dbus/machine-id or /etc/machine-id, otherwise it fails with: + # "Bail out! IBUS-FATAL-WARNING: Unable to load /var/lib/dbus/machine-id: Failed to open file + # “/var/lib/dbus/machine-id”: No such file or directory" + echo "1..1" + echo "ok 1 - Integration tests # SKIP on package build" + exit 0 +fi + +if ! which Xvfb > /dev/null || ! which Xephyr > /dev/null || ! which metacity > /dev/null || ! which mutter > /dev/null; then + echo "Please install Xvfb, Xephyr, metacity and mutter before running these tests!" + exit 1 +fi + +function cleanup() { + if [ -f "$PID_FILE" ]; then + echo + echo "# Shutting down processes..." + bash "$PID_FILE" > /dev/null 2>&1 + rm "$PID_FILE" + echo "# Finished shutdown of processes." + fi +} + +function help() { + echo "Usage:" + echo " $0 [-k] [--tap] [--surrounding-text] [--no-surrounding-text] [--no-wayland] [--no-x11] [[--] TEST...]" + echo + echo "Arguments:" + echo " --help, -h, -? Display this help" + echo " --verbose, -v Run tests verbosely" + echo " --debug debug test logging output" + echo " -k passed to GLib testing framework" + echo " --tap output in TAP format. Passed to GLib testing framework" + echo " --surrounding-text run tests with surrounding texts enabled" + echo " --no-surrounding-text run tests without support for surrounding text" + echo " --no-wayland don't run tests with Wayland" + echo " --no-x11 don't run tests with X11" + echo + echo "If no TESTs are specified then all tests are run." + echo "If neither --surrounding-text nor --no-surrounding-text are specified then the tests run with both settings." + exit 0 +} + +function run_tests() { + DISPLAY_SERVER=$1 + shift + + echo > "$PID_FILE" + TEMP_DATA_DIR=$(mktemp --directory) + echo "rm -rf ${TEMP_DATA_DIR}" >> "$PID_FILE" + + COMMON_ARCH_DIR= + [ -d "${TOP_SRCDIR}"/../../core/build/arch ] && COMMON_ARCH_DIR=${TOP_SRCDIR}/../../core/build/arch + [ -d "${TOP_SRCDIR}"/../keyboardprocessor/arch ] && COMMON_ARCH_DIR=${TOP_SRCDIR}/../keyboardprocessor/arch + + if [ -d "${COMMON_ARCH_DIR}"/release ]; then + COMMON_ARCH_DIR=${COMMON_ARCH_DIR}/release + elif [ -d "${COMMON_ARCH_DIR}"/debug ]; then + COMMON_ARCH_DIR=${COMMON_ARCH_DIR}/debug + else + echo "Can't find neither ${COMMON_ARCH_DIR}/release nor ${COMMON_ARCH_DIR}/debug" + exit 2 + fi + + if [ ! -d "$TESTDIR" ] || ! [[ $(find "${TESTDIR}/" -name \*.kmx 2>/dev/null | wc -l) -gt 0 ]]; then + if [[ $(find "${COMMON_ARCH_DIR}/tests/unit/kmx/" -name \*.kmx 2>/dev/null | wc -l) -gt 0 ]]; then + mkdir -p "$(realpath --canonicalize-missing "$TESTDIR"/..)" + ln -sf "$(realpath "${COMMON_ARCH_DIR}"/tests/unit/kmx)" "$TESTDIR" + else + echo "Can't find kmx files in ${COMMON_ARCH_DIR}/tests/unit/kmx" + exit 3 + fi + fi + + echo "# NOTE: When the tests fail check /tmp/ibus-engine-keyman.log and /tmp/ibus-daemon.log!" + echo "" + + if [ "$DISPLAY_SERVER" == "wayland" ]; then + if ! can_run_wayland; then + # support for --headless got added in mutter 40.x + echo "ERROR: mutter doesn't support running headless. Can't run Wayland tests." + exit 7 + fi + echo "# Running on Wayland..." + 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 $!" >> "$PID_FILE" + sleep 1s + export WAYLAND_DISPLAY + WAYLAND_DISPLAY=$(cat "$TMPFILE" | grep "Using Wayland display" | cut -d"'" -f2) + rm "$TMPFILE" + else + echo "# Starting Xvfb..." + Xvfb -screen 0 1024x768x24 :33 &> /dev/null & + echo "kill -9 $!" >> "$PID_FILE" + sleep 1 + echo "# Starting Xephyr..." + DISPLAY=:33 Xephyr :32 -screen 1024x768 &> /dev/null & + echo "kill -9 $!" >> "$PID_FILE" + sleep 1 + echo "# Starting metacity" + metacity --display=:32 &> /dev/null & + echo "kill -9 $!" >> "$PID_FILE" + + export DISPLAY=:32 + fi + + # Install schema to temporary directory. This removes the build dependency on the keyman package. + SCHEMA_DIR=$TEMP_DATA_DIR/glib-2.0/schemas + export XDG_DATA_DIRS=$TEMP_DATA_DIR:$XDG_DATA_DIRS + + mkdir -p "$SCHEMA_DIR" + cp "${TOP_SRCDIR}"/../keyman-config/com.keyman.gschema.xml "$SCHEMA_DIR"/ + glib-compile-schemas "$SCHEMA_DIR" + + if [ $# -gt 0 ]; then + TESTFILES=($@) + else + pushd "$TESTDIR" > /dev/null || exit + TESTFILES=(*.kmx) + popd > /dev/null || exit + fi + + export LD_LIBRARY_PATH=${COMMON_ARCH_DIR}/src:$LD_LIBRARY_PATH + + # Ubuntu 18.04 Bionic doesn't have ibus-memconf, and glib is not compiled with the keyfile + # backend enabled, so we just use the default backend. Otherwise we use the keyfile + # store which interferes less when running on a dev machine. + if [ -f /usr/libexec/ibus-memconf ]; then + export GSETTINGS_BACKEND=keyfile + IBUS_CONFIG=--config=/usr/libexec/ibus-memconf + fi + + ibus-daemon "${ARG_VERBOSE-}" --panel=disable ${IBUS_CONFIG-} &> /tmp/ibus-daemon.log & + echo "kill -9 $!" >> "$PID_FILE" + sleep 1s + + ../src/ibus-engine-keyman "${ARG_VERBOSE-}" &> /tmp/ibus-engine-keyman.log & + echo "kill -9 $!" >> "$PID_FILE" + sleep 1s + + echo "# Starting tests..." + # Note: -k and --tap are consumed by the GLib testing framework + "${G_TEST_BUILDDIR:-.}"/ibus-keyman-tests "${ARG_K-}" "${ARG_TAP-}" \ + "${ARG_VERBOSE-}" "${ARG_DEBUG-}" "${ARG_SURROUNDING_TEXT-}" "${ARG_NO_SURROUNDING_TEXT-}" \ + --directory "$TESTDIR" --"${DISPLAY_SERVER}" "${TESTFILES[@]}" + echo "# Finished tests." + + cleanup +} + +USE_WAYLAND=1 +USE_X11=1 + +while (( $# )); do + case $1 in + --help|-h|-\?) help ;; + -k) ARG_K=$1 ;; + --tap) ARG_TAP=$1 ;; + --surrounding-text) ARG_SURROUNDING_TEXT=$1 ;; + --no-surrounding-text) ARG_NO_SURROUNDING_TEXT=$1 ;; + --no-wayland) USE_WAYLAND=0;; + --no-x11) USE_X11=0;; + --verbose|-v) ARG_VERBOSE=--verbose;; + --debug) ARG_DEBUG=--debug-log;; + --) shift && 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 + +if ! can_run_wayland; then + # support for --headless got added in mutter 40.x + echo "# WARNING: mutter doesn't support running headless. Skipping Wayland tests." + USE_WAYLAND=0 + if [ "$USE_X11" == "0" ]; then + echo "ERROR: no tests to run. Can't run Wayland tests, and --no-x11 is specified." + exit 8 + fi +fi + +if [ "$USE_WAYLAND" == "0" ] && [ "$USE_X11" == "0" ]; then + echo "ERROR: I'll have to run somewhere. Specifying both --no-wayland and --no-x11 is not allowed." + exit 6 +fi + +echo > "$PID_FILE" +trap cleanup EXIT SIGINT + +if [ "$USE_WAYLAND" == "1" ]; then + run_tests wayland "$@" +fi + +if [ "$USE_X11" == "1" ]; then + run_tests x11 "$@" +fi diff --git a/linux/ibus-keyman/tests/scripts/setup-tests.sh b/linux/ibus-keyman/tests/scripts/setup-tests.sh new file mode 100755 index 0000000000..e48d36eba9 --- /dev/null +++ b/linux/ibus-keyman/tests/scripts/setup-tests.sh @@ -0,0 +1,111 @@ +#!/usr/bin/env bash +DISPLAY_SERVER=$1 +ENV_FILE=$2 +PID_FILE=$3 + +TOP_SRCDIR=${G_TEST_SRCDIR:-$(realpath "$(dirname "$0")/..")}/.. +TOP_BINDIR=${G_TEST_BUILDDIR:-$(realpath "$(dirname "$0/..")")}/.. +TESTDIR=${XDG_DATA_HOME:-$HOME/.local/share}/keyman/test_kmx + +. "$(dirname "$0")/"/test-helper.sh + +echo > "$ENV_FILE" + +if [ -f "$PID_FILE" ]; then + # kill previous instances + "$(dirname "$0")"/teardown-tests.sh "$PID_FILE" +fi + +echo > "$PID_FILE" +TEMP_DATA_DIR=$(mktemp --directory) +echo "rm -rf ${TEMP_DATA_DIR}" >> "$PID_FILE" + +COMMON_ARCH_DIR= +[ -d "${TOP_SRCDIR}"/../../core/build/arch ] && COMMON_ARCH_DIR=${TOP_SRCDIR}/../../core/build/arch +[ -d "${TOP_SRCDIR}"/../keyboardprocessor/arch ] && COMMON_ARCH_DIR=${TOP_SRCDIR}/../keyboardprocessor/arch + +if [ -d "${COMMON_ARCH_DIR}"/release ]; then + COMMON_ARCH_DIR=${COMMON_ARCH_DIR}/release +elif [ -d "${COMMON_ARCH_DIR}"/debug ]; then + COMMON_ARCH_DIR=${COMMON_ARCH_DIR}/debug +else + echo "Can't find neither ${COMMON_ARCH_DIR}/release nor ${COMMON_ARCH_DIR}/debug" + exit 2 +fi + +if [ ! -d "$TESTDIR" ] || ! [[ $(find "${TESTDIR}/" -name \*.kmx 2>/dev/null | wc -l) -gt 0 ]]; then + if [[ $(find "${COMMON_ARCH_DIR}/tests/unit/kmx/" -name \*.kmx 2>/dev/null | wc -l) -gt 0 ]]; then + mkdir -p "$(realpath --canonicalize-missing "$TESTDIR"/..)" + ln -sf "$(realpath "${COMMON_ARCH_DIR}"/tests/unit/kmx)" "$TESTDIR" + else + echo "Can't find kmx files in ${COMMON_ARCH_DIR}/tests/unit/kmx" + exit 3 + fi +fi + +if [ "$DISPLAY_SERVER" == "wayland" ]; then + if ! can_run_wayland; then + # support for --headless got added in mutter 40.x + echo "ERROR: mutter doesn't support running headless. Can't run Wayland tests." + exit 7 + fi + echo "Running on Wayland..." + 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 $!" >> "$PID_FILE" + sleep 1s + export WAYLAND_DISPLAY + WAYLAND_DISPLAY=$(grep "Using Wayland display" "$TMPFILE" | cut -d"'" -f2) + rm "$TMPFILE" + echo "export WAYLAND_DISPLAY=\"$WAYLAND_DISPLAY\"" >> "$ENV_FILE" +else + echo "Starting Xvfb..." + Xvfb -screen 0 1024x768x24 :33 &> /dev/null & + echo "kill -9 $!" >> "$PID_FILE" + sleep 1 + echo "Starting Xephyr..." + DISPLAY=:33 Xephyr :32 -screen 1024x768 &> /dev/null & + echo "kill -9 $!" >> "$PID_FILE" + sleep 1 + echo "Starting metacity" + metacity --display=:32 &> /dev/null & + echo "kill -9 $!" >> "$PID_FILE" + + export DISPLAY=:32 + echo "export DISPLAY=\"$DISPLAY\"" >> "$ENV_FILE" +fi + + # Install schema to temporary directory. This removes the build dependency on the keyman package. + SCHEMA_DIR=$TEMP_DATA_DIR/glib-2.0/schemas + export XDG_DATA_DIRS=$TEMP_DATA_DIR:$XDG_DATA_DIRS + echo "export XDG_DATA_DIRS=\"$XDG_DATA_DIRS\"" >> "$ENV_FILE" + + mkdir -p "$SCHEMA_DIR" + cp "${TOP_SRCDIR}"/../keyman-config/com.keyman.gschema.xml "$SCHEMA_DIR"/ + glib-compile-schemas "$SCHEMA_DIR" + + export LD_LIBRARY_PATH=${COMMON_ARCH_DIR}/src:$LD_LIBRARY_PATH + echo "export LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH\"" >> "$ENV_FILE" + + # Ubuntu 18.04 Bionic doesn't have ibus-memconf, and glib is not compiled with the keyfile + # backend enabled, so we just use the default backend. Otherwise we use the keyfile + # store which interferes less when running on a dev machine. + if [ -f /usr/libexec/ibus-memconf ]; then + export GSETTINGS_BACKEND=keyfile + echo "export GSETTINGS_BACKEND=\"$GSETTINGS_BACKEND\"" >> "$ENV_FILE" + IBUS_CONFIG=--config=/usr/libexec/ibus-memconf + fi + + ibus-daemon "${ARG_VERBOSE-}" --daemonize --panel=disable ${IBUS_CONFIG-} &> /tmp/ibus-daemon.log + echo "kill -9 $!" >> "$PID_FILE" + sleep 1s + + IBUS_ADDRESS=$(ibus address) + export IBUS_ADDRESS + + echo "export IBUS_ADDRESS=\"$IBUS_ADDRESS\"" >> "$ENV_FILE" + + "${TOP_BINDIR}"/src/ibus-engine-keyman "${ARG_VERBOSE-}" &> /tmp/ibus-engine-keyman.log & + echo "kill -9 $!" >> "$PID_FILE" + sleep 1s diff --git a/linux/ibus-keyman/tests/scripts/teardown-tests.sh b/linux/ibus-keyman/tests/scripts/teardown-tests.sh new file mode 100755 index 0000000000..489769d721 --- /dev/null +++ b/linux/ibus-keyman/tests/scripts/teardown-tests.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +PID_FILE=$1 + +echo "Shutting down processes..." +bash "$PID_FILE" > /dev/null 2>&1 +rm "$PID_FILE" +echo "Finished shutdown of processes." diff --git a/linux/ibus-keyman/tests/scripts/test-helper.sh b/linux/ibus-keyman/tests/scripts/test-helper.sh new file mode 100755 index 0000000000..92c8a7e528 --- /dev/null +++ b/linux/ibus-keyman/tests/scripts/test-helper.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +function can_run_wayland() { + local MUTTER_VERSION + MUTTER_VERSION=$(mutter --version | head -1 | cut -f2 -d' ' | cut -f1 -d'.') + if (( MUTTER_VERSION < 40 )); then + return 1 + else + return 0 + fi +} diff --git a/linux/ibus-keyman/tests/testfixture.cpp b/linux/ibus-keyman/tests/testfixture.cpp index 9d4d9ca9b0..5f811572d0 100644 --- a/linux/ibus-keyman/tests/testfixture.cpp +++ b/linux/ibus-keyman/tests/testfixture.cpp @@ -184,7 +184,7 @@ string_format(const std::string &format, Args... args) { } static unsigned short vk_to_keycode(unsigned short vk) { - for (int i = 0; i < sizeof(keycode_to_vk); i++) { + for (int i = 0; i < (int)sizeof(keycode_to_vk); i++) { if (keycode_to_vk[i] == vk) return i; } diff --git a/linux/ibus-keyman/tests/testmodule.c b/linux/ibus-keyman/tests/testmodule.c index 4e32573d94..663edafb55 100644 --- a/linux/ibus-keyman/tests/testmodule.c +++ b/linux/ibus-keyman/tests/testmodule.c @@ -5,6 +5,10 @@ #include #include "testmodule.h" +static GType test_module_get_type(void); + +#define TEST_TYPE_MODULE (test_module_get_type()) + static gboolean test_module_load(GTypeModule *module) { TestModule *test_module = TEST_MODULE(module); diff --git a/linux/ibus-keyman/tests/testmodule.h b/linux/ibus-keyman/tests/testmodule.h index 465ec6e6be..cebc648bc1 100644 --- a/linux/ibus-keyman/tests/testmodule.h +++ b/linux/ibus-keyman/tests/testmodule.h @@ -6,7 +6,6 @@ G_BEGIN_DECLS typedef struct _TestModule TestModule; typedef struct _TestModuleClass TestModuleClass; -#define TEST_TYPE_MODULE (test_module_get_type()) #define TEST_MODULE(module) (G_TYPE_CHECK_INSTANCE_CAST((module), TEST_TYPE_MODULE, TestModule)) #define TEST_MODULE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), TEST_TYPE_MODULE, TestModuleClass)) #define TEST_IS_MODULE(module) (G_TYPE_CHECK_INSTANCE_TYPE((module), TEST_TYPE_MODULE)) @@ -24,7 +23,6 @@ struct _TestModuleClass { GTypeModuleClass parent_class; }; -static GType test_module_get_type(void); GTypeModule* test_module_new(TestModuleRegisterFunc register_func); void test_module_unuse(GTypeModule* test_module); diff --git a/linux/keyman-config/keyman_config/install_kmp.py b/linux/keyman-config/keyman_config/install_kmp.py index 19f3d218af..0caa9ac0fc 100755 --- a/linux/keyman-config/keyman_config/install_kmp.py +++ b/linux/keyman-config/keyman_config/install_kmp.py @@ -173,7 +173,7 @@ class InstallKmp(): f['name']) checkandsaveico(fpath) elif ftype == KMFileTypes.KM_SOURCE: - # TODO for the moment just leave it for ibus-kmfl to ignore if it doesn't load + # TODO for the moment just leave it for ibus-keyman to ignore if it doesn't load pass elif ftype == KMFileTypes.KM_KMX: # Sanitize keyboard filename if not lower case diff --git a/linux/keyman-config/locale/ff_ZA.po b/linux/keyman-config/locale/ff_ZA.po index c20f361d9c..04de8a26cb 100644 --- a/linux/keyman-config/locale/ff_ZA.po +++ b/linux/keyman-config/locale/ff_ZA.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: keyman\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-08-19 19:17+0200\n" -"PO-Revision-Date: 2022-10-25 04:29\n" +"PO-Revision-Date: 2023-02-17 01:51\n" "Last-Translator: \n" "Language-Team: Fula\n" "Language: ff_ZA\n" diff --git a/linux/keyman-config/locale/kn_IN.po b/linux/keyman-config/locale/kn_IN.po index e1d4aa6bcd..7745c3c745 100644 --- a/linux/keyman-config/locale/kn_IN.po +++ b/linux/keyman-config/locale/kn_IN.po @@ -3,7 +3,7 @@ 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-01-03 04:05\n" +"PO-Revision-Date: 2023-02-07 14:38\n" "Last-Translator: \n" "Language-Team: Kannada\n" "Language: kn_IN\n" diff --git a/linux/keyman-config/locale/ru_RU.po b/linux/keyman-config/locale/ru_RU.po new file mode 100644 index 0000000000..594889818b --- /dev/null +++ b/linux/keyman-config/locale/ru_RU.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-01-24 03:09\n" +"Last-Translator: \n" +"Language-Team: Russian\n" +"Language: ru_RU\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n" +"X-Crowdin-Project: keyman\n" +"X-Crowdin-Project-ID: 386703\n" +"X-Crowdin-Language: ru\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 не доступны. Не включает отправку отчетов об ошибке." + +#: 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: ошибка: в {package} не найдено kmp.json или kmp.inf" + +#: 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: ошибка: в {packageFile} не найдено kmp.json или kmp.inf" + +#: 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} keyboard" + +#: 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 "Keyboard 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" +"на другом устройстве или поделиться онлайн" + +#: keyman_config/options.py:24 +#, python-brace-format +msgid "{packageId} Settings" +msgstr "Настройки {packageId}" + +#: keyman_config/view_installed.py:30 +msgid "Keyman Configuration" +msgstr "Настройки Keyman" + +#: 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" + +#: 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 "_OK" + diff --git a/linux/keyman-config/locale/sv_SE.po b/linux/keyman-config/locale/sv_SE.po new file mode 100644 index 0000000000..f288b17d6e --- /dev/null +++ b/linux/keyman-config/locale/sv_SE.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-01-24 02:30\n" +"Last-Translator: \n" +"Language-Team: Swedish\n" +"Language: sv_SE\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Crowdin-Project: keyman\n" +"X-Crowdin-Project-ID: 386703\n" +"X-Crowdin-Language: sv-SE\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 "Varken sentry-sdk eller raven är tillgänglig. Aktiverar inte Sentry felrapportering." + +#: keyman_config/downloadkeyboard.py:23 +msgid "Download Keyman keyboards" +msgstr "Ladda ner Keyman-tangentbord" + +#: 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 "_Stäng" + +#: 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 "Du har inte behörighet att installera tangentbordsfilerna till det delade området /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 "Du har inte behörighet att installera dokumentationen till det delade dokumentationsområdet /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 "Du har inte behörighet att installera teckensnittsfilerna till det delade teckensnittsområdet /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: fel: Ingen kmp.json eller kmp.inf hittades i {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: fel: Ingen kmp.json eller kmp.inf hittades i {packageFile}" + +#: keyman_config/install_window.py:54 +#, python-brace-format +msgid "Installing keyboard/package {keyboardid}" +msgstr "Installerar tangentbord/paket {keyboardid}" + +#: keyman_config/install_window.py:72 keyman_config/install_window.py:93 +msgid "Keyboard is installed already" +msgstr "Tangentbord är redan installerat" + +#: 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} tangentbordet är redan installerat på version {version}. Vill du avinstallera sedan installera om det?" + +#: 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} tangentbordet är redan installerat med en nyare version {installedversion}. Vill du avinstallera det och installera den äldre versionen {version}?" + +#: keyman_config/install_window.py:128 +msgid "Keyboard layouts: " +msgstr "Tangentbordslayouter: " + +#: keyman_config/install_window.py:147 +msgid "Fonts: " +msgstr "Teckensnitt: " + +#: keyman_config/install_window.py:167 keyman_config/keyboard_details.py:96 +msgid "Package version: " +msgstr "Paketversion: " + +#: keyman_config/install_window.py:179 +msgid "Author: " +msgstr "Författare: " + +#: keyman_config/install_window.py:197 +msgid "Website: " +msgstr "Webbplats: " + +#: keyman_config/install_window.py:211 +msgid "Copyright: " +msgstr "Upphovsrätt: " + +#: keyman_config/install_window.py:245 +msgid "Details" +msgstr "Detaljer" + +#: keyman_config/install_window.py:248 +msgid "README" +msgstr "LÄS DIG" + +#: keyman_config/install_window.py:256 keyman_config/view_installed.py:200 +msgid "_Install" +msgstr "_Installera" + +#: keyman_config/install_window.py:260 +msgid "_Cancel" +msgstr "_Avbryt" + +#: keyman_config/install_window.py:305 +#, python-brace-format +msgid "Keyboard {name} installed" +msgstr "Tangentbord {name} installerat" + +#: keyman_config/install_window.py:310 keyman_config/install_window.py:315 +#, python-brace-format +msgid "Keyboard {name} could not be installed." +msgstr "Tangentbord {name} kunde inte installeras." + +#: keyman_config/install_window.py:311 +msgid "Error Message:" +msgstr "Felmeddelande:" + +#: keyman_config/install_window.py:316 +msgid "Warning Message:" +msgstr "Varningsmeddelande:" + +#: keyman_config/keyboard_details.py:37 +#, python-brace-format +msgid "{name} keyboard" +msgstr "{name} keyboard" + +#: keyman_config/keyboard_details.py:53 +msgid "ERROR: Keyboard metadata is damaged.\n" +"Please \"Uninstall\" and then \"Install\" the keyboard." +msgstr "FEL: Tangentbords metadata är skadad.\n" +"Vänligen \"Avinstallera\" och sedan \"Installera\" tangentbordet." + +#: keyman_config/keyboard_details.py:74 +msgid "Package name: " +msgstr "Paketets namn: " + +#: keyman_config/keyboard_details.py:85 +msgid "Package id: " +msgstr "Paket-id: " + +#: keyman_config/keyboard_details.py:108 +msgid "Package description: " +msgstr "Paketbeskrivning: " + +#: keyman_config/keyboard_details.py:121 +msgid "Package author: " +msgstr "Paketets författare: " + +#: keyman_config/keyboard_details.py:133 +msgid "Package copyright: " +msgstr "Paketets upphovsrätt: " + +#: keyman_config/keyboard_details.py:174 +msgid "Keyboard filename: " +msgstr "Tangentbords filnamn: " + +#: keyman_config/keyboard_details.py:187 +msgid "Keyboard name: " +msgstr "Tangentbords namn: " + +#: keyman_config/keyboard_details.py:198 +msgid "Keyboard id: " +msgstr "Keyboard id: " + +#: keyman_config/keyboard_details.py:209 +msgid "Keyboard version: " +msgstr "Tangentbordsversion: " + +#: keyman_config/keyboard_details.py:221 +msgid "Keyboard author: " +msgstr "Tangentbord författare: " + +#: keyman_config/keyboard_details.py:232 +msgid "Keyboard license: " +msgstr "Tangentbord licens: " + +#: keyman_config/keyboard_details.py:243 +msgid "Keyboard description: " +msgstr "Tangentbord beskrivning: " + +#: 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 "Skanna koden för att ladda det här tangentbordet\n" +"på en annan enhet eller dela online" + +#: keyman_config/options.py:24 +#, python-brace-format +msgid "{packageId} Settings" +msgstr "{packageId} Inställningar" + +#: keyman_config/view_installed.py:30 +msgid "Keyman Configuration" +msgstr "Keyman konfiguration" + +#: keyman_config/view_installed.py:60 +msgid "Choose a kmp file..." +msgstr "Välj en TMP-fil..." + +#. i18n: file type in file selection dialog +#: keyman_config/view_installed.py:65 +msgid "KMP files" +msgstr "KMP filer" + +#. i18n: column header in table displaying installed keyboards +#: keyman_config/view_installed.py:141 +msgid "Icon" +msgstr "Ikon" + +#. i18n: column header in table displaying installed keyboards +#: keyman_config/view_installed.py:145 +msgid "Name" +msgstr "Namn" + +#. i18n: column header in table displaying installed keyboards +#: keyman_config/view_installed.py:148 +msgid "Version" +msgstr "Version" + +#: keyman_config/view_installed.py:161 +msgid "_Uninstall" +msgstr "_Avinstallera" + +#: keyman_config/view_installed.py:162 keyman_config/view_installed.py:304 +msgid "Uninstall keyboard" +msgstr "Avinstallera tangentbordet" + +#: keyman_config/view_installed.py:167 +msgid "_About" +msgstr "_Om" + +#: keyman_config/view_installed.py:168 keyman_config/view_installed.py:306 +msgid "About keyboard" +msgstr "Om tangentbordet" + +#: keyman_config/view_installed.py:173 +msgid "_Help" +msgstr "_Hjälp" + +#: keyman_config/view_installed.py:174 keyman_config/view_installed.py:305 +msgid "Help for keyboard" +msgstr "Hjälp för tangentbordet" + +#: keyman_config/view_installed.py:179 +msgid "_Options" +msgstr "_Alternativ" + +#: keyman_config/view_installed.py:180 keyman_config/view_installed.py:307 +msgid "Settings for keyboard" +msgstr "Inställningar för tangentbord" + +#: keyman_config/view_installed.py:190 +msgid "_Refresh" +msgstr "_Uppdatera" + +#: keyman_config/view_installed.py:191 +msgid "Refresh keyboard list" +msgstr "Uppdatera tangentbordslista" + +#: keyman_config/view_installed.py:195 +msgid "_Download" +msgstr "_Ladda" + +#: keyman_config/view_installed.py:196 +msgid "Download and install a keyboard from the Keyman website" +msgstr "Ladda ner och installera ett tangentbord från Keymans webbplats" + +#: keyman_config/view_installed.py:201 +msgid "Install a keyboard from a file" +msgstr "Installera ett tangentbord från en fil" + +#: keyman_config/view_installed.py:206 +msgid "Close window" +msgstr "Stäng fönster" + +#: keyman_config/view_installed.py:278 +#, python-brace-format +msgid "Uninstall keyboard {package}" +msgstr "Avinstallera tangentbordet {package}" + +#: keyman_config/view_installed.py:280 +#, python-brace-format +msgid "Help for keyboard {package}" +msgstr "Hjälp för tangentbord {package}" + +#: keyman_config/view_installed.py:282 +#, python-brace-format +msgid "About keyboard {package}" +msgstr "Om tangentbordet {package}" + +#: keyman_config/view_installed.py:284 +#, python-brace-format +msgid "Settings for keyboard {package}" +msgstr "Inställningar för tangentbord {package}" + +#: keyman_config/view_installed.py:349 +msgid "Uninstall keyboard package?" +msgstr "Avinstallera tangentbordspaket?" + +#: 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 "Är du säker på att du vill avinstallera tangentbordet {keyboard} och dess teckensnitt?" + +#: keyman_config/welcome.py:22 +#, python-brace-format +msgid "{name} installed" +msgstr "{name} installerade" + +#: keyman_config/welcome.py:40 +msgid "Open in _Web browser" +msgstr "Öppna i _Webbläsare" + +#: keyman_config/welcome.py:42 +msgid "Open in the default web browser to do things like printing" +msgstr "Öppna i standardwebbläsaren för att göra saker som utskrift" + +#: keyman_config/welcome.py:45 +msgid "_OK" +msgstr "_OK" + diff --git a/linux/keyman-config/locale/uk_UA.po b/linux/keyman-config/locale/uk_UA.po new file mode 100644 index 0000000000..2d68b91513 --- /dev/null +++ b/linux/keyman-config/locale/uk_UA.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-01-24 03:25\n" +"Last-Translator: \n" +"Language-Team: Ukrainian\n" +"Language: uk_UA\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n" +"X-Crowdin-Project: keyman\n" +"X-Crowdin-Project-ID: 386703\n" +"X-Crowdin-Language: uk\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 "Ні реал sdk ні крук не доступні. Не допускається надсилання повідомлень про помилки входу на екран." + +#: keyman_config/downloadkeyboard.py:23 +msgid "Download Keyman keyboards" +msgstr "Завантажити клавіатури Keyman" + +#: 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: помилка: у {package} не знайдено kmp.json або kmp.inf" + +#: 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: помилка: у {packageFile} не знайдено kmp.json або kmp.inf" + +#: 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 "README" + +#: 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} keyboard" + +#: 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 "Keyboard 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" +"на іншому пристрої або поділитися онлайн" + +#: keyman_config/options.py:24 +#, python-brace-format +msgid "{packageId} Settings" +msgstr "{packageId} Налаштування" + +#: keyman_config/view_installed.py:30 +msgid "Keyman Configuration" +msgstr "Налаштування Keyman" + +#: 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" + +#: 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 "_OK" + diff --git a/linux/legacy/.gitignore b/linux/legacy/.gitignore deleted file mode 100644 index ae44c68b67..0000000000 --- a/linux/legacy/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -ibus-kmfl/m4/codeset.m4 -ibus-kmfl/m4/glibc2.m4 -ibus-kmfl/m4/glibc21.m4 -ibus-kmfl/m4/intdiv0.m4 -ibus-kmfl/m4/intl.m4 -ibus-kmfl/m4/intldir.m4 -ibus-kmfl/m4/intmax.m4 -ibus-kmfl/m4/inttypes-pri.m4 -ibus-kmfl/m4/inttypes_h.m4 -ibus-kmfl/m4/lcmessage.m4 -ibus-kmfl/m4/lock.m4 -ibus-kmfl/m4/longdouble.m4 -ibus-kmfl/m4/longlong.m4 -ibus-kmfl/m4/printf-posix.m4 -ibus-kmfl/m4/size_max.m4 -ibus-kmfl/m4/stdint_h.m4 -ibus-kmfl/m4/uintmax_t.m4 -ibus-kmfl/m4/ulonglong.m4 -ibus-kmfl/m4/visibility.m4 -ibus-kmfl/m4/wchar_t.m4 -ibus-kmfl/m4/wint_t.m4 -ibus-kmfl/m4/xsize.m4 -ibus-kmfl/m4/extern-inline.m4 -ibus-kmfl/m4/fcntl-o.m4 -ibus-kmfl/m4/gettext.m4 -ibus-kmfl/m4/iconv.m4 -ibus-kmfl/m4/intlmacosx.m4 -ibus-kmfl/m4/lib-ld.m4 -ibus-kmfl/m4/lib-link.m4 -ibus-kmfl/m4/lib-prefix.m4 -ibus-kmfl/m4/nls.m4 -ibus-kmfl/m4/po.m4 -ibus-kmfl/m4/progtest.m4 -ibus-kmfl/m4/threadlib.m4 -ibus-kmfl/po/Makefile.in.in -ibus-kmfl/po/Makevars.template -ibus-kmfl/po/Rules-quot diff --git a/linux/legacy/LICENSE.md b/linux/legacy/LICENSE.md deleted file mode 100644 index 25cba465bf..0000000000 --- a/linux/legacy/LICENSE.md +++ /dev/null @@ -1,13 +0,0 @@ -# LICENSE - -The [kmflcomp](./kmflcomp) and [libkmfl](./libkmfl) projects are covered by the -[MIT license](./libkmfl/COPYING). - -The [ibus-kmfl](./ibus-kmfl) project is licensed under GNU General Public License -as published by the Free Software Foundation; either -[version 2 of the License](./ibus-kmfl/COPYING), or (at your option) any later version. - -Two files in ibus-kmfl, [kmflutil.c](./ibus-kmfl/src/kmflutil.c) and -[kmflutil.h](./ibus-kmfl/src/kmflutil.h) are dual licensed by the MIT license and the -GNU General Public License which is described above. -The MIT license alone may be chosen for them for their use in other projects. diff --git a/linux/legacy/README.md b/linux/legacy/README.md deleted file mode 100644 index d65723012d..0000000000 --- a/linux/legacy/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# Keyman for Linux - -## Projects - -- [kmflcomp](./kmflcomp) - KMFL keyboard compiler -- [libkmfl](./libkmfl) - older KMFL core library -- [ibus-kmfl](./ibus-kmfl) - IBUS integration to use KMFL - -See [license information](./LICENSE.md) about licensing. - -## Linux Requirements/Setup - -- It is helpful to be using the [packages.sil.org](http://packages.sil.org) repo - -- Install packages required for building and developing KMFL - - ```bash - sudo apt install cdbs debhelper libx11-dev autotools-dev build-essential \ - dh-autoreconf flex bison libibus-1.0-dev python3-setuptools meson \ - libjson-glib-dev libgtk-3-dev libxml2-utils help2man python3-lxml \ - python3-magic python3-numpy python3-pil python3-pip python3-qrcode \ - python3-requests python3-requests-cache python3 python3-gi dconf-cli \ - dconf-editor cargo python3-dbus - ``` - -## Compiling from Command Line - -### Build script - -#### Installing for ibus to use ibus-kmfl - -- The process to build and install everything is: - - - `make reconf` to create the build system and set the version - - `make fullbuild` to configure and build - - `sudo make install` to install to `/usr/local` - -- Some of the files must be installed to `/usr/share/` so `make install` must be run as `sudo`. - - To do this run `sudo make install` - - - This will install to `/usr/local` - - and `/usr/share/ibus/component/kmfl.xml` and `/usr/share/kmfl/icons` - - - If you already have the ibus-kmfl package installed then it will move the file `/usr/share/ibus/component/kmfl.xml` to `/usr/share/doc/ibus-kmfl/` - -- run `sudo make uninstall` to uninstall everything and put it back again - -#### Tmp install - -Used by TC for validating PRs - -Run `make tmpinstall` to build and install **keyboardprocessor**, **kmflcomp**, **libkmfl**, **ibus-kmfl** and **ibus-keyman** to `/tmp/kmfl` - -This is only for testing the build, not for running **ibus-kmfl** in ibus - -### Manually - -- **libkmfl** requires `kmfl.h` header from **kmflcomp** -- **ibus-kfml** requires `kmfl.h` and headers and lib from **libkmfl** - -So - -- **kmflcomp** must be built and installed before **libkmfl** -- **libkmfl** must be built and installed before **ibus-kmfl** - -For each project run `./configure && make && make install`. - -You may prefer to create a different directory to build in and run configure from there e.g. - -```bash -mkdir ../build-kmflcomp -cd ../build-kmflcomp -../kmflcomp/configure -make -make install -``` - -The install of **ibus-kmfl** doesn't install everything to the correct location for it to be -used - to be fixed diff --git a/linux/legacy/ibus-kmfl/AUTHORS b/linux/legacy/ibus-kmfl/AUTHORS deleted file mode 100644 index 2fffbe28de..0000000000 --- a/linux/legacy/ibus-kmfl/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Doug Rintoul diff --git a/linux/legacy/ibus-kmfl/COPYING b/linux/legacy/ibus-kmfl/COPYING deleted file mode 100644 index d511905c16..0000000000 --- a/linux/legacy/ibus-kmfl/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/linux/legacy/ibus-kmfl/ChangeLog b/linux/legacy/ibus-kmfl/ChangeLog deleted file mode 100644 index e6faa6080c..0000000000 --- a/linux/legacy/ibus-kmfl/ChangeLog +++ /dev/null @@ -1,63 +0,0 @@ -ibus-kmfl (1.0.8-1) unstable; urgency=low - - * changed IBusEngineDesc to include layout and license information - * default to "us" layout if no layout is specified - * fix bug when keyboard version was greater than 7.0 - - -- Doug Rintoul Thu, 24 Oct 2013 13:48:01 -0700 - -ibus-kmfl (1.0.7-1) unstable; urgency=low - - * fix silly error with oneiric. test code caused xim interface to break. - - -- Doug Rintoul Thu, 15 Dec 2011 12:16:01 -0800 - -ibus-kmfl (1.0.6-1) unstable; urgency=low - - * update for ibus 1.3.99 - - -- Doug Rintoul Wed, 07 Dec 2011 09:08:52 -0800 - -ibus-kmfl (1.0.5-1) unstable; urgency=low - - * fix problem with forwardKeyEvent - - -- Doug Rintoul Tue, 09 Nov 2010 14:07:08 -0800 - -ibus-kmfl (1.0.4-1) unstable; urgency=low - - * add support for differentiating between right and left ctrl, alt, and shift keys - * add support for fallback to forwardKeyEvent if deleteSurroundingText is not supported - - -- Doug Rintoul Wed, 03 Nov 2010 14:44:46 -0700 - -ibus-kmfl (1.0.3-3) unstable; urgency=low - - * fix for when app does not support delete_surrounding - - -- Doug Rintoul Tue, 02 Nov 2010 11:30:59 -0700 - -ibus-kmfl (1.0.3-2) unstable; urgency=low - - * let the application handle user generated backspaces after clearing the kmfl history - - -- Doug Rintoul Mon, 19 Jul 2010 13:44:30 -0700 - -ibus-kmfl (1.0.2-1) unstable; urgency=low - - * Fix icon loading - * Update copyright - - -- Doug Rintoul Thu, 03 Jun 2010 09:53:30 -0700 - -ibus-kmfl (1.0.1-1) unstable; urgency=low - - * fix a crash with openoffice 3.2 when backspacing at the beginning of a line - - -- Doug Rintoul Thu, 03 Jun 2010 09:53:11 -0700 - -ibus-kmfl (1.0-1) unstable; urgency=low - - * initial release - - -- Doug Rintoul Tue, 08 Dec 2009 08:51:39 -0800 diff --git a/linux/legacy/ibus-kmfl/Makefile.am b/linux/legacy/ibus-kmfl/Makefile.am deleted file mode 100644 index 4ec8500661..0000000000 --- a/linux/legacy/ibus-kmfl/Makefile.am +++ /dev/null @@ -1,65 +0,0 @@ -# vim:set noet ts=4: -# -# ibus-kmfl - The kmfl engine for IBus -# -# Copyright (c) 2009 Doug Rintoul -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -SUBDIRS = \ - src \ - icons \ - m4 \ - po \ - $(NULL) - -ACLOCAL_AMFLAGS = -I m4 - -EXTRA_DIST = \ - autogen.sh \ - @PACKAGE_NAME@.spec.in \ - VERSION \ - $(NULL) - -noinst_DIST = \ - $(NULL) - - -DISTCLEANFILES = \ - po/stamp-it \ - $(NULL) - -rpm: dist @PACKAGE_NAME@.spec - rpmbuild -bb \ - --define "_sourcedir `pwd`" \ - --define "_builddir `pwd`" \ - --define "_srcrpmdir `pwd`" \ - --define "_rpmdir `pwd`" \ - --define "_specdir `pwd`" \ - @PACKAGE_NAME@.spec - -srpm: dist @PACKAGE_NAME@.spec - rpmbuild -bs \ - --define "_sourcedir `pwd`" \ - --define "_builddir `pwd`" \ - --define "_srcrpmdir `pwd`" \ - --define "_rpmdir `pwd`" \ - --define "_specdir `pwd`" \ - @PACKAGE_NAME@.spec - -clean-rpm: - $(RM) -r "`uname -i`" - -clean-local: clean-rpm diff --git a/linux/legacy/ibus-kmfl/NEWS b/linux/legacy/ibus-kmfl/NEWS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/linux/legacy/ibus-kmfl/README b/linux/legacy/ibus-kmfl/README deleted file mode 100644 index b7ac6e9f55..0000000000 --- a/linux/legacy/ibus-kmfl/README +++ /dev/null @@ -1 +0,0 @@ -KMFL engine for IBus. diff --git a/linux/legacy/ibus-kmfl/README.repo b/linux/legacy/ibus-kmfl/README.repo deleted file mode 100644 index 6b2703bf27..0000000000 --- a/linux/legacy/ibus-kmfl/README.repo +++ /dev/null @@ -1,3 +0,0 @@ -You need autoconf, autopoint, gettext, automake and libtool to generate the build system - -Run ./autogen.sh to run them diff --git a/linux/legacy/ibus-kmfl/VERSION b/linux/legacy/ibus-kmfl/VERSION deleted file mode 120000 index 558194c5a5..0000000000 --- a/linux/legacy/ibus-kmfl/VERSION +++ /dev/null @@ -1 +0,0 @@ -../../VERSION \ No newline at end of file diff --git a/linux/legacy/ibus-kmfl/autogen.sh b/linux/legacy/ibus-kmfl/autogen.sh deleted file mode 100755 index 905970e6df..0000000000 --- a/linux/legacy/ibus-kmfl/autogen.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -autoreconf -if diff --git a/linux/legacy/ibus-kmfl/configure.ac b/linux/legacy/ibus-kmfl/configure.ac deleted file mode 100644 index 4b27590878..0000000000 --- a/linux/legacy/ibus-kmfl/configure.ac +++ /dev/null @@ -1,81 +0,0 @@ -# vim:set et ts=4: -# -# ibus-kmfl - The kmfl engine for IBus -# -# Copyright (c) 2009 Doug Rintoul -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -# if not 1, append datestamp to the version number. -m4_define([ibus_released], [0]) -m4_define([ibus_major_version], [1]) -m4_define([ibus_minor_version], [2]) -m4_define([ibus_micro_version], [0]) -m4_define(ibus_maybe_datestamp, - m4_esyscmd([if test x]ibus_released[ != x1; then date +.%Y%m%d | tr -d '\n\r'; fi])) - -m4_define([ibus_version], - ibus_major_version.ibus_minor_version.ibus_micro_version[]ibus_maybe_datestamp) - -AC_INIT([ibus-kmfl], m4_esyscmd_s([cat VERSION]), [https://github.com/keymanapp/keyman/issues/new]) - -AM_INIT_AUTOMAKE -AC_GNU_SOURCE - -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_MACRO_DIR([m4]) - -# define PACKAGE_VERSION_* variables -AM_SANITY_CHECK -AM_MAINTAINER_MODE -AM_DISABLE_STATIC -AC_PROG_CC -AM_PROG_CC_C_O -AC_PROG_CXX -AC_ISC_POSIX -AC_HEADER_STDC -AM_PROG_LIBTOOL - -# check ibus -PKG_CHECK_MODULES(IBUS, [ - ibus-1.0 >= 1.2.0 -]) - -# check kmfl - -# check env -AC_PATH_PROG(ENV, env) -AC_SUBST(ENV) - -# define GETTEXT_* variables -GETTEXT_PACKAGE=ibus-kmfl -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the read-only architecture-independent data directory.]) - -AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION(0.19.7) - - -# OUTPUT files -AC_CONFIG_FILES([ po/Makefile.in -Makefile -ibus-kmfl.spec -src/Makefile -src/kmfl.xml.in -icons/Makefile -m4/Makefile -]) - -AC_OUTPUT diff --git a/linux/legacy/ibus-kmfl/debian/changelog b/linux/legacy/ibus-kmfl/debian/changelog deleted file mode 100644 index 0706b3e0f6..0000000000 --- a/linux/legacy/ibus-kmfl/debian/changelog +++ /dev/null @@ -1,89 +0,0 @@ -ibus-kmfl (14.0.284-1) unstable; urgency=medium - - * New upstream release - * Re-release to Debian - - -- Eberhard Beilharz Fri, 14 Jan 2022 18:00:13 +0100 - -ibus-kmfl (14.0.283-2) unstable; urgency=medium - - * New upstream release - * Re-release to Debian - - -- Eberhard Beilharz Thu, 02 Dec 2021 12:02:27 +0100 - -ibus-kmfl (14.0.282-1) unstable; urgency=medium - - * New upstream release - * Re-release to Debian - - -- Eberhard Beilharz Wed, 29 Sep 2021 12:47:21 +0200 - -ibus-kmfl (14.0.280-1) unstable; urgency=medium - - * New upstream release - * Re-release to Debian - - -- Eberhard Beilharz Mon, 23 Aug 2021 17:38:14 +0200 - -ibus-kmfl (14.0.276-1) experimental; urgency=medium - - * New upstream release - * Re-release to Debian - - -- Eberhard Beilharz Fri, 11 Jun 2021 14:43:38 +0200 - -ibus-kmfl (14.0.273-1) experimental; urgency=medium - - * Keyman 14 - - -- Eberhard Beilharz Mon, 26 Apr 2021 18:24:41 +0200 - -ibus-kmfl (11.0.101-1) unstable; urgency=medium - - * New upstream Keyman for Linux 11.0 beta 1 - * d/watch update for beta/stable - * d/control standards 4.3.0 no changes - - -- Daniel Glassey Fri, 04 Jan 2019 08:24:03 +0700 - -ibus-kmfl (10.99.64-2) unstable; urgency=medium - - * New upstream pre-release - * remove dbus service that is now in ibus-keyman - - -- Daniel Glassey Thu, 20 Dec 2018 09:38:11 +0700 - -ibus-kmfl (10.99.64-1) unstable; urgency=medium - - * New upstream pre-release - * remove dbus service that is now in ibus-keyman - - -- Daniel Glassey Wed, 19 Dec 2018 22:10:16 +0700 - -ibus-kmfl (10.99.33-1) unstable; urgency=medium - - * New upstream pre-release - * Change license to MIT of some files as ibus-kmfl is being moved into - Keyman 11 - * Keyman is now owned by SIL - * Changing to Debian Input Method Team maintainership - with me as uploader - * know about keyboards in more directories - * dbus service to let patched onboard know about keyman on-screen keyboards - * d/compat v11 - * d/control Standards 4.2.1 no changes - * d/control adjust dependencies, fix description (thanks Holger :) ) - * d/watch watch downloads.keyman.com alphas - * actual release to Debian, Closes: #911865 - - -- Daniel Glassey Fri, 26 Oct 2018 10:52:23 +0700 - -ibus-kmfl (1.0.8-1) unstable; urgency=low - - * changed IBusEngineDesc to include layout and license information - * default to "us" layout if no layout is specified - * fix bug when keyboard version was greater than 7.0 - * initial release to Debian - - -- Doug Rintoul Wed, 12 Oct 2016 10:22:01 -0700 diff --git a/linux/legacy/ibus-kmfl/debian/com.keyman.ibus_kmfl.metainfo.xml b/linux/legacy/ibus-kmfl/debian/com.keyman.ibus_kmfl.metainfo.xml deleted file mode 100644 index caa80345bb..0000000000 --- a/linux/legacy/ibus-kmfl/debian/com.keyman.ibus_kmfl.metainfo.xml +++ /dev/null @@ -1,40 +0,0 @@ - - -​ com.keyman.ibus_kmfl -​ GPL-2+ - GPL-2+ - Keyman - SIL International - https://keyman.com/cdn/dev/img/keyman-logo.png - -​ ibus-kmfl -​ KMFL input method for IBus -​ -​

- This package provides the KMFL (Keyboard Mapping for Linux) input method - engine for IBus. With this module, you can use keyboard layouts designed - for Keyman for Windows 6.0 under the IBus platform. -

-

- Originally created in 1993 to type Lao on Windows, Keyman is now a free and - open source keyboarding platform which allows anyone to write a keyboard layout - for their language. Keyman is available for many platforms, including Windows, - macOS, iOS, Android, Linux and the web. -

-

- Keyboard layouts are defined with a clear and easy to understand keyboard - grammar. Keyman's contextual input model means keyboard layouts can be - intelligent and make it simple to type even the most complex languages. - Keyboard layouts are distributed through an open catalog to all major desktop - and mobile platforms. -

-

-​ Input methods are typing systems allowing users to input complex languages. -​

-​
- https://keyman.com/linux/ - https://github.com/keymanapp/keyman/issues - https://help.keyman.com/ - https://community.software.sil.org/c/keyman - https://donate.keyman.com/ -​
diff --git a/linux/legacy/ibus-kmfl/debian/compat b/linux/legacy/ibus-kmfl/debian/compat deleted file mode 100644 index b4de394767..0000000000 --- a/linux/legacy/ibus-kmfl/debian/compat +++ /dev/null @@ -1 +0,0 @@ -11 diff --git a/linux/legacy/ibus-kmfl/debian/control b/linux/legacy/ibus-kmfl/debian/control deleted file mode 100644 index 1702603fe9..0000000000 --- a/linux/legacy/ibus-kmfl/debian/control +++ /dev/null @@ -1,34 +0,0 @@ -Source: ibus-kmfl -Section: utils -Priority: optional -Maintainer: Debian Input Method Team -Uploaders: - Keyman team , - Eberhard Beilharz , -Build-Depends: - debhelper (>= 11), - libibus-1.0-dev (>= 1.2), - libkmfl-dev (>=10.99.30), - libkmflcomp-dev (>=10.99.30), - libx11-dev, - pkg-config, - x11proto-core-dev, -Standards-Version: 4.5.1 -Vcs-Git: https://github.com/keymanapp/keyman.git -Vcs-Browser: https://github.com/keymanapp/keyman/tree/master/linux/ibus-kmfl -Homepage: https://www.keyman.com - -Package: ibus-kmfl -Architecture: any -Depends: - ibus (>= 1.3.7), - ${misc:Depends}, - ${shlibs:Depends}, -Description: KMFL engine for IBus - ibus-kmfl is a input method engine for multiple languages, based on IBus. - . - This package provides the KMFL (Keyboard Mapping for Linux) IM engine for - IBus. With this module, you can use keyboard layouts designed for - Keyman for Windows under the IBus platform. - . - Note that usually you should install the newer ibus-keyman package instead. diff --git a/linux/legacy/ibus-kmfl/debian/copyright b/linux/legacy/ibus-kmfl/debian/copyright deleted file mode 100644 index ee06a10095..0000000000 --- a/linux/legacy/ibus-kmfl/debian/copyright +++ /dev/null @@ -1,55 +0,0 @@ -Format: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?view=markup&pathrev=174 -Upstream-Name: ibus-kmfl -Upstream-Contact: Keyman team - -Files: * -Copyright: 2004-2021 SIL International -License: GPL-2+ - -Files: src/kmflutil.c - src/kmflutil.h -Copyright: 2009-2021 SIL International -License: GPL-2+ or MIT - -Files: debian/* -Copyright: 2004-2021 SIL International -License: GPL-2+ - -License: GPL-2+ - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - . - On Debian systems, the full text of the GNU General Public - License version 2 can be found in the file - `/usr/share/common-licenses/GPL-2'. - -License: MIT - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - . - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/linux/legacy/ibus-kmfl/debian/install b/linux/legacy/ibus-kmfl/debian/install deleted file mode 100644 index f480529f6e..0000000000 --- a/linux/legacy/ibus-kmfl/debian/install +++ /dev/null @@ -1 +0,0 @@ -debian/com.keyman.ibus_kmfl.metainfo.xml /usr/share/metainfo diff --git a/linux/legacy/ibus-kmfl/debian/rules b/linux/legacy/ibus-kmfl/debian/rules deleted file mode 100755 index 995ed53868..0000000000 --- a/linux/legacy/ibus-kmfl/debian/rules +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/make -f - -export DEB_BUILD_MAINT_OPTIONS = hardening=+all - -%: - dh $@ - -override_dh_auto_configure: - dh_auto_configure -- \ - --libexecdir=/usr/libexec - -override_dh_auto_test: - # run test but disable failing - -dh_auto_test diff --git a/linux/legacy/ibus-kmfl/debian/source/format b/linux/legacy/ibus-kmfl/debian/source/format deleted file mode 100644 index 163aaf8d82..0000000000 --- a/linux/legacy/ibus-kmfl/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/linux/legacy/ibus-kmfl/debian/upstream/signing-key.asc b/linux/legacy/ibus-kmfl/debian/upstream/signing-key.asc deleted file mode 100644 index a235c64d44..0000000000 --- a/linux/legacy/ibus-kmfl/debian/upstream/signing-key.asc +++ /dev/null @@ -1,51 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQINBF46PusBEAC9veJYGsAAGnu5ug4RFELBXCwYTXK6aSaRFJ7ItW75EJUQWcIo -FaDCWiiP9ZEXfS7JeG+RZ4MHp6pNnvNCX/Ww4QEfiI4NefMIon6cy2pWfKZRFBDG -Y0x/9Mm+Wzx4vfuGP/TeFwkFy0syFYBsCkoV7KV3VxKNN73k6ZvkRn6tChebwVeM -1FIldfeQw6KeTfdlE12wP4sI3MaaMh/QG1CnPRB4lTCK1WkpFqzxe3Y9XT6w+qxu -tRV2xyAgbe19Q4SlDNvH4bgE/RlaWZ5zjnJLybP80t3qcEGKibUYEkQDuTPC44pn -aqbRmEaihTHhMD/Ye0Oul1OQG13Io5jOm9OEKIzbwzOSlbZML+KVAIN85N1t0TW1 -N1gNZOZDwzXeHAUu+yKZdXliGM8Irb0nxQMWnZqIFtV6GQUNGskCUtd/tGcPe7Y6 -MXaPI7d5FLDGZmyUFsumazW0UN672PqHOlmrlwC+mSlmjFYPakg02Y8MiqPBZ5VB -Uyf0YRBDYMc3WdmIxIYkgzjnSAuoDU3taSAFflS4AxfS5ebTw9ydxrrYEvZzPX4m -hRpX2zt+DGfz/zovinO3kLn4Rch7g/ab6XCmQ/TbQ4GqTEq6XLnjXHSZLXr/Z+lD -u3xtj9iAlxC48NspV/GGzIgsKJzTXXOfazIsgVjHDr/x+mmWZ9e5MwNu/wARAQAB -tCFrZXltYW4tYmEgPGJ1aWxkYWdlbnRAa2V5bWFuLmNvbT6JAk4EEwEKADgWIQRs -jureYH1DTHT9NP3I5hT1jxtl4AUCXjo+6wIbAwULCQgHAgYVCgkICwIEFgIDAQIe -AQIXgAAKCRDI5hT1jxtl4LxHEAC4Lq+c48Q5q3UkfNxcGP2SkE++kco7haxnoQwT -H1cJSqY+X+eHhAPYyhrriT3CwwQ3w5RT73v69tUrrpiIK6dc4ltQca0qrwppLzOc -hZji61KWXYGHYIpqI+PpayxcJ1Vxz154EiFQk7Hbbo+x/5I0qzl6QmROHhenez06 -51hr5WGwonscnX7ReDuBA296XS5GCFQ1h+080xNkqiUt0SYWBhWzqQizEnF3VBrS -Be5pNGqp5Md11In7ZsRNhGBs2ewpY0As6D9Ll0x4CulAAeMhXqbPnNhqE0uehbdR -ks15fcBXwiVwUFN/dMacTFJovRgkXLU/c0OwHM6cnHBBHFDmKTohIYY8/g8eDt4m -413XIJREOXaWa3UWrfwfup9FI/PI1g2KnGHEFP2PBS+77/3PVpQlYOnJ52Mc19ON -BzAE5qFlXwLIyktcpvzaFz+mw5S5YvccjoLLRcTV9er/64ZhQxz87Sqn2l94wo4f -V989CMfy2ujh4G80xcLJDDpovGQpdgflD7eZjaYyD1maYp+FlhYuDGT7nTzkX8nm -G6RWICeHFJrk3OXyx3ir+IXSUc+B0NjQS/6rtTr5qCntm/R/WYnS5eDhwcForHB5 -KryJtkJBkIqZ8PalUWrSfSHWQjbJZgVEsJVKReBS0srW95j1Bi3gvsKLPf1/9zv2 -PmzVXLkCDQReOj7rARAAubQWo/upxgAUI4d8kGqIooyWgSbVbWnW4Ra/1FjP1RLn -zChmJTYm5QTGEs2u2J0jhhdP/o2xYFdaD3BOVaDTCTV0Ron5Y2EI5T0WEqLuGcu0 -YmaGtR0fj1qw/0IJ1CtOfv3V0XIGuSM2NQtCiS80oo1sRBwpi+eDWn19UClT7F0T -PVwX2eXwgb1UR6CWbxu4nUMyq0lTfYyk2L+XiC/gbtVLs4I2UaxvO0DOxPbEoKyK -SUA5Jxae/QsLrJ4HvqlGekgqSH5gLAr6zH1jWKn0bnwRX92ka/yTIzQQg5+vgJQH -inOOhIg5Gii55KgQjLL7atL48w/Df9ftJohm9LN6YUzF5qCSAs1BQ7p3G2LKR8Vw -CMYH9Fp6dHeb/83w6pSth/kYfx/GyI5tXCuCCzgTvEFW9/qjhvSNk6hW7NhwmiRz -oqPnOub2NewgIu3EBgme7f5U6M/zAtTGoJn6+ftfILsW9SxKJgZWkxzmndvZ/hZn -SAGmBQNylq0/xGKjGjoeKbkR0oNlUGYWJ4svFrd4VFk65a502JdTU5ZxoJGFKGgh -UNWvqqL0ruTQmtXWFOfZdCKOIbHjoTP/xsnmnKIbPpe09J3kgJc6zsplHEPO5dXJ -kfD4oTQQsrUG3dmNBJU3jbSV0jcHzrMGRTpYw2+ptsk/PWJc9XSUpJAAQP+/mvUA -EQEAAYkCNgQYAQoAIBYhBGyO6t5gfUNMdP00/cjmFPWPG2XgBQJeOj7rAhsMAAoJ -EMjmFPWPG2Xg4D8QAJr7v8Ly2DYd7e3ilk3LWURXpvi79U5fsy3qLglZt/8c52mf -DGo+s3XjVhVqFMYlhs1ezmVPgORtDky+57aS5cgPU5Lqo4fYZoLwDS0LUvMEO5Im -pTo/7rtdRpVsmSgyJ48t0eh3qi/mf8ONFqho53elb5IdROrpM1pZm3vWvM/vdEMi -kGN1R6BdajKEvofdc2x/3YQhQyfekCxKa/RXRQ5M+JtW4iHrDuyAFksoCVk2p4dO -OdZoNaMMYi6egcHbph+LR2CYsnijUr7vlTOBfF2XUom+vq5audySc4+NqeaWyXtD -mmoriz8IF0hIt2mWpQCqC/gftR9K2SDd8TYn2Z8OH4/h8cLRQssN/VsZie3jDh4u -ZD+A/1IF5q+Ayx+pXRpoDMDl+vvHHBfHpnLt4iFuPNZgJO5xSBd5Ra6/PRPs26wV -y+ArzNhdA5ImhOPHF08qwBxDeS7476N7j3yTGv1vPJTOmIII1/60bUI/u8cAjXWa -tMHDsIAIfJF2A8bkukbNEQUcWw3HUIA3lCq7cV6xs9LT5/xa1XfMQoj9vHMogCcT -YykbTr9QHLLX62htZijKU1REYuxwEoFXIm7y7HpBIWNBjSLkE53K9RaZP3z01xcX -B0e/y1m02FicU+owqJC38pXpUogyw+ZLj+VNFbv/dSDaG+00eRdqGGmTTIgo -=jcZL ------END PGP PUBLIC KEY BLOCK----- diff --git a/linux/legacy/ibus-kmfl/ibus-kmfl.spec.in b/linux/legacy/ibus-kmfl/ibus-kmfl.spec.in deleted file mode 100644 index 7a3d4144ad..0000000000 --- a/linux/legacy/ibus-kmfl/ibus-kmfl.spec.in +++ /dev/null @@ -1,86 +0,0 @@ -%define _prefix /usr - -%define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0) -%define is_mandriva %(test -e /etc/mandriva-release && echo 1 || echo 0) -%define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0) -%define is_opensuse %(grep open /etc/SuSE-release 2> /dev/null 1>/dev/null && echo 1 || echo 0) -%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0) - -%if %is_mandrake -%define dist mandrake -%define disttag mdk -%endif -%if %is_mandriva -%define dist mandriva -%define disttag mdk -%endif -%if %is_suse -%define dist suse -%define disttag suse -%define kde_path /opt/kde3 -%endif -%if %is_opensuse -%define dist openSUSE -%define disttag openSUSE -%define kde_path /opt/kde3 -%endif -%if %is_fedora -%define dist fedora -%define disttag fc -%endif - -%define distver %(release="`rpm -q --queryformat='%{VERSION}' %{dist}-release 2> /dev/null | tr . : | sed s/://g`" ; if test $? != 0 ; then release="" ; fi ; echo "$release") - -Name: ibus-kmfl -Version: @PACKAGE_VERSION@ -Release: 1%{disttag}%{distver} -Summary: The KMFL engine for IBus platform -License: GPLv2+ -Source0: %{name}-%{version}.tar.gz -Group: System Environment/Libraries -URL: http://kmfl.sourceforge.net - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: gettext-devel -BuildRequires: libtool -BuildRequires: pkgconfig - -BuildRequires: ibus-devel -BuildRequires: libkmfl-devel -Requires: ibus -Requires: libkmfl, kmflcomp - -%description -KMFL engine for IBus input platform. It allows input of many languages using -the kmfl engine - -%prep -%setup -q - -%build -%configure --disable-static -# make -C po update-gmo -make %{?_smp_mflags} - -%install -rm -rf $RPM_BUILD_ROOT -make DESTDIR=${RPM_BUILD_ROOT} install - -%find_lang %{name} - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -f %{name}.lang -%defattr(-,root,root,-) -%doc AUTHORS COPYING README -%{_libexecdir}/ibus-engine-kmfl -%{_datadir}/ibus/component/* -%{_datadir}/kmfl/icons/* - - -%changelog -* Mon Dec 07 2009 Doug Rintoul - @VERSION@-1 -- The first version. - - diff --git a/linux/legacy/ibus-kmfl/icons/Makefile.am b/linux/legacy/ibus-kmfl/icons/Makefile.am deleted file mode 100644 index 74e8130098..0000000000 --- a/linux/legacy/ibus-kmfl/icons/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# vim:set noet ts=4: -# -# ibus - The Input Bus -# -# Copyright (c) 2007-2008 Huang Peng -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program; if not, write to the -# Free Software Foundation, Inc., 59 Temple Place, Suite 330, -# Boston, MA 02111-1307 USA - -icons_DATA = \ - ibus-kmfl.svg \ - default.png \ - $(NULL) - -iconsdir = $(datadir)/kmfl/icons - -EXTRA_DIST = \ - ibus-kmfl.svg \ - default.png \ - $(NULL) diff --git a/linux/legacy/ibus-kmfl/icons/default.png b/linux/legacy/ibus-kmfl/icons/default.png deleted file mode 100644 index b8af67faf5..0000000000 Binary files a/linux/legacy/ibus-kmfl/icons/default.png and /dev/null differ diff --git a/linux/legacy/ibus-kmfl/icons/ibus-kmfl.svg b/linux/legacy/ibus-kmfl/icons/ibus-kmfl.svg deleted file mode 100644 index e27018c648..0000000000 --- a/linux/legacy/ibus-kmfl/icons/ibus-kmfl.svg +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/linux/legacy/ibus-kmfl/m4/Makefile.am b/linux/legacy/ibus-kmfl/m4/Makefile.am deleted file mode 100644 index d8b4c1becf..0000000000 --- a/linux/legacy/ibus-kmfl/m4/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -# vim:set noet ts=4: -# -# ibus-kmfl - The kmfl engine for IBus -# -# Copyright (c) 2007-2008 Huang Peng -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -EXTRA_DIST = \ - as-version.m4 \ - $(NULL) diff --git a/linux/legacy/ibus-kmfl/m4/as-version.m4 b/linux/legacy/ibus-kmfl/m4/as-version.m4 deleted file mode 100644 index a5b439903e..0000000000 --- a/linux/legacy/ibus-kmfl/m4/as-version.m4 +++ /dev/null @@ -1,71 +0,0 @@ -dnl as-version.m4 0.2.0 - -dnl autostars m4 macro for versioning - -dnl Thomas Vander Stichele - -dnl $Id: as-version.m4,v 1.4 2004/06/01 09:40:05 thomasvs Exp $ - -dnl AS_VERSION - -dnl example -dnl AS_VERSION - -dnl this macro -dnl - AC_SUBST's PACKAGE_VERSION_MAJOR, _MINOR, _MICRO -dnl - AC_SUBST's PACKAGE_VERSION_RELEASE, -dnl which can be used for rpm release fields -dnl - doesn't call AM_INIT_AUTOMAKE anymore because it prevents -dnl maintainer mode from running correctly -dnl -dnl don't forget to put #undef PACKAGE_VERSION_RELEASE in acconfig.h -dnl if you use acconfig.h - -AC_DEFUN([AS_VERSION], -[ - PACKAGE_VERSION_MAJOR=$(echo AC_PACKAGE_VERSION | cut -d'.' -f1) - PACKAGE_VERSION_MINOR=$(echo AC_PACKAGE_VERSION | cut -d'.' -f2) - PACKAGE_VERSION_MICRO=$(echo AC_PACKAGE_VERSION | cut -d'.' -f3) - - AC_SUBST(PACKAGE_VERSION_MAJOR) - AC_SUBST(PACKAGE_VERSION_MINOR) - AC_SUBST(PACKAGE_VERSION_MICRO) -]) - -dnl AS_NANO(ACTION-IF-NO-NANO, [ACTION-IF-NANO]) - -dnl requires AC_INIT to be called before -dnl For projects using a fourth or nano number in your versioning to indicate -dnl development or prerelease snapshots, this macro allows the build to be -dnl set up differently accordingly. - -dnl this macro: -dnl - parses AC_PACKAGE_VERSION, set by AC_INIT, and extracts the nano number -dnl - sets the variable PACKAGE_VERSION_NANO -dnl - sets the variable PACKAGE_VERSION_RELEASE, which can be used -dnl for rpm release fields -dnl - executes ACTION-IF-NO-NANO or ACTION-IF-NANO - -dnl example: -dnl AS_NANO(RELEASE="yes", RELEASE="no") - -AC_DEFUN([AS_NANO], -[ - AC_MSG_CHECKING(nano version) - - NANO=$(echo AC_PACKAGE_VERSION | cut -d'.' -f4) - - if test x"$NANO" = x || test "x$NANO" = "x0" ; then - AC_MSG_RESULT([0 (release)]) - NANO=0 - PACKAGE_VERSION_RELEASE=1 - ifelse([$1], , :, [$1]) - else - AC_MSG_RESULT($NANO) - PACKAGE_VERSION_RELEASE=0.`date +%Y%m%d.%H%M%S` - ifelse([$2], , :, [$2]) - fi - PACKAGE_VERSION_NANO=$NANO - AC_SUBST(PACKAGE_VERSION_NANO) - AC_SUBST(PACKAGE_VERSION_RELEASE) -]) diff --git a/linux/legacy/ibus-kmfl/po/LINGUAS b/linux/legacy/ibus-kmfl/po/LINGUAS deleted file mode 100644 index 22bdb911bb..0000000000 --- a/linux/legacy/ibus-kmfl/po/LINGUAS +++ /dev/null @@ -1,2 +0,0 @@ -zh_CN - diff --git a/linux/legacy/ibus-kmfl/po/Makevars b/linux/legacy/ibus-kmfl/po/Makevars deleted file mode 100644 index 6f61914821..0000000000 --- a/linux/legacy/ibus-kmfl/po/Makevars +++ /dev/null @@ -1,78 +0,0 @@ -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = $(PACKAGE) - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = .. - -# These options get passed to xgettext. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ - -# This is the copyright holder that gets inserted into the header of the -# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding -# package. (Note that the msgstr strings, extracted from the package's -# sources, belong to the copyright holder of the package.) Translators are -# expected to transfer the copyright for their translations to this person -# or entity, or to disclaim their copyright. The empty string stands for -# the public domain; in this case the translators are expected to disclaim -# their copyright. -COPYRIGHT_HOLDER = SIL International - -# This tells whether or not to prepend "GNU " prefix to the package -# name that gets inserted into the header of the $(DOMAIN).pot file. -# Possible values are "yes", "no", or empty. If it is empty, try to -# detect it automatically by scanning the files in $(top_srcdir) for -# "GNU packagename" string. -PACKAGE_GNU = no - -# This is the email address or URL to which the translators shall report -# bugs in the untranslated strings: -# - Strings which are not entire sentences, see the maintainer guidelines -# in the GNU gettext documentation, section 'Preparing Strings'. -# - Strings which use unclear terms or require additional context to be -# understood. -# - Strings which make invalid assumptions about notation of date, time or -# money. -# - Pluralisation problems. -# - Incorrect English spelling. -# - Incorrect formatting. -# It can be your email address, or a mailing list address where translators -# can write to without being subscribed, or the URL of a web page through -# which the translators can contact you. -MSGID_BUGS_ADDRESS = $(PACKAGE_BUGREPORT) - -# This is the list of locale categories, beyond LC_MESSAGES, for which the -# message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = - -# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' -# context. Possible values are "yes" and "no". Set this to yes if the -# package uses functions taking also a message context, like pgettext(), or -# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. -USE_MSGCTXT = no - -# These options get passed to msgmerge. -# Useful options are in particular: -# --previous to keep previous msgids of translated messages, -# --quiet to reduce the verbosity. -MSGMERGE_OPTIONS = - -# These options get passed to msginit. -# If you want to disable line wrapping when writing PO files, add -# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and -# MSGINIT_OPTIONS. -MSGINIT_OPTIONS = - -# This tells whether or not to regenerate a PO file when $(DOMAIN).pot -# has changed. Possible values are "yes" and "no". Set this to no if -# the POT file is checked in the repository and the version control -# program ignores timestamps. -PO_DEPENDS_ON_POT = yes - -# This tells whether or not to forcibly update $(DOMAIN).pot and -# regenerate PO files on "make dist". Possible values are "yes" and -# "no". Set this to no if the POT file and PO files are maintained -# externally. -DIST_DEPENDS_ON_UPDATE_PO = yes diff --git a/linux/legacy/ibus-kmfl/po/POTFILES.in b/linux/legacy/ibus-kmfl/po/POTFILES.in deleted file mode 100644 index 07075b98d3..0000000000 --- a/linux/legacy/ibus-kmfl/po/POTFILES.in +++ /dev/null @@ -1,3 +0,0 @@ -src/engine.c -src/kmflutil.c -src/main.c diff --git a/linux/legacy/ibus-kmfl/po/boldquot.sed b/linux/legacy/ibus-kmfl/po/boldquot.sed deleted file mode 100644 index 4b937aa517..0000000000 --- a/linux/legacy/ibus-kmfl/po/boldquot.sed +++ /dev/null @@ -1,10 +0,0 @@ -s/"\([^"]*\)"/“\1”/g -s/`\([^`']*\)'/‘\1’/g -s/ '\([^`']*\)' / ‘\1’ /g -s/ '\([^`']*\)'$/ ‘\1’/g -s/^'\([^`']*\)' /‘\1’ /g -s/“”/""/g -s/“/“/g -s/”/”/g -s/‘/‘/g -s/’/’/g diff --git a/linux/legacy/ibus-kmfl/po/en@boldquot.header b/linux/legacy/ibus-kmfl/po/en@boldquot.header deleted file mode 100644 index fedb6a06d1..0000000000 --- a/linux/legacy/ibus-kmfl/po/en@boldquot.header +++ /dev/null @@ -1,25 +0,0 @@ -# All this catalog "translates" are quotation characters. -# The msgids must be ASCII and therefore cannot contain real quotation -# characters, only substitutes like grave accent (0x60), apostrophe (0x27) -# and double quote (0x22). These substitutes look strange; see -# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html -# -# This catalog translates grave accent (0x60) and apostrophe (0x27) to -# left single quotation mark (U+2018) and right single quotation mark (U+2019). -# It also translates pairs of apostrophe (0x27) to -# left single quotation mark (U+2018) and right single quotation mark (U+2019) -# and pairs of quotation mark (0x22) to -# left double quotation mark (U+201C) and right double quotation mark (U+201D). -# -# When output to an UTF-8 terminal, the quotation characters appear perfectly. -# When output to an ISO-8859-1 terminal, the single quotation marks are -# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to -# grave/acute accent (by libiconv), and the double quotation marks are -# transliterated to 0x22. -# When output to an ASCII terminal, the single quotation marks are -# transliterated to apostrophes, and the double quotation marks are -# transliterated to 0x22. -# -# This catalog furthermore displays the text between the quotation marks in -# bold face, assuming the VT100/XTerm escape sequences. -# diff --git a/linux/legacy/ibus-kmfl/po/en@quot.header b/linux/legacy/ibus-kmfl/po/en@quot.header deleted file mode 100644 index a9647fc35c..0000000000 --- a/linux/legacy/ibus-kmfl/po/en@quot.header +++ /dev/null @@ -1,22 +0,0 @@ -# All this catalog "translates" are quotation characters. -# The msgids must be ASCII and therefore cannot contain real quotation -# characters, only substitutes like grave accent (0x60), apostrophe (0x27) -# and double quote (0x22). These substitutes look strange; see -# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html -# -# This catalog translates grave accent (0x60) and apostrophe (0x27) to -# left single quotation mark (U+2018) and right single quotation mark (U+2019). -# It also translates pairs of apostrophe (0x27) to -# left single quotation mark (U+2018) and right single quotation mark (U+2019) -# and pairs of quotation mark (0x22) to -# left double quotation mark (U+201C) and right double quotation mark (U+201D). -# -# When output to an UTF-8 terminal, the quotation characters appear perfectly. -# When output to an ISO-8859-1 terminal, the single quotation marks are -# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to -# grave/acute accent (by libiconv), and the double quotation marks are -# transliterated to 0x22. -# When output to an ASCII terminal, the single quotation marks are -# transliterated to apostrophes, and the double quotation marks are -# transliterated to 0x22. -# diff --git a/linux/legacy/ibus-kmfl/po/ibus-kmfl.pot b/linux/legacy/ibus-kmfl/po/ibus-kmfl.pot deleted file mode 100644 index 0254b25799..0000000000 --- a/linux/legacy/ibus-kmfl/po/ibus-kmfl.pot +++ /dev/null @@ -1,22 +0,0 @@ -# Translations for ibus-kmfl. -# Copyright (C) 2009 Doug Rintoul -# This file is distributed under the same license as the ibus-kmfl package. -# Doug Rintoul , 2009. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: ibus-kmfl 10.99.33\n" -"Report-Msgid-Bugs-To: https://github.com/keymanapp/keyman/issues/new\n" -"POT-Creation-Date: 2018-09-03 16:25+0700\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/kmflutil.c:294 -msgid "KMFL" -msgstr "" diff --git a/linux/legacy/ibus-kmfl/po/insert-header.sin b/linux/legacy/ibus-kmfl/po/insert-header.sin deleted file mode 100644 index b26de01f6c..0000000000 --- a/linux/legacy/ibus-kmfl/po/insert-header.sin +++ /dev/null @@ -1,23 +0,0 @@ -# Sed script that inserts the file called HEADER before the header entry. -# -# At each occurrence of a line starting with "msgid ", we execute the following -# commands. At the first occurrence, insert the file. At the following -# occurrences, do nothing. The distinction between the first and the following -# occurrences is achieved by looking at the hold space. -/^msgid /{ -x -# Test if the hold space is empty. -s/m/m/ -ta -# Yes it was empty. First occurrence. Read the file. -r HEADER -# Output the file's contents by reading the next line. But don't lose the -# current line while doing this. -g -N -bb -:a -# The hold space was nonempty. Following occurrences. Do nothing. -x -:b -} diff --git a/linux/legacy/ibus-kmfl/po/quot.sed b/linux/legacy/ibus-kmfl/po/quot.sed deleted file mode 100644 index 0122c46318..0000000000 --- a/linux/legacy/ibus-kmfl/po/quot.sed +++ /dev/null @@ -1,6 +0,0 @@ -s/"\([^"]*\)"/“\1”/g -s/`\([^`']*\)'/‘\1’/g -s/ '\([^`']*\)' / ‘\1’ /g -s/ '\([^`']*\)'$/ ‘\1’/g -s/^'\([^`']*\)' /‘\1’ /g -s/“”/""/g diff --git a/linux/legacy/ibus-kmfl/po/remove-potcdate.sin b/linux/legacy/ibus-kmfl/po/remove-potcdate.sin deleted file mode 100644 index 2436c49e78..0000000000 --- a/linux/legacy/ibus-kmfl/po/remove-potcdate.sin +++ /dev/null @@ -1,19 +0,0 @@ -# Sed script that remove the POT-Creation-Date line in the header entry -# from a POT file. -# -# The distinction between the first and the following occurrences of the -# pattern is achieved by looking at the hold space. -/^"POT-Creation-Date: .*"$/{ -x -# Test if the hold space is empty. -s/P/P/ -ta -# Yes it was empty. First occurrence. Remove the line. -g -d -bb -:a -# The hold space was nonempty. Following occurrences. Do nothing. -x -:b -} diff --git a/linux/legacy/ibus-kmfl/po/stamp-po b/linux/legacy/ibus-kmfl/po/stamp-po deleted file mode 100644 index 9788f70238..0000000000 --- a/linux/legacy/ibus-kmfl/po/stamp-po +++ /dev/null @@ -1 +0,0 @@ -timestamp diff --git a/linux/legacy/ibus-kmfl/po/zh_CN.gmo b/linux/legacy/ibus-kmfl/po/zh_CN.gmo deleted file mode 100644 index 750b1a747e..0000000000 Binary files a/linux/legacy/ibus-kmfl/po/zh_CN.gmo and /dev/null differ diff --git a/linux/legacy/ibus-kmfl/po/zh_CN.po b/linux/legacy/ibus-kmfl/po/zh_CN.po deleted file mode 100644 index 21e592b196..0000000000 --- a/linux/legacy/ibus-kmfl/po/zh_CN.po +++ /dev/null @@ -1,22 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2009 Doug Rintoul -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: https://github.com/ibus/ibus/issues/new\n" -"POT-Creation-Date: 2018-09-03 16:25+0700\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/kmflutil.c:294 -msgid "KMFL" -msgstr "" diff --git a/linux/legacy/ibus-kmfl/src/Makefile.am b/linux/legacy/ibus-kmfl/src/Makefile.am deleted file mode 100644 index df1e959e8f..0000000000 --- a/linux/legacy/ibus-kmfl/src/Makefile.am +++ /dev/null @@ -1,89 +0,0 @@ -# vim:set noet ts=4: -# -# ibus-anthy - The Anthy engine for IBus -# -# Copyright (c) 2009 Doug Rintoul -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -AM_CFLAGS = \ - @IBUS_CFLAGS@ \ - -DPKGDATADIR=\"$(pkgdatadir)\" \ - $(NULL) - -AM_LDFLAGS = \ - @IBUS_LIBS@ \ - -lkmfl -lX11 \ - $(NULL) - -check_PROGRAMS = \ - test-kmfl \ - $(NULL) - -TESTS = \ - $(check_PROGRAMS) \ - $(NULL) - - -test_kmfl_SOURCES = \ - kmflutil.c \ - $(NULL) -test_kmfl_CFLAGS = \ - $(AM_CFLAGS) \ - -DDEBUG \ - $(NULL) - -libexec_PROGRAMS = ibus-engine-kmfl - -ibus_engine_kmfl_SOURCES = \ - kmflutil.c \ - kmflutil.h \ - main.c \ - engine.c \ - engine.h \ - $(NULL) -ibus_engine_kmfl_CFLAGS = \ - @IBUS_CFLAGS@ \ - -DPKGDATADIR=\"$(pkgdatadir)\" \ - $(NULL) - -ibus_engine_kmfl_LDFLAGS = \ - @IBUS_LIBS@ \ - -lkmfl -lX11 \ - $(NULL) - -component_DATA = \ - kmfl.xml \ - $(NULL) -componentdir = @datadir@/ibus/component - -EXTRA_DIST = \ - kmfl.xml.in \ - $(NULL) - -CLEANFILES = \ - kmfl.xml \ - $(NULL) - -kmfl.xml: kmfl.xml.in - ( \ - libexecdir=${libexecdir}; \ - pkgdatadir=${pkgdatadir}; \ - s=`cat $<`; \ - eval "echo \"$${s}\""; \ - ) > $@ - -test: ibus-engine-kmfl - $(builddir)/ibus-engine-kmfl diff --git a/linux/legacy/ibus-kmfl/src/engine.c b/linux/legacy/ibus-kmfl/src/engine.c deleted file mode 100644 index cde3e8b10e..0000000000 --- a/linux/legacy/ibus-kmfl/src/engine.c +++ /dev/null @@ -1,473 +0,0 @@ -/* vim:set et sts=4: */ - -/* - * KMFL Input Method for IBUS (The Input Bus) - * - * Copyright (C) 2009 SIL International - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - */ - -#include -#include -#include -#include -#include -#include - -#include "kmflutil.h" -#include "engine.h" - -typedef struct _IBusKMFLEngine IBusKMFLEngine; -typedef struct _IBusKMFLEngineClass IBusKMFLEngineClass; - -struct _IBusKMFLEngine { - IBusEngine parent; - - /* members */ - KInputContext *context; - IBusLookupTable *table; - IBusProperty *status_prop; - IBusPropList *prop_list; - Display *display; - -}; - -struct _IBusKMFLEngineClass { - IBusEngineClass parent; -}; - -/* functions prototype */ -static void ibus_kmfl_engine_class_init (IBusKMFLEngineClass *klass); -static void ibus_kmfl_engine_init (IBusKMFLEngine *kmfl); -static GObject* - ibus_kmfl_engine_constructor (GType type, - guint n_construct_params, - GObjectConstructParam *construct_params); -static void ibus_kmfl_engine_destroy (IBusKMFLEngine *kmfl); -static gboolean - ibus_kmfl_engine_process_key_event - (IBusEngine *engine, - guint keyval, - guint keycode, - guint state); -static void ibus_kmfl_engine_focus_in (IBusEngine *engine); -static void ibus_kmfl_engine_focus_out (IBusEngine *engine); -static void ibus_kmfl_engine_reset (IBusEngine *engine); -static void ibus_kmfl_engine_enable (IBusEngine *engine); -static void ibus_kmfl_engine_disable (IBusEngine *engine); -static void ibus_engine_set_cursor_location (IBusEngine *engine, - gint x, - gint y, - gint w, - gint h); -static void ibus_kmfl_engine_set_capabilities - (IBusEngine *engine, - guint caps); -static void ibus_kmfl_engine_page_up (IBusEngine *engine); -static void ibus_kmfl_engine_page_down (IBusEngine *engine); -static void ibus_kmfl_engine_cursor_up (IBusEngine *engine); -static void ibus_kmfl_engine_cursor_down (IBusEngine *engine); -static void ibus_kmfl_engine_property_activate - (IBusEngine *engine, - const gchar *prop_name, - guint prop_state); -static void ibus_kmfl_engine_property_show - (IBusEngine *engine, - const gchar *prop_name); -static void ibus_kmfl_engine_property_hide - (IBusEngine *engine, - const gchar *prop_name); - -static void ibus_kmfl_engine_commit_string - (IBusKMFLEngine *kmfl, - const gchar *string); - -static IBusEngineClass *parent_class = NULL; -static GHashTable *im_table = NULL; - - -GType -ibus_kmfl_engine_get_type (void) -{ - static GType type = 0; - - static const GTypeInfo type_info = { - sizeof (IBusKMFLEngineClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) ibus_kmfl_engine_class_init, - NULL, - NULL, - sizeof (IBusKMFLEngine), - 0, - (GInstanceInitFunc) ibus_kmfl_engine_init, - }; - - if (type == 0) { - type = g_type_register_static (IBUS_TYPE_ENGINE, - "IBusKMFLEngine", - &type_info, - (GTypeFlags) 0); - } - - return type; -} - -static void -ibus_kmfl_engine_class_init (IBusKMFLEngineClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); - IBusEngineClass *engine_class = IBUS_ENGINE_CLASS (klass); - - parent_class = (IBusEngineClass *) g_type_class_peek_parent (klass); - - object_class->constructor = ibus_kmfl_engine_constructor; - ibus_object_class->destroy = (IBusObjectDestroyFunc) ibus_kmfl_engine_destroy; - - engine_class->process_key_event = ibus_kmfl_engine_process_key_event; - - engine_class->reset = ibus_kmfl_engine_reset; - engine_class->enable = ibus_kmfl_engine_enable; - engine_class->disable = ibus_kmfl_engine_disable; - - engine_class->focus_in = ibus_kmfl_engine_focus_in; - engine_class->focus_out = ibus_kmfl_engine_focus_out; - - engine_class->page_up = ibus_kmfl_engine_page_up; - engine_class->page_down = ibus_kmfl_engine_page_down; - - engine_class->cursor_up = ibus_kmfl_engine_cursor_up; - engine_class->cursor_down = ibus_kmfl_engine_cursor_down; - - engine_class->property_activate = ibus_kmfl_engine_property_activate; -} - -static void -ibus_kmfl_engine_init (IBusKMFLEngine *kmfl) -{ - kmfl->status_prop = ibus_property_new ("status", - PROP_TYPE_NORMAL, - NULL, - NULL, - NULL, - TRUE, - FALSE, - 0, - NULL); - g_object_ref_sink(kmfl->status_prop); - kmfl->prop_list = ibus_prop_list_new (); - g_object_ref_sink(kmfl->prop_list); - ibus_prop_list_append (kmfl->prop_list, kmfl->status_prop); - - kmfl->table = ibus_lookup_table_new (9, 0, TRUE, TRUE); - g_object_ref_sink(kmfl->table); - kmfl->context = NULL; -} - -static GObject* -ibus_kmfl_engine_constructor (GType type, - guint n_construct_params, - GObjectConstructParam *construct_params) -{ - IBusKMFLEngine *kmfl; - KInputMethod *im; - const gchar *engine_name; - - g_debug("DAR: ibus_kmfl_engine_constructor"); - - kmfl = (IBusKMFLEngine *) G_OBJECT_CLASS (parent_class)->constructor (type, - n_construct_params, - construct_params); - - engine_name = ibus_engine_get_name ((IBusEngine *) kmfl); - g_assert (engine_name); - g_message("DAR: ibus_kmfl_engine_constructor %s", engine_name); - - if (im_table == NULL) { - im_table = g_hash_table_new_full (g_str_hash, - g_str_equal, - g_free, - (GDestroyNotify) kinput_close_im); - } - - im = (KInputMethod *) g_hash_table_lookup (im_table, engine_name); - - if (im == NULL) { - im = kinput_open_im(engine_name); - - if (im != NULL) - g_hash_table_insert (im_table, g_strdup (engine_name), im); - - } - - if (im == NULL) { - g_warning ("Can not find kmfl keymap %s", engine_name); - g_object_unref (kmfl); - return NULL; - } - - kmfl->context = kmfl_create_ic (im); - kmfl->display = XOpenDisplay(NULL); - - return (GObject *) kmfl; -} - - -static void -ibus_kmfl_engine_destroy (IBusKMFLEngine *kmfl) -{ - const gchar *engine_name; - - g_debug("DAR: ibus_kmfl_engine_destroy"); - engine_name = ibus_engine_get_name ((IBusEngine *) kmfl); - g_assert (engine_name); - g_message("DAR: ibus_kmfl_engine_destroy %s", engine_name); - - if (kmfl->prop_list) { - g_debug("DAR: unref kmfl->prop_list"); - g_object_unref (kmfl->prop_list); - kmfl->prop_list = NULL; - } - - if (kmfl->status_prop) { - g_debug("DAR: unref kmfl->status_prop"); - g_object_unref (kmfl->status_prop); - kmfl->status_prop = NULL; - } - - if (kmfl->table) { - g_debug("DAR: unref kmfl->table"); - g_object_unref (kmfl->table); - kmfl->table = NULL; - } - - if (kmfl->context) { - kmfl_destroy_ic (kmfl->context); - kmfl->context = NULL; - } - - if (kmfl->display) { - XCloseDisplay(kmfl->display); - kmfl->display = NULL; - } - - g_hash_table_remove(im_table, engine_name); - - IBUS_OBJECT_CLASS (parent_class)->destroy ((IBusObject *)kmfl); -} - -static void -ibus_kmfl_engine_commit_string (IBusKMFLEngine *kmfl, - const gchar *string) -{ - IBusText *text; - g_debug("DAR: ibus_kmfl_engine_commit_string - %s", string); - text = ibus_text_new_from_static_string (string); - g_object_ref_sink(text); - ibus_engine_commit_text ((IBusEngine *)kmfl, text); - g_object_unref (text); -} - -int is_key_pressed(Display * display, char *key_vec, KeySym keysym) -{ - unsigned char keycode; - keycode = XKeysymToKeycode(display, keysym); - return key_vec[keycode >> 3] & (1 << (keycode & 7)); -} - -static void forward_key(IBusKMFLEngine *engine, unsigned int keysym, unsigned int state) -{ - unsigned char keycode; - g_debug("DAR: forward_key"); - keycode = XKeysymToKeycode(engine->display, keysym); - ibus_engine_forward_key_event((IBusEngine *)engine, keysym, keycode-8, state); - } - -static gboolean -ibus_kmfl_engine_process_key_event (IBusEngine *engine, - guint keyval, - guint keycode, - guint state) -{ - IBusKMFLEngine *kmfl = (IBusKMFLEngine *) engine; - - if (state & IBUS_RELEASE_MASK) - return FALSE; - - g_debug("DAR: ibus_kmfl_engine_process_key_event - keyval=%x, keycode=%x, state=%x", keyval, keycode, state); - - // If a modifier key is pressed, check to see if it is a right modifier key - // This is rather expensive so only do it if a shift state is active - int right_modifier_state = 0; - if (state & (IBUS_SHIFT_MASK | IBUS_CONTROL_MASK | IBUS_MOD1_MASK)) { - Display * m_display = XOpenDisplay(NULL);; - char key_vec[32]; - XQueryKeymap(m_display, key_vec); - - if ((state & IBUS_MOD1_MASK) && is_key_pressed(m_display, key_vec, IBUS_Alt_R)) { - right_modifier_state |= (IBUS_MOD1_MASK << 8); - } - - if ((state & IBUS_CONTROL_MASK) && is_key_pressed(m_display, key_vec, IBUS_Control_R)) { - right_modifier_state |= (IBUS_CONTROL_MASK << 8); - } - - if ((state & IBUS_SHIFT_MASK) && is_key_pressed(m_display, key_vec, IBUS_Shift_R)) { - right_modifier_state |= (IBUS_SHIFT_MASK << 8); - } - XCloseDisplay(m_display); - } - g_debug("DAR: ibus_kmfl_engine_process_key_event - right_modifier_state=%x", right_modifier_state); - // Let the application handle user generated backspaces after resetting the kmfl history - if (keyval == IBUS_BackSpace) { - clear_history(kmfl->context->p_kmsi); - } else if (kmfl_interpret(kmfl->context->p_kmsi, keyval, state | right_modifier_state) == 1) { - GList * p; - for (p=kmfl->context->cmds; p != NULL; p = p->next) { - Cmd * cmd = (Cmd *) p->data; - if (cmd) { - switch (cmd->opcode) { - case OUTPUT_STRING: - ibus_kmfl_engine_commit_string(kmfl, cmd->cmdarg); - break; - case ERASE_CHAR: - g_debug("DAR: ibus_kmfl_engine_process_key_event - client_capabilities=%x, %x, %x", engine->client_capabilities, IBUS_CAP_SURROUNDING_TEXT, engine->client_capabilities & IBUS_CAP_SURROUNDING_TEXT); - - if ((engine->client_capabilities & IBUS_CAP_SURROUNDING_TEXT) != 0) { - ibus_engine_delete_surrounding_text(engine, -1, 1); - if ((engine->client_capabilities & IBUS_CAP_SURROUNDING_TEXT) == 0) { - forward_key(kmfl, IBUS_BackSpace, 0); - } - } else - forward_key(kmfl, IBUS_BackSpace, 0); - break; - case FORWARD_KEYEVENT: - break; - case OUTPUT_BEEP: - break; - } - if (cmd->cmdarg) - g_free(cmd->cmdarg); - g_free(cmd); - } - } - g_list_free(kmfl->context->cmds); - kmfl->context->cmds=NULL; - return TRUE; - } - - return FALSE; - } - -static void -ibus_kmfl_engine_focus_in (IBusEngine *engine) -{ - IBusKMFLEngine *kmfl = (IBusKMFLEngine *) engine; - - ibus_engine_register_properties (engine, kmfl->prop_list); - - parent_class->focus_in (engine); -} - -static void -ibus_kmfl_engine_focus_out (IBusEngine *engine) -{ - IBusKMFLEngine *kmfl = (IBusKMFLEngine *) engine; - - parent_class->focus_out (engine); -} - -static void -ibus_kmfl_engine_reset (IBusEngine *engine) -{ - IBusKMFLEngine *kmfl = (IBusKMFLEngine *) engine; - - parent_class->reset (engine); - ibus_kmfl_engine_focus_in (engine); -} - -static void -ibus_kmfl_engine_enable (IBusEngine *engine) -{ - const gchar *engine_name; - IBusKMFLEngine *kmfl = (IBusKMFLEngine *) engine; - KInputMethod *im; - - engine_name = ibus_engine_get_name (engine); - g_assert (engine_name); - g_message("WDG: ibus_kmfl_engine_enable %s", engine_name); - parent_class->enable (engine); -} - -static void -ibus_kmfl_engine_disable (IBusEngine *engine) -{ - const gchar *engine_name; - IBusKMFLEngine *kmfl = (IBusKMFLEngine *) engine; - - engine_name = ibus_engine_get_name (engine); - g_assert (engine_name); - g_message("WDG: ibus_kmfl_engine_disable %s", engine_name); - ibus_kmfl_engine_focus_out (engine); - - parent_class->disable (engine); -} - -static void -ibus_kmfl_engine_page_up (IBusEngine *engine) -{ - IBusKMFLEngine *kmfl = (IBusKMFLEngine *) engine; - - parent_class->page_up (engine); -} - -static void -ibus_kmfl_engine_page_down (IBusEngine *engine) -{ - - IBusKMFLEngine *kmfl = (IBusKMFLEngine *) engine; - - parent_class->page_down (engine); -} - -static void -ibus_kmfl_engine_cursor_up (IBusEngine *engine) -{ - - IBusKMFLEngine *kmfl = (IBusKMFLEngine *) engine; - - parent_class->cursor_up (engine); -} - -static void -ibus_kmfl_engine_cursor_down (IBusEngine *engine) -{ - - IBusKMFLEngine *kmfl = (IBusKMFLEngine *) engine; - - parent_class->cursor_down (engine); -} - -static void -ibus_kmfl_engine_property_activate (IBusEngine *engine, - const gchar *prop_name, - guint prop_state) -{ - parent_class->property_activate (engine, prop_name, prop_state); -} - diff --git a/linux/legacy/ibus-kmfl/src/engine.h b/linux/legacy/ibus-kmfl/src/engine.h deleted file mode 100644 index 6f977ad41b..0000000000 --- a/linux/legacy/ibus-kmfl/src/engine.h +++ /dev/null @@ -1,34 +0,0 @@ -/* vim:set et sts=4: */ - -/* - * KMFL Input Method for IBUS (The Input Bus) - * - * Copyright (C) 2009 SIL International - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - */ - -#ifndef __ENGINE_H__ -#define __ENGINE_H__ - -#include - -#define IBUS_TYPE_KMFL_ENGINE \ - (ibus_kmfl_engine_get_type ()) - -GType ibus_kmfl_engine_get_type (void); - -#endif diff --git a/linux/legacy/ibus-kmfl/src/kmfl.xml.in.in b/linux/legacy/ibus-kmfl/src/kmfl.xml.in.in deleted file mode 100644 index 32a2f47a17..0000000000 --- a/linux/legacy/ibus-kmfl/src/kmfl.xml.in.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - org.freedesktop.IBus.KMFL - KMFL Component - ${libexecdir}/ibus-engine-kmfl --ibus - @VERSION@ - Doug Rintoul <doug_rintoul@sil.org> - GPL - http://kmfl.sourceforge.net - ibus-kmfl - - /usr/share/kmfl/ - ~/.kmfl/ - /usr/local/share/kmfl/ - - - diff --git a/linux/legacy/ibus-kmfl/src/kmflutil.c b/linux/legacy/ibus-kmfl/src/kmflutil.c deleted file mode 100644 index 2e4eb9406b..0000000000 --- a/linux/legacy/ibus-kmfl/src/kmflutil.c +++ /dev/null @@ -1,487 +0,0 @@ -/* vim:set et sts=4: */ - -/* - * KMFL Input Method for IBUS (The Input Bus) - * - * Copyright (C) 2009-2018 SIL International - * - * kmflutil is dual licensed under the MIT or GPL licenses as described below. - * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - * MIT license - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * OR - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - */ - - - -#include -#include -#include -#include -#include -#include - -#include "kmflutil.h" - -#define N_(text) text -static gchar * get_dirname(const gchar * path) -{ - gchar * dirend = g_strrstr(path, "/"); - - if (dirend) { - return g_strndup(path, dirend-path); - } else { - return g_strdup(""); - } -} - -GList * kmfl_get_keyboard_fromdir( GList *keyboard_list, const gchar * path) -{ -// g_message("KMFL: getting from dir: %s", path); - DIR *dir = opendir(path); - - if (dir != NULL) { - struct dirent *file = readdir(dir); - while (file != NULL) { - struct stat filestat; - gchar * absfn = g_strdup_printf("%s/%s", path, file->d_name); - stat(absfn, &filestat); - - if (S_ISDIR(filestat.st_mode)) - { - if(strcmp(file->d_name, ".") != 0 && strcmp(file->d_name, "..") != 0) - keyboard_list = kmfl_get_keyboard_fromdir(keyboard_list, absfn); - g_free(absfn); - } - - // Only .kmfl and .kmn extensions are valid keyboard files - else if (S_ISREG(filestat.st_mode) - && ((g_str_has_suffix(absfn, ".kmfl") && kmfl_check_keyboard(absfn) == 0) - || g_str_has_suffix(absfn, ".kmn"))) { - - keyboard_list=g_list_append(keyboard_list, absfn); - } - else - { - g_free(absfn); - } - - file = readdir(dir); - } - closedir(dir); - } - return keyboard_list; -} - -GList * kmfl_get_keyboard_list( const gchar * path) -{ - GList * keyboard_list=NULL; - keyboard_list = kmfl_get_keyboard_fromdir(keyboard_list, path); - return keyboard_list; -} - -gchar * kmfl_get_icon_file(KInputMethod * im) -{ - const char * icon_file = kmfl_icon_file(im->keyboard_number); - gchar * full_path_to_icon_file=NULL; - struct stat filestat; - char * valid_extensions[]= {"", ".png", ".bmp", ".jpg", NULL}; - int valid_extension_index; - - if (strlen(icon_file) > 0) { - for (valid_extension_index=0; valid_extensions[valid_extension_index] != NULL; valid_extension_index++) { - full_path_to_icon_file=g_strdup_printf("%s/%s%s", get_dirname(im->keyboard_filename), icon_file, valid_extensions[valid_extension_index]); - - stat(full_path_to_icon_file, &filestat); - - if (S_ISREG(filestat.st_mode)) { - break; - } else { - g_free(full_path_to_icon_file); - full_path_to_icon_file=NULL; - } - } - } - - if (full_path_to_icon_file==NULL) - full_path_to_icon_file=g_strdup("/usr/share/kmfl/icons/default.png"); - - return full_path_to_icon_file; -} - -gchar * kmfl_get_ldml_file(KInputMethod * im) -{ - gchar * full_path_to_ldml_file=NULL, *p, *filename; - struct stat filestat; - - if(g_strcmp0(im->keyboard_visualkeyboard, "") == 0) - { - g_debug("WDG: no kvk(s) so no ldml file"); - return g_strdup(""); - } - p=rindex(im->keyboard_visualkeyboard,'.'); - if (p==NULL) - { - g_debug("WDG: couldn't find . in vk filename %s", im->keyboard_visualkeyboard); - return g_strdup(""); - } - if (strncmp(p, ".kvk", 4) != 0) // sometimes kmn have kvks as the "visual keyboard" - { - g_debug("WDG: visual keyboard is not a kvk. Filename: %s", im->keyboard_visualkeyboard); - return g_strdup(""); - } - filename = g_strndup(im->keyboard_visualkeyboard, p-(im->keyboard_visualkeyboard)); - full_path_to_ldml_file=g_strdup_printf("%s/%s.ldml", get_dirname(im->keyboard_filename), filename); - g_free(filename); - // don't forget to stat for the file before returning - stat(full_path_to_ldml_file, &filestat); - - if (!S_ISREG(filestat.st_mode)) { - g_debug("WDG: couldn't find ldml file %s", full_path_to_ldml_file); - g_free(full_path_to_ldml_file); - full_path_to_ldml_file=g_strdup(""); - } - return full_path_to_ldml_file; -} - -void kmfl_get_keyboard_info(KInputMethod * im) -{ - char buf[1024]; - KMSI * p_kmsi; - - im->keyboard_name = g_strdup(kmfl_keyboard_name(im->keyboard_number)); - p_kmsi = kmfl_make_keyboard_instance(NULL); - kmfl_attach_keyboard(p_kmsi, im->keyboard_number); - - *buf='\0'; - kmfl_get_header(p_kmsi,SS_AUTHOR,buf,sizeof(buf) - 1); - im->keyboard_author=g_strdup(buf); - - *buf='\0'; - kmfl_get_header(p_kmsi,SS_COPYRIGHT,buf,sizeof(buf) - 1); - im->keyboard_copyright=g_strdup(buf); - - *buf='\0'; - kmfl_get_header(p_kmsi,SS_LANGUAGE,buf,sizeof(buf) - 1); - im->keyboard_language=g_strdup(buf); - - *buf='\0'; - kmfl_get_header(p_kmsi,SS_MESSAGE,buf,sizeof(buf) - 1); - im->keyboard_description=g_strdup(buf); - - if (g_strrstr(buf, "license") || g_strrstr(buf, "License") || g_strrstr(buf, "LICENSE")) - im->keyboard_license=g_strdup(buf); - else - im->keyboard_license=g_strdup(""); - - *buf='\0'; - kmfl_get_header(p_kmsi,SS_VISUALKEYBOARD,buf,sizeof(buf) - 1); - im->keyboard_visualkeyboard=g_strdup(buf); - - *buf='\0'; - kmfl_get_header(p_kmsi,SS_KEYBOARDVERSION,buf,sizeof(buf) - 1); - im->keyboard_keyboardversion=g_strdup(buf); - - *buf='\0'; - kmfl_get_header(p_kmsi,SS_LAYOUT,buf,sizeof(buf) - 1); - if (*buf != '\0') - im->keyboard_layout=g_strdup(buf); - else - im->keyboard_layout=g_strdup("us"); - - kmfl_detach_keyboard(p_kmsi); - kmfl_delete_keyboard_instance(p_kmsi); - im->keyboard_icon_filename = kmfl_get_icon_file(im); - im->keyboard_ldmlfile = kmfl_get_ldml_file(im); -} - -void kmfl_free_keyboard_info(KInputMethod * im) -{ - g_assert(im != NULL); - g_free(im->keyboard_filename); - g_free(im->keyboard_name); - g_free(im->keyboard_author); - g_free(im->keyboard_copyright); - g_free(im->keyboard_language); - g_free(im->keyboard_description); - g_free(im->keyboard_icon_filename); - g_free(im->keyboard_layout); - g_free(im->keyboard_license); - g_free(im->keyboard_visualkeyboard); - g_free(im->keyboard_keyboardversion); - g_free(im->keyboard_ldmlfile); -} - - -static IBusEngineDesc * -ibus_kmfl_engine_new (gchar * file_name, - gchar *lang, - gchar *name, - gchar *author, - gchar *icon, - gchar *copyright, - gchar *description, - gchar *layout, - gchar *license) -{ - IBusEngineDesc *engine; - gchar * desc = g_strdup_printf("%s\n%s", description, copyright); - - engine = ibus_engine_desc_new (file_name, - name, - desc ? desc : "", - lang, - license ? license : "", - author ? author : "", - icon ? icon : "", - layout); - - return engine; -} - -GList * -ibus_kmfl_add_engines(GList * engines, GList * keyboard_list) -{ - GList *p; - for (p=keyboard_list; p != NULL; p = p->next) { - gchar * keyboard_filename = (gchar *) p->data; - KInputMethod im; - - im.keyboard_number = kmfl_load_keyboard(keyboard_filename); - if (im.keyboard_number >=0) { - im.keyboard_filename = g_strdup(keyboard_filename); - - kmfl_get_keyboard_info(&im); - engines = g_list_append (engines, ibus_kmfl_engine_new (keyboard_filename, im.keyboard_language, im.keyboard_name, im.keyboard_author, im.keyboard_icon_filename, im.keyboard_copyright, im.keyboard_description, im.keyboard_layout, im.keyboard_license)); - g_free(p->data); - kmfl_free_keyboard_info(&im); - } - } - return engines; -} - -GList * -ibus_kmfl_list_engines (void) -{ - GList *engines = NULL; - GList *keyboard_list; - gchar *local_keyboard_path; - - keyboard_list = kmfl_get_keyboard_list("/usr/share/kmfl"); - engines = ibus_kmfl_add_engines(engines, keyboard_list); - g_list_free(keyboard_list); - - keyboard_list = kmfl_get_keyboard_list("/usr/local/share/kmfl"); - engines = ibus_kmfl_add_engines(engines, keyboard_list); - g_list_free(keyboard_list); - - local_keyboard_path= g_strdup_printf("%s/.kmfl", getenv("HOME")); - keyboard_list = kmfl_get_keyboard_list(local_keyboard_path); - engines = ibus_kmfl_add_engines(engines, keyboard_list); - g_free(local_keyboard_path); - g_list_free(keyboard_list); - - return engines; -} - -IBusComponent * -ibus_kmfl_get_component (void) -{ - GList *engines, *p; - IBusComponent *component; - - component = ibus_component_new ("org.freedesktop.IBus.KMFL", - N_("KMFL"), - "0.1.0", - "GPL", - "Doug Rintoul next) { - ibus_component_add_engine (component, (IBusEngineDesc *) p->data); - } - - g_list_free (engines); - return component; -} - -KInputMethod * kinput_open_im(const gchar * keyboard_filename) -{ - KInputMethod * im = g_new(KInputMethod, 1); - - if (im != NULL) { - im->keyboard_number = kmfl_load_keyboard(keyboard_filename); - if (im->keyboard_number < 0) { - g_free(im); - im = NULL; - } else { - im->keyboard_filename = g_strdup(keyboard_filename); - kmfl_get_keyboard_info(im) ; - } - } - return im; -} - -void kinput_close_im(KInputMethod * im) -{ - g_assert(im != NULL); - kmfl_free_keyboard_info(im); - kmfl_unload_keyboard(im->keyboard_number); - g_free(im); -} - -void output_string(void *contrack, char *ptr) { - KInputContext * ic = (KInputContext *)contrack; - g_debug("DAR: output_string - ic->cmds=%p", ic->cmds); - if (ptr) { - Cmd * cmd = g_new(Cmd, 1); - cmd->opcode=OUTPUT_STRING; - cmd->cmdarg=g_strdup(ptr); - ic->cmds = g_list_append(ic->cmds, cmd); - } -} - -void erase_char(void *contrack) { - KInputContext * ic = (KInputContext *)contrack; - g_debug("DAR: erase_char - ic->cmds=%p", ic->cmds); - Cmd * cmd = g_new(Cmd, 1); - cmd->opcode = ERASE_CHAR; - cmd->cmdarg=NULL; - ic->cmds = g_list_append(ic->cmds, cmd); -} - -void output_char(void *contrack, unsigned char byte) { - if (byte == 8) { - erase_char(contrack); - } else { - char s[2]; - s[0] = byte; - s[1] = '\0'; - output_string(contrack, s); - } -} - -void forward_keyevent(void *contrack, unsigned int key, unsigned int state) -{ - -} - -void output_beep(void *contrack) { - KInputContext * ic = (KInputContext *)contrack; - Cmd * cmd = g_new(Cmd, 1); - cmd->opcode = OUTPUT_BEEP; - cmd->cmdarg=NULL; - ic->cmds = g_list_append(ic->cmds, cmd); -} - - -/* - * Create an input context - */ -KInputContext * -kmfl_create_ic(KInputMethod *im) -{ - KInputContext * ic; - g_debug("DAR: kmfl_create_ic"); - ic = g_new(KInputContext, 1); - ic->cmds = NULL; - ic->p_kmsi=kmfl_make_keyboard_instance(ic); - kmfl_attach_keyboard(ic->p_kmsi, im->keyboard_number); - - return ic; -} - - -/* - * Destroy an input context - */ -void -kmfl_destroy_ic(KInputContext *ic) -{ - GList * p; - g_debug("DAR: kmfl_destroy_ic"); - kmfl_detach_keyboard(ic->p_kmsi); - kmfl_delete_keyboard_instance(ic->p_kmsi); - - if (ic->cmds) { - for (p=ic->cmds; p != NULL; p = p->next) { - Cmd * cmd = (Cmd *)p->data; - if (cmd) { - if (cmd->cmdarg) - g_free(cmd->cmdarg); - g_free(cmd); - } - } - g_list_free(ic->cmds); - ic->cmds=NULL; - } - -} - -#ifdef DEBUG -#include - -int main () -{ - IBusComponent *component; - GString *output; - - setlocale (LC_ALL, ""); - ibus_init (); - - component = ibus_kmfl_get_component (); - - output = g_string_new (""); - - ibus_component_output (component, output, 1); - - g_debug ("\n%s", output->str); - - g_string_free (output, TRUE); - g_object_unref (component); - - return 0; -} -#endif - diff --git a/linux/legacy/ibus-kmfl/src/kmflutil.h b/linux/legacy/ibus-kmfl/src/kmflutil.h deleted file mode 100644 index 1358d48b8e..0000000000 --- a/linux/legacy/ibus-kmfl/src/kmflutil.h +++ /dev/null @@ -1,100 +0,0 @@ -/* vim:set et sts=4: */ - -/* - * KMFL Input Method for IBUS (The Input Bus) - * - * Copyright (C) 2009-2018 SIL International - * - * kmflutil is dual licensed under the MIT or GPL licenses as described below. - * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - * MIT license - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * OR - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - */ - -#ifndef __KMFLUTIL_H__ -#define __KMFLUTIL_H__ - -#include -#include -#include - -typedef enum {OUTPUT_STRING, ERASE_CHAR, FORWARD_KEYEVENT, OUTPUT_BEEP} kmfl_opcodes; - -typedef struct -{ - kmfl_opcodes opcode; - gchar * cmdarg; -} Cmd; - -typedef struct -{ - KMSI * p_kmsi; - GList * cmds; -} KInputContext; - -typedef struct -{ - int keyboard_number; - gchar * keyboard_filename; - gchar * keyboard_icon_filename; - gchar * keyboard_id; - gchar * keyboard_name; - gchar * keyboard_language; - gchar * keyboard_author; - gchar * keyboard_copyright; - gchar * keyboard_description; - gchar * keyboard_layout; - gchar * keyboard_license; - gchar * keyboard_visualkeyboard; - gchar * keyboard_keyboardversion; - gchar * keyboard_ldmlfile; - -} KInputMethod; - -void ibus_kmfl_init (void); -GList *ibus_kmfl_list_engines (void); -IBusComponent *ibus_kmfl_get_component (void); -KInputMethod *kinput_open_im (const gchar * keyboard_filename); -KInputContext *kmfl_create_ic (KInputMethod *im); -void kmfl_destroy_ic (KInputContext *ic); -void kinput_close_im (KInputMethod * im); -void kmfl_get_keyboard_info (KInputMethod * im); -#endif diff --git a/linux/legacy/ibus-kmfl/src/main.c b/linux/legacy/ibus-kmfl/src/main.c deleted file mode 100644 index 4d29670801..0000000000 --- a/linux/legacy/ibus-kmfl/src/main.c +++ /dev/null @@ -1,136 +0,0 @@ -/* vim:set et sts=4: */ - -/* - * KMFL Input Method for IBUS (The Input Bus) - * - * Copyright (C) 2009 SIL International - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - */ - -#include -#include -#include -#include -#include "kmflutil.h" -#include "engine.h" - -static IBusBus *bus = NULL; -static IBusFactory *factory = NULL; - -/* options */ -static gboolean xml = FALSE; -static gboolean ibus = FALSE; -static gboolean verbose = 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 }, - { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "verbose", NULL }, - { NULL }, -}; - - -static void -ibus_disconnected_cb (IBusBus *bus, - gpointer user_data) -{ - ibus_quit (); -} - - -static void -start_component (void) -{ - GList *engines, *p; - IBusComponent *component; - - ibus_init (); - - bus = ibus_bus_new (); - - component = ibus_kmfl_get_component (); - - 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); -#else - const gchar *engine_name = engine->name; -#endif /* !IBUS_CHECK_VERSION(1,3,99) */ - ibus_factory_add_engine (factory, engine_name, IBUS_TYPE_KMFL_ENGINE); - } - - if (ibus) { - ibus_bus_request_name (bus, "org.freedesktop.IBus.KMFL", 0); - } - else { - ibus_bus_register_component (bus, component); - } - - g_object_unref (component); - - ibus_main (); -} - -static void -print_engines_xml (void) -{ - IBusComponent *component; - GString *output; - - ibus_init (); - - component = ibus_kmfl_get_component (); - output = g_string_new (""); - - ibus_component_output_engines (component, output, 0); - - fprintf (stdout, "%s", output->str); - - g_string_free (output, TRUE); - -} - -int -main (gint argc, gchar **argv) -{ - GError *error = NULL; - GOptionContext *context; - - setlocale (LC_ALL, ""); - - context = g_option_context_new ("- ibus KMFL engine component"); - - g_option_context_add_main_entries (context, entries, "ibus-kmfl"); - - 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); - } - - start_component (); - return 0; -} diff --git a/linux/legacy/kmflcomp/AUTHORS b/linux/legacy/kmflcomp/AUTHORS deleted file mode 100644 index 03bd9268e7..0000000000 --- a/linux/legacy/kmflcomp/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -John Durdin (jmdurdin@tavultesoft.com) -Doug Rintoul (doug_rintoul@sil.org) diff --git a/linux/legacy/kmflcomp/COPYING b/linux/legacy/kmflcomp/COPYING deleted file mode 100644 index 4587de8ab2..0000000000 --- a/linux/legacy/kmflcomp/COPYING +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2017 SIL International - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/linux/legacy/kmflcomp/ChangeLog b/linux/legacy/kmflcomp/ChangeLog deleted file mode 100644 index 5af89fa15f..0000000000 --- a/linux/legacy/kmflcomp/ChangeLog +++ /dev/null @@ -1,77 +0,0 @@ -kmflcomp (10.99.1-1) - - * Change license to MIT as it is being moved into Keyman 11 - * Keyman is now owned by SIL - * kmflcomp can now compile Keyman kmn source files up to version 10 - provided they don't use newer syntax - - -- Daniel Glassey Wed, 12 Sep 2018 11:43:22 +0700 - -kmflcomp (0.9.10-1) - - * fix bug in processing special stores when special store name is invalid - - -- Doug Rintoul Thu, 24 Oct 2013 14:13:31 -0700 - -kmflcomp (0.9.9-1) - - * bugfix for FreeBSD amd64 - - -- Doug Rintoul Fri, 23 Jul 2010 09:49:20 -0700 - -kmflcomp (0.9.8) - - * add Platform conditionals - * add support for Keyman 7 - - -- Doug Rintoul Mon, 26 Jan 2009 12:54:38 -0800 - -kmflcomp (0.9.7) - - * Add libx11 to link - - -- Doug Rintoul Thu, 16 Oct 2008 16:41:09 -0700 - -kmflcomp (0.9.6) - - * add support for get_surrounding_text to provide context sensitive input - methods - * add the ability to reload keyboards on the fly - - -- Doug Rintoul Tue, 7 Nov 2006 14:57:53 -0800 - - -kmflcomp (0.9.4-1) - - * Consolidate utfconv to kmflcomp - * fix reinitialization bug when using kmflcomp to load multiple keyboards - - -- Doug Rintoul Fri, 16 Jun 2006 11:10:00 -0700 - - -kmflcomp (0.9.2-1) - - * Replace UTF Conversion library with a GPLed implementation - * add version and usage message to kmflcomp - - -- Doug Rintoul Thu, 02 Mar 2006 11:10:00 -0800 - -kmflcomp (0.9.1-1) - - * fix headers for C++ inclusion - * fix bug when compile a keyboard with Non UTF upper ANSI characters - - -- Doug Rintoul Tue, 02 Feb 2006 11:40:00 -0800 - -0.9 30-Aug-2005 - Fix Shift key problem -0.8 4-Jul-2005 - Add full support for virtual keys. -0.7 2-Jun-2005 - Fix bug when keyboard name was greater than 31 characters. - Increase maximum size of names to 64 characters and add warnings when names exceed this amount - Allow stores to be used before they are defined -0.6 31-May-2005 - Add the ability to load uncompiled keyboards on the fly - - diff --git a/linux/legacy/kmflcomp/Makefile.am b/linux/legacy/kmflcomp/Makefile.am deleted file mode 100644 index 32defa2b06..0000000000 --- a/linux/legacy/kmflcomp/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -## Process this file with automake to produce Makefile.in -## Created by Anjuta - will be overwritten -## If you don't want it to overwrite it, -## Please disable it in the Anjuta project configuration - -SUBDIRS = include src kmfl_compiler - -kmflcompdocdir = ${docdir} -kmflcompdoc_DATA = \ - README\ - COPYING\ - AUTHORS\ - ChangeLog\ - INSTALL\ - NEWS - -EXTRA_DIST = $(kmflcompdoc_DATA) VERSION - -# Copy all the spec files. Of cource, only one is actually used. -dist-hook: - for specfile in *.spec; do \ - if test -f $$specfile; then \ - cp -p $$specfile $(distdir); \ - fi \ - done - diff --git a/linux/legacy/kmflcomp/NEWS b/linux/legacy/kmflcomp/NEWS deleted file mode 100644 index 6b36eb5c64..0000000000 --- a/linux/legacy/kmflcomp/NEWS +++ /dev/null @@ -1,6 +0,0 @@ -10.99 ------ - -kmflcomp now supports special stores added since Keyman version 6.0. -However it does not support the newer syntax. -Keyboards for Keyman > 6.0 which only use older syntax should compile diff --git a/linux/legacy/kmflcomp/README b/linux/legacy/kmflcomp/README deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/linux/legacy/kmflcomp/README.repo b/linux/legacy/kmflcomp/README.repo deleted file mode 100644 index 6a2837ad43..0000000000 --- a/linux/legacy/kmflcomp/README.repo +++ /dev/null @@ -1,5 +0,0 @@ -You need autoconf, automake and libtool to generate the build system - -flex and bison are useful to rebuild lex.l and yacc.y but not essential - -Run ./autogen.sh to run them diff --git a/linux/legacy/kmflcomp/VERSION b/linux/legacy/kmflcomp/VERSION deleted file mode 120000 index 558194c5a5..0000000000 --- a/linux/legacy/kmflcomp/VERSION +++ /dev/null @@ -1 +0,0 @@ -../../VERSION \ No newline at end of file diff --git a/linux/legacy/kmflcomp/acinclude.m4 b/linux/legacy/kmflcomp/acinclude.m4 deleted file mode 100644 index 009184e2bf..0000000000 --- a/linux/legacy/kmflcomp/acinclude.m4 +++ /dev/null @@ -1,67 +0,0 @@ -AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) - -AC_DEFUN([AC_YACC_EXPECT],[ -AC_MSG_CHECKING([whether $YACC understands %expect]) -cat > ac_test.y <<_ACEOF -%{ -%} -%union - { int simple; } -%expect 0 -%token T_SIMP -%type T_RES -%% -T_RES : - T_SIMP T_SIMP - ; -%% -_ACEOF - -if ${YACC} ac_test.y 2>/dev/null -then -AC_MSG_RESULT(yes) -rm -f ac_test.y y.tab.c -YACC_PREEXPECT='' -YACC_POSTEXPECT='' -else -AC_MSG_RESULT(no) -rm -f ac_test.y -YACC_PREEXPECT="/*" -YACC_POSTEXPECT="*/" -fi -AC_SUBST(YACC_PREEXPECT) -AC_SUBST(YACC_POSTEXPECT) -]) - -AC_DEFUN([AC_YACC_ERROR],[ -AC_MSG_CHECKING([whether $YACC understands error]) -cat > ac_test.y <<_ACEOF -%{ -%} -%union - { int simple; } -%token T_SIMP -%type T_RES -%% -T_RES : - T_SIMP T_SIMP { } - | error T_SIMP { } - ; -%% -_ACEOF - -if ${YACC} ac_test.y 2>/dev/null -then -AC_MSG_RESULT(yes) -rm -f ac_test.y y.tab.c -YACC_PREERROR='' -YACC_POSTERROR='' -else -AC_MSG_RESULT(no) -rm -f ac_test.y -YACC_PREERROR="/*" -YACC_POSTERROR="*/" -fi -AC_SUBST(YACC_PREERROR) -AC_SUBST(YACC_POSTERROR) -]) diff --git a/linux/legacy/kmflcomp/autogen.sh b/linux/legacy/kmflcomp/autogen.sh deleted file mode 100755 index 905970e6df..0000000000 --- a/linux/legacy/kmflcomp/autogen.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -autoreconf -if diff --git a/linux/legacy/kmflcomp/configure.ac b/linux/legacy/kmflcomp/configure.ac deleted file mode 100644 index 097c2b019d..0000000000 --- a/linux/legacy/kmflcomp/configure.ac +++ /dev/null @@ -1,107 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl Created by Anjuta - will be overwritten -dnl If you don't want it to overwrite it, -dnl Please disable it in the Anjuta project configuration - -AC_INIT(kmflcomp, m4_esyscmd_s([cat VERSION])) -AM_INIT_AUTOMAKE - -AM_CONFIG_HEADER(config.h) - -AC_ISC_POSIX -AC_SUBST(CFLAGS,$CFLAGS) -AC_PROG_CC -AM_PROG_CC_STDC -AM_PROG_CC_C_O -AC_HEADER_STDC -AC_PROG_LIBTOOL -AM_PROG_LEX -AC_PROG_YACC -AC_YACC_EXPECT -AC_YACC_ERROR - -dnl Checks for programs. -dnl Checks for libraries. -dnl Checks for header files. -dnl Checks for typedefs, structures, and compiler characteristics. -dnl Checks for library functions. -dnl Checks for Additional stuffs. - -dnl Set PACKAGE SOURCE DIR in config.h. -packagesrcdir=`cd $srcdir && pwd` - -dnl Set PACKAGE PREFIX -if test "x${prefix}" = "xNONE"; then - packageprefix=${ac_default_prefix} -else - packageprefix=${prefix} -fi - -dnl Set PACKAGE DATA & DOC DIR -packagedatadir=share/${PACKAGE} -packagedocdir=doc/${PACKAGE} - -dnl Set PACKAGE DIRS in config.h. -packagepixmapsdir=${packagedatadir}/pixmaps -packagehelpdir=${packagedatadir}/help -packagemenudir=${packagedatadir} - -dnl Subst PACKAGE_DATA_DIR. -NO_PREFIX_PACKAGE_DATA_DIR="${packagedatadir}" -AC_SUBST(NO_PREFIX_PACKAGE_DATA_DIR) -PACKAGE_DATA_DIR="${packageprefix}/${packagedatadir}" -AC_SUBST(PACKAGE_DATA_DIR) - -dnl Subst PACKAGE_DOC_DIR. -NO_PREFIX_PACKAGE_DOC_DIR="${packagedocdir}" -AC_SUBST(NO_PREFIX_PACKAGE_DOC_DIR) -PACKAGE_DOC_DIR="${packageprefix}/${packagedocdir}" -AC_SUBST(PACKAGE_DOC_DIR) - -dnl Subst PACKAGE_PIXMAPS_DIR. -NO_PREFIX_PACKAGE_PIXMAPS_DIR="${packagepixmapsdir}" -AC_SUBST(NO_PREFIX_PACKAGE_PIXMAPS_DIR) -PACKAGE_PIXMAPS_DIR="${packageprefix}/${packagepixmapsdir}" -AC_SUBST(PACKAGE_PIXMAPS_DIR) - -dnl Subst PACKAGE_HELP_DIR. -NO_PREFIX_PACKAGE_HELP_DIR="${packagehelpdir}" -AC_SUBST(NO_PREFIX_PACKAGE_HELP_DIR) -PACKAGE_HELP_DIR="${packageprefix}/${packagehelpdir}" -AC_SUBST(PACKAGE_HELP_DIR) - -dnl Subst PACKAGE_MENU_DIR. -NO_PREFIX_PACKAGE_MENU_DIR="${packagemenudir}" -AC_SUBST(NO_PREFIX_PACKAGE_MENU_DIR) -PACKAGE_MENU_DIR="${packageprefix}/${packagemenudir}" -AC_SUBST(PACKAGE_MENU_DIR) - -AH_TEMPLATE([ENABLE_NLS]) -AH_TEMPLATE([HAVE_CATGETS]) -AH_TEMPLATE([HAVE_GETTEXT]) -AH_TEMPLATE([HAVE_LC_MESSAGES]) -AH_TEMPLATE([HAVE_STPCPY]) -AH_TEMPLATE([HAVE_LIBSM]) -AH_TEMPLATE([PACKAGE_LOCALE_DIR]) -AH_TEMPLATE([PACKAGE_DOC_DIR]) -AH_TEMPLATE([PACKAGE_DATA_DIR]) -AH_TEMPLATE([PACKAGE_PIXMAPS_DIR]) -AH_TEMPLATE([PACKAGE_HELP_DIR]) -AH_TEMPLATE([PACKAGE_MENU_DIR]) -AH_TEMPLATE([PACKAGE_SOURCE_DIR]) -AH_TEMPLATE([GETTEXT_PACKAGE]) - -AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${packageprefix}/${packagedatadir}") -AC_DEFINE_UNQUOTED(PACKAGE_DOC_DIR, "${packageprefix}/${packagedocdir}") -AC_DEFINE_UNQUOTED(PACKAGE_PIXMAPS_DIR, "${packageprefix}/${packagepixmapsdir}") -AC_DEFINE_UNQUOTED(PACKAGE_HELP_DIR, "${packageprefix}/${packagehelpdir}") -AC_DEFINE_UNQUOTED(PACKAGE_MENU_DIR, "${packageprefix}/${packagemenudir}") -AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}") - -AC_OUTPUT([ -Makefile -include/Makefile -src/Makefile -kmfl_compiler/Makefile -]) - diff --git a/linux/legacy/kmflcomp/debian/changelog b/linux/legacy/kmflcomp/debian/changelog deleted file mode 100644 index e4f188fe5d..0000000000 --- a/linux/legacy/kmflcomp/debian/changelog +++ /dev/null @@ -1,186 +0,0 @@ -kmflcomp (14.0.284-1) unstable; urgency=medium - - * New upstream release - * Re-release to Debian - - -- Eberhard Beilharz Fri, 14 Jan 2022 17:59:57 +0100 - -kmflcomp (14.0.283-2) unstable; urgency=medium - - * New upstream release - * Re-release to Debian - - -- Eberhard Beilharz Thu, 02 Dec 2021 12:02:10 +0100 - -kmflcomp (14.0.282-1) unstable; urgency=medium - - * New upstream release - * Re-release to Debian - - -- Eberhard Beilharz Wed, 29 Sep 2021 12:47:08 +0200 - -kmflcomp (14.0.280-1) unstable; urgency=medium - - * New upstream release - * Re-release to Debian - - -- Eberhard Beilharz Mon, 23 Aug 2021 17:37:57 +0200 - -kmflcomp (14.0.276-1) experimental; urgency=medium - - * New upstream release - * Re-release to Debian - - -- Eberhard Beilharz Fri, 11 Jun 2021 14:43:20 +0200 - -kmflcomp (14.0.273-1) experimental; urgency=medium - - * Keyman 14 - - -- Eberhard Beilharz Mon, 26 Apr 2021 18:24:41 +0200 - -kmflcomp (11.0.101-1) unstable; urgency=medium - - * New upstream beta 1 of Keyman for Linux 11.0 - * d/watch update for beta/stable - * d/control multi-arch - standards 4.3.0 no changes - - -- Daniel Glassey Thu, 03 Jan 2019 16:55:50 +0700 - -kmflcomp (10.99.33-3) unstable; urgency=medium - - * change to Debian Input Method Team maintainership - with me as uploader - - -- Daniel Glassey Wed, 24 Oct 2018 21:31:54 +0700 - -kmflcomp (10.99.33-2) unstable; urgency=medium - - * d/compat 11 - * change from cdbs to dh - - -- Daniel Glassey Mon, 22 Oct 2018 11:20:38 +0700 - -kmflcomp (10.99.33-1) unstable; urgency=medium - - * transition not required so uploading to unstable - * d/control: standards version 4.2.1 - no changes - * New upstream changes linking libX11 which closes: #616572 - - -- Daniel Glassey Fri, 19 Oct 2018 11:14:12 +0700 - -kmflcomp (10.99.32-1) experimental; urgency=medium - - * Change license to MIT as kmflcomp is being moved into Keyman 11 - * Keyman is now owned by SIL - * new upstream pre-release - - add new symbols to d/libkmflcomp0.symbols - * d/control remove build-dep on autotools-dev (compat 10) - update webpage - * New upstream pre-release - * added symbols in libkmflcomp0 so will require transition - * I am now the maintainer as I am the one working - on Keyman for Linux upstream - - -- Daniel Glassey Tue, 16 Oct 2018 13:09:24 +0700 - -kmflcomp (0.9.10-1) unstable; urgency=low - - * new upstream release - * bring d/compat to level 10 (Closes: #817512) - - d/control: B-D on debhelper > 10 - * update d/control: - - change short description to be more informative (Closes: #493522) - - change extended description to be more informative - - remove redundant Section: util from kmfl binary package - - add homepage field to source section - - remove build depend on dh-autoreconfig (not needed for compat 10) - - remove version constraint on cdbs (fulfilled in oldstable) - * include update for newer architectures (using autotools-dev) - from Wookey (Closes: #765228) - * empty dependency_libs in .la files to bring standards-version to 3.9.1.0 - * change copyright to machine-readable copyright-format to bring - standards-version to 3.9.3.0 - * bring standards-version to 3.9.8.0 (no other changes required) - * switch to dpkg-source 3.0 (quilt) format - * add watch file to check for newer upstream version - * add d/libkmflcomp0.symbols (for lintian warning no-symbols-control-file) - - -- Doug Rintoul Mon, 23 Jan 2017 11:36:01 -0800 - -kmflcomp (0.9.9-1) UNRELEASED; urgency=low - - * new upsteam release - - -- Doug Rintoul Fri, 23 Jul 2010 09:49:20 -0700 - -kmflcomp (0.9.8-1.1) unstable; urgency=medium - - * Non-maintainer upload. - * Update for newer architectures (using autotools-dev) (Closes: #765228) - - -- Wookey Thu, 15 Oct 2015 20:51:15 +0000 - -kmflcomp (0.9.8-1) unstable; urgency=low - - * add Platform conditionals - * add support for Keyman 7 - - -- Doug Rintoul Mon, 26 Jan 2009 12:54:38 -0800 - -kmflcomp (0.9.7-1) unstable; urgency=low - - * Add libx11 to link - * Add manpage for kmflcomp - - -- Doug Rintoul Thu, 20 Oct 2008 12:20:09 -0700 - - -kmflcomp (0.9.6-1) unstable; urgency=low - - * add support for get_surrounding_text to provide context sensitive input - methods - * add the ability to reload keyboards on the fly - - -- Doug Rintoul Tue, 7 Nov 2006 14:57:53 -0800 - -kmflcomp (0.9.3-1) unstable; urgency=low - - * Fix some packaging issues - - -- Daniel Glassey Sat, 4 Mar 2006 10:28:51 +0000 - -kmflcomp (0.9.2-1) unstable; urgency=low - - * Replace UTF Conversion library with a GPLed implementation - * add version and usage message to kmflcomp - - -- Doug Rintoul Thu, 02 Mar 2006 11:10:00 +0800 - -kmflcomp (0.9.1-1) unstable; urgency=low - - * fix headers for C++ inclusion - * fix bug when compile a keyboard with Non UTF upper ANSI characters - * AMD64 fixes - - -- Doug Rintoul Tue, 02 Feb 2006 11:40:00 +0800 - -kmflcomp (0.9-1) unstable; urgency=low - - * fix shift key problem - - -- Doug Rintoul Tue, 30 Aug 2005 11:20:00 +0800 - -kmflcomp (0.8-1) unstable; urgency=low - - * Add full virtual key support - - -- Doug Rintoul Mon, 04 Jul 2005 11:20:00 +0800 - -kmflcomp (0.7-1) unstable; urgency=low - - * first debian release - - -- Doug Rintoul Mon, 21 Jun 2005 19:57:17 +0800 diff --git a/linux/legacy/kmflcomp/debian/compat b/linux/legacy/kmflcomp/debian/compat deleted file mode 100644 index b4de394767..0000000000 --- a/linux/legacy/kmflcomp/debian/compat +++ /dev/null @@ -1 +0,0 @@ -11 diff --git a/linux/legacy/kmflcomp/debian/control b/linux/legacy/kmflcomp/debian/control deleted file mode 100644 index 5fd4997389..0000000000 --- a/linux/legacy/kmflcomp/debian/control +++ /dev/null @@ -1,55 +0,0 @@ -Source: kmflcomp -Priority: optional -Section: utils -Maintainer: Debian Input Method Team -Uploaders: - Keyman team , - Eberhard Beilharz , -Build-Depends: - debhelper (>= 11), - libx11-dev, -Standards-Version: 4.5.1 -Vcs-Git: https://github.com/keymanapp/keyman.git -Vcs-Browser: https://github.com/keymanapp/keyman/tree/master/linux/kmflcomp -Homepage: https://www.keyman.com - -Package: kmflcomp -Architecture: any -Depends: - libkmflcomp0 (= ${binary:Version}), - ${misc:Depends}, - ${shlibs:Depends}, -Multi-Arch: foreign -Description: KMFL (Keyboard Mapping for Linux) Compiler - The kmfl library is a multilingual text processing library that implements - the Keyman(C) text processing language. - . - Utility to compile Keyman-style keyboard layout files to a binary format for - use by the KMFL keystroke interpreter. - -Package: libkmflcomp-dev -Section: libdevel -Architecture: any -Depends: - libkmflcomp0 (= ${binary:Version}), - ${misc:Depends}, -Multi-Arch: same -Description: Development files for libkmflcomp - The kmfl library is a multilingual text processing library that implements - the Keyman(C) text processing language. - . - Development libraries and headers to use libkmflcomp in an application - -Package: libkmflcomp0 -Section: libs -Architecture: any -Depends: - ${misc:Depends}, - ${shlibs:Depends}, -Multi-Arch: same -Description: KMFL (Keyboard Mapping for Linux) compiler library - The kmfl library is a multilingual text processing library that implements - the Keyman(C) text processing language. - . - Library to compile Keyman layout files to a binary format for use by the - KMFL keystroke interpreter. diff --git a/linux/legacy/kmflcomp/debian/copyright b/linux/legacy/kmflcomp/debian/copyright deleted file mode 100644 index e9ac131bc5..0000000000 --- a/linux/legacy/kmflcomp/debian/copyright +++ /dev/null @@ -1,65 +0,0 @@ -Format: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?view=markup&pathrev=174 -Upstream-Name: kmflcomp -Upstream-Contact: Doug Rintoul - -Files: * -Copyright: Copyright (C) 2005-2021 SIL International -License: MIT - -Files: src/yacc.c - src/yacc.h -Copyright: Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -License: GPL-2+ with Bison 2.2 exception - -License: MIT - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - . - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -License: GPL-2+ with Bison 2.2 exception - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - . - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - . - On Debian systems, the full text of the GNU General Public - License version 2 can be found in the file - `/usr/share/common-licenses/GPL-2'. - . - As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - . - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. diff --git a/linux/legacy/kmflcomp/debian/gbp.conf b/linux/legacy/kmflcomp/debian/gbp.conf deleted file mode 100644 index 01571b6b1e..0000000000 --- a/linux/legacy/kmflcomp/debian/gbp.conf +++ /dev/null @@ -1,6 +0,0 @@ -[DEFAULT] -sign-tags = True -pristine-tar = False -pristine-tar-commit = False -[import-orig] -merge-mode = merge diff --git a/linux/legacy/kmflcomp/debian/kmflcomp.1 b/linux/legacy/kmflcomp/debian/kmflcomp.1 deleted file mode 100644 index 55df6cc172..0000000000 --- a/linux/legacy/kmflcomp/debian/kmflcomp.1 +++ /dev/null @@ -1,41 +0,0 @@ -.TH kmflcomp "1" "February 2009" "kmflcomp 0.9.8" -.SH NAME -kmflcomp \- keyboard mapping for linux compiler -.SH SYNOPSIS -.B kmflcomp \-v -.br -.BR kmflcomp " [" \-d "]" -.RB "[" \-f "]" -.RB "[" \-V "]" -.RB \fIkeyboardfile\fR -.br -.B kmflcomp \-h -.SH DESCRIPTION -KMFL is a keyboard input method project which brings Tavultesoft Keyman functionality to *nix operating systems. -.PP -kmflcomp is the keyboard compiler and syntax checker for the kmfl project. The files created by kmflcomp can be loaded by the kmfl libraries to provide input methods to clients. -.PP -Note that the kmfl libraries now have the capability to compile kmfl keyboards on the fly so kmflcomp is no longer strictly necessary. The most useful part of kmflcomp is its kmfl keyboard syntax checking. -.SH OPTIONS -.TP -.BR \fB\-d\fR -Output debugging information -.TP -.BR \fB\-f\fR -Force compilation even if there are errors found in the keyboard file -.TP -.BR \fB\-h\fR -Print this help message -.TP -.BR \fB\-V\fR -Be more verbose in kmfcomp's information messages -.TP -.BR \fB\-v\fR -Print program version -.SH "SEE ALSO" -The full documentation for -.B kmflcomp -can be found on the kmfl website (kmfl.sourceforge.net). -This includes documentation for the kmfl language syntax, useful for creating new keyboards, or modifying existing keyboards. -.SH AUTHORS -KMFL was developed jointly by SIL international(www.sil.org) and Tavultesoft(www.tavultesoft.com). The primary authors are John Durdin and Doug Rintoul. diff --git a/linux/legacy/kmflcomp/debian/kmflcomp.install b/linux/legacy/kmflcomp/debian/kmflcomp.install deleted file mode 100644 index 1df36c612f..0000000000 --- a/linux/legacy/kmflcomp/debian/kmflcomp.install +++ /dev/null @@ -1 +0,0 @@ -usr/bin/* diff --git a/linux/legacy/kmflcomp/debian/kmflcomp.manpages b/linux/legacy/kmflcomp/debian/kmflcomp.manpages deleted file mode 100644 index fc167ec30a..0000000000 --- a/linux/legacy/kmflcomp/debian/kmflcomp.manpages +++ /dev/null @@ -1 +0,0 @@ -debian/kmflcomp.1 diff --git a/linux/legacy/kmflcomp/debian/libkmflcomp-dev.install b/linux/legacy/kmflcomp/debian/libkmflcomp-dev.install deleted file mode 100644 index cead934303..0000000000 --- a/linux/legacy/kmflcomp/debian/libkmflcomp-dev.install +++ /dev/null @@ -1,3 +0,0 @@ -usr/include/kmfl/* -usr/lib/*/lib*.a -usr/lib/*/lib*.so diff --git a/linux/legacy/kmflcomp/debian/libkmflcomp0.install b/linux/legacy/kmflcomp/debian/libkmflcomp0.install deleted file mode 100644 index 3ddde58419..0000000000 --- a/linux/legacy/kmflcomp/debian/libkmflcomp0.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/lib*.so.* diff --git a/linux/legacy/kmflcomp/debian/libkmflcomp0.symbols b/linux/legacy/kmflcomp/debian/libkmflcomp0.symbols deleted file mode 100644 index 42de4f9284..0000000000 --- a/linux/legacy/kmflcomp/debian/libkmflcomp0.symbols +++ /dev/null @@ -1,131 +0,0 @@ -libkmflcomp.so.0 libkmflcomp0 #MINVER# -* Build-Depends-Package: libkmflcomp-dev - IConvertUTF16toUTF32@Base 0.9.10 - IConvertUTF16toUTF8@Base 0.9.10 - IConvertUTF32toUTF16@Base 0.9.10 - IConvertUTF32toUTF8@Base 0.9.10 - IConvertUTF8toUTF16@Base 0.9.10 - IConvertUTF8toUTF32@Base 0.9.10 - UTF16toUTF8@Base 0.9.10 - UTFConvert@Base 0.9.10 - Version@Base 0.9.10 - add_char@Base 0.9.10 - add_item_to_list@Base 0.9.10 - add_lists@Base 0.9.10 - add_rule@Base 0.9.10 - append_to_buffer@Base 0.9.10 - caller0@Base 0.9.10 - caller@Base 0.9.10 - check_bitmap_file@Base 0.9.10 - check_keyboard@Base 0.9.10 - check_linux_target@Base 10.99.1 - check_lhs@Base 0.9.10 - check_rhs@Base 0.9.10 - check_rule@Base 0.9.10 - checked_alloc@Base 0.9.10 - checked_strcpy@Base 0.9.10 - compare_rules@Base 0.9.10 - compile_keyboard_to_buffer@Base 0.9.10 - count_groups@Base 0.9.10 - count_items@Base 0.9.10 - count_rules@Base 0.9.10 - count_stores@Base 0.9.10 - create_keyboard_buffer@Base 0.9.10 - deadkey_number@Base 0.9.10 - debug@Base 0.9.10 - done@Base 0.9.10 - dwarn@Base 0.9.10 - errcount@Base 0.9.10 - errlimit@Base 0.9.10 - fail@Base 0.9.10 - fatal_error_buf@Base 0.9.10 - file_format@Base 0.9.10 - find_deadkey@Base 0.9.10 - find_first_match@Base 0.9.10 - find_group@Base 0.9.10 - find_store@Base 0.9.10 - gp@Base 0.9.10 - group_number@Base 0.9.10 - ignored_stores@Base 10.99.1 - initialize_special_stores@Base 0.9.10 - items_from_string@Base 0.9.10 - items_to_string@Base 0.9.10 - kbp@Base 0.9.10 - keyboard@Base 0.9.10 - kmflcomp_error@Base 0.9.10 - kmflcomp_warn@Base 0.9.10 - last_deadkey@Base 0.9.10 - last_store@Base 0.9.10 - lineno@Base 0.9.10 - make_keysym@Base 0.9.10 - make_xkeysym@Base 0.9.10 - mem_alloc@Base 0.9.10 - mem_calloc@Base 0.9.10 - mem_free@Base 0.9.10 - mem_free_all@Base 0.9.10 - mem_realloc@Base 0.9.10 - mem_strdup@Base 0.9.10 - n@Base 0.9.10 - new_deadkey@Base 0.9.10 - new_group@Base 0.9.10 - new_list@Base 0.9.10 - new_rule@Base 0.9.10 - new_store@Base 0.9.10 - new_store_from_string@Base 0.9.10 - new_string@Base 0.9.10 - opt_debug@Base 0.9.10 - opt_force@Base 0.9.10 - opt_verbose@Base 0.9.10 - process_special_store@Base 0.9.10 - qchar@Base 0.9.10 - save_keyboard@Base 0.9.10 - set_start_group@Base 0.9.10 - sort_rules@Base 0.9.10 - special_stores@Base 0.9.10 - store_name@Base 0.9.10 - store_number@Base 0.9.10 - string_to_keysym@Base 0.9.10 - text_to_keysym@Base 0.9.10 - valid_targets@Base 10.99.1 - warncount@Base 0.9.10 - warnlimit@Base 0.9.10 - write_keyboard@Base 0.9.10 - yy_create_buffer@Base 0.9.10 - yy_delete_buffer@Base 0.9.10 - yy_flex_debug@Base 0.9.10 - yy_flush_buffer@Base 0.9.10 - yy_scan_buffer@Base 0.9.10 - yy_scan_bytes@Base 0.9.10 - yy_scan_string@Base 0.9.10 - yy_switch_to_buffer@Base 0.9.10 - yyalloc@Base 0.9.10 - yychar@Base 0.9.10 - yycleanup@Base 0.9.10 - yydebug@Base 0.9.10 - yyerror@Base 0.9.10 - yyfree@Base 0.9.10 - yyget_debug@Base 0.9.10 - yyget_in@Base 0.9.10 - yyget_leng@Base 0.9.10 - yyget_lineno@Base 0.9.10 - yyget_out@Base 0.9.10 - yyget_text@Base 0.9.10 - yyin@Base 0.9.10 - yyleng@Base 0.9.10 - yylex@Base 0.9.10 - yylex_destroy@Base 0.9.10 - yylineno@Base 0.9.10 - yylval@Base 0.9.10 - yynerrs@Base 0.9.10 - yyout@Base 0.9.10 - yyparse@Base 0.9.10 - yypop_buffer_state@Base 0.9.10 - yypush_buffer_state@Base 0.9.10 - yyrealloc@Base 0.9.10 - yyrestart@Base 0.9.10 - yyset_debug@Base 0.9.10 - yyset_in@Base 0.9.10 - yyset_lineno@Base 0.9.10 - yyset_out@Base 0.9.10 - yyterminate@Base 0.9.10 - yytext@Base 0.9.10 diff --git a/linux/legacy/kmflcomp/debian/rules b/linux/legacy/kmflcomp/debian/rules deleted file mode 100755 index d4d9844bbc..0000000000 --- a/linux/legacy/kmflcomp/debian/rules +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/make -f -# -*- mode: makefile; coding: utf-8 -*- - -export DEB_BUILD_MAINT_OPTIONS = hardening=+all - -%: - dh $@ diff --git a/linux/legacy/kmflcomp/debian/source/format b/linux/legacy/kmflcomp/debian/source/format deleted file mode 100644 index 163aaf8d82..0000000000 --- a/linux/legacy/kmflcomp/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/linux/legacy/kmflcomp/debian/upstream/signing-key.asc b/linux/legacy/kmflcomp/debian/upstream/signing-key.asc deleted file mode 100644 index a235c64d44..0000000000 --- a/linux/legacy/kmflcomp/debian/upstream/signing-key.asc +++ /dev/null @@ -1,51 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQINBF46PusBEAC9veJYGsAAGnu5ug4RFELBXCwYTXK6aSaRFJ7ItW75EJUQWcIo -FaDCWiiP9ZEXfS7JeG+RZ4MHp6pNnvNCX/Ww4QEfiI4NefMIon6cy2pWfKZRFBDG -Y0x/9Mm+Wzx4vfuGP/TeFwkFy0syFYBsCkoV7KV3VxKNN73k6ZvkRn6tChebwVeM -1FIldfeQw6KeTfdlE12wP4sI3MaaMh/QG1CnPRB4lTCK1WkpFqzxe3Y9XT6w+qxu -tRV2xyAgbe19Q4SlDNvH4bgE/RlaWZ5zjnJLybP80t3qcEGKibUYEkQDuTPC44pn -aqbRmEaihTHhMD/Ye0Oul1OQG13Io5jOm9OEKIzbwzOSlbZML+KVAIN85N1t0TW1 -N1gNZOZDwzXeHAUu+yKZdXliGM8Irb0nxQMWnZqIFtV6GQUNGskCUtd/tGcPe7Y6 -MXaPI7d5FLDGZmyUFsumazW0UN672PqHOlmrlwC+mSlmjFYPakg02Y8MiqPBZ5VB -Uyf0YRBDYMc3WdmIxIYkgzjnSAuoDU3taSAFflS4AxfS5ebTw9ydxrrYEvZzPX4m -hRpX2zt+DGfz/zovinO3kLn4Rch7g/ab6XCmQ/TbQ4GqTEq6XLnjXHSZLXr/Z+lD -u3xtj9iAlxC48NspV/GGzIgsKJzTXXOfazIsgVjHDr/x+mmWZ9e5MwNu/wARAQAB -tCFrZXltYW4tYmEgPGJ1aWxkYWdlbnRAa2V5bWFuLmNvbT6JAk4EEwEKADgWIQRs -jureYH1DTHT9NP3I5hT1jxtl4AUCXjo+6wIbAwULCQgHAgYVCgkICwIEFgIDAQIe -AQIXgAAKCRDI5hT1jxtl4LxHEAC4Lq+c48Q5q3UkfNxcGP2SkE++kco7haxnoQwT -H1cJSqY+X+eHhAPYyhrriT3CwwQ3w5RT73v69tUrrpiIK6dc4ltQca0qrwppLzOc -hZji61KWXYGHYIpqI+PpayxcJ1Vxz154EiFQk7Hbbo+x/5I0qzl6QmROHhenez06 -51hr5WGwonscnX7ReDuBA296XS5GCFQ1h+080xNkqiUt0SYWBhWzqQizEnF3VBrS -Be5pNGqp5Md11In7ZsRNhGBs2ewpY0As6D9Ll0x4CulAAeMhXqbPnNhqE0uehbdR -ks15fcBXwiVwUFN/dMacTFJovRgkXLU/c0OwHM6cnHBBHFDmKTohIYY8/g8eDt4m -413XIJREOXaWa3UWrfwfup9FI/PI1g2KnGHEFP2PBS+77/3PVpQlYOnJ52Mc19ON -BzAE5qFlXwLIyktcpvzaFz+mw5S5YvccjoLLRcTV9er/64ZhQxz87Sqn2l94wo4f -V989CMfy2ujh4G80xcLJDDpovGQpdgflD7eZjaYyD1maYp+FlhYuDGT7nTzkX8nm -G6RWICeHFJrk3OXyx3ir+IXSUc+B0NjQS/6rtTr5qCntm/R/WYnS5eDhwcForHB5 -KryJtkJBkIqZ8PalUWrSfSHWQjbJZgVEsJVKReBS0srW95j1Bi3gvsKLPf1/9zv2 -PmzVXLkCDQReOj7rARAAubQWo/upxgAUI4d8kGqIooyWgSbVbWnW4Ra/1FjP1RLn -zChmJTYm5QTGEs2u2J0jhhdP/o2xYFdaD3BOVaDTCTV0Ron5Y2EI5T0WEqLuGcu0 -YmaGtR0fj1qw/0IJ1CtOfv3V0XIGuSM2NQtCiS80oo1sRBwpi+eDWn19UClT7F0T -PVwX2eXwgb1UR6CWbxu4nUMyq0lTfYyk2L+XiC/gbtVLs4I2UaxvO0DOxPbEoKyK -SUA5Jxae/QsLrJ4HvqlGekgqSH5gLAr6zH1jWKn0bnwRX92ka/yTIzQQg5+vgJQH -inOOhIg5Gii55KgQjLL7atL48w/Df9ftJohm9LN6YUzF5qCSAs1BQ7p3G2LKR8Vw -CMYH9Fp6dHeb/83w6pSth/kYfx/GyI5tXCuCCzgTvEFW9/qjhvSNk6hW7NhwmiRz -oqPnOub2NewgIu3EBgme7f5U6M/zAtTGoJn6+ftfILsW9SxKJgZWkxzmndvZ/hZn -SAGmBQNylq0/xGKjGjoeKbkR0oNlUGYWJ4svFrd4VFk65a502JdTU5ZxoJGFKGgh -UNWvqqL0ruTQmtXWFOfZdCKOIbHjoTP/xsnmnKIbPpe09J3kgJc6zsplHEPO5dXJ -kfD4oTQQsrUG3dmNBJU3jbSV0jcHzrMGRTpYw2+ptsk/PWJc9XSUpJAAQP+/mvUA -EQEAAYkCNgQYAQoAIBYhBGyO6t5gfUNMdP00/cjmFPWPG2XgBQJeOj7rAhsMAAoJ -EMjmFPWPG2Xg4D8QAJr7v8Ly2DYd7e3ilk3LWURXpvi79U5fsy3qLglZt/8c52mf -DGo+s3XjVhVqFMYlhs1ezmVPgORtDky+57aS5cgPU5Lqo4fYZoLwDS0LUvMEO5Im -pTo/7rtdRpVsmSgyJ48t0eh3qi/mf8ONFqho53elb5IdROrpM1pZm3vWvM/vdEMi -kGN1R6BdajKEvofdc2x/3YQhQyfekCxKa/RXRQ5M+JtW4iHrDuyAFksoCVk2p4dO -OdZoNaMMYi6egcHbph+LR2CYsnijUr7vlTOBfF2XUom+vq5audySc4+NqeaWyXtD -mmoriz8IF0hIt2mWpQCqC/gftR9K2SDd8TYn2Z8OH4/h8cLRQssN/VsZie3jDh4u -ZD+A/1IF5q+Ayx+pXRpoDMDl+vvHHBfHpnLt4iFuPNZgJO5xSBd5Ra6/PRPs26wV -y+ArzNhdA5ImhOPHF08qwBxDeS7476N7j3yTGv1vPJTOmIII1/60bUI/u8cAjXWa -tMHDsIAIfJF2A8bkukbNEQUcWw3HUIA3lCq7cV6xs9LT5/xa1XfMQoj9vHMogCcT -YykbTr9QHLLX62htZijKU1REYuxwEoFXIm7y7HpBIWNBjSLkE53K9RaZP3z01xcX -B0e/y1m02FicU+owqJC38pXpUogyw+ZLj+VNFbv/dSDaG+00eRdqGGmTTIgo -=jcZL ------END PGP PUBLIC KEY BLOCK----- diff --git a/linux/legacy/kmflcomp/include/Makefile.am b/linux/legacy/kmflcomp/include/Makefile.am deleted file mode 100644 index 6c67312e56..0000000000 --- a/linux/legacy/kmflcomp/include/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -## Process this file with automake to produce Makefile.in - -## Created by Anjuta - will be overwritten -## If you don't want it to overwrite it, -## Please disable it in the Anjuta project configuration - -kmflcomp_includedir = $(includedir)/kmfl - -kmflcomp_include_DATA =\ - kmfl.h \ - kmflcomp.h \ - kmflutfconv.h - -EXTRA_DIST = $(kmflcomp_include_DATA) diff --git a/linux/legacy/kmflcomp/include/kmfl.h b/linux/legacy/kmflcomp/include/kmfl.h deleted file mode 100644 index c8b4fa2c27..0000000000 --- a/linux/legacy/kmflcomp/include/kmfl.h +++ /dev/null @@ -1,190 +0,0 @@ -/* kmfl.h - * Copyright (C) 2005 SIL International - * - * This file is part of the KMFL compiler. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - */ - - -// KMFL.H: Header for compiler and interpreter for Keyboard Mapping for Linux - -#ifndef KMFL_H - -#define KMFL_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#define FILE_VERSION "1" -#define BASE_VERSION "0320" -#define LAST_VERSION "1000" - -// Undefine some Windows constants so we can use them (even on Windows) -#ifdef UNDEFINED -#undef UNDEFINED -#endif - -#ifdef SS_BITMAP -#undef SS_BITMAP -#endif - -// Keyboard flags -#define KF_ANSI 0 -#define KF_UNICODE 1 -#define KF_POSITIONAL 0 -#define KF_MNEMONIC 1 - -// State bit assignments -#define KS_LSHIFT 1 -#define KS_CAPS 2 -#define KS_LCTRL 4 -#define KS_LALT 8 -#define KS_RSHIFT 16 -#define KS_NCAPS 32 -#define KS_RCTRL 64 -#define KS_RALT 128 -#define KS_SHIFT (KS_LSHIFT|KS_RSHIFT) -#define KS_CTRL (KS_LCTRL|KS_RCTRL) -#define KS_ALT (KS_LALT|KS_RALT) - -// Group flags -#define GF_USEKEYS 1 - -// Various constants -#define UNDEFINED (-1) // redefine this value for our own use -#define NAMELEN 64 // maximum length of names for stores, groups or deadkeys -#define MAX_HISTORY 128 // number of output (32-bit) characters remembered -#define MAX_OUTPUT 128 // maximum length of output allowed from any one key event -#define MAX_KEYBOARDS 64 // maximum number of keyboards that can be loaded -#define MAX_INSTANCES 255 // maximum number of keyboard instances that can be supported -#define VERSION_ZERO 1000 // lowest valid version - -// Variable types and structures -#ifdef _WIN32 - typedef unsigned int UINT; // 32-bit unsigned integer (general purpose) -#else - typedef u_int32_t UINT; -#endif - - -typedef int32_t INT; -typedef u_int8_t BYTE; - -typedef UINT ITEM; // 32-bit unsigned integer for UTF-32 or control values -typedef UINT OFFSET; // 32-bit unsigned integer used as table offsets - -#define ITEMSIZE (sizeof(ITEM)) - -// Rule (and store) item types (high-order byte of ITEMs) -enum {ITEM_CHAR=0,ITEM_KEYSYM,ITEM_ANY,ITEM_INDEX,ITEM_OUTS,ITEM_DEADKEY,ITEM_CONTEXT,ITEM_NUL,ITEM_RETURN, - ITEM_BEEP,ITEM_USE,ITEM_MATCH,ITEM_NOMATCH,ITEM_PLUS,ITEM_CALL, ITEM_NOTANY}; - -// Macros to determine an item type and build an item from item type and value -#define ITEM_TYPE(x) (((x)>>24)&0xff) -#define MAKE_ITEM(t,x) (((t)<<24)|((x)&0xffffff)) -#define MAKE_PARAMETER_ITEM(t,i,x) (((t)<<24)|(((i)&0xff)<<16)|((x)&0xffff)) - -// Enumerate special stores with reserved names (prefixed by &) -enum TAG_SS {SS_UNDEFINED=-1,SS_NAME,SS_VERSION,SS_HOTKEY,SS_LANGUAGE,SS_LAYOUT,SS_COPYRIGHT, - SS_MESSAGE,SS_BITMAP,SS_MNEMONIC,SS_ETHNOLOGUE,SS_CAPSOFF,SS_CAPSON,SS_CAPSFREE,SS_AUTHOR, - SS_TARGETS,SS_VISUALKEYBOARD,SS_KEYBOARDVERSION}; - -// The following compiled keyboard structures and types are used by both the compiler -// and the interpreter - -// Unnamed stores -struct _xstore { - UINT len; // number of items in store - OFFSET items; // offset to store text (from start of string table) -}; - -typedef struct _xstore XSTORE; - -// Interpreter rule structure -struct _xrule { - UINT ilen; // input rule length (items) - UINT olen; // output rule length (items) - OFFSET lhs; // offset to input (match) rule (from start of string table) - OFFSET rhs; // offset to output (process) rule (from start of string table) -}; - -typedef struct _xrule XRULE; - -// Unnamed groups (each group header is followed by its rules, so the rules are not included) -struct _xgroup { - UINT flags; // group flags - UINT nrules; // number of rules in group - UINT rule1; // (absolute) rule number of first rule of group - UINT mrlen; // length of match rule (rhs) - UINT nmrlen; // length of nomatch rule (rhs) - OFFSET match; // offset to match (rhs) rule (from start of string table) - OFFSET nomatch; // offset to nomatch (rhs) rule (from start of string table) -}; - -typedef struct _xgroup XGROUP; - -// Compiled keyboard structure -struct _xkeyboard { - char id[4]; // always KMFL - char version[5]; // keyboard version(4) and file version(1) - char name[NAMELEN+1]; // utf8 version of keyboard name - UINT mode:1; // Keyboard Flags: Unicode (0) or ANSI (1) - UINT layout:1; // positional(0) or mnemonic(1) - UINT capson:1; // caps on only - UINT capsoff:1; // caps always off - UINT capsfree:1; // shift frees caps - UINT usedll:1; // use external library (to be implemented) - UINT hotkey; // shift state + keysym for hotkey - UINT group1; // index of first group used - UINT nstores; // number of defined stores - UINT ngroups; // number of groups -}; - -typedef struct _xkeyboard XKEYBOARD; - -// Keyboard mapping server instance -struct _kmsi { - void *connection; // instance identification passed by server - char kbd_name[NAMELEN+1]; // name of currently attached keyboard - int keyboard_number; // the keyboard slot - XKEYBOARD *keyboard; // pointer to valid keyboard structure - XGROUP *groups; // pointer to list of groups in loaded keyboard - XRULE *rules; // pointer to list of rules in loaded keyboard - XSTORE *stores; // pointer to list of stores in loaded keyboard - ITEM *strings; // pointer to (32-bit) string table in loaded keyboard - ITEM *history; // (32-bit) character output history - UINT nhistory; // valid history count - ITEM output_queue[MAX_OUTPUT]; - UINT noutput_queue; - struct _kmsi *next; // link to next instance - struct _kmsi *last; // link to previous instance -}; - -typedef struct _kmsi KMSI; - -#ifdef __cplusplus -} -#endif - -#endif /* *** end of KMFL.H *** */ diff --git a/linux/legacy/kmflcomp/include/kmflcomp.h b/linux/legacy/kmflcomp/include/kmflcomp.h deleted file mode 100644 index 8e6c4e61a8..0000000000 --- a/linux/legacy/kmflcomp/include/kmflcomp.h +++ /dev/null @@ -1,45 +0,0 @@ -/* kmflcomp.h - * Copyright (C) 2005 SIL International - * - * This file is part of the KMFL compiler. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - */ - -#ifndef KMFLCOMP_H -#ifdef __cplusplus -extern "C" { -#endif - -extern int opt_debug; -extern int opt_force; -extern int opt_verbose; -extern int errcount, errlimit, warnings, warnlimit; -extern int yydebug; -extern jmp_buf fatal_error_buf; - -unsigned long compile_keyboard_to_buffer(const char * infile, void ** keyboard_buffer); -void write_keyboard(char * fname, void *keyboard_buffer, int keyboard_buffer_size); - -#ifdef __cplusplus -} -#endif - -#endif /* KMFLCOMP_H */ diff --git a/linux/legacy/kmflcomp/include/kmflutfconv.h b/linux/legacy/kmflcomp/include/kmflutfconv.h deleted file mode 100644 index 3d7158f747..0000000000 --- a/linux/legacy/kmflcomp/include/kmflutfconv.h +++ /dev/null @@ -1,65 +0,0 @@ -/* kmflutfconv.h - * Copyright (C) 2006 SIL International - * - * This file is part of the KMFL compiler. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - */ - -#if !defined(KMFLUTFCONV_H) -#define KMFLUTFCONV_H - -#ifdef __cplusplus -extern "C" { -#endif - - -#include -typedef u_int32_t UTF32; -typedef u_int16_t UTF16; -typedef u_int8_t UTF8; - -size_t IConvertUTF8toUTF16 ( - const UTF8** sourceStart, const UTF8* sourceEnd, - UTF16** targetStart, UTF16* targetEnd); - -size_t IConvertUTF16toUTF8 ( - const UTF16** sourceStart, const UTF16* sourceEnd, - UTF8** targetStart, UTF8* targetEnd); - -size_t IConvertUTF8toUTF32 ( - const UTF8** sourceStart, const UTF8* sourceEnd, - UTF32** targetStart, UTF32* targetEnd); - -size_t IConvertUTF32toUTF8 ( - const UTF32** sourceStart, const UTF32* sourceEnd, - UTF8** targetStart, UTF8* targetEnd); - -size_t IConvertUTF16toUTF32 ( - const UTF16** sourceStart, const UTF16* sourceEnd, - UTF32** targetStart, UTF32* targetEnd); - -size_t IConvertUTF32toUTF16 ( - const UTF32** sourceStart, const UTF32* sourceEnd, - UTF16** targetStart, UTF16* targetEnd); -#ifdef __cplusplus -} -#endif -#endif diff --git a/linux/legacy/kmflcomp/kmfl_compiler/Makefile.am b/linux/legacy/kmflcomp/kmfl_compiler/Makefile.am deleted file mode 100644 index d46a1b7ff3..0000000000 --- a/linux/legacy/kmflcomp/kmfl_compiler/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -## Process this file with automake to produce Makefile.in - -## Created by Anjuta - will be overwritten -## If you don't want it to overwrite it, -## Please disable it in the Anjuta project configuration - -AM_CPPFLAGS =\ - -I$(top_srcdir)/include - -kmflcomp_CFLAGS =\ - -Wall\ - -g - -bin_PROGRAMS = kmflcomp - -kmflcomp_SOURCES = \ - kmfl_compiler.c - -kmflcomp_LDADD = ../src/libkmflcomp.la diff --git a/linux/legacy/kmflcomp/kmfl_compiler/kmfl_compiler.c b/linux/legacy/kmflcomp/kmfl_compiler/kmfl_compiler.c deleted file mode 100644 index 86bcb86e35..0000000000 --- a/linux/legacy/kmflcomp/kmfl_compiler/kmfl_compiler.c +++ /dev/null @@ -1,119 +0,0 @@ -/* kmfl_compiler.c - * Copyright (C) 2005 SIL International - * - * This file is part of KMFL compiler. - * - */ -#include "config.h" - -const char * KMFL_VERSION= VERSION; - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef _WIN32 - #include - #include - #include "getopt.h" - #define strcasecmp _stricmp - #define rindex strrchr - #define seek _lseek - #define DIRDELIM '\\' - char *GetInputFile(void); -#else - #include - #include - #include - #define O_BINARY 0 - #define DIRDELIM '/' -#endif - -#include -#include -const char * usagemsg= -"usage: kmflcomp [OPTION...] file\n" \ -" -d debug\n" \ -" -f force compilation\n" \ -" -h print this help message\n" \ -" -V verbose\n" \ -" -v print program version\n" \ -" -y yydebug\n"; - -void usage(void) -{ - fprintf(stderr, "kmflcomp version %s\n", KMFL_VERSION); - fprintf(stderr, "%s", usagemsg); - exit(1); -} - -int main(int argc, char *argv[]) -{ - int opt,nopt=0; - void * keyboard_buffer; - unsigned long keyboard_buffer_size; - int errcode; - char *fname="(stdin)"; - - while((opt=getopt(argc,argv,"dfhVvy"))!=EOF) - { - switch (opt) - { - case 'd': - opt_debug=1; - break; - case 'f': - opt_force=1; - break; - case 'h': - usage(); - break; - case 'V': - opt_verbose = 1; - break; - case 'v': - fprintf(stderr, "kmflcomp version %s\n", KMFL_VERSION); - exit(0); - case 'y': - yydebug = 1; - break; - } - nopt++; - } - - if(argc > nopt+1) - fname=argv[argc-1]; - else - usage(); - -#ifdef _WIN32 - else if(!(fname=GetInputFile())) exit(0); -#endif - - // Set warnings level - if(opt_verbose) - errlimit = warnlimit = 1000; - - errcode = setjmp(fatal_error_buf); - - if (errcode == 0) - { - keyboard_buffer_size = compile_keyboard_to_buffer(fname, &keyboard_buffer); - - write_keyboard(fname, keyboard_buffer, keyboard_buffer_size); - free(keyboard_buffer); - -#ifdef _WIN32 - if(opt_debug) getch(); -#endif - - exit(errcount); - } else { - exit(errcode); - } -} diff --git a/linux/legacy/kmflcomp/kmflcomp.spec b/linux/legacy/kmflcomp/kmflcomp.spec deleted file mode 100644 index f91f63ea69..0000000000 --- a/linux/legacy/kmflcomp/kmflcomp.spec +++ /dev/null @@ -1,105 +0,0 @@ -%define _prefix /usr - -%define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0) -%define is_mandriva %(test -e /etc/mandriva-release && echo 1 || echo 0) -%define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0) -%define is_opensuse %(grep open /etc/SuSE-release 2> /dev/null 1>/dev/null && echo 1 || echo 0) -%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0) - -%if %is_mandrake -%define dist mandrake -%define disttag mdk -%endif -%if %is_mandriva -%define dist mandriva -%define disttag mdk -%endif -%if %is_suse -%define dist suse -%define disttag suse -%define kde_path /opt/kde3 -%endif -%if %is_opensuse -%define dist openSUSE -%define disttag openSUSE -%define kde_path /opt/kde3 -%endif -%if %is_fedora -%define dist fedora -%define disttag fc -%endif - -%define distver %(release="`rpm -q --queryformat='%{VERSION}' %{dist}-release 2> /dev/null | tr . : | sed s/://g`" ; if test $? != 0 ; then release="" ; fi ; echo "$release") - -Summary: %{name} -Name: kmflcomp -Version: 0.9.9 -Release: 2%{disttag}%{distver} -Vendor: SIL -Packager: Doug Rintoul -Group: Applications/System -License: GPL -Source0: %{name}-%{version}.tar.gz -# Url: (none) -BuildRoot: /var/tmp/kmflcomp -%if %is_opensuse -Buildrequires: xorg-x11-devel -%endif -# Requires: (none) -# Conflicts: (none) -# Provides: (none) -# Obsoletes: (none) - -%description -Compile Keyman-style keyboard layout files to a binary format for use by the KMFL keystroke interpreter. - -%package devel -Summary: Development libraries and headers to use %{name} in an application -Group: Development/Libraries -# Requires: (none) -# Buildrequires: (none) -# Conflicts: (none) -# Provides: (none) -# Obsoletes: (none) - - -%description devel -Library to compile Keyman-style keyboard layout files - -%prep -%setup -q - -%build -[ ! -f Makefile ] || make distclean -%configure -make - -%install -[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT - -%makeinstall -for doc in ABOUT-NLS AUTHORS README COPYING INSTALL NEWS TODO ChangeLog; do - rm -f $RPM_BUILD_ROOT%{_prefix}/doc/kmflcomp/$doc; -done; - -%clean -[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) -%{_bindir}/kmflcomp -%{_libdir}/libkmflcomp.so.0.0.0 -%{_libdir}/libkmflcomp.so.0 - - -%doc AUTHORS COPYING ChangeLog README INSTALL NEWS TODO - -%files devel -%defattr(-,root,root) -%{_includedir}/kmfl/kmfl.h -%{_includedir}/kmfl/kmflcomp.h -%{_includedir}/kmfl/kmflutfconv.h -%{_libdir}/libkmflcomp.la -%{_libdir}/libkmflcomp.a -%{_libdir}/libkmflcomp.so - diff --git a/linux/legacy/kmflcomp/src/Makefile.am b/linux/legacy/kmflcomp/src/Makefile.am deleted file mode 100644 index c1d1ce3917..0000000000 --- a/linux/legacy/kmflcomp/src/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -## Process this file with automake to produce Makefile.in - -## Created by Anjuta - will be overwritten -## If you don't want it to overwrite it, -## Please disable it in the Anjuta project configuration - -AM_CPPFLAGS =\ - -I$(top_srcdir)/include - -libkmflcomp_la_CFLAGS =\ - -Wall\ - -g - -lib_LTLIBRARIES = libkmflcomp.la - -libkmflcomp_la_SOURCES = \ - yacc.y\ - lex.l\ - kmflcomp.c\ - memman.c\ - utfconv.c - -EXTRA_DIST = compiler.h memman.h - -libkmflcomp_la_LDFLAGS = -Wl,--no-as-needed -version-info 1:0:1 - -libkmflcomp_la_LIBADD = -L/usr/X11R6/lib -lX11 - -AM_YFLAGS = -d diff --git a/linux/legacy/kmflcomp/src/compiler.h b/linux/legacy/kmflcomp/src/compiler.h deleted file mode 100644 index 78ef588081..0000000000 --- a/linux/legacy/kmflcomp/src/compiler.h +++ /dev/null @@ -1,163 +0,0 @@ -/* compiler.h - * Copyright (C) 2005 SIL International - * - */ - -// COMPILER.H: Header file for compiler routines in Keyboard Mapping for Linux - -// Include constants, structures, types and prototypes used by both compiler and interpreter - -#include - -#define BUFSIZE 256 // output buffer limit for converting from UTF16 -#define NOSHIFTPROCESSING 0x8000 // For XKEY Symbols, don't process shift state - -// The types KEYBOARD, GROUP, RULE, STORE and DEADKEY are used only by the compiler, -// and are defined in this header. The types XKEYBOARD, XGROUP, XSTORE and XRULE are -// used by both the compiler and the interpreter, and are defined in kmfl.h. - -// Named deadkeys -struct _deadkey { - char name[NAMELEN+1]; // name of deadkey - struct _deadkey *next; // pointer to next deadkey -}; - -typedef struct _deadkey DEADKEY; - -// Named stores -struct _store { - char name[NAMELEN+1]; // name of store - UINT len; // number of items in store - INT lineno; // first definition - ITEM *items; // store text (item list) - struct _store *next; // pointer to next store -}; - -typedef struct _store STORE; - -// Processing rules -struct _rule { - UINT ilen; // input rule length (items) - UINT olen; // output rule length (items) - ITEM *lhs; // input (match) rule - ITEM *rhs; // output (process) rule - INT line; // source code line number - struct _rule *next; // pointer to next rule -}; - -typedef struct _rule RULE; - -// Named rule-groups -struct _group { - char name[NAMELEN+1]; // name of group - UINT flags; // group flags - UINT nrules; // number of rules in group - UINT mrlen; // length of match rule (rhs) - UINT nmrlen; // length of nomatch rule (rhs) - ITEM *match; // match rule (rhs) - ITEM *nomatch; // nomatch rule (rhs) - RULE *rules; // linked list of rules - struct _group *next; // pointer to next group -}; - -typedef struct _group GROUP; - -// Keyboard structure -struct _keyboard { - char id[4]; // always KMFL - char version[5]; // initially 1000 - char name[NAMELEN+1]; // utf8 version of keyboard name - UINT mode:1; // Keyboard Flags: Unicode (0) or ANSI (1) - UINT layout:1; // positional(0) or mnemonic(1) - UINT capson:1; // caps on only - UINT capsoff:1; // caps always off - UINT capsfree:1; // shift frees caps - UINT usedll:1; // use external library (to be implemented) - UINT hotkey; // shift state + keysym for hotkey - UINT group1; // index of first group used - UINT nstores; // number of defined stores - UINT ngroups; // number of groups - UINT ndeadkeys; // number of deadkeys - GROUP *groups; // address of linked list of groups - STORE *stores; // address of linked list of stores - DEADKEY *deadkeys; // address of linked list of deadkeys -}; - -typedef struct _keyboard KEYBOARD; - -// Routine prototypes -FILE *UTF16toUTF8(FILE *fp); - -RULE *new_rule(GROUP *gp, ITEM *lhs, ITEM *rhs, int line); -RULE *add_rule(RULE *rp, RULE *rules); -void check_rule(RULE *rp, GROUP *gp); -ITEM *check_lhs(ITEM *lhs, unsigned int ilen, GROUP *gp, int line); -void check_rhs(ITEM *rhs, unsigned int olen, GROUP *gp, int line); - -int store_number(char *name, int line); -int group_number(char *name, int line); -int deadkey_number(char *name, int line); -int items_in_string(char *p); -int count_groups(GROUP *gp); -int count_rules(RULE *rp); -int count_stores(STORE *sp); -char *new_string(int q); -char *add_char(char *sp, int q); - -STORE *new_store_from_string(char *name, char *string, int line); -STORE *new_store(char *name, ITEM *ip, int line); -GROUP *new_group(char *name, int line); -void set_start_group(char *groupname, int mode, int line); - -DEADKEY *new_deadkey(char *name, int line); -ITEM *new_list(ITEM q); -ITEM *add_lists(ITEM *s1, ITEM *s2); -ITEM *add_item_to_list(ITEM *s1, ITEM q); -unsigned int count_items(ITEM *p); - -char *items_to_string(ITEM *p); -ITEM *items_from_string(char *sp, int line); - -ITEM string_to_keysym(char *sp, int line); -ITEM make_xkeysym(int lineno, ITEM shift, ITEM q); -ITEM make_keysym(int lineno, ITEM shift, ITEM q); -ITEM text_to_keysym(char * str); -STORE *find_store(char *name); -char *store_name(int number); - -GROUP *find_group(char *name); -DEADKEY *find_deadkey(char *name); -int find_special_store(char *name); -void initialize_special_stores(void); -void process_special_store(char *name, STORE *sp, int line); -void check_keyboard(KEYBOARD *kbp); -int check_bitmap_file(STORE *sp, int line); -int check_linux_target(STORE *sp, int line); - -void *checked_alloc(size_t n, size_t sz); -void sort_rules(GROUP *gp); - -void debug(int line, char *s, ...); -void kmflcomp_warn(int line, char *s, ...); -void kmflcomp_error(int line, char *s, ...); -void fail(int errcode, char *s, ...); - -// External references used while parsing -extern KEYBOARD *kbp; -extern int errcount, lineno, done; - -// Prototypes and references used by yacc/lex -int yylex(void); -int yyparse(void); -void yyerror(char *); -void yyrestart( FILE *input_file ); -void yycleanup(void); - -extern FILE *yyin, *yyout; -extern int yydebug; - -// Add some function equivalents for Windows -#ifdef _WIN32 -#define snprintf _snprintf -#define vsnprintf _vsnprintf -#endif diff --git a/linux/legacy/kmflcomp/src/kmflcomp.c b/linux/legacy/kmflcomp/src/kmflcomp.c deleted file mode 100644 index ad9ae15237..0000000000 --- a/linux/legacy/kmflcomp/src/kmflcomp.c +++ /dev/null @@ -1,1647 +0,0 @@ -/* kmflcomp.c - * Copyright (C) 2005 SIL International - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kmflutfconv.h" -#include "compiler.h" -#include "yacc.h" -#include -#include "memman.h" - -#ifdef _WIN32 - #include - #include - #include "getopt.h" - #define strcasecmp _stricmp - #define rindex strrchr - #define seek _lseek - #define DIRDELIM '\\' - char *GetInputFile(void); -#else - #include - #include - #include - #include - #define O_BINARY 0 - #define DIRDELIM '/' -#endif - -#include - - -// Compiler options -int opt_debug=0; -int opt_force=0; -int opt_verbose=0; - -// Fatal error variables -jmp_buf fatal_error_buf; - -// The keyboard being compiled, and version string -KEYBOARD keyboard, *kbp=&keyboard; -char Version[6]=BASE_VERSION FILE_VERSION; // Concatenate keyboard version and file version - -int warncount=0, warnlimit=10, errlimit=10, file_format=KF_UNICODE; - -DEADKEY *last_deadkey=NULL; -STORE *last_store=NULL; - -extern FILE *yyin; -static const char * fname=NULL; -static int firstkeyboard = 1; - -// forward function declarations -unsigned long create_keyboard_buffer(const char *infile, void ** kb_buf); -char * checked_strcpy(char * dst, char * src, int len, char * type, int line); -int get_char_shift_state(ITEM q); - - -// Write the compiled keyboard to the output file -long save_keyboard(const char *infile, void * keyboard_buffer, unsigned long size) -{ - char *outfile, *pdot; - unsigned long n, out; - struct stat fstat; - - // Create file names from input file name - n = strlen(infile)+6; - - if(!(outfile=(char *)mem_alloc(n))) return(-1); - strcpy(outfile,infile); pdot = rindex(outfile,'.'); - if(pdot) strcpy(pdot, ".kmfl"); else strcat(outfile,".kmfl"); - - - // Open output file, rule table and string table - if((out=open(outfile,O_WRONLY|O_BINARY|O_CREAT|O_TRUNC,00666)) < 0) return(-2); - - - if (write(out, keyboard_buffer, size) < 0) - fail(1, "cannot write compiled keyboard file %s", outfile); - - close(out); - - stat(outfile,&fstat); - mem_free(outfile); - - size = fstat.st_size; - return size; -} - -void write_keyboard(char * infile, void *keyboard_buffer, int keyboard_buffer_size) -{ - long filesize; - - // Save the output file - if((filesize=save_keyboard(infile, keyboard_buffer, keyboard_buffer_size)) > 0) - { - if(errcount > 0 || warncount > 0) - { - if(errcount > 0 ) - fprintf(stderr," Warning: %d error%s ignored - compiled keyboard may fail!\n", - errcount,(errcount==1?"":"s")); - - if(warncount > warnlimit) - fprintf(stderr," Total warnings: %d\n",warncount); - } - - if(Version[3] > '0') - fprintf(stderr,"Keyboard '%s' (Version %c%c.%c%c) compiled to %ld bytes\n", - kbp->name,Version[0],Version[1],Version[2],Version[3],filesize); - else - fprintf(stderr,"Keyboard '%s' (Version %c%c.%c) compiled to %ld bytes\n", - kbp->name,Version[0],Version[1],Version[2],filesize); - } - else - fail(3,"unable to save output file!"); -} - -unsigned long compile_keyboard_to_buffer(const char * infile, void ** keyboard_buffer) -{ - GROUP *gp; - BYTE BOM[4]={0}; - unsigned - long size; - - fname = infile; - // Open input file - yyin = fopen(infile,"r"); - if(!yyin) - { - char *ftmp; - ftmp = (char *)checked_alloc(strlen(infile)+6,1); - strcpy(ftmp,infile); strcat(ftmp,".kmn"); - yyin = fopen(ftmp,"r"); - mem_free(ftmp); - } - if(!yyin) fail(1,"cannot open %s",infile); - - // Initialize defaults and parameters - errcount=0; - warncount=0; - lineno=0; - done=0; - last_deadkey=NULL; - last_store=NULL; - kbp->deadkeys = NULL; - kbp->mode = KF_ANSI; // Must be ANSI if not specified - - // Check for BOM at start of file - if (fread(BOM,3,1,yyin) != 1) - fail(1, "Cannot read byte order mark"); - - if(BOM[0] == 0xEF && BOM[1] == 0xBB && BOM[2] == 0xBF) - { - file_format = KF_UNICODE; // Set file format to Unicode if file is UTF-8 or UTF-16 - } - else - { - fseek(yyin,0,SEEK_SET); - file_format = KF_ANSI; // Set file format to ansi - } - - if(BOM[0] == 0xFF && BOM[1] == 0xFE) // Is it UTF-16? - { - yyin = UTF16toUTF8(yyin); // Make a temporary UTF-8 copy of the file - file_format = KF_UNICODE; // And set file format to Unicode - } - - // Define the reserved-name stores as the first numbered stores - initialize_special_stores(); - - // Parse the input file with yacc - if (firstkeyboard) - firstkeyboard = 0; - else - yyrestart(yyin); - - yyparse(); - yycleanup(); - - fflush(stdout); - fclose(yyin); - - // Complete keyboard header and and check it for validity - check_keyboard(kbp); - - // Exit on error (unless forced) - if (errcount > 0 && !opt_force) - { - fail(2,"%d error%s and %d warning%s",errcount,(errcount==1?"":"s"), - warncount,(warncount==1?"":"s")); - } - - // Sort the rules in each group - for(gp=kbp->groups; gp; gp=gp->next) sort_rules(gp); - - size = create_keyboard_buffer(infile, keyboard_buffer); - // cleanup memory - mem_free_all(); - return size; - -} - -// Complete keyboard header, and check for validity -void check_keyboard(KEYBOARD *kbp) -{ - UTF32 *p1; - UTF8 *p2; - STORE *sp; - ITEM *p; - const char *np; - unsigned int n; - - // Has keyboard name been defined? - sp = &kbp->stores[SS_NAME]; - if(sp->items == NULL || *sp->items == 0) - { - np = rindex(fname,'/'); - if(np == NULL) np = rindex(fname, '\\'); - if(np == NULL) np = rindex(fname, ':'); - if(np == NULL) np = fname-1; - - for(n=0,np++; nname+n) = *np; - *(kbp->name+n) = 0; - - kmflcomp_warn(0,"Keyboard name set by default to '%s'",kbp->name); - } - else - { - // There should be no MS bytes set, but make sure! - for(n=0,p=sp->items; nlen && *p!=0; n++,p++) *p &= 0xffffff; - - p1 = (UTF32 *)sp->items; p2 = (UTF8 *)kbp->name; - IConvertUTF32toUTF8((const UTF32 **)&p1,(const UTF32 *)(sp->items+sp->len),&p2,(UTF8 *)(kbp->name+NAMELEN)); - *p2 = 0; - } -} - -void * append_to_buffer(void * buffer, long * bufsize, void * chunk, int chunk_size) -{ - // don't use memory management for buffers because they will be used outside of kmflcomp - buffer=realloc(buffer, (*bufsize)+chunk_size); - if (buffer) - { - memcpy(buffer+(*bufsize), chunk, chunk_size); - *bufsize+=chunk_size; - } else { - fail(4, "Out of memory\n"); - } - - return buffer; -} - -// Create the keyboard buffer. -unsigned long create_keyboard_buffer(const char *infile, void ** kb_buf) -{ - XKEYBOARD xkbd={{0}}; - XSTORE xstore; - XGROUP xgroup; - XRULE xrule; - STORE *sp, *sp1; - GROUP *gp, *gp1; - RULE *rp; - DEADKEY *dp, *dp1; - void * keyboard_buffer = NULL; - void * rtt_buffer = NULL; - void * stt_buffer = NULL; - long keyboard_buffer_size = 0; - long rtt_buffer_size = 0; - long stt_buffer_size = 0; - unsigned long i, j, n, index, offset; - - // Fill the compiled keyboard header structure - memcpy(&xkbd,kbp,sizeof(XKEYBOARD)); - - // Set tag and version - memcpy(&xkbd.id,"KMFL",4); - memcpy(&xkbd.version,Version,5); - - // add the keyboard header - keyboard_buffer = append_to_buffer(keyboard_buffer, &keyboard_buffer_size, &xkbd, sizeof(XKEYBOARD)); - - // Save each store, saving its contents in the string table (no nulls) - for(n=0,index=0,sp=kbp->stores; nnstores; n++,sp=sp->next) - { - if(sp->len > 0) - { - stt_buffer = append_to_buffer(stt_buffer, &stt_buffer_size,sp->items,sp->len*ITEMSIZE); - } - if(sp->items) { - mem_free(sp->items); // free string memory - sp->items = NULL; - } - xstore.len = sp->len; - xstore.items = index; - keyboard_buffer = append_to_buffer(keyboard_buffer, &keyboard_buffer_size, &xstore,sizeof(XSTORE)); - index += sp->len; - } - - // Save each group, saving rules in the rule table and rule strings in the string table - for(j=0,gp=kbp->groups,offset=0; jngroups; j++,gp=gp->next) - { - xgroup.flags = gp->flags; - xgroup.nrules = gp->nrules; - xgroup.rule1 = offset; - xgroup.mrlen = gp->mrlen; - xgroup.nmrlen = gp->nmrlen; - - if(gp->mrlen > 0) - { - stt_buffer = append_to_buffer(stt_buffer, &stt_buffer_size, gp->match, gp->mrlen*ITEMSIZE); - mem_free(gp->match); // free string memory - xgroup.match = index; - index += gp->mrlen; - } - else xgroup.match = UNDEFINED; - - if(gp->nmrlen > 0) - { - stt_buffer = append_to_buffer(stt_buffer, &stt_buffer_size, gp->nomatch, gp->nmrlen*ITEMSIZE); - mem_free(gp->nomatch); // free string memory - xgroup.nomatch = index; - index += gp->nmrlen; - } - else xgroup.nomatch = UNDEFINED; - - keyboard_buffer = append_to_buffer(keyboard_buffer, &keyboard_buffer_size, &xgroup, sizeof(XGROUP)); - - for(i=0,rp=gp->rules; inrules; i++,rp=rp->next) - { - xrule.ilen = rp->ilen; - xrule.olen = rp->olen; - stt_buffer = append_to_buffer(stt_buffer, &stt_buffer_size, rp->lhs, rp->ilen*ITEMSIZE); - mem_free(rp->lhs); // free string memory - xrule.lhs = index; - index += rp->ilen; - stt_buffer = append_to_buffer(stt_buffer, &stt_buffer_size, rp->rhs,rp->olen*ITEMSIZE); - mem_free(rp->rhs); // free string memory - xrule.rhs = index; - index += rp->olen; - - rtt_buffer = append_to_buffer(rtt_buffer, &rtt_buffer_size, &xrule, sizeof(XRULE)); - offset++; - } - } - - keyboard_buffer = append_to_buffer(keyboard_buffer, &keyboard_buffer_size, rtt_buffer, rtt_buffer_size); - - keyboard_buffer = append_to_buffer(keyboard_buffer, &keyboard_buffer_size, stt_buffer, stt_buffer_size); - - // don't use memory management for buffers because they will be used outside of kmflcomp - free(rtt_buffer); - free(stt_buffer); - - // Free deadkey memory - for(dp=kbp->deadkeys; dp!=NULL; dp=dp1) - { - dp1=dp->next; mem_free(dp); - } - - kbp->deadkeys = NULL; - - // Check and free stores - for(sp=kbp->stores; sp!=NULL; sp=sp1) - { - // only warn for undefined user stores - if (sp->len == 0 && sp->name[0] != '&') - kmflcomp_warn(sp->lineno,"store (%s) is undefined!",sp->name); - - sp1=sp->next; mem_free(sp); - } - - kbp->stores = NULL; - - // Free groups and rules - for(gp=kbp->groups; gp!=NULL; gp=gp1) - { - if(gp->rules) mem_free(gp->rules); - gp1=gp->next; - mem_free(gp); - } - kbp->groups = NULL; - *kb_buf = keyboard_buffer; - return keyboard_buffer_size; -} - - -// Routines for manipulating rule groups - -// Create a new group -GROUP *new_group(char *name, int line) -{ - GROUP *gp, *gp1; - - if((gp=find_group(name)) == NULL) - { - gp = (GROUP *)checked_alloc(sizeof(GROUP),1); - checked_strcpy(gp->name,name,NAMELEN, "group", line); - - // and add it to the linked list of groups - if(kbp->groups) - { - for(gp1=kbp->groups; gp1->next; gp1=gp1->next); - gp1->next = gp; - kbp->ngroups++; - } - else - { - kbp->groups = gp; - kbp->ngroups = 1; - } - } - - return gp; -} - -// Find a group by name -GROUP *find_group(char *name) -{ - GROUP *gp; - for(gp=kbp->groups; gp!=NULL; gp=gp->next) - { - if(strcasecmp(name,gp->name) == 0) return gp; - } - return NULL; -} - -// Find the group number of a named group, and create a new group if necessary -int group_number(char *name, int line) -{ - GROUP *gp; - int n; - - for(n=0,gp=kbp->groups; gp!=NULL; gp=gp->next,n++) - { - if(strcasecmp(name,gp->name) == 0) return n; - } - - // Create a new group and save the name - gp = new_group(name, line); - - return n; -} - -// Count the groups in a linked list of groups -int count_groups(GROUP *gp) -{ - int n; - - for(n=0; gp!=NULL; gp=gp->next) n++; - - return n; -} - -// Save the name of the starting group and set the mode flag -void set_start_group(char *name, int mode, int line) -{ - kbp->group1 = group_number(name, line); - kbp->mode = mode; -} - -// Routines for manipulating rules - -// Create a new rule for this group -RULE *new_rule(GROUP *gp, ITEM *lhs, ITEM *rhs, int line) -{ - RULE *rp; - - // Check first for match and nomatch rules - switch(ITEM_TYPE(*lhs)) - { - case ITEM_MATCH: - if(count_items(lhs) == 1) - { - gp->match = rhs; - gp->mrlen = count_items(rhs); - check_rhs(gp->match,gp->mrlen,gp,line); - } - else - { - kmflcomp_error(line,"'match' must be the only item on the input side of a rule"); - } - return NULL; - case ITEM_NOMATCH: - if(count_items(lhs) == 1) - { - gp->nomatch = rhs; - gp->nmrlen = count_items(rhs); - check_rhs(gp->nomatch,gp->nmrlen,gp,line); - } - else - { - kmflcomp_error(line,"'nomatch' must be the only item on the input side of a rule"); - } - return NULL; - } - - // Otherwise allocate memory for a rule and initialize the rule - rp = (RULE *)checked_alloc(sizeof(RULE),1); - rp->lhs = lhs; - rp->rhs = rhs; - rp->ilen = count_items(rp->lhs); - rp->olen = count_items(rp->rhs); - rp->next = NULL; - rp->line = line; - - // Check the rule for validity - check_rule(rp,gp); - return rp; -} - -// Add a rule to a rule list -RULE *add_rule(RULE *rp, RULE *prules) -{ - if(rp) // must allow for null rules (blank lines) - { - rp->next = prules; - return rp; - } - else - { - return prules; - } -} - -// Count the rules in a linked list of rules -int count_rules(RULE *rp) -{ - int n; - - for(n=0; rp!=NULL; rp=rp->next) n++; - - return n; -} - -// Check the left hand side of a rule, remove any '+' keystroke marker items, -// and expand any outs() keywords found -ITEM *check_lhs(ITEM *lhs, unsigned int ilen, GROUP *gp, int line) -{ - STORE *sp; - ITEM *p, *p1, *ip, *ip0; - unsigned int i, j, k, newlen, goodplus=0, badplus=0; - char *fmt="%s cannot be used on the left hand side of a rule"; - - // Check for and remove any TOK_PLUS items, and warn if appropriate - for(i=0,p=lhs; iflags & GF_USEKEYS) && (i == ilen-2)) - { - goodplus = 1; - } - else - { - badplus = 1; - } - for(j=i, p1=p; jflags & GF_USEKEYS) && !goodplus && (Version[1] > '3' || Version[0] >= '1')) // needs review - { - kmflcomp_warn(line,"'+' should be used before the keystroke"); - } - - if(badplus) - { - if(Version[1] > '5' || Version[0] >= '1') // needs review - kmflcomp_error(line,"use '+' only immediately before keystroke"); - else - kmflcomp_warn(line,"'+' used incorrectly (but ignored)"); - } - - // Make keystroke character explicitly a keysym (unless any, etc.) - if((gp->flags & GF_USEKEYS) == GF_USEKEYS) - { - p = lhs+ilen-1; - if(ITEM_TYPE(*p) == ITEM_CHAR) - { - *p = MAKE_ITEM(ITEM_KEYSYM,*p); - } - } - - if(ilen != count_items(lhs)) fail(1,"fatal compiler error"); - - // Expand any outs() keywords on the left hand side of rules - for(i=0, p=lhs; ilen > 0)) - { - newlen = ilen + sp->len - 1; - ip = ip0 = (ITEM *)checked_alloc(newlen,sizeof(ITEM)); - for(j=0; jlen; k++) *ip++ = *(sp->items+k); - for(++j; jname, line) == (*p & 0xffff)) - kmflcomp_warn(line,"rule group used recursively (use() refers to the containing group)"); - break; - } - } -} - -// Check that the match and output strings only contain legal items -void check_rule(RULE *rp, GROUP *gp) -{ - if((rp->ilen != count_items(rp->lhs)) || (rp->olen != count_items(rp->rhs))) - fail(1,"fatal compiler error"); - - // Check and adjust the lhs of the rule - rp->lhs = check_lhs(rp->lhs,rp->ilen,gp,rp->line); - rp->ilen = count_items(rp->lhs); // must recalculate, as string may have been changed - - // Check the rhs of the rule - check_rhs(rp->rhs,rp->olen,gp,rp->line); -} - -// Rule comparison -int compare_rules(const void *arg1, const void *arg2) -{ - RULE *rp1, *rp2; - - rp1 = (RULE *)arg1; - rp2 = (RULE *)arg2; - - // Check rule length first - if(rp1->ilen > rp2->ilen) return -1; - if(rp1->ilen < rp2->ilen) return 1; - - // Then compare line numbers - process according to source code sequence - if(rp1->line < rp2->line) return -1; - if(rp1->line > rp2->line) return 1; - - return 0; -} - -// Sort the rules in each group -void sort_rules(GROUP *gp) -{ - RULE *rp, *rp1, *rptemp, *rpnext; - UINT n; - - // Don't sort trivial groups! - if(gp->nrules < 2) return; - - // Create a single linear array of rules and free the existing linked list - rptemp = (RULE *)checked_alloc(2*gp->nrules,sizeof(RULE)); - for(n=0,rp=gp->rules,rp1=rptemp; nnrules; n++,rp=rpnext,rp1++) - { - *rp1 = *rp; rpnext = rp->next; mem_free(rp); - } - - // Sort the array - qsort((void *)rptemp,(size_t)gp->nrules,sizeof(RULE),compare_rules); - - // Relink the list - gp->rules = rptemp; - for(n=0,rp=rptemp; nnrules; n++,rp++) rp->next = rp+1; - rp->next = NULL; -} - -// Routines for manipulating deadkeys - -// Create a deadkey (I don't think this is ever needed - see deadkey_number) -DEADKEY *new_deadkey(char *name, int line) -{ - DEADKEY *dp; - - if((dp=find_deadkey(name)) == NULL) - { - dp = (DEADKEY *)checked_alloc(sizeof(DEADKEY),1); - if(last_deadkey != NULL) last_deadkey->next = dp; - last_deadkey = dp; - if(kbp->deadkeys == NULL) kbp->deadkeys = dp; // initialize pointer to list of deadkeys - } - checked_strcpy(dp->name,name,NAMELEN, "deadkey", line); - - return dp; -} - -// Find a deadkey by name -DEADKEY *find_deadkey(char *name) -{ - DEADKEY *p; - for(p=kbp->deadkeys; p!=NULL; p=p->next) - { - if(strcasecmp(name,p->name) == 0) return p; - } - return NULL; -} - -// Find a deadkey number -int deadkey_number(char *name, int line) -{ - DEADKEY *dp, *dp0=NULL, *dp1; - int n; - for(n=0,dp=kbp->deadkeys; dp!=NULL; dp0=dp,dp=dp->next,n++) - { - if(strcasecmp(name,dp->name) == 0) return n; - } - // Create the deadkey if this is the first reference - dp1 = (DEADKEY *)checked_alloc(sizeof(DEADKEY),1); - if(dp0) dp0->next = dp1; else kbp->deadkeys = dp1; - - kbp->ndeadkeys++; - checked_strcpy(dp1->name,name,NAMELEN, "deadkey", line); - - return n; -} - - -// Routines for manipulating stores - -// Add a store to the list of stores and set its contents -STORE *new_store(char *name, ITEM *ip0, int line) -{ - STORE *sp, *osp; - ITEM *ip, *ipt, *osip; - int len; - - if((sp=find_store(name)) != NULL) - { - if(sp->items != NULL) - { mem_free(sp->items); - if(sp->len > 0) - kmflcomp_warn(line,"overwriting previous contents of store %s",name); - sp->items = NULL; - } - } - else - { - sp = (STORE *)checked_alloc(sizeof(STORE), 1); - if(kbp->stores == NULL) kbp->stores = sp; // initialize pointer to list of stores - checked_strcpy(sp->name,name,NAMELEN, "store", line); - sp->lineno=line; - if(last_store != NULL) last_store->next = sp; - last_store = sp; - sp->next = NULL; - } - - // Allocate memory for this store, expanding any outs() - if(ip0) - { - for(len=0,ip=ip0; *ip; ip++) - { - switch(ITEM_TYPE(*ip)) - { - case ITEM_CHAR: - case ITEM_KEYSYM: - case ITEM_DEADKEY: - case ITEM_BEEP: - len++; - break; - case ITEM_OUTS: - if((osp=find_store(store_name(*ip & 0xffff)))) - len += osp->len; - break; - } - } - - sp->items = checked_alloc(len+1,4); - sp->len = len; - - for(ip=ip0,ipt=sp->items; *ip; ip++) - { - switch(ITEM_TYPE(*ip)) - { - case ITEM_CHAR: - case ITEM_KEYSYM: - case ITEM_DEADKEY: - case ITEM_BEEP: - *ipt++ = *ip; - break; - case ITEM_OUTS: - if((osp=find_store(store_name(*ip & 0xffff)))) - { - for(osip=osp->items;osip && *osip; osip++) - *ipt++ = *osip; - } - break; - default: - kmflcomp_error(line,"illegal item in store"); - break; - } - } - - // Process special store commands and copy to header as required - if(*name == '&') process_special_store(name,sp,line); - - // Free the item list (probably OK to do this here, but must check...) - mem_free(ip0); - } - else // allow for empty stores, just in case - { - sp->items = checked_alloc(1,4); - sp->len = 0; - } - - return sp; -} - -STORE *new_store_from_string(char *name, char *string,int line) -{ - return new_store(name,items_from_string(string,line),line); -} - -// Find a store by name -STORE *find_store(char *name) -{ - STORE *p; - - if(name != NULL) - { - for(p=kbp->stores; p!=NULL; p=p->next) - { - if(strcasecmp(name,p->name) == 0) return p; - } - } - return NULL; -} - -// Find a store number -int store_number(char *name, int line) -{ - STORE *p; - int n; - for(n=0,p=kbp->stores; p!=NULL; p=p->next,n++) - { - if(strcasecmp(name,p->name) == 0) return n; - } - - // create the store - if (new_store(name, NULL, line) != NULL) - return n; - - return UNDEFINED; -} - -// Find a store name -char *store_name(int number) -{ - STORE *sp; - int n; - for(n=0,sp=kbp->stores; sp!=NULL; sp=sp->next,n++) - { - if(n == number) return sp->name; - } - return NULL; -} - -// Count the stores in a linked list of stores -int count_stores(STORE *sp) -{ - int n; - - for(n=0; sp!=NULL; sp=sp->next) n++; - - return n; -} - -// Create a new itemlist -ITEM *new_list(ITEM q) -{ - ITEM *p; - p = (ITEM *)checked_alloc(2,4); - *p = q; - return p; -} - -// Add an item to an itemlist -ITEM *add_item_to_list(ITEM *s1, ITEM q) -{ - ITEM *p, *p0; - int i, n; - - if((n=count_items(s1)) == 0) return new_list(q); - - p = p0 = (ITEM *)checked_alloc(n+1,4); - *p++ = q; - for(i=0; i>16,(*p&0xff)); - break; - case ITEM_ANY: - sp += sprintf(sp,"[any %u]",(unsigned)(*p&0xffff)); - break; - case ITEM_INDEX: - sp += sprintf(sp,"[index %d,%u]",(*p&0xff0000)>>16,(*p&0xffff)); - break; - case ITEM_OUTS: - sp += sprintf(sp,"[outs %u]",(*p&0xffff)); - break; - case ITEM_DEADKEY: - sp += sprintf(sp,"[dk %u]",(*p&0xffff)); - break; - case ITEM_CONTEXT: - if(*p & 0xff) - sp += sprintf(sp,"[context %u]",(*p&0xff)); - else - sp += sprintf(sp,"[context]"); - break; - case ITEM_NUL: - sp += sprintf(sp,"[nul]"); - break; - case ITEM_RETURN: - sp += sprintf(sp,"[return]"); - break; - case ITEM_BEEP: - sp += sprintf(sp,"[beep]"); - break; - case ITEM_USE: - sp += sprintf(sp,"[use %u]",(*p&0xffff)); - break; - case ITEM_MATCH: - sp += sprintf(sp,"[match]"); - break; - case ITEM_NOMATCH: - sp += sprintf(sp,"[nomatch]"); - break; - case ITEM_PLUS: - sp += sprintf(sp,"[+]"); - break; - case ITEM_CALL: - sp += sprintf(sp,"[use %u]",(*p&0xffff)); - break; - } - } - *sp = 0; - - return temp; -} - -// List of special stores with reserved names -char *special_stores[] = { - "&name","&version","&hotkey","&language","&layout","©right","&message", - "&bitmap","&mnemoniclayout","ðnologuecode", - "&capsalwaysoff","&capsononly","&shiftfreescaps","&author", - "&targets","&visualkeyboard","&keyboardversion"}; - -// stores new from keyman 7.0 onwards that can safely be ignored for kmfl 11 for now -char *ignored_stores[] = { - "&layoutfile","&kmw_helpfile","&kmw_embedjs", - "&windowslanguages","&kmw_rtl", - "&kmw_embedcss","&kmw_helptext","&includecodes"}; - -// Initialize special stores (create dummy entries) -void initialize_special_stores(void) -{ - int i; - for(i=0; ihotkey = sp->items[0]; - break; - case SS_MNEMONIC: - kbp->layout = (sp->items[0] != '0'); - break; - case SS_CAPSOFF: - kbp->capsoff = 1; - break; - case SS_CAPSON: - kbp->capson = 1; - break; - case SS_CAPSFREE: - kbp->capsfree = 1; - break; - case SS_VERSION: - kbver = (int)(100.0*atof(items_to_string(sp->items))+0.5); - sprintf(Version,"%4.4d%1.1s",kbver,FILE_VERSION); - break; - case SS_BITMAP: - check_bitmap_file(sp,line); - break; - case SS_TARGETS: - if (!check_linux_target(sp,line)) - fail(1, "Line %d: No valid linux target in %s", line, items_to_string(sp->items)); - //kmflcomp_warn(line, "No valid linux target."); - break; - case SS_COPYRIGHT: - case SS_MESSAGE: - case SS_LAYOUT: - case SS_AUTHOR: - case SS_LANGUAGE: - case SS_ETHNOLOGUE: - case SS_KEYBOARDVERSION: - case SS_VISUALKEYBOARD: - break; - default: - for(p=0; p errlimit) return; - - va_start(v1,s); - vsnprintf(t,511,s,v1); - va_end(v1); - - if(lineno) - fprintf(stderr, " Error: %s (line %d)\n", t, lineno); - else - fprintf(stderr, " Error: %s\n", t); - - if(errcount == errlimit) - fprintf(stderr, " -------(remaining errors unreported)-------\n"); -} - -void dwarn(int lineno,char *fmt,...) -{ - va_list args; - - fprintf(stderr,"debug: "); - va_start(args,fmt); - vfprintf(stderr,fmt,args); - va_end(args); -} -void kmflcomp_warn(int lineno,char *s, ...) -{ - va_list v1; - - if(++warncount > warnlimit) return; - - fprintf(stderr, " Warning: "); - va_start(v1,s); - vfprintf(stderr,s,v1); - va_end(v1); - - if(lineno) - fprintf(stderr, " (line %d)\n", lineno); - else - fprintf(stderr, " \n"); - - if(warncount == warnlimit) - fprintf(stderr, " -------(remaining warnings unreported)-------\n"); -} -void debug(int lineno,char *s, ...) -{ - char t[512]; - va_list v1; - - if(!opt_debug) return; - - va_start(v1,s); - vsnprintf(t,511,s,v1); - va_end(v1); - - if(lineno) - fprintf(stderr, "Debug: %s (line %d)\n", t, lineno); - else - fprintf(stderr, "Debug: %s\n", t); -} - -// Checked memory allocation, always allocating one more element than requested -void *checked_alloc(size_t n, size_t sz) -{ - void *p; - - if(!(p=mem_calloc(n+1,sz))) fail(4,"out of memory!"); - - return p; -} - -char * checked_strcpy(char * dst, char * src, int len, char * type, int line) -{ - strncpy(dst, src, len); - - dst[len]='\0'; - - if (strlen(src) > len) - kmflcomp_warn(line,"%s name %s exceeds %d characters, truncating to %s", type, src, len, dst); - - return dst; -} - -// Convert the first (Unicode) character of a UTF-8 (or ANSI) text string to a keysym -ITEM string_to_keysym(char *sp, int line) -{ - ITEM *ip, keysym=0; - unsigned int iplen; - - ip = items_from_string(sp,line); - if(ip) - { - iplen = count_items(ip); - if(iplen > 0) keysym = *ip; - if(iplen > 1) kmflcomp_warn(line,"only the first character can be used in a keysym"); - mem_free(ip); - } - if(keysym == 0) kmflcomp_error(line,"illegal keysym/virtual character key"); - - return keysym; -} - -// Convert an virtual keysym string to an actual keysym (XK_HYPHEN, etc) -ITEM text_to_keysym(char * str) -{ - ITEM keysym = -1; -#ifndef _WIN32 - if (strlen(str) > 3) - { - keysym = XStringToKeysym(str+3); - - if (keysym == NoSymbol) - keysym = -1; - } -#endif - return keysym; -} -// Combine shift state and key code as required for Linux -ITEM make_keysym(int lineno, ITEM state, ITEM q) -{ - // Mask character and state - - q &= 0xffff; state &= 0xff; - - if ((q & 0xff00) == 0) - { - int keycode; - int shifted=((state & KS_SHIFT) == 0) ^ ((state & KS_CAPS) == 0); -#ifndef _WIN32 - Display * display; - display = XOpenDisplay(NULL); - - if (display) - { - keycode = XKeysymToKeycode (display, q & 0x7F); - q=XKeycodeToKeysym(display, keycode, !shifted ? 0 : 1); - XCloseDisplay(display); - } - else -#endif - if (isalpha(q)) - { - if (!shifted) - { - q += 0x20; - } - } - else if (((state & KS_SHIFT) == 0) || ((state & KS_CAPS) == 0)) - { - kmflcomp_warn(lineno, "Non-alphabetic virtual key sequence used with K_SHIFT or K_CAPS outside of the X environment.\n" - " KMFLCOMP cannot determined correct shifted keysym"); - } - state &= ~KS_CAPS; - } - return q | (state<<16) | (ITEM_KEYSYM<<24); -} - -ITEM make_xkeysym(int lineno, ITEM state, ITEM q) -{ - // Mask character and state - q &= 0xffff; state &= 0xff; - return q | (state<<16) | (ITEM_KEYSYM<<24); -} - -// Find the first file that matches the given path, ignoring case -// Substitute the actual name, and return (or return NULL) -#ifdef _WIN32 -// Windows version -char *find_first_match(char *path) -{ - char *p=NULL; - struct stat fstat; - - if(stat(path,&fstat) == 0) - { - p = rindex(path,DIRDELIM); - return (p==NULL ? path : p+1); - } - else - { - return NULL; - } -} -#else -// Linux version: needs to be researched later -char *find_first_match(char *path) -{ - char *p=NULL; - struct stat fstat; - - if(stat(path,&fstat) == 0) - { - p = rindex(path,DIRDELIM); - return (p==NULL ? path : p+1); - } - else - { - return NULL; - } -} -#endif - -// valid targets that should compile for linux -char *valid_targets[] = { - "any","linux","desktop","windows","macosx"}; -int check_linux_target(STORE *sp, int line) -{ - char *p, *ptr, tname[128]; - char delim[] = " "; - UTF32 *p1; - UTF8 *p2; - int n; - - p1 = (UTF32*)sp->items; - p2 = (UTF8*)tname; - IConvertUTF32toUTF8((const UTF32 **)&p1,(const UTF32 *)(sp->items+sp->len),&p2,(UTF8 *)(tname+127)); - *p2 = 0; - p = (char *)tname; - ptr = strtok(p, delim); - while(ptr != NULL) - { - for(n=0; nitems; - p2 = (UTF8*)tname; - IConvertUTF32toUTF8((const UTF32 **)&p1,(const UTF32 *)(sp->items+sp->len),&p2,(UTF8 *)(tname+255)); - *p2 = 0; - - if((p=rindex(fname,DIRDELIM)) != NULL) - { - bmp_path = (char *)checked_alloc((p-fname+1)+strlen(tname)+10,1); - strncpy(bmp_path,fname,p-fname+1); - strcpy(bmp_path+(p-fname+1),tname); - } - else - { - bmp_path = (char *)checked_alloc(strlen(tname)+10,1); - strcpy(bmp_path,tname); - } - - if (strncmp(bmp_path+strlen(bmp_path)-4, ".ico", 4) == 0) - { - strcat(bmp_path,".png"); - } - // First test if the file exists exactly as in BITMAP statement - else if(stat(bmp_path,&fstat) == 0) - { - mem_free(bmp_path); // file exists - return 0; - } - - // Search for a case-variation (irrelevant for Windows) - p = find_first_match(bmp_path); - - // Search in icons dir - if(p == NULL) - { - icons_path = (char *)checked_alloc(strlen(bmp_path)+12,1); - if((p=rindex(fname,DIRDELIM)) != NULL) - { - strncpy(icons_path,fname,p-fname+1); - strcpy(icons_path+(p-fname+1),"icons/"); - strcpy(icons_path+(p-fname+1+6),tname); - } - else - { - strcpy(icons_path,"icons/"); - strcat(icons_path, bmp_path); - } - p = find_first_match(icons_path); - } - - // If no extension specified, search next for files with extensions .bmp and .png - if((p == NULL) && (strchr(tname,'.') == NULL)) - { - // Add .bmp - strcat(bmp_path,".bmp"); - p = find_first_match(bmp_path); - if ((p == NULL) && icons_path) - { - // Add .bmp in icons dir - strcat(icons_path,".bmp"); - p = find_first_match(icons_path); - } - if(p == NULL) - { - // Add .png - strcpy(bmp_path+strlen(bmp_path)-4,".png"); - p = find_first_match(bmp_path); - } - if ((p == NULL) && icons_path) - { - // Add .png in icons dir - strcpy(icons_path+strlen(icons_path)-4,".png"); - p = find_first_match(icons_path); - } - if(p == NULL) - { - // Add .ico.png (ico converted to png) - strcpy(bmp_path+strlen(bmp_path)-4,".ico.png"); - p = find_first_match(bmp_path); - } - } - - // If there is an extension but not found, try .png added (converted from .ico) - if(p == NULL) - { - strcat(bmp_path, ".png"); - p = find_first_match(bmp_path); - } - - // Issue appropriate warnings and replace file name in store - if(p == NULL) - { - kmflcomp_warn(line,"The bitmap file '%s' was not found. Create a suitable bitmap of that name " - "and copy it with the compiled keyboard",tname); - } - else - { - if (icons_path) - { - p = p - 6; // include 'icons/' in name - } - kmflcomp_warn(line,"A bitmap named '%s' was found and will be referred to in the compiled keyboard " - "instead of '%s'",p,tname); - - if(sp->len)mem_free(sp->items); - // First allocate more than will be needed - titems = (UTF32 *)checked_alloc(strlen(p)+1,sizeof(UTF32)); - p2 = (UTF8*)p; p1 = titems; - IConvertUTF8toUTF32((const UTF8 **)&p2,(UTF8*)(p+strlen(p)),(UTF32 **)&p1,p1+strlen(p)); - sp->len = (UINT)(p1 - titems); // Then reallocate to exact length - sp->items = (ITEM *)checked_alloc(sp->len,sizeof(ITEM)); - for(i=0; ilen; i++) *(sp->items+i) = *(titems+i); - mem_free(titems); - } - - if(bmp_path) mem_free(bmp_path); - if(icons_path) mem_free(icons_path); - return 1; -} - -// Create a temporary file with a UTF-8 copy of a UTF-16 input file -FILE *UTF16toUTF8(FILE *fp) -{ - FILE *fp8; - unsigned short t16[512]; - unsigned char t8[2048]; - const UTF16 *p16,*p16a; - UTF8 *p8; - - if((fp8=tmpfile()) == NULL) return NULL; - -#ifdef _WIN32 - _setmode(_fileno(fp),_O_BINARY); -#endif - - fseek(fp,2,SEEK_SET); - while(fread(t16,2,1,fp)) - { - p16 = t16; p8 = t8; p16a = p16+1; - if(IConvertUTF16toUTF8(&p16,p16a,&p8,t8+2047) == 0) - { - if (fwrite(t8,1,(size_t)(p8-t8),fp8) == 0) - fail(1, "unable to write to temporary file %s", fp8); - } - else - fail(1,"unable to convert Unicode file, illegal or malformed UTF16 sequence"); - } - - fseek(fp8,0,SEEK_SET); - - return fp8; -} - - -#ifdef _WIN32 - -#include - -#define OFN_DONTADDTORECENT 0x2000000 - -char *GetInputFile(void) -{ - OPENFILENAME OFN={0}; - static char FileName[MAX_PATH], KeyboardName[32]; - - OFN.lStructSize = sizeof(OPENFILENAME); - OFN.hwndOwner = NULL; - OFN.lpstrFilter = "Uncompiled Keyboard Files (*.kmn)\0*.kmn\0"; - OFN.lpstrCustomFilter = NULL; - OFN.nFilterIndex = 1; - OFN.lpstrFile = FileName; - OFN.nMaxFile = MAX_PATH-1; - OFN.lpstrFileTitle = KeyboardName; - OFN.nMaxFileTitle = 32; - OFN.lpstrInitialDir = NULL; - - OFN.lpstrTitle = "Choose keyboard to compile"; - OFN.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_NOCHANGEDIR - | OFN_DONTADDTORECENT | OFN_FILEMUSTEXIST; - OFN.lpstrDefExt = "kmn"; - OFN.lpfnHook = NULL; - return(GetOpenFileName(&OFN) != 0 ? FileName : NULL); -} -#endif diff --git a/linux/legacy/kmflcomp/src/lex.c b/linux/legacy/kmflcomp/src/lex.c deleted file mode 100644 index a9edf3d7da..0000000000 --- a/linux/legacy/kmflcomp/src/lex.c +++ /dev/null @@ -1,3809 +0,0 @@ - -#line 3 "lex.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 4 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -/* begin standard C++ headers. */ - -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an - * integer in range [0..255] for use as an array index. - */ -#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin ) -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -extern int yyleng; - -extern FILE *yyin, *yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) -#define unput(c) yyunput( c, (yytext_ptr) ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -/* yy_hold_char holds the character lost when yytext is formed. */ -static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = NULL; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yyrestart ( FILE *input_file ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); -void yy_delete_buffer ( YY_BUFFER_STATE b ); -void yy_flush_buffer ( YY_BUFFER_STATE b ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); -void yypop_buffer_state ( void ); - -static void yyensure_buffer_stack ( void ); -static void yy_load_buffer_state ( void ); -static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); -#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); - -void *yyalloc ( yy_size_t ); -void *yyrealloc ( void *, yy_size_t ); -void yyfree ( void * ); - -#define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -#define yywrap() (/*CONSTCOND*/1) -#define YY_SKIP_YYWRAP -typedef flex_uint8_t YY_CHAR; - -FILE *yyin = NULL, *yyout = NULL; - -typedef int yy_state_type; - -extern int yylineno; -int yylineno = 1; - -extern char *yytext; -#ifdef yytext_ptr -#undef yytext_ptr -#endif -#define yytext_ptr yytext - -static yy_state_type yy_get_previous_state ( void ); -static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); -static int yy_get_next_buffer ( void ); -static void yynoreturn yy_fatal_error ( const char* msg ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 236 -#define YY_END_OF_BUFFER 237 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static const flex_int16_t yy_accept[773] = - { 0, - 44, 44, 44, 44, 0, 0, 82, 82, 92, 92, - 85, 85, 60, 60, 0, 0, 74, 74, 0, 0, - 0, 0, 237, 235, 44, 1, 2, 235, 235, 235, - 235, 233, 42, 49, 41, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 53, 235, 44, 231, 234, - 236, 44, 2, 236, 236, 236, 49, 59, 59, 59, - 59, 59, 59, 59, 59, 53, 236, 81, 81, 2, - 81, 84, 82, 2, 83, 84, 92, 216, 215, 236, - 236, 236, 236, 236, 236, 236, 236, 217, 89, 85, - - 2, 87, 88, 86, 89, 66, 60, 2, 63, 65, - 64, 66, 66, 71, 71, 2, 71, 71, 71, 71, - 74, 80, 77, 236, 236, 236, 232, 232, 2, 232, - 91, 91, 2, 90, 91, 44, 0, 0, 48, 43, - 0, 47, 0, 46, 49, 234, 234, 234, 234, 234, - 45, 234, 234, 50, 234, 37, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 0, 234, 234, 234, 51, 0, - 218, 0, 44, 0, 43, 231, 43, 45, 223, 222, - 44, 0, 59, 59, 50, 59, 56, 59, 59, 51, - - 0, 82, 92, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 85, 60, 0, - 0, 0, 68, 67, 0, 0, 70, 0, 69, 0, - 73, 72, 74, 77, 0, 78, 79, 0, 227, 226, - 29, 234, 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 35, 234, 234, 234, 234, 234, 234, - 52, 27, 234, 234, 234, 219, 228, 231, 231, 231, - 0, 225, 224, 59, 59, 58, 59, 103, 0, 0, - 0, 106, 107, 108, 109, 110, 111, 112, 113, 114, - - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 62, 61, 0, - 0, 76, 75, 0, 0, 234, 31, 234, 234, 39, - 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 3, 234, 234, 24, 234, 234, - 234, 234, 234, 234, 234, 234, 231, 231, 54, 59, - 57, 0, 94, 0, 102, 214, 214, 214, 214, 214, - 214, 214, 214, 214, 214, 183, 184, 185, 186, 187, - - 188, 189, 190, 191, 214, 214, 214, 214, 214, 214, - 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, - 214, 214, 214, 160, 96, 0, 0, 0, 100, 0, - 0, 0, 213, 0, 67, 0, 0, 220, 0, 234, - 22, 234, 0, 234, 234, 234, 234, 234, 234, 25, - 234, 32, 234, 234, 234, 34, 234, 234, 234, 234, - 234, 234, 23, 234, 234, 234, 234, 234, 231, 230, - 59, 100, 0, 210, 214, 214, 214, 214, 214, 214, - 211, 214, 165, 214, 214, 157, 192, 193, 194, 195, - 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, - - 206, 214, 214, 166, 214, 214, 173, 174, 175, 176, - 177, 178, 179, 180, 181, 182, 214, 214, 214, 214, - 214, 212, 214, 214, 214, 214, 214, 214, 214, 214, - 214, 214, 214, 153, 95, 0, 98, 99, 0, 101, - 0, 68, 67, 221, 16, 0, 4, 0, 0, 234, - 234, 234, 234, 234, 234, 5, 234, 234, 8, 234, - 234, 234, 30, 38, 0, 234, 40, 234, 0, 234, - 234, 231, 230, 59, 0, 214, 214, 152, 209, 214, - 214, 214, 162, 214, 214, 158, 214, 214, 159, 214, - 214, 214, 214, 214, 214, 214, 214, 164, 163, 214, - - 214, 214, 214, 214, 214, 214, 93, 97, 68, 0, - 0, 4, 4, 0, 0, 234, 0, 234, 28, 234, - 36, 234, 234, 234, 13, 234, 33, 0, 234, 17, - 0, 6, 234, 229, 55, 102, 214, 214, 147, 143, - 214, 154, 148, 214, 149, 171, 214, 214, 214, 214, - 214, 155, 214, 105, 151, 161, 214, 207, 146, 104, - 0, 0, 0, 0, 234, 234, 234, 234, 234, 7, - 234, 0, 234, 0, 234, 229, 214, 214, 214, 144, - 214, 169, 214, 168, 214, 145, 156, 0, 0, 0, - 0, 234, 234, 12, 234, 234, 0, 234, 0, 234, - - 0, 234, 142, 150, 208, 170, 172, 167, 20, 0, - 0, 0, 234, 10, 234, 234, 0, 234, 0, 234, - 26, 234, 0, 0, 10, 0, 234, 0, 234, 234, - 0, 234, 0, 0, 234, 234, 0, 0, 234, 0, - 234, 234, 0, 234, 0, 234, 234, 21, 0, 9, - 0, 234, 234, 0, 234, 0, 234, 234, 9, 0, - 15, 234, 0, 14, 0, 11, 18, 15, 19, 14, - 11, 0 - } ; - -static const YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 5, 1, 6, 1, 7, 1, 1, 8, 9, - 10, 1, 11, 12, 1, 13, 1, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 1, 1, - 1, 25, 1, 1, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 1, 55, 1, 56, 57, 58, 59, - - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static const YY_CHAR yy_meta[82] = - { 0, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 4, 1, 3, 3, 3, 3, 3, - 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 1, 1, 1, 1, 3, 3, 3, 3, 3, - 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5 - } ; - -static const flex_int16_t yy_base[801] = - { 0, - 0, 77, 135, 0, 215, 219, 223, 227, 279, 357, - 236, 247, 435, 492, 258, 289, 549, 0, 322, 336, - 628, 683, 765, 2012, 308, 2012, 2012, 719, 0, 709, - 696, 2012, 2012, 71, 2012, 54, 64, 294, 725, 38, - 0, 52, 56, 58, 69, 75, 317, 328, 56, 73, - 324, 78, 275, 213, 778, 2012, 104, 377, 243, 463, - 2012, 386, 2012, 699, 603, 581, 100, 0, 205, 253, - 826, 198, 232, 574, 879, 2012, 414, 2012, 441, 2012, - 457, 2012, 472, 2012, 2012, 468, 473, 2012, 2012, 277, - 352, 463, 499, 293, 500, 357, 359, 2012, 2012, 474, - - 2012, 2012, 2012, 2012, 478, 2012, 532, 2012, 2012, 2012, - 2012, 301, 482, 2012, 584, 2012, 498, 484, 107, 519, - 534, 2012, 599, 365, 640, 0, 2012, 619, 2012, 544, - 2012, 620, 2012, 2012, 577, 621, 591, 441, 439, 2012, - 420, 401, 397, 366, 650, 0, 353, 367, 613, 389, - 2012, 534, 605, 667, 503, 0, 509, 536, 552, 643, - 648, 680, 654, 657, 674, 682, 713, 685, 678, 679, - 692, 692, 723, 716, 0, 750, 729, 729, 0, 707, - 2012, 352, 762, 711, 307, 2012, 791, 766, 2012, 2012, - 822, 427, 0, 752, 792, 757, 0, 749, 778, 0, - - 855, 859, 861, 780, 813, 834, 831, 927, 844, 837, - 852, 862, 853, 846, 889, 917, 262, 1007, 1008, 250, - 326, 1012, 2012, 377, 772, 306, 298, 294, 290, 487, - 2012, 513, 1016, 909, 537, 1008, 0, 237, 2012, 2012, - 0, 978, 978, 986, 994, 996, 990, 992, 988, 1010, - 1003, 997, 1009, 1016, 1020, 1016, 1011, 1024, 1009, 1016, - 1025, 1030, 1031, 0, 1014, 1013, 1029, 1018, 1026, 1047, - 0, 0, 1041, 1048, 1047, 2012, 235, 251, 1070, 1071, - 828, 2012, 2012, 1055, 1068, 0, 1054, 1067, 1056, 1058, - 1067, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 1068, 1070, 1081, 1078, 1072, 1137, 0, 1099, 1073, - 0, 0, 1113, 0, 1120, 1085, 1142, 1071, 1137, 1147, - 1136, 1122, 0, 0, 0, 0, 0, 1120, 1124, 1142, - 1136, 1133, 1138, 1148, 1152, 0, 580, 2012, 596, 647, - 600, 2012, 606, 218, 929, 1145, 0, 1147, 1161, 0, - 1194, 1159, 1157, 1167, 1169, 1180, 1192, 1174, 1184, 1179, - 1180, 1194, 1202, 1189, 0, 1186, 1193, 0, 1192, 1191, - 1207, 1210, 1210, 1209, 1208, 1217, 1222, 1239, 0, 1208, - 0, 1202, 2012, 1204, 2012, 0, 1203, 1237, 1228, 1245, - 1243, 1237, 1257, 1241, 1260, 1305, 853, 0, 0, 0, - - 0, 0, 0, 0, 1262, 1260, 1259, 1261, 1274, 1322, - 1291, 253, 1300, 1304, 1319, 1309, 1307, 1320, 1310, 1320, - 1329, 1330, 1330, 0, 2012, 1321, 1330, 1318, 2012, 1327, - 1336, 1323, 0, 1366, 1368, 1397, 1401, 2012, 368, 1364, - 237, 1367, 1404, 1373, 1372, 1363, 1379, 1385, 1379, 0, - 1367, 0, 1392, 1396, 1378, 0, 1393, 1387, 1399, 1378, - 1390, 1430, 0, 1399, 1388, 533, 1394, 1399, 1425, 212, - 1409, 2012, 1425, 0, 1421, 1431, 1426, 1431, 1435, 1430, - 0, 1437, 0, 1447, 1452, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 1449, 1447, 0, 1446, 1438, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1444, 1451, 1449, 1451, - 1450, 0, 1445, 1456, 1453, 1452, 1449, 1463, 1471, 1471, - 1490, 1481, 1499, 0, 2012, 1483, 2012, 2012, 1485, 2012, - 1533, 2012, 1371, 2012, 0, 1526, 1537, 1495, 1494, 1492, - 1538, 1499, 1513, 1496, 1507, 0, 1506, 1518, 0, 1523, - 1520, 1526, 0, 0, 1556, 1521, 0, 1521, 1564, 1528, - 1532, 1532, 2012, 1523, 1548, 1548, 1564, 0, 0, 1552, - 1566, 1550, 0, 1553, 1562, 0, 1574, 1560, 0, 1561, - 1568, 1563, 1584, 1586, 1573, 1584, 1576, 0, 0, 1589, - - 1579, 1580, 1590, 1583, 1598, 1602, 2012, 2012, 2012, 1594, - 1599, 716, 761, 1593, 1640, 1621, 1643, 1612, 0, 1619, - 0, 1624, 1630, 1630, 0, 1636, 0, 1622, 1636, 0, - 1637, 0, 1639, 210, 0, 2012, 1625, 1628, 0, 0, - 1633, 0, 0, 1635, 0, 0, 1629, 1632, 1634, 1636, - 1656, 0, 1656, 0, 0, 0, 1650, 0, 0, 0, - 1644, 1657, 1666, 1654, 1648, 1664, 1662, 1665, 1665, 0, - 1711, 1689, 1690, 1674, 1675, 2012, 1696, 1694, 1692, 0, - 1686, 0, 1699, 0, 1697, 0, 0, 1700, 1707, 1686, - 1701, 1695, 1690, 0, 1713, 1714, 1740, 1720, 1721, 1708, - - 1709, 1731, 0, 0, 0, 0, 0, 0, 2012, 1721, - 1723, 1721, 1770, 0, 1767, 1736, 1758, 1735, 1742, 1775, - 2012, 1747, 1760, 1787, 2012, 1788, 1759, 1793, 1754, 1752, - 1749, 1760, 1803, 1806, 1776, 1779, 1776, 1781, 1782, 1778, - 1793, 1789, 1797, 1792, 1813, 1800, 1801, 2012, 1814, 0, - 1817, 1817, 1809, 1804, 1809, 1814, 1812, 1830, 2012, 1830, - 0, 1823, 1818, 0, 1821, 0, 0, 2012, 0, 2012, - 2012, 2012, 1895, 1900, 1905, 1910, 1915, 1920, 1925, 1930, - 1935, 1938, 1943, 1948, 1951, 1954, 1957, 1962, 1967, 1972, - 1977, 119, 109, 1980, 1985, 1990, 1995, 1998, 2001, 2006 - - } ; - -static const flex_int16_t yy_def[801] = - { 0, - 772, 1, 772, 3, 773, 773, 774, 774, 775, 775, - 776, 776, 777, 777, 778, 778, 775, 17, 779, 779, - 780, 780, 772, 772, 772, 772, 772, 781, 782, 783, - 784, 772, 772, 772, 772, 785, 785, 785, 785, 785, - 785, 785, 785, 785, 785, 785, 785, 785, 785, 785, - 785, 785, 785, 785, 785, 772, 772, 772, 786, 785, - 772, 772, 772, 781, 783, 784, 772, 787, 787, 787, - 787, 787, 787, 787, 787, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 788, 772, 789, 790, 791, 772, - 772, 772, 772, 772, 772, 792, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 781, 781, 772, - 783, 783, 784, 784, 772, 785, 785, 785, 785, 785, - 772, 785, 785, 39, 785, 785, 785, 785, 785, 785, - 785, 785, 785, 785, 785, 785, 785, 785, 785, 785, - 785, 785, 785, 785, 793, 785, 785, 785, 55, 772, - 772, 772, 772, 772, 794, 772, 794, 772, 772, 772, - 772, 772, 787, 787, 71, 787, 787, 787, 787, 75, - - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 795, - 788, 788, 772, 788, 788, 789, 789, 790, 790, 791, - 772, 791, 772, 772, 796, 772, 792, 797, 772, 772, - 785, 785, 785, 785, 785, 785, 785, 785, 785, 785, - 785, 785, 785, 785, 785, 785, 785, 785, 785, 785, - 785, 785, 785, 785, 785, 785, 785, 785, 785, 785, - 793, 785, 785, 785, 785, 772, 797, 794, 794, 794, - 772, 772, 772, 787, 787, 787, 787, 772, 772, 772, - 772, 798, 798, 798, 798, 798, 798, 798, 798, 798, - - 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, - 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, - 798, 798, 798, 798, 798, 798, 798, 772, 772, 772, - 772, 772, 772, 772, 772, 799, 795, 772, 795, 800, - 796, 772, 796, 797, 797, 785, 785, 785, 785, 785, - 785, 785, 785, 785, 785, 785, 785, 785, 785, 785, - 785, 785, 785, 785, 785, 785, 785, 785, 785, 785, - 785, 785, 785, 785, 785, 785, 794, 794, 787, 787, - 787, 772, 772, 772, 772, 798, 798, 798, 798, 798, - 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, - - 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, - 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, - 798, 798, 798, 798, 772, 772, 772, 772, 772, 772, - 772, 772, 799, 800, 800, 800, 797, 772, 797, 785, - 785, 785, 772, 785, 785, 785, 785, 785, 785, 785, - 785, 785, 785, 785, 785, 785, 785, 785, 785, 785, - 785, 785, 785, 785, 785, 785, 785, 785, 794, 794, - 787, 772, 772, 798, 798, 798, 798, 798, 798, 798, - 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, - 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, - - 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, - 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, - 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, - 798, 798, 798, 798, 772, 772, 772, 772, 772, 772, - 800, 772, 800, 772, 785, 772, 785, 772, 772, 785, - 785, 785, 785, 785, 785, 785, 785, 785, 785, 785, - 785, 785, 785, 785, 772, 785, 785, 785, 772, 785, - 785, 794, 772, 787, 772, 798, 798, 798, 798, 798, - 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, - 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, - - 798, 798, 798, 798, 798, 798, 772, 772, 772, 772, - 772, 772, 785, 772, 772, 785, 772, 785, 785, 785, - 785, 785, 785, 785, 785, 785, 785, 772, 785, 785, - 772, 785, 785, 794, 787, 772, 798, 798, 798, 798, - 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, - 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, - 772, 772, 772, 772, 785, 785, 785, 785, 785, 785, - 785, 772, 785, 772, 785, 772, 798, 798, 798, 798, - 798, 798, 798, 798, 798, 798, 798, 772, 772, 772, - 772, 785, 785, 785, 785, 785, 772, 785, 772, 785, - - 772, 785, 798, 798, 798, 798, 798, 798, 772, 772, - 772, 772, 785, 785, 785, 785, 772, 785, 772, 785, - 772, 785, 772, 772, 772, 772, 785, 772, 785, 785, - 772, 785, 772, 772, 785, 785, 772, 772, 785, 772, - 785, 785, 772, 785, 772, 785, 785, 772, 772, 785, - 772, 785, 785, 772, 785, 772, 785, 785, 772, 772, - 785, 785, 772, 785, 772, 785, 785, 772, 785, 772, - 772, 0, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772 - - } ; - -static const flex_int16_t yy_nxt[2094] = - { 0, - 24, 25, 26, 27, 25, 28, 29, 30, 31, 32, - 33, 24, 24, 34, 34, 34, 34, 34, 34, 34, - 34, 24, 24, 24, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 41, 45, 46, 47, 48, 49, - 41, 41, 50, 51, 52, 53, 54, 41, 55, 41, - 41, 56, 57, 24, 24, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 41, 45, 46, 47, 48, 49, - 41, 41, 50, 51, 52, 53, 54, 41, 55, 41, - 41, 58, 157, 59, 145, 145, 145, 145, 145, 145, - 145, 145, 147, 149, 158, 159, 160, 150, 161, 148, - - 162, 169, 170, 174, 60, 180, 181, 182, 180, 231, - 232, 271, 157, 145, 145, 145, 145, 145, 145, 145, - 145, 237, 147, 149, 158, 159, 160, 150, 161, 148, - 162, 169, 170, 174, 60, 61, 62, 26, 63, 62, - 64, 61, 65, 66, 61, 61, 61, 61, 67, 67, - 67, 67, 67, 67, 67, 67, 61, 61, 61, 61, - 68, 69, 70, 71, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 72, 73, 68, 68, 68, 68, 68, - 74, 68, 68, 75, 68, 68, 76, 77, 61, 61, - 68, 69, 70, 71, 68, 68, 68, 68, 68, 68, - - 68, 68, 68, 72, 73, 68, 68, 68, 68, 68, - 74, 68, 68, 75, 68, 68, 79, 26, 80, 79, - 79, 26, 80, 79, 83, 26, 84, 83, 83, 26, - 84, 83, 85, 676, 194, 573, 85, 100, 26, 101, - 100, 546, 177, 198, 102, 103, 178, 104, 100, 26, - 101, 100, 338, 339, 151, 102, 103, 151, 104, 115, - 26, 116, 115, 117, 194, 118, 186, 81, 522, 119, - 345, 81, 177, 198, 186, 86, 178, 199, 187, 86, - 87, 26, 63, 87, 88, 175, 89, 345, 105, 345, - 115, 26, 116, 115, 117, 151, 118, 229, 151, 105, - - 119, 229, 220, 227, 90, 220, 91, 199, 187, 136, - 120, 227, 136, 204, 92, 93, 336, 94, 176, 152, - 212, 95, 96, 128, 26, 129, 128, 97, 223, 224, - 186, 77, 98, 153, 90, 137, 91, 128, 26, 129, - 128, 120, 163, 204, 92, 93, 164, 94, 176, 152, - 212, 95, 96, 166, 276, 165, 171, 97, 87, 26, - 63, 87, 88, 153, 89, 137, 235, 167, 172, 235, - 544, 173, 163, 168, 130, 144, 164, 205, 136, 223, - 224, 183, 90, 166, 91, 165, 171, 191, 130, 216, - 191, 206, 92, 93, 217, 94, 207, 167, 172, 95, - - 96, 173, 241, 168, 184, 97, 144, 205, 142, 77, - 98, 242, 90, 192, 91, 180, 181, 182, 180, 216, - 345, 206, 92, 93, 217, 94, 207, 142, 238, 95, - 96, 238, 241, 245, 184, 97, 107, 26, 108, 107, - 109, 242, 201, 192, 139, 201, 139, 110, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 180, 181, - 182, 180, 112, 245, 188, 189, 190, 188, 192, 180, - 181, 182, 180, 202, 203, 218, 202, 203, 218, 180, - 181, 182, 180, 180, 181, 182, 180, 113, 152, 231, - 232, 229, 112, 107, 26, 108, 107, 109, 192, 192, - - 192, 192, 153, 227, 110, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 231, 232, 208, 152, 112, - 180, 181, 182, 180, 209, 213, 210, 214, 250, 192, - 192, 192, 153, 219, 569, 233, 219, 569, 233, 342, - 343, 251, 211, 215, 113, 180, 181, 182, 180, 112, - 121, 26, 63, 121, 209, 213, 210, 214, 250, 192, - 122, 192, 123, 123, 123, 123, 123, 123, 123, 123, - 246, 251, 211, 215, 247, 252, 124, 125, 180, 181, - 182, 180, 338, 339, 175, 222, 223, 224, 222, 192, - 144, 192, 238, 239, 240, 238, 253, 126, 338, 339, - - 246, 77, 342, 343, 247, 252, 124, 125, 342, 343, - 142, 225, 234, 234, 234, 234, 234, 234, 234, 234, - 201, 201, 136, 201, 201, 136, 253, 126, 131, 132, - 26, 133, 132, 131, 131, 131, 131, 131, 131, 131, - 131, 225, 243, 248, 244, 249, 192, 192, 137, 223, - 435, 131, 131, 236, 236, 236, 236, 236, 236, 236, - 236, 236, 236, 145, 145, 145, 145, 145, 145, 145, - 145, 254, 243, 248, 244, 249, 192, 192, 137, 131, - 135, 131, 131, 131, 132, 26, 133, 132, 131, 131, - 131, 131, 131, 131, 131, 131, 146, 255, 258, 436, - - 259, 254, 146, 260, 139, 144, 131, 131, 180, 181, - 182, 180, 277, 239, 240, 277, 142, 612, 256, 261, - 612, 264, 265, 266, 139, 267, 146, 255, 258, 257, - 259, 268, 146, 260, 131, 135, 131, 131, 154, 154, - 154, 154, 154, 154, 154, 154, 154, 154, 256, 261, - 262, 264, 265, 266, 155, 267, 269, 263, 270, 257, - 156, 268, 612, 136, 772, 612, 183, 281, 282, 283, - 281, 274, 275, 340, 223, 224, 340, 772, 772, 272, - 262, 284, 285, 273, 155, 286, 269, 263, 270, 184, - 156, 179, 179, 179, 179, 179, 179, 179, 179, 179, - - 179, 274, 275, 179, 179, 179, 179, 179, 179, 272, - 772, 284, 285, 273, 186, 286, 772, 772, 772, 184, - 279, 193, 287, 191, 288, 772, 191, 193, 280, 281, - 282, 283, 281, 179, 179, 179, 179, 179, 179, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 192, - 279, 193, 287, 289, 288, 196, 201, 193, 280, 201, - 202, 197, 203, 202, 772, 203, 497, 498, 499, 500, - 501, 772, 290, 291, 772, 772, 772, 772, 772, 192, - 328, 329, 192, 289, 330, 196, 192, 331, 192, 332, - 333, 197, 200, 200, 200, 200, 200, 200, 200, 200, - - 200, 200, 290, 291, 200, 200, 200, 200, 200, 200, - 328, 329, 192, 772, 330, 772, 192, 331, 192, 332, - 333, 334, 234, 234, 234, 234, 234, 234, 234, 234, - 437, 438, 439, 437, 200, 200, 200, 200, 200, 200, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - 335, 334, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 772, 772, - 335, 345, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - - 320, 321, 322, 323, 324, 325, 326, 327, 218, 219, - 346, 218, 219, 222, 223, 224, 222, 233, 347, 348, - 233, 236, 236, 236, 236, 236, 236, 236, 236, 236, - 236, 349, 350, 351, 192, 192, 352, 353, 354, 225, - 346, 355, 356, 192, 357, 358, 359, 360, 347, 348, - 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, - 371, 349, 350, 351, 192, 192, 352, 353, 354, 225, - 372, 355, 356, 192, 357, 358, 359, 360, 373, 374, - 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, - 371, 375, 376, 186, 186, 379, 380, 381, 382, 383, - - 372, 378, 384, 385, 387, 388, 389, 391, 373, 374, - 393, 407, 772, 394, 412, 395, 416, 392, 772, 377, - 390, 375, 376, 772, 772, 379, 380, 381, 382, 383, - 772, 378, 384, 385, 387, 388, 389, 391, 405, 408, - 393, 407, 409, 394, 412, 395, 416, 392, 406, 377, - 390, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 410, 423, 424, 417, 425, 411, 426, 413, 405, 408, - 418, 414, 409, 415, 419, 427, 428, 429, 406, 420, - 430, 431, 432, 421, 440, 441, 442, 422, 446, 772, - 410, 423, 424, 417, 425, 411, 426, 413, 443, 447, - - 418, 414, 448, 415, 419, 427, 428, 429, 449, 420, - 430, 431, 432, 421, 440, 441, 442, 422, 446, 444, - 450, 451, 452, 453, 454, 455, 456, 457, 458, 447, - 459, 460, 448, 445, 461, 462, 463, 464, 449, 465, - 466, 467, 468, 471, 472, 186, 473, 474, 772, 444, - 450, 451, 452, 453, 454, 455, 456, 457, 458, 469, - 459, 460, 186, 445, 461, 462, 463, 464, 477, 465, - 466, 467, 468, 471, 472, 470, 473, 474, 475, 481, - 476, 478, 479, 480, 482, 483, 485, 486, 772, 469, - 772, 772, 772, 772, 772, 772, 772, 772, 477, 502, - - 503, 484, 504, 505, 506, 470, 772, 772, 475, 481, - 476, 478, 479, 480, 482, 483, 485, 486, 487, 488, - 489, 490, 491, 492, 493, 494, 495, 496, 521, 502, - 503, 484, 504, 505, 506, 507, 508, 509, 510, 511, - 512, 513, 514, 515, 516, 523, 524, 525, 527, 528, - 517, 529, 530, 531, 532, 533, 534, 535, 521, 518, - 536, 537, 519, 538, 526, 520, 539, 540, 223, 435, - 223, 435, 772, 609, 435, 523, 524, 525, 527, 528, - 517, 529, 530, 531, 532, 533, 534, 535, 772, 518, - 536, 537, 519, 538, 526, 520, 539, 540, 541, 542, - - 543, 541, 437, 438, 439, 437, 545, 547, 443, 550, - 551, 552, 553, 772, 554, 555, 556, 557, 436, 772, - 436, 558, 559, 436, 560, 561, 562, 563, 564, 548, - 772, 567, 568, 570, 565, 571, 545, 547, 574, 550, - 551, 552, 553, 549, 554, 555, 556, 557, 186, 436, - 572, 558, 559, 345, 560, 561, 562, 563, 564, 548, - 566, 567, 568, 570, 575, 571, 576, 577, 574, 579, - 580, 578, 581, 549, 582, 583, 584, 585, 586, 587, - 572, 588, 589, 590, 591, 592, 595, 593, 596, 597, - 566, 598, 599, 600, 575, 594, 576, 577, 601, 579, - - 580, 578, 581, 602, 582, 583, 584, 585, 586, 587, - 603, 588, 589, 590, 591, 592, 595, 593, 596, 597, - 604, 598, 599, 600, 605, 594, 606, 607, 601, 608, - 546, 614, 615, 602, 541, 542, 543, 541, 612, 616, - 603, 612, 617, 619, 620, 621, 622, 772, 623, 624, - 604, 610, 625, 626, 605, 186, 606, 607, 627, 608, - 565, 614, 615, 629, 630, 569, 632, 633, 569, 616, - 634, 611, 635, 619, 620, 621, 622, 618, 623, 624, - 613, 610, 625, 626, 636, 436, 628, 637, 627, 638, - 639, 640, 641, 629, 630, 642, 632, 633, 643, 631, - - 634, 611, 635, 644, 645, 646, 647, 618, 648, 649, - 613, 650, 651, 652, 636, 653, 628, 637, 654, 638, - 639, 640, 641, 655, 656, 642, 657, 658, 643, 631, - 659, 660, 661, 644, 645, 646, 647, 662, 648, 649, - 663, 650, 651, 652, 617, 653, 665, 617, 654, 772, - 666, 667, 772, 655, 656, 668, 657, 658, 669, 670, - 659, 660, 661, 671, 672, 673, 674, 662, 675, 677, - 663, 678, 679, 680, 681, 682, 665, 683, 684, 664, - 666, 667, 664, 685, 686, 668, 687, 688, 669, 670, - 689, 690, 691, 671, 672, 673, 674, 692, 675, 677, - - 693, 678, 679, 680, 681, 682, 694, 683, 684, 664, - 695, 696, 664, 685, 686, 697, 687, 688, 699, 700, - 689, 690, 691, 701, 702, 703, 704, 692, 705, 706, - 693, 707, 708, 709, 710, 711, 694, 712, 713, 714, - 695, 696, 715, 716, 697, 718, 772, 698, 699, 700, - 719, 720, 721, 701, 702, 703, 704, 722, 705, 706, - 723, 707, 708, 709, 710, 711, 724, 712, 713, 714, - 725, 728, 715, 716, 726, 718, 717, 698, 730, 734, - 719, 720, 721, 731, 732, 733, 736, 722, 737, 739, - 723, 726, 726, 741, 729, 742, 724, 728, 743, 744, - - 725, 746, 735, 772, 747, 748, 717, 734, 730, 727, - 734, 749, 750, 731, 732, 733, 736, 751, 737, 739, - 740, 752, 753, 741, 729, 742, 738, 738, 743, 744, - 745, 746, 735, 745, 747, 748, 754, 755, 756, 727, - 757, 749, 750, 758, 759, 760, 761, 751, 762, 763, - 740, 752, 753, 764, 765, 766, 738, 738, 767, 768, - 745, 769, 770, 745, 771, 772, 754, 755, 756, 772, - 757, 772, 772, 758, 759, 760, 761, 772, 762, 763, - 772, 772, 772, 764, 765, 766, 772, 772, 767, 768, - 772, 769, 770, 772, 771, 78, 78, 78, 78, 78, - - 82, 82, 82, 82, 82, 61, 61, 61, 61, 61, - 99, 99, 99, 99, 99, 106, 106, 106, 106, 106, - 114, 114, 114, 114, 114, 127, 127, 127, 127, 127, - 134, 134, 134, 134, 134, 138, 772, 138, 138, 138, - 140, 772, 140, 141, 772, 141, 141, 141, 143, 772, - 143, 143, 143, 146, 772, 146, 185, 185, 185, 193, - 772, 193, 221, 221, 221, 221, 221, 226, 772, 226, - 226, 226, 228, 772, 228, 228, 228, 230, 230, 230, - 230, 230, 278, 278, 278, 337, 337, 337, 337, 337, - 341, 341, 341, 341, 341, 344, 772, 344, 344, 344, - - 386, 772, 386, 433, 772, 433, 434, 434, 434, 434, - 434, 23, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772 - - } ; - -static const flex_int16_t yy_chk[2094] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 40, 2, 34, 34, 34, 34, 34, 34, - 34, 34, 36, 37, 42, 43, 44, 37, 45, 36, - - 46, 49, 50, 52, 2, 57, 57, 57, 57, 119, - 119, 793, 40, 67, 67, 67, 67, 67, 67, 67, - 67, 792, 36, 37, 42, 43, 44, 37, 45, 36, - 46, 49, 50, 52, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, - 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, - 8, 8, 7, 634, 69, 470, 8, 11, 11, 11, - 11, 441, 54, 72, 11, 11, 54, 11, 12, 12, - 12, 12, 220, 220, 70, 12, 12, 70, 12, 15, - 15, 15, 15, 15, 69, 15, 59, 5, 412, 15, - 344, 6, 54, 72, 278, 7, 54, 73, 59, 8, - 9, 9, 9, 9, 9, 53, 9, 277, 11, 238, - 16, 16, 16, 16, 16, 38, 16, 229, 38, 12, - - 16, 228, 112, 227, 9, 112, 9, 73, 59, 25, - 15, 226, 25, 90, 9, 9, 217, 9, 53, 38, - 94, 9, 9, 19, 19, 19, 19, 9, 221, 221, - 185, 9, 9, 38, 9, 25, 9, 20, 20, 20, - 20, 16, 47, 90, 9, 9, 47, 9, 53, 38, - 94, 9, 9, 48, 182, 47, 51, 9, 10, 10, - 10, 10, 10, 38, 10, 25, 124, 48, 51, 124, - 439, 51, 47, 48, 19, 144, 47, 91, 58, 224, - 224, 58, 10, 48, 10, 47, 51, 62, 20, 96, - 62, 91, 10, 10, 97, 10, 91, 48, 51, 10, - - 10, 51, 147, 48, 58, 10, 143, 91, 142, 10, - 10, 148, 10, 62, 10, 77, 77, 77, 77, 96, - 439, 91, 10, 10, 97, 10, 91, 141, 192, 10, - 10, 192, 147, 150, 58, 10, 13, 13, 13, 13, - 13, 148, 79, 62, 139, 79, 138, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 81, 81, - 81, 81, 13, 150, 60, 60, 60, 60, 79, 86, - 86, 86, 86, 83, 87, 100, 83, 87, 100, 105, - 105, 105, 105, 113, 113, 113, 113, 13, 60, 230, - 230, 118, 13, 14, 14, 14, 14, 14, 79, 83, - - 87, 100, 60, 117, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 232, 232, 92, 60, 14, - 120, 120, 120, 120, 93, 95, 93, 95, 155, 83, - 87, 100, 60, 107, 466, 121, 107, 466, 121, 235, - 235, 157, 93, 95, 14, 130, 130, 130, 130, 14, - 17, 17, 17, 17, 93, 95, 93, 95, 155, 107, - 17, 121, 17, 17, 17, 17, 17, 17, 17, 17, - 152, 157, 93, 95, 152, 158, 17, 17, 135, 135, - 135, 135, 337, 337, 74, 115, 115, 115, 115, 107, - 66, 121, 137, 137, 137, 137, 159, 17, 339, 339, - - 152, 17, 341, 341, 152, 158, 17, 17, 343, 343, - 65, 115, 123, 123, 123, 123, 123, 123, 123, 123, - 128, 132, 136, 128, 132, 136, 159, 17, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 115, 149, 153, 149, 153, 128, 132, 136, 340, - 340, 21, 21, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125, 145, 145, 145, 145, 145, 145, 145, - 145, 160, 149, 153, 149, 153, 128, 132, 136, 21, - 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 154, 161, 163, 340, - - 164, 160, 154, 165, 64, 31, 22, 22, 180, 180, - 180, 180, 184, 184, 184, 184, 30, 612, 162, 166, - 612, 168, 169, 170, 28, 171, 154, 161, 163, 162, - 164, 172, 154, 165, 22, 22, 22, 22, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 39, 162, 166, - 167, 168, 169, 170, 39, 171, 173, 167, 174, 162, - 39, 172, 613, 183, 23, 613, 183, 188, 188, 188, - 188, 177, 178, 225, 225, 225, 225, 0, 0, 176, - 167, 194, 196, 176, 39, 198, 173, 167, 174, 183, - 39, 55, 55, 55, 55, 55, 55, 55, 55, 55, - - 55, 177, 178, 55, 55, 55, 55, 55, 55, 176, - 0, 194, 196, 176, 187, 198, 0, 0, 0, 183, - 187, 195, 199, 191, 204, 0, 191, 195, 187, 281, - 281, 281, 281, 55, 55, 55, 55, 55, 55, 71, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 191, - 187, 195, 199, 205, 204, 71, 201, 195, 187, 201, - 202, 71, 203, 202, 0, 203, 397, 397, 397, 397, - 397, 0, 206, 207, 0, 0, 0, 0, 0, 191, - 209, 210, 201, 205, 211, 71, 202, 212, 203, 213, - 214, 71, 75, 75, 75, 75, 75, 75, 75, 75, - - 75, 75, 206, 207, 75, 75, 75, 75, 75, 75, - 209, 210, 201, 0, 211, 0, 202, 212, 203, 213, - 214, 215, 234, 234, 234, 234, 234, 234, 234, 234, - 345, 345, 345, 345, 75, 75, 75, 75, 75, 75, - 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, - 216, 215, 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, 0, 0, - 216, 345, 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, - - 208, 208, 208, 208, 208, 208, 208, 208, 218, 219, - 242, 218, 219, 222, 222, 222, 222, 233, 243, 244, - 233, 236, 236, 236, 236, 236, 236, 236, 236, 236, - 236, 245, 246, 247, 218, 219, 248, 249, 250, 222, - 242, 251, 252, 233, 253, 254, 255, 256, 243, 244, - 257, 258, 259, 260, 261, 262, 263, 265, 266, 267, - 268, 245, 246, 247, 218, 219, 248, 249, 250, 222, - 269, 251, 252, 233, 253, 254, 255, 256, 270, 273, - 257, 258, 259, 260, 261, 262, 263, 265, 266, 267, - 268, 274, 275, 279, 280, 284, 285, 287, 288, 289, - - 269, 280, 290, 291, 302, 303, 304, 305, 270, 273, - 306, 310, 0, 306, 316, 306, 318, 305, 0, 279, - 304, 274, 275, 0, 0, 284, 285, 287, 288, 289, - 0, 280, 290, 291, 302, 303, 304, 305, 309, 313, - 306, 310, 313, 306, 316, 306, 318, 305, 309, 279, - 304, 307, 307, 307, 307, 307, 307, 307, 307, 307, - 315, 321, 322, 319, 328, 315, 329, 317, 309, 313, - 319, 317, 313, 317, 320, 330, 331, 332, 309, 320, - 333, 334, 335, 320, 346, 348, 349, 320, 352, 0, - 315, 321, 322, 319, 328, 315, 329, 317, 351, 353, - - 319, 317, 354, 317, 320, 330, 331, 332, 355, 320, - 333, 334, 335, 320, 346, 348, 349, 320, 352, 351, - 356, 357, 358, 359, 360, 361, 362, 363, 364, 353, - 366, 367, 354, 351, 369, 370, 371, 372, 355, 373, - 374, 375, 376, 380, 382, 377, 384, 387, 0, 351, - 356, 357, 358, 359, 360, 361, 362, 363, 364, 377, - 366, 367, 378, 351, 369, 370, 371, 372, 389, 373, - 374, 375, 376, 380, 382, 378, 384, 387, 388, 391, - 388, 390, 390, 390, 392, 393, 394, 395, 0, 377, - 0, 0, 0, 0, 0, 0, 0, 0, 389, 405, - - 406, 393, 407, 408, 409, 378, 0, 0, 388, 391, - 388, 390, 390, 390, 392, 393, 394, 395, 396, 396, - 396, 396, 396, 396, 396, 396, 396, 396, 411, 405, - 406, 393, 407, 408, 409, 410, 410, 410, 410, 410, - 410, 410, 410, 410, 410, 413, 414, 415, 416, 417, - 410, 418, 419, 420, 421, 422, 423, 426, 411, 410, - 427, 428, 410, 430, 415, 410, 431, 432, 434, 434, - 435, 435, 0, 543, 543, 413, 414, 415, 416, 417, - 410, 418, 419, 420, 421, 422, 423, 426, 0, 410, - 427, 428, 410, 430, 415, 410, 431, 432, 436, 436, - - 436, 436, 437, 437, 437, 437, 440, 442, 443, 444, - 445, 446, 447, 0, 448, 449, 451, 453, 434, 0, - 435, 454, 455, 543, 457, 458, 459, 460, 461, 443, - 0, 464, 465, 467, 462, 468, 440, 442, 471, 444, - 445, 446, 447, 443, 448, 449, 451, 453, 469, 436, - 469, 454, 455, 437, 457, 458, 459, 460, 461, 443, - 462, 464, 465, 467, 473, 468, 475, 476, 471, 477, - 478, 476, 479, 443, 480, 482, 484, 485, 502, 503, - 469, 505, 506, 517, 518, 519, 521, 520, 523, 524, - 462, 525, 526, 527, 473, 520, 475, 476, 528, 477, - - 478, 476, 479, 529, 480, 482, 484, 485, 502, 503, - 530, 505, 506, 517, 518, 519, 521, 520, 523, 524, - 531, 525, 526, 527, 532, 520, 533, 536, 528, 539, - 546, 548, 549, 529, 541, 541, 541, 541, 547, 550, - 530, 547, 551, 552, 553, 554, 555, 0, 557, 558, - 531, 546, 560, 561, 532, 572, 533, 536, 562, 539, - 565, 548, 549, 566, 568, 569, 570, 571, 569, 550, - 572, 546, 574, 552, 553, 554, 555, 551, 557, 558, - 547, 546, 560, 561, 575, 541, 565, 576, 562, 577, - 580, 581, 582, 566, 568, 584, 570, 571, 585, 569, - - 572, 546, 574, 587, 588, 590, 591, 551, 592, 593, - 547, 594, 595, 596, 575, 597, 565, 576, 600, 577, - 580, 581, 582, 601, 602, 584, 603, 604, 585, 569, - 605, 606, 610, 587, 588, 590, 591, 611, 592, 593, - 614, 594, 595, 596, 615, 597, 616, 617, 600, 0, - 618, 620, 0, 601, 602, 622, 603, 604, 623, 624, - 605, 606, 610, 626, 628, 629, 631, 611, 633, 637, - 614, 638, 641, 644, 647, 648, 616, 649, 650, 615, - 618, 620, 617, 651, 653, 622, 657, 661, 623, 624, - 662, 663, 664, 626, 628, 629, 631, 665, 633, 637, - - 666, 638, 641, 644, 647, 648, 667, 649, 650, 615, - 668, 669, 617, 651, 653, 671, 657, 661, 672, 673, - 662, 663, 664, 674, 675, 677, 678, 665, 679, 681, - 666, 683, 685, 688, 689, 690, 667, 691, 692, 693, - 668, 669, 695, 696, 697, 698, 0, 671, 672, 673, - 699, 700, 701, 674, 675, 677, 678, 702, 679, 681, - 710, 683, 685, 688, 689, 690, 711, 691, 692, 693, - 712, 715, 695, 696, 713, 698, 697, 671, 716, 720, - 699, 700, 701, 717, 718, 719, 722, 702, 723, 727, - 710, 724, 726, 729, 715, 730, 711, 728, 731, 732, - - 712, 735, 720, 0, 736, 737, 697, 733, 716, 713, - 734, 738, 739, 717, 718, 719, 722, 740, 723, 727, - 728, 741, 742, 729, 715, 730, 724, 726, 731, 732, - 733, 735, 720, 734, 736, 737, 743, 744, 745, 713, - 746, 738, 739, 747, 749, 751, 752, 740, 753, 754, - 728, 741, 742, 755, 756, 757, 724, 726, 758, 760, - 733, 762, 763, 734, 765, 0, 743, 744, 745, 0, - 746, 0, 0, 747, 749, 751, 752, 0, 753, 754, - 0, 0, 0, 755, 756, 757, 0, 0, 758, 760, - 0, 762, 763, 0, 765, 773, 773, 773, 773, 773, - - 774, 774, 774, 774, 774, 775, 775, 775, 775, 775, - 776, 776, 776, 776, 776, 777, 777, 777, 777, 777, - 778, 778, 778, 778, 778, 779, 779, 779, 779, 779, - 780, 780, 780, 780, 780, 781, 0, 781, 781, 781, - 782, 0, 782, 783, 0, 783, 783, 783, 784, 0, - 784, 784, 784, 785, 0, 785, 786, 786, 786, 787, - 0, 787, 788, 788, 788, 788, 788, 789, 0, 789, - 789, 789, 790, 0, 790, 790, 790, 791, 791, 791, - 791, 791, 794, 794, 794, 795, 795, 795, 795, 795, - 796, 796, 796, 796, 796, 797, 0, 797, 797, 797, - - 798, 0, 798, 799, 0, 799, 800, 800, 800, 800, - 800, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772 - - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -extern int yy_flex_debug; -int yy_flex_debug = 0; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *yytext; -#line 1 "../../kmflcomp/src/lex.l" -#line 2 "../../kmflcomp/src/lex.l" -/* lex.l: Lex parser for Keyman keyboard source files for kmflcomp compiler */ - -/* Derived from version written by David Gardner for k_tty */ - -#include -#include - -#include "compiler.h" -#include "yacc.h" - -void yyerror(char *); - -#if defined(FLEX_SCANNER) && ! defined(INITIAL) -int caller=0,caller0=0; -#else -int caller= INITIAL,caller0=INITIAL; -#endif - -char qchar; -extern int lineno; -extern int errcount; -int done=0; - -void yycleanup(void) -{ - yy_delete_buffer(YY_CURRENT_BUFFER); -} - -int yyterminate(void) -{ - yyerror("END\n"); - fflush(stderr); - return YY_NULL; -} - -#line 1204 "lex.c" - -#line 1206 "lex.c" - -#define INITIAL 0 -#define STOR 1 -#define QUOTE 2 -#define PARENS 3 -#define KEYNAME 4 -#define PLIST 5 -#define KBDVER 6 -#define BITMAP 7 -#define LNGCODE 8 -#define SKIP 9 -#define NAME 10 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -static int yy_init_globals ( void ); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int yylex_destroy ( void ); - -int yyget_debug ( void ); - -void yyset_debug ( int debug_flag ); - -YY_EXTRA_TYPE yyget_extra ( void ); - -void yyset_extra ( YY_EXTRA_TYPE user_defined ); - -FILE *yyget_in ( void ); - -void yyset_in ( FILE * _in_str ); - -FILE *yyget_out ( void ); - -void yyset_out ( FILE * _out_str ); - - int yyget_leng ( void ); - -char *yyget_text ( void ); - -int yyget_lineno ( void ); - -void yyset_lineno ( int _line_number ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap ( void ); -#else -extern int yywrap ( void ); -#endif -#endif - -#ifndef YY_NO_UNPUT - - static void yyunput ( int c, char *buf_ptr ); - -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int ); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * ); -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput ( void ); -#else -static int input ( void ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - int n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int yylex (void); - -#define YY_DECL int yylex (void) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; -#endif - -#define YY_RULE_SETUP \ - if ( yyleng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (yytext[yyleng - 1] == '\n'); \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - - if ( !(yy_init) ) - { - (yy_init) = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE ); - } - - yy_load_buffer_state( ); - } - - { -#line 53 "../../kmflcomp/src/lex.l" - - -#line 1439 "lex.c" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of yytext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 773 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 2012 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - -case 1: -/* rule 1 can match eol */ -YY_RULE_SETUP -#line 55 "../../kmflcomp/src/lex.l" -{lineno++;caller=INITIAL;BEGIN(INITIAL);return(TOK_NL);} - YY_BREAK -case 2: -YY_RULE_SETUP -#line 56 "../../kmflcomp/src/lex.l" -{/* just ignore carriage returns */}; - YY_BREAK -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(STOR): -case YY_STATE_EOF(QUOTE): -case YY_STATE_EOF(PARENS): -case YY_STATE_EOF(KEYNAME): -case YY_STATE_EOF(PLIST): -case YY_STATE_EOF(KBDVER): -case YY_STATE_EOF(BITMAP): -case YY_STATE_EOF(LNGCODE): -case YY_STATE_EOF(SKIP): -case YY_STATE_EOF(NAME): -#line 58 "../../kmflcomp/src/lex.l" -{ - if(done){yyterminate();} - else {done=1;lineno++;caller=INITIAL;BEGIN(INITIAL);return(TOK_NL);} - } - YY_BREAK -case 3: -YY_RULE_SETUP -#line 63 "../../kmflcomp/src/lex.l" -{return TOK_NAME;} - YY_BREAK -case 4: -YY_RULE_SETUP -#line 64 "../../kmflcomp/src/lex.l" -{BEGIN(BITMAP);return TOK_BITMAP;} - YY_BREAK -case 5: -YY_RULE_SETUP -#line 65 "../../kmflcomp/src/lex.l" -{caller=STOR;BEGIN(STOR);return TOK_HOTKEY;} - YY_BREAK -case 6: -YY_RULE_SETUP -#line 66 "../../kmflcomp/src/lex.l" -{BEGIN(KBDVER);return TOK_VERSION;} - YY_BREAK -case 7: -YY_RULE_SETUP -#line 67 "../../kmflcomp/src/lex.l" -{BEGIN(LNGCODE);return TOK_LANGUAGE;} - YY_BREAK -case 8: -YY_RULE_SETUP -#line 68 "../../kmflcomp/src/lex.l" -{return TOK_LAYOUT;} - YY_BREAK -case 9: -YY_RULE_SETUP -#line 69 "../../kmflcomp/src/lex.l" -{return TOK_CAPSOFF;} - YY_BREAK -case 10: -YY_RULE_SETUP -#line 70 "../../kmflcomp/src/lex.l" -{return TOK_CAPSON;} - YY_BREAK -case 11: -YY_RULE_SETUP -#line 71 "../../kmflcomp/src/lex.l" -{return TOK_CAPSFREE;} - YY_BREAK -case 12: -YY_RULE_SETUP -#line 72 "../../kmflcomp/src/lex.l" -{return TOK_COPYRIGHT;} - YY_BREAK -case 13: -YY_RULE_SETUP -#line 73 "../../kmflcomp/src/lex.l" -{return TOK_MESSAGE;} - YY_BREAK -case 14: -YY_RULE_SETUP -#line 74 "../../kmflcomp/src/lex.l" -{return TOK_MNEMONIC;} - YY_BREAK -case 15: -YY_RULE_SETUP -#line 75 "../../kmflcomp/src/lex.l" -{return TOK_ETHNOLOGUE;} - YY_BREAK -case 16: -YY_RULE_SETUP -#line 76 "../../kmflcomp/src/lex.l" -{return TOK_AUTHOR;} - YY_BREAK -case 17: -YY_RULE_SETUP -#line 77 "../../kmflcomp/src/lex.l" -{return TOK_TARGETS;} - YY_BREAK -case 18: -YY_RULE_SETUP -#line 78 "../../kmflcomp/src/lex.l" -{return TOK_VISUALKEYBOARD;} - YY_BREAK -case 19: -YY_RULE_SETUP -#line 79 "../../kmflcomp/src/lex.l" -{BEGIN(KBDVER);return TOK_KEYBOARDVERSION;} - YY_BREAK -case 20: -YY_RULE_SETUP -#line 80 "../../kmflcomp/src/lex.l" -{return TOK_ANSI;} - YY_BREAK -case 21: -YY_RULE_SETUP -#line 81 "../../kmflcomp/src/lex.l" -{return TOK_UNICODE;} - YY_BREAK -case 22: -YY_RULE_SETUP -#line 82 "../../kmflcomp/src/lex.l" -{return TOK_ANSI;} - YY_BREAK -case 23: -YY_RULE_SETUP -#line 83 "../../kmflcomp/src/lex.l" -{caller=STOR;BEGIN(STOR);return TOK_STORE;} - YY_BREAK -case 24: -YY_RULE_SETUP -#line 84 "../../kmflcomp/src/lex.l" -{return TOK_OUTS;} - YY_BREAK -case 25: -YY_RULE_SETUP -#line 85 "../../kmflcomp/src/lex.l" -{return TOK_GROUP;} - YY_BREAK -case 26: -YY_RULE_SETUP -#line 86 "../../kmflcomp/src/lex.l" -{return TOK_USINGKEYS;} - YY_BREAK -case 27: -YY_RULE_SETUP -#line 87 "../../kmflcomp/src/lex.l" -{return TOK_USE;} - YY_BREAK -case 28: -YY_RULE_SETUP -#line 88 "../../kmflcomp/src/lex.l" -{return TOK_CONTEXT;} - YY_BREAK -case 29: -YY_RULE_SETUP -#line 89 "../../kmflcomp/src/lex.l" -{return TOK_ANY;} - YY_BREAK -case 30: -YY_RULE_SETUP -#line 90 "../../kmflcomp/src/lex.l" -{return TOK_NOTANY;} - YY_BREAK -case 31: -YY_RULE_SETUP -#line 91 "../../kmflcomp/src/lex.l" -{return TOK_BEEP;} - YY_BREAK -case 32: -YY_RULE_SETUP -#line 92 "../../kmflcomp/src/lex.l" -{BEGIN(PLIST);return TOK_INDEX;} - YY_BREAK -case 33: -YY_RULE_SETUP -#line 93 "../../kmflcomp/src/lex.l" -{return TOK_NOMATCH;} - YY_BREAK -case 34: -YY_RULE_SETUP -#line 94 "../../kmflcomp/src/lex.l" -{return TOK_MATCH;} - YY_BREAK -case 35: -YY_RULE_SETUP -#line 95 "../../kmflcomp/src/lex.l" -{return TOK_NUL;} - YY_BREAK -case 36: -YY_RULE_SETUP -#line 96 "../../kmflcomp/src/lex.l" -{return TOK_DEADKEY;} - YY_BREAK -case 37: -YY_RULE_SETUP -#line 97 "../../kmflcomp/src/lex.l" -{return TOK_DEADKEY;} - YY_BREAK -case 38: -YY_RULE_SETUP -#line 98 "../../kmflcomp/src/lex.l" -{return TOK_RTN;} - YY_BREAK -case 39: -YY_RULE_SETUP -#line 99 "../../kmflcomp/src/lex.l" -{return TOK_CALL; /* not implemented */} - YY_BREAK -case 40: -YY_RULE_SETUP -#line 100 "../../kmflcomp/src/lex.l" -{return TOK_SWITCH;/* (obsolete) */} - YY_BREAK -case 41: -YY_RULE_SETUP -#line 101 "../../kmflcomp/src/lex.l" -{return TOK_GT;} - YY_BREAK -case 42: -YY_RULE_SETUP -#line 102 "../../kmflcomp/src/lex.l" -{return TOK_PLUS;} - YY_BREAK -case 43: -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -(yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 103 "../../kmflcomp/src/lex.l" -{BEGIN(NAME);return TOK_DOLLAR;} - YY_BREAK - -case 44: -YY_RULE_SETUP -#line 106 "../../kmflcomp/src/lex.l" -{/* ignore spaces */} - YY_BREAK -case 45: -YY_RULE_SETUP -#line 107 "../../kmflcomp/src/lex.l" -{BEGIN(SKIP);} - YY_BREAK -case 46: -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -(yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 108 "../../kmflcomp/src/lex.l" -{BEGIN(PARENS);return(TOK_BRKT);} - YY_BREAK -case 47: -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -(yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 109 "../../kmflcomp/src/lex.l" -{qchar='\'';BEGIN(QUOTE);return(TOK_QM);} - YY_BREAK -case 48: -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -(yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 110 "../../kmflcomp/src/lex.l" -{qchar='"';BEGIN(QUOTE);return(TOK_QM);} - YY_BREAK -case 49: -YY_RULE_SETUP -#line 111 "../../kmflcomp/src/lex.l" -{yylval.number=strtol(yytext,NULL,8);return(TOK_NUMBER);} - YY_BREAK -case 50: -YY_RULE_SETUP -#line 112 "../../kmflcomp/src/lex.l" -{yylval.number=atoi(yytext+1);return(TOK_NUMBER);} - YY_BREAK -case 51: -YY_RULE_SETUP -#line 113 "../../kmflcomp/src/lex.l" -{yylval.number=strtol(yytext+1,NULL,16);return(TOK_NUMBER);} - YY_BREAK -case 52: -YY_RULE_SETUP -#line 114 "../../kmflcomp/src/lex.l" -{yylval.number=strtol(yytext+2,NULL,16);return(TOK_NUMBER);} - YY_BREAK -case 53: -YY_RULE_SETUP -#line 115 "../../kmflcomp/src/lex.l" -{BEGIN(KEYNAME);return(TOK_SB);} - YY_BREAK -case 54: -YY_RULE_SETUP -#line 116 "../../kmflcomp/src/lex.l" -{return(TOK_BEEP);} - YY_BREAK - - -case 55: -YY_RULE_SETUP -#line 120 "../../kmflcomp/src/lex.l" -{return(TOK_DEADKEY);} - YY_BREAK -case 56: -YY_RULE_SETUP -#line 121 "../../kmflcomp/src/lex.l" -{return(TOK_DEADKEY);} - YY_BREAK -case 57: -YY_RULE_SETUP -#line 122 "../../kmflcomp/src/lex.l" -{return(TOK_OUTS);} - YY_BREAK -case 58: -YY_RULE_SETUP -#line 123 "../../kmflcomp/src/lex.l" -{return(TOK_NUL);} - YY_BREAK -case 59: -YY_RULE_SETUP -#line 124 "../../kmflcomp/src/lex.l" -{return(TOK_ERROR);} - YY_BREAK - - -case 60: -YY_RULE_SETUP -#line 128 "../../kmflcomp/src/lex.l" -{/* ignore spaces */} - YY_BREAK -case 61: -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 129 "../../kmflcomp/src/lex.l" -{/* ignore comments */} - YY_BREAK -case 62: -/* rule 62 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -YY_LINENO_REWIND_TO(yy_cp - 1); -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 130 "../../kmflcomp/src/lex.l" -{/* before either EOL */} - YY_BREAK -case 63: -YY_RULE_SETUP -#line 131 "../../kmflcomp/src/lex.l" -{return TOK_QM;} - YY_BREAK -case 64: -YY_RULE_SETUP -#line 132 "../../kmflcomp/src/lex.l" -{yylval.number=*yytext;return TOK_CHAR;} - YY_BREAK -case 65: -YY_RULE_SETUP -#line 133 "../../kmflcomp/src/lex.l" -{yylval.number=*yytext;return TOK_CHAR;} - YY_BREAK -case 66: -YY_RULE_SETUP -#line 134 "../../kmflcomp/src/lex.l" -{BEGIN(SKIP);} - YY_BREAK - - -case 67: -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 138 "../../kmflcomp/src/lex.l" -{/* ignore anything after a space */} - YY_BREAK -case 68: -/* rule 68 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -YY_LINENO_REWIND_TO(yy_cp - 1); -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 139 "../../kmflcomp/src/lex.l" -{/* including comments */} - YY_BREAK -case 69: -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -(yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 140 "../../kmflcomp/src/lex.l" -{qchar='\'';BEGIN(QUOTE);return(TOK_QM);} - YY_BREAK -case 70: -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -(yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 141 "../../kmflcomp/src/lex.l" -{qchar='"';BEGIN(QUOTE);return(TOK_QM);} - YY_BREAK -case 71: -YY_RULE_SETUP -#line 142 "../../kmflcomp/src/lex.l" -{yylval.number=*yytext;return TOK_CHAR;} - YY_BREAK -case 72: -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 143 "../../kmflcomp/src/lex.l" -{/* also ignore anything after a comma */} - YY_BREAK -case 73: -/* rule 73 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -YY_LINENO_REWIND_TO(yy_cp - 1); -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 144 "../../kmflcomp/src/lex.l" -{/* before either EOL */} - YY_BREAK - - -case 74: -YY_RULE_SETUP -#line 148 "../../kmflcomp/src/lex.l" -{/* ignore spaces */} - YY_BREAK -case 75: -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 149 "../../kmflcomp/src/lex.l" -{/* ignore comments */} - YY_BREAK -case 76: -/* rule 76 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -YY_LINENO_REWIND_TO(yy_cp - 1); -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 150 "../../kmflcomp/src/lex.l" -{/* before either EOL */} - YY_BREAK -case 77: -YY_RULE_SETUP -#line 151 "../../kmflcomp/src/lex.l" -{yylval.number=strtoul(yytext,NULL,8);return(TOK_NUMBER);} - YY_BREAK -case 78: -YY_RULE_SETUP -#line 152 "../../kmflcomp/src/lex.l" -{yylval.number=strtoul(yytext+1,NULL,10);return(TOK_NUMBER);} - YY_BREAK -case 79: -YY_RULE_SETUP -#line 153 "../../kmflcomp/src/lex.l" -{yylval.number=strtoul(yytext+1,NULL,16);return(TOK_NUMBER);} - YY_BREAK -case 80: -YY_RULE_SETUP -#line 154 "../../kmflcomp/src/lex.l" -{/* ignore comma separator */} - YY_BREAK - - -case 81: -YY_RULE_SETUP -#line 158 "../../kmflcomp/src/lex.l" -{if (*yytext==qchar) - {BEGIN(caller);return(TOK_QM);} - else - {yylval.number=*yytext;return(TOK_CHAR);} - } - YY_BREAK - - -case 82: -YY_RULE_SETUP -#line 166 "../../kmflcomp/src/lex.l" - - YY_BREAK -case 83: -YY_RULE_SETUP -#line 167 "../../kmflcomp/src/lex.l" -{BEGIN(caller);return(TOK_BRKT);} - YY_BREAK -case 84: -YY_RULE_SETUP -#line 168 "../../kmflcomp/src/lex.l" -{yylval.number=*yytext;return(TOK_CHAR);} - YY_BREAK - - -case 85: -YY_RULE_SETUP -#line 172 "../../kmflcomp/src/lex.l" -{/* ignore */} - YY_BREAK -case 86: -YY_RULE_SETUP -#line 173 "../../kmflcomp/src/lex.l" -{ return(TOK_COMMA);} - YY_BREAK -case 87: -YY_RULE_SETUP -#line 174 "../../kmflcomp/src/lex.l" -{ return(TOK_BRKT);} - YY_BREAK -case 88: -YY_RULE_SETUP -#line 175 "../../kmflcomp/src/lex.l" -{BEGIN(caller);return(TOK_BRKT);} - YY_BREAK -case 89: -YY_RULE_SETUP -#line 176 "../../kmflcomp/src/lex.l" -{yylval.number=*yytext;return(TOK_CHAR);} - YY_BREAK - - -case 90: -YY_RULE_SETUP -#line 180 "../../kmflcomp/src/lex.l" -{yylval.number=*yytext;return(TOK_CHAR);} - YY_BREAK -case 91: -YY_RULE_SETUP -#line 181 "../../kmflcomp/src/lex.l" -{BEGIN(caller);} - YY_BREAK - - -case 92: -YY_RULE_SETUP -#line 185 "../../kmflcomp/src/lex.l" -{/* ignore */} - YY_BREAK -case 93: -YY_RULE_SETUP -#line 186 "../../kmflcomp/src/lex.l" -{yylval.number=KS_LSHIFT;return(TOK_SHIFT);} - YY_BREAK -case 94: -YY_RULE_SETUP -#line 187 "../../kmflcomp/src/lex.l" -{yylval.number=KS_CAPS;return(TOK_SHIFT);} - YY_BREAK -case 95: -YY_RULE_SETUP -#line 188 "../../kmflcomp/src/lex.l" -{yylval.number=KS_LCTRL;return(TOK_SHIFT);} - YY_BREAK -case 96: -YY_RULE_SETUP -#line 189 "../../kmflcomp/src/lex.l" -{yylval.number=KS_LALT;return(TOK_SHIFT);} - YY_BREAK -case 97: -YY_RULE_SETUP -#line 190 "../../kmflcomp/src/lex.l" -{yylval.number=KS_RSHIFT;return(TOK_SHIFT);} - YY_BREAK -case 98: -YY_RULE_SETUP -#line 191 "../../kmflcomp/src/lex.l" -{yylval.number=KS_NCAPS;return(TOK_SHIFT);} - YY_BREAK -case 99: -YY_RULE_SETUP -#line 192 "../../kmflcomp/src/lex.l" -{yylval.number=KS_RCTRL;return(TOK_SHIFT);} - YY_BREAK -case 100: -YY_RULE_SETUP -#line 193 "../../kmflcomp/src/lex.l" -{yylval.number=KS_RALT;return(TOK_SHIFT);} - YY_BREAK -case 101: -YY_RULE_SETUP -#line 194 "../../kmflcomp/src/lex.l" -{yylval.number=KS_SHIFT;return(TOK_SHIFT);} - YY_BREAK -case 102: -YY_RULE_SETUP -#line 195 "../../kmflcomp/src/lex.l" -{yylval.number=KS_CTRL;return(TOK_SHIFT);} - YY_BREAK -case 103: -YY_RULE_SETUP -#line 196 "../../kmflcomp/src/lex.l" -{yylval.number=KS_ALT;return(TOK_SHIFT);} - YY_BREAK -case 104: -YY_RULE_SETUP -#line 198 "../../kmflcomp/src/lex.l" -{yylval.number=0x20;return(TOK_RAWKEY);} - YY_BREAK -case 105: -YY_RULE_SETUP -#line 199 "../../kmflcomp/src/lex.l" -{yylval.number=0x27;return(TOK_RAWKEY);} - YY_BREAK -case 106: -YY_RULE_SETUP -#line 200 "../../kmflcomp/src/lex.l" -{yylval.number=0x30;return(TOK_RAWKEY);} - YY_BREAK -case 107: -YY_RULE_SETUP -#line 201 "../../kmflcomp/src/lex.l" -{yylval.number=0x31;return(TOK_RAWKEY);} - YY_BREAK -case 108: -YY_RULE_SETUP -#line 202 "../../kmflcomp/src/lex.l" -{yylval.number=0x32;return(TOK_RAWKEY);} - YY_BREAK -case 109: -YY_RULE_SETUP -#line 203 "../../kmflcomp/src/lex.l" -{yylval.number=0x33;return(TOK_RAWKEY);} - YY_BREAK -case 110: -YY_RULE_SETUP -#line 204 "../../kmflcomp/src/lex.l" -{yylval.number=0x34;return(TOK_RAWKEY);} - YY_BREAK -case 111: -YY_RULE_SETUP -#line 205 "../../kmflcomp/src/lex.l" -{yylval.number=0x35;return(TOK_RAWKEY);} - YY_BREAK -case 112: -YY_RULE_SETUP -#line 206 "../../kmflcomp/src/lex.l" -{yylval.number=0x36;return(TOK_RAWKEY);} - YY_BREAK -case 113: -YY_RULE_SETUP -#line 207 "../../kmflcomp/src/lex.l" -{yylval.number=0x37;return(TOK_RAWKEY);} - YY_BREAK -case 114: -YY_RULE_SETUP -#line 208 "../../kmflcomp/src/lex.l" -{yylval.number=0x38;return(TOK_RAWKEY);} - YY_BREAK -case 115: -YY_RULE_SETUP -#line 209 "../../kmflcomp/src/lex.l" -{yylval.number=0x39;return(TOK_RAWKEY);} - YY_BREAK -case 116: -YY_RULE_SETUP -#line 210 "../../kmflcomp/src/lex.l" -{yylval.number=0x41;return(TOK_RAWKEY);} - YY_BREAK -case 117: -YY_RULE_SETUP -#line 211 "../../kmflcomp/src/lex.l" -{yylval.number=0x42;return(TOK_RAWKEY);} - YY_BREAK -case 118: -YY_RULE_SETUP -#line 212 "../../kmflcomp/src/lex.l" -{yylval.number=0x43;return(TOK_RAWKEY);} - YY_BREAK -case 119: -YY_RULE_SETUP -#line 213 "../../kmflcomp/src/lex.l" -{yylval.number=0x44;return(TOK_RAWKEY);} - YY_BREAK -case 120: -YY_RULE_SETUP -#line 214 "../../kmflcomp/src/lex.l" -{yylval.number=0x45;return(TOK_RAWKEY);} - YY_BREAK -case 121: -YY_RULE_SETUP -#line 215 "../../kmflcomp/src/lex.l" -{yylval.number=0x46;return(TOK_RAWKEY);} - YY_BREAK -case 122: -YY_RULE_SETUP -#line 216 "../../kmflcomp/src/lex.l" -{yylval.number=0x47;return(TOK_RAWKEY);} - YY_BREAK -case 123: -YY_RULE_SETUP -#line 217 "../../kmflcomp/src/lex.l" -{yylval.number=0x48;return(TOK_RAWKEY);} - YY_BREAK -case 124: -YY_RULE_SETUP -#line 218 "../../kmflcomp/src/lex.l" -{yylval.number=0x49;return(TOK_RAWKEY);} - YY_BREAK -case 125: -YY_RULE_SETUP -#line 219 "../../kmflcomp/src/lex.l" -{yylval.number=0x4a;return(TOK_RAWKEY);} - YY_BREAK -case 126: -YY_RULE_SETUP -#line 220 "../../kmflcomp/src/lex.l" -{yylval.number=0x4b;return(TOK_RAWKEY);} - YY_BREAK -case 127: -YY_RULE_SETUP -#line 221 "../../kmflcomp/src/lex.l" -{yylval.number=0x4c;return(TOK_RAWKEY);} - YY_BREAK -case 128: -YY_RULE_SETUP -#line 222 "../../kmflcomp/src/lex.l" -{yylval.number=0x4d;return(TOK_RAWKEY);} - YY_BREAK -case 129: -YY_RULE_SETUP -#line 223 "../../kmflcomp/src/lex.l" -{yylval.number=0x4e;return(TOK_RAWKEY);} - YY_BREAK -case 130: -YY_RULE_SETUP -#line 224 "../../kmflcomp/src/lex.l" -{yylval.number=0x4f;return(TOK_RAWKEY);} - YY_BREAK -case 131: -YY_RULE_SETUP -#line 225 "../../kmflcomp/src/lex.l" -{yylval.number=0x50;return(TOK_RAWKEY);} - YY_BREAK -case 132: -YY_RULE_SETUP -#line 226 "../../kmflcomp/src/lex.l" -{yylval.number=0x51;return(TOK_RAWKEY);} - YY_BREAK -case 133: -YY_RULE_SETUP -#line 227 "../../kmflcomp/src/lex.l" -{yylval.number=0x52;return(TOK_RAWKEY);} - YY_BREAK -case 134: -YY_RULE_SETUP -#line 228 "../../kmflcomp/src/lex.l" -{yylval.number=0x53;return(TOK_RAWKEY);} - YY_BREAK -case 135: -YY_RULE_SETUP -#line 229 "../../kmflcomp/src/lex.l" -{yylval.number=0x54;return(TOK_RAWKEY);} - YY_BREAK -case 136: -YY_RULE_SETUP -#line 230 "../../kmflcomp/src/lex.l" -{yylval.number=0x55;return(TOK_RAWKEY);} - YY_BREAK -case 137: -YY_RULE_SETUP -#line 231 "../../kmflcomp/src/lex.l" -{yylval.number=0x56;return(TOK_RAWKEY);} - YY_BREAK -case 138: -YY_RULE_SETUP -#line 232 "../../kmflcomp/src/lex.l" -{yylval.number=0x57;return(TOK_RAWKEY);} - YY_BREAK -case 139: -YY_RULE_SETUP -#line 233 "../../kmflcomp/src/lex.l" -{yylval.number=0x58;return(TOK_RAWKEY);} - YY_BREAK -case 140: -YY_RULE_SETUP -#line 234 "../../kmflcomp/src/lex.l" -{yylval.number=0x59;return(TOK_RAWKEY);} - YY_BREAK -case 141: -YY_RULE_SETUP -#line 235 "../../kmflcomp/src/lex.l" -{yylval.number=0x5a;return(TOK_RAWKEY);} - YY_BREAK -case 142: -YY_RULE_SETUP -#line 236 "../../kmflcomp/src/lex.l" -{yylval.number=0x60;return(TOK_RAWKEY);} - YY_BREAK -case 143: -YY_RULE_SETUP -#line 237 "../../kmflcomp/src/lex.l" -{yylval.number=0x2c;return(TOK_RAWKEY);} - YY_BREAK -case 144: -YY_RULE_SETUP -#line 238 "../../kmflcomp/src/lex.l" -{yylval.number=0x2d;return(TOK_RAWKEY);} - YY_BREAK -case 145: -YY_RULE_SETUP -#line 239 "../../kmflcomp/src/lex.l" -{yylval.number=0x2e;return(TOK_RAWKEY);} - YY_BREAK -case 146: -YY_RULE_SETUP -#line 240 "../../kmflcomp/src/lex.l" -{yylval.number=0x2f;return(TOK_RAWKEY);} - YY_BREAK -case 147: -YY_RULE_SETUP -#line 241 "../../kmflcomp/src/lex.l" -{yylval.number=0x3a;return(TOK_RAWKEY);} - YY_BREAK -case 148: -YY_RULE_SETUP -#line 242 "../../kmflcomp/src/lex.l" -{yylval.number=0x3d;return(TOK_RAWKEY);} - YY_BREAK -case 149: -YY_RULE_SETUP -#line 243 "../../kmflcomp/src/lex.l" -{yylval.number=0x5b;return(TOK_RAWKEY);} - YY_BREAK -case 150: -YY_RULE_SETUP -#line 244 "../../kmflcomp/src/lex.l" -{yylval.number=0x5c;return(TOK_RAWKEY);} - YY_BREAK -case 151: -YY_RULE_SETUP -#line 245 "../../kmflcomp/src/lex.l" -{yylval.number=0x5d;return(TOK_RAWKEY);} - YY_BREAK -case 152: -YY_RULE_SETUP -#line 246 "../../kmflcomp/src/lex.l" -{yylval.number=0xff08;return(TOK_RAWKEY);} - YY_BREAK -case 153: -YY_RULE_SETUP -#line 247 "../../kmflcomp/src/lex.l" -{yylval.number=0xff09;return(TOK_RAWKEY);} - YY_BREAK -case 154: -YY_RULE_SETUP -#line 248 "../../kmflcomp/src/lex.l" -{yylval.number=0xff0d;return(TOK_RAWKEY);} - YY_BREAK -case 155: -YY_RULE_SETUP -#line 249 "../../kmflcomp/src/lex.l" -{yylval.number=0xff13;return(TOK_RAWKEY);} - YY_BREAK -case 156: -YY_RULE_SETUP -#line 250 "../../kmflcomp/src/lex.l" -{yylval.number=0xff14;return(TOK_RAWKEY);} - YY_BREAK -case 157: -YY_RULE_SETUP -#line 251 "../../kmflcomp/src/lex.l" -{yylval.number=0xff1b;return(TOK_RAWKEY);} - YY_BREAK -case 158: -YY_RULE_SETUP -#line 252 "../../kmflcomp/src/lex.l" -{yylval.number=0xff50;return(TOK_RAWKEY);} - YY_BREAK -case 159: -YY_RULE_SETUP -#line 253 "../../kmflcomp/src/lex.l" -{yylval.number=0xff51;return(TOK_RAWKEY);} - YY_BREAK -case 160: -YY_RULE_SETUP -#line 254 "../../kmflcomp/src/lex.l" -{yylval.number=0xff52;return(TOK_RAWKEY);} - YY_BREAK -case 161: -YY_RULE_SETUP -#line 255 "../../kmflcomp/src/lex.l" -{yylval.number=0xff53;return(TOK_RAWKEY);} - YY_BREAK -case 162: -YY_RULE_SETUP -#line 256 "../../kmflcomp/src/lex.l" -{yylval.number=0xff54;return(TOK_RAWKEY);} - YY_BREAK -case 163: -YY_RULE_SETUP -#line 257 "../../kmflcomp/src/lex.l" -{yylval.number=0xff55;return(TOK_RAWKEY);} - YY_BREAK -case 164: -YY_RULE_SETUP -#line 258 "../../kmflcomp/src/lex.l" -{yylval.number=0xff56;return(TOK_RAWKEY);} - YY_BREAK -case 165: -YY_RULE_SETUP -#line 259 "../../kmflcomp/src/lex.l" -{yylval.number=0xff57;return(TOK_RAWKEY);} - YY_BREAK -case 166: -YY_RULE_SETUP -#line 260 "../../kmflcomp/src/lex.l" -{yylval.number=0xff63;return(TOK_RAWKEY);} - YY_BREAK -case 167: -YY_RULE_SETUP -#line 261 "../../kmflcomp/src/lex.l" -{yylval.number=0xff7f;return(TOK_RAWKEY);} - YY_BREAK -case 168: -YY_RULE_SETUP -#line 262 "../../kmflcomp/src/lex.l" -{yylval.number=0xffaa;return(TOK_RAWKEY);} - YY_BREAK -case 169: -YY_RULE_SETUP -#line 263 "../../kmflcomp/src/lex.l" -{yylval.number=0xffab;return(TOK_RAWKEY);} - YY_BREAK -case 170: -YY_RULE_SETUP -#line 264 "../../kmflcomp/src/lex.l" -{yylval.number=0xffad;return(TOK_RAWKEY);} - YY_BREAK -case 171: -YY_RULE_SETUP -#line 265 "../../kmflcomp/src/lex.l" -{yylval.number=0xffae;return(TOK_RAWKEY);} - YY_BREAK -case 172: -YY_RULE_SETUP -#line 266 "../../kmflcomp/src/lex.l" -{yylval.number=0xffaf;return(TOK_RAWKEY);} - YY_BREAK -case 173: -YY_RULE_SETUP -#line 267 "../../kmflcomp/src/lex.l" -{yylval.number=0xffb0;return(TOK_RAWKEY);} - YY_BREAK -case 174: -YY_RULE_SETUP -#line 268 "../../kmflcomp/src/lex.l" -{yylval.number=0xffb1;return(TOK_RAWKEY);} - YY_BREAK -case 175: -YY_RULE_SETUP -#line 269 "../../kmflcomp/src/lex.l" -{yylval.number=0xffb2;return(TOK_RAWKEY);} - YY_BREAK -case 176: -YY_RULE_SETUP -#line 270 "../../kmflcomp/src/lex.l" -{yylval.number=0xffb3;return(TOK_RAWKEY);} - YY_BREAK -case 177: -YY_RULE_SETUP -#line 271 "../../kmflcomp/src/lex.l" -{yylval.number=0xffb4;return(TOK_RAWKEY);} - YY_BREAK -case 178: -YY_RULE_SETUP -#line 272 "../../kmflcomp/src/lex.l" -{yylval.number=0xffb5;return(TOK_RAWKEY);} - YY_BREAK -case 179: -YY_RULE_SETUP -#line 273 "../../kmflcomp/src/lex.l" -{yylval.number=0xffb6;return(TOK_RAWKEY);} - YY_BREAK -case 180: -YY_RULE_SETUP -#line 274 "../../kmflcomp/src/lex.l" -{yylval.number=0xffb7;return(TOK_RAWKEY);} - YY_BREAK -case 181: -YY_RULE_SETUP -#line 275 "../../kmflcomp/src/lex.l" -{yylval.number=0xffb8;return(TOK_RAWKEY);} - YY_BREAK -case 182: -YY_RULE_SETUP -#line 276 "../../kmflcomp/src/lex.l" -{yylval.number=0xffb9;return(TOK_RAWKEY);} - YY_BREAK -case 183: -YY_RULE_SETUP -#line 277 "../../kmflcomp/src/lex.l" -{yylval.number=0xffbe;return(TOK_RAWKEY);} - YY_BREAK -case 184: -YY_RULE_SETUP -#line 278 "../../kmflcomp/src/lex.l" -{yylval.number=0xffbf;return(TOK_RAWKEY);} - YY_BREAK -case 185: -YY_RULE_SETUP -#line 279 "../../kmflcomp/src/lex.l" -{yylval.number=0xffc0;return(TOK_RAWKEY);} - YY_BREAK -case 186: -YY_RULE_SETUP -#line 280 "../../kmflcomp/src/lex.l" -{yylval.number=0xffc1;return(TOK_RAWKEY);} - YY_BREAK -case 187: -YY_RULE_SETUP -#line 281 "../../kmflcomp/src/lex.l" -{yylval.number=0xffc2;return(TOK_RAWKEY);} - YY_BREAK -case 188: -YY_RULE_SETUP -#line 282 "../../kmflcomp/src/lex.l" -{yylval.number=0xffc3;return(TOK_RAWKEY);} - YY_BREAK -case 189: -YY_RULE_SETUP -#line 283 "../../kmflcomp/src/lex.l" -{yylval.number=0xffc4;return(TOK_RAWKEY);} - YY_BREAK -case 190: -YY_RULE_SETUP -#line 284 "../../kmflcomp/src/lex.l" -{yylval.number=0xffc5;return(TOK_RAWKEY);} - YY_BREAK -case 191: -YY_RULE_SETUP -#line 285 "../../kmflcomp/src/lex.l" -{yylval.number=0xffc6;return(TOK_RAWKEY);} - YY_BREAK -case 192: -YY_RULE_SETUP -#line 286 "../../kmflcomp/src/lex.l" -{yylval.number=0xffc7;return(TOK_RAWKEY);} - YY_BREAK -case 193: -YY_RULE_SETUP -#line 287 "../../kmflcomp/src/lex.l" -{yylval.number=0xffc8;return(TOK_RAWKEY);} - YY_BREAK -case 194: -YY_RULE_SETUP -#line 288 "../../kmflcomp/src/lex.l" -{yylval.number=0xffc9;return(TOK_RAWKEY);} - YY_BREAK -case 195: -YY_RULE_SETUP -#line 289 "../../kmflcomp/src/lex.l" -{yylval.number=0xffca;return(TOK_RAWKEY);} - YY_BREAK -case 196: -YY_RULE_SETUP -#line 290 "../../kmflcomp/src/lex.l" -{yylval.number=0xffcb;return(TOK_RAWKEY);} - YY_BREAK -case 197: -YY_RULE_SETUP -#line 291 "../../kmflcomp/src/lex.l" -{yylval.number=0xffcc;return(TOK_RAWKEY);} - YY_BREAK -case 198: -YY_RULE_SETUP -#line 292 "../../kmflcomp/src/lex.l" -{yylval.number=0xffcd;return(TOK_RAWKEY);} - YY_BREAK -case 199: -YY_RULE_SETUP -#line 293 "../../kmflcomp/src/lex.l" -{yylval.number=0xffce;return(TOK_RAWKEY);} - YY_BREAK -case 200: -YY_RULE_SETUP -#line 294 "../../kmflcomp/src/lex.l" -{yylval.number=0xffcf;return(TOK_RAWKEY);} - YY_BREAK -case 201: -YY_RULE_SETUP -#line 295 "../../kmflcomp/src/lex.l" -{yylval.number=0xffd0;return(TOK_RAWKEY);} - YY_BREAK -case 202: -YY_RULE_SETUP -#line 296 "../../kmflcomp/src/lex.l" -{yylval.number=0xffd1;return(TOK_RAWKEY);} - YY_BREAK -case 203: -YY_RULE_SETUP -#line 297 "../../kmflcomp/src/lex.l" -{yylval.number=0xffd2;return(TOK_RAWKEY);} - YY_BREAK -case 204: -YY_RULE_SETUP -#line 298 "../../kmflcomp/src/lex.l" -{yylval.number=0xffd3;return(TOK_RAWKEY);} - YY_BREAK -case 205: -YY_RULE_SETUP -#line 299 "../../kmflcomp/src/lex.l" -{yylval.number=0xffd4;return(TOK_RAWKEY);} - YY_BREAK -case 206: -YY_RULE_SETUP -#line 300 "../../kmflcomp/src/lex.l" -{yylval.number=0xffd5;return(TOK_RAWKEY);} - YY_BREAK -case 207: -YY_RULE_SETUP -#line 301 "../../kmflcomp/src/lex.l" -{yylval.number=0xffe1;return(TOK_RAWKEY);} - YY_BREAK -case 208: -YY_RULE_SETUP -#line 302 "../../kmflcomp/src/lex.l" -{yylval.number=0xffe3;return(TOK_RAWKEY);} - YY_BREAK -case 209: -YY_RULE_SETUP -#line 303 "../../kmflcomp/src/lex.l" -{yylval.number=0xffe5;return(TOK_RAWKEY);} - YY_BREAK -case 210: -YY_RULE_SETUP -#line 304 "../../kmflcomp/src/lex.l" -{yylval.number=0xffe9;return(TOK_RAWKEY);} - YY_BREAK -case 211: -YY_RULE_SETUP -#line 305 "../../kmflcomp/src/lex.l" -{yylval.number=0xffff;return(TOK_RAWKEY);} - YY_BREAK -case 212: -YY_RULE_SETUP -#line 306 "../../kmflcomp/src/lex.l" -{yylval.number=0x3c;return(TOK_RAWKEY); /* on German kbds only!*/} - YY_BREAK -case 213: -YY_RULE_SETUP -#line 308 "../../kmflcomp/src/lex.l" -{yylval.number=text_to_keysym(yytext); if (yylval.number == -1) yyerror("unrecognised raw key"); else return(TOK_XKEYSYM);} - YY_BREAK -case 214: -YY_RULE_SETUP -#line 309 "../../kmflcomp/src/lex.l" -{ yyerror("unrecognised raw key");} - YY_BREAK -case 215: -YY_RULE_SETUP -#line 310 "../../kmflcomp/src/lex.l" -{caller0=caller;caller=KEYNAME;qchar='\'';BEGIN(QUOTE);return(TOK_QM);} - YY_BREAK -case 216: -YY_RULE_SETUP -#line 311 "../../kmflcomp/src/lex.l" -{caller0=caller;caller=KEYNAME;qchar='\"';BEGIN(QUOTE);return(TOK_QM);} - YY_BREAK -case 217: -YY_RULE_SETUP -#line 313 "../../kmflcomp/src/lex.l" -{ - if(caller==KEYNAME) caller=caller0; - BEGIN(caller);return(TOK_SB); - } - YY_BREAK - -case 218: -/* rule 218 can match eol */ -YY_RULE_SETUP -#line 319 "../../kmflcomp/src/lex.l" -{lineno++; /* Join lines */} - YY_BREAK -case 219: -/* rule 219 can match eol */ -YY_RULE_SETUP -#line 320 "../../kmflcomp/src/lex.l" -{lineno++; /* Join lines */} - YY_BREAK -case 220: -/* rule 220 can match eol */ -YY_RULE_SETUP -#line 321 "../../kmflcomp/src/lex.l" -{lineno++; /* Join lines */} - YY_BREAK -case 221: -/* rule 221 can match eol */ -YY_RULE_SETUP -#line 322 "../../kmflcomp/src/lex.l" -{lineno++; /* Join lines */} - YY_BREAK -case 222: -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -(yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 324 "../../kmflcomp/src/lex.l" -{/* ignore, use both /\r and /\n, not to work $ */} - YY_BREAK -case 223: -/* rule 223 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -YY_LINENO_REWIND_TO(yy_bp + 1); -(yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 325 "../../kmflcomp/src/lex.l" -{/* with either CR or CR/LF line ending */} - YY_BREAK -case 224: -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 326 "../../kmflcomp/src/lex.l" -{/* ignore */} - YY_BREAK -case 225: -/* rule 225 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -YY_LINENO_REWIND_TO(yy_cp - 1); -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 327 "../../kmflcomp/src/lex.l" -{/* ignore */} - YY_BREAK -case 226: -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 328 "../../kmflcomp/src/lex.l" -{/* ignore */} - YY_BREAK -case 227: -/* rule 227 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -YY_LINENO_REWIND_TO(yy_cp - 1); -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 329 "../../kmflcomp/src/lex.l" -{/* ignore */} - YY_BREAK -case 228: -YY_RULE_SETUP -#line 331 "../../kmflcomp/src/lex.l" -{BEGIN(SKIP);} - YY_BREAK -case 229: -YY_RULE_SETUP -#line 333 "../../kmflcomp/src/lex.l" -{/* Keyman platform conditional - just drop marker */} - YY_BREAK -case 230: -YY_RULE_SETUP -#line 334 "../../kmflcomp/src/lex.l" -{/* Kmfl platform conditional - just drop marker */} - YY_BREAK -case 231: -YY_RULE_SETUP -#line 335 "../../kmflcomp/src/lex.l" -{BEGIN(SKIP);} /* Platform Conditional */ - YY_BREAK - -case 232: -YY_RULE_SETUP -#line 338 "../../kmflcomp/src/lex.l" -{/* ignore everything until nl or EOF */} - YY_BREAK - -case 233: -YY_RULE_SETUP -#line 341 "../../kmflcomp/src/lex.l" -{fprintf(stderr,"Line %d: Unmatched closing parenthesis\n",lineno);return(TOK_BRKT);} - YY_BREAK -case 234: -YY_RULE_SETUP -#line 342 "../../kmflcomp/src/lex.l" -{yylval.number=yytext[0];fprintf(stderr,"Line %d: Unrecognized keyword '%s'\n", - (int)lineno, yytext);errcount++;return(TOK_ERROR);} - YY_BREAK -case 235: -YY_RULE_SETUP -#line 344 "../../kmflcomp/src/lex.l" -{yylval.number=yytext[0];fprintf(stderr,"Line %d: Unexpected char (%d) `%c'\n", - (int)lineno, (int) yytext[0],(char) yytext[0]);errcount++;return(TOK_CHAR);} - YY_BREAK -case 236: -YY_RULE_SETUP -#line 346 "../../kmflcomp/src/lex.l" -ECHO; - YY_BREAK -#line 2804 "lex.c" - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_c_buf_p); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( yywrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ -} /* end of yylex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (void) -{ - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = (yytext_ptr); - int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc( (void *) b->yy_ch_buf, - (yy_size_t) (b->yy_buf_size + 2) ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( - (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (void) -{ - yy_state_type yy_current_state; - char *yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 773 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ - int yy_is_jam; - char *yy_cp = (yy_c_buf_p); - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 773 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 772); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_UNPUT - - static void yyunput (int c, char * yy_bp ) -{ - char *yy_cp; - - yy_cp = (yy_c_buf_p); - - /* undo effects of setting up yytext */ - *yy_cp = (yy_hold_char); - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - int number_to_move = (yy_n_chars) + 2; - char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; -} - -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (void) -#else - static int input (void) -#endif - -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( ) ) - return 0; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve yytext */ - (yy_hold_char) = *++(yy_c_buf_p); - - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void yyrestart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE ); - } - - yy_init_buffer( YY_CURRENT_BUFFER, input_file ); - yy_load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void yy_load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer( b, file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with yy_create_buffer() - * - */ - void yy_delete_buffer (YY_BUFFER_STATE b ) -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yyfree( (void *) b->yy_ch_buf ); - - yyfree( (void *) b ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a yyrestart() or at EOF. - */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) - -{ - int oerrno = errno; - - yy_flush_buffer( b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void yy_flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void yypop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void yyensure_buffer_stack (void) -{ - yy_size_t num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to yylex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * yy_scan_bytes() instead. - */ -YY_BUFFER_STATE yy_scan_string (const char * yystr ) -{ - - return yy_scan_bytes( yystr, (int) strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to yylex() will - * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc( n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yynoreturn yy_fatal_error (const char* msg ) -{ - fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = (yy_hold_char); \ - (yy_c_buf_p) = yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int yyget_lineno (void) -{ - - return yylineno; -} - -/** Get the input stream. - * - */ -FILE *yyget_in (void) -{ - return yyin; -} - -/** Get the output stream. - * - */ -FILE *yyget_out (void) -{ - return yyout; -} - -/** Get the length of the current token. - * - */ -int yyget_leng (void) -{ - return yyleng; -} - -/** Get the current token. - * - */ - -char *yyget_text (void) -{ - return yytext; -} - -/** Set the current line number. - * @param _line_number line number - * - */ -void yyset_lineno (int _line_number ) -{ - - yylineno = _line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param _in_str A readable stream. - * - * @see yy_switch_to_buffer - */ -void yyset_in (FILE * _in_str ) -{ - yyin = _in_str ; -} - -void yyset_out (FILE * _out_str ) -{ - yyout = _out_str ; -} - -int yyget_debug (void) -{ - return yy_flex_debug; -} - -void yyset_debug (int _bdebug ) -{ - yy_flex_debug = _bdebug ; -} - -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = NULL; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = NULL; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = NULL; - yyout = NULL; -#endif - - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; -} - -/* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer( YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(); - } - - /* Destroy the stack itself. */ - yyfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( ); - - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, const char * s2, int n ) -{ - - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (const char * s ) -{ - int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *yyalloc (yy_size_t size ) -{ - return malloc(size); -} - -void *yyrealloc (void * ptr, yy_size_t size ) -{ - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); -} - -void yyfree (void * ptr ) -{ - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 346 "../../kmflcomp/src/lex.l" diff --git a/linux/legacy/kmflcomp/src/lex.l b/linux/legacy/kmflcomp/src/lex.l deleted file mode 100755 index 2ad13b727d..0000000000 --- a/linux/legacy/kmflcomp/src/lex.l +++ /dev/null @@ -1,345 +0,0 @@ -%{ -/* lex.l: Lex parser for Keyman keyboard source files for kmflcomp compiler */ - -/* Derived from version written by David Gardner for k_tty */ - -#include -#include - -#include "compiler.h" -#include "yacc.h" - -void yyerror(char *); - -#if defined(FLEX_SCANNER) && ! defined(INITIAL) -int caller=0,caller0=0; -#else -int caller= INITIAL,caller0=INITIAL; -#endif - -char qchar; -extern int lineno; -extern int errcount; -int done=0; - -void yycleanup(void) -{ - yy_delete_buffer(YY_CURRENT_BUFFER); -} - -int yyterminate(void) -{ - yyerror("END\n"); - fflush(stderr); - return YY_NULL; -} - -%} - -%option noyywrap -%option caseless -%x STOR -%x QUOTE -%x PARENS -%x KEYNAME -%x PLIST -%x KBDVER -%x BITMAP -%x LNGCODE -%x SKIP -%x NAME -SPACES [ \t] - -%% - -<*>\n {lineno++;caller=INITIAL;BEGIN(INITIAL);return(TOK_NL);} -<*>\r {/* just ignore carriage returns */}; - -<> { - if(done){yyterminate();} - else {done=1;lineno++;caller=INITIAL;BEGIN(INITIAL);return(TOK_NL);} - } - -NAME {return TOK_NAME;} -BITMAPS?{SPACES}* {BEGIN(BITMAP);return TOK_BITMAP;} -HOTKEY {caller=STOR;BEGIN(STOR);return TOK_HOTKEY;} -VERSION {BEGIN(KBDVER);return TOK_VERSION;} -LANGUAGE {BEGIN(LNGCODE);return TOK_LANGUAGE;} -LAYOUT {return TOK_LAYOUT;} -CAPS[ ]*ALWAYS[ ]*OFF {return TOK_CAPSOFF;} -CAPS[ ]*ON[ ]*ONLY {return TOK_CAPSON;} -SHIFT[ ]*FREES[ ]*CAPS {return TOK_CAPSFREE;} -COPYRIGHT {return TOK_COPYRIGHT;} -MESSAGE {return TOK_MESSAGE;} -MNEMONIC[ ]*LAYOUT {return TOK_MNEMONIC;} -ETHNOLOGUE[ ]*CODE {return TOK_ETHNOLOGUE;} -AUTHOR {return TOK_AUTHOR;} -TARGETS {return TOK_TARGETS;} -VISUALKEYBOARD {return TOK_VISUALKEYBOARD;} -KEYBOARDVERSION {BEGIN(KBDVER);return TOK_KEYBOARDVERSION;} -begin[ ]+ansi {return TOK_ANSI;} -begin[ ]+unicode {return TOK_UNICODE;} -begin {return TOK_ANSI;} -store {caller=STOR;BEGIN(STOR);return TOK_STORE;} -outs {return TOK_OUTS;} -group {return TOK_GROUP;} -using{SPACES}+keys {return TOK_USINGKEYS;} -use {return TOK_USE;} -context {return TOK_CONTEXT;} -any {return TOK_ANY;} -notany {return TOK_NOTANY;} -beep {return TOK_BEEP;} -index {BEGIN(PLIST);return TOK_INDEX;} -nomatch {return TOK_NOMATCH;} -match {return TOK_MATCH;} -nul {return TOK_NUL;} -deadkey {return TOK_DEADKEY;} -dk {return TOK_DEADKEY;} -return {return TOK_RTN;} -call {return TOK_CALL; /* not implemented */} -switch {return TOK_SWITCH;/* (obsolete) */} -\> {return TOK_GT;} -\+ {return TOK_PLUS;} -\$/[a-z0-9] {BEGIN(NAME);return TOK_DOLLAR;} - -{ - {SPACES}* {/* ignore spaces */} - c{SPACES} {BEGIN(SKIP);} - \(/.*\) {BEGIN(PARENS);return(TOK_BRKT);} - \'/.*\' {qchar='\'';BEGIN(QUOTE);return(TOK_QM);} - \"/.*\" {qchar='"';BEGIN(QUOTE);return(TOK_QM);} - [0-7]+ {yylval.number=strtol(yytext,NULL,8);return(TOK_NUMBER);} - [dD][0-9]+ {yylval.number=atoi(yytext+1);return(TOK_NUMBER);} - [xX][0-9a-fA-F]+ {yylval.number=strtol(yytext+1,NULL,16);return(TOK_NUMBER);} - U\+[0-9a-fA-F]+ {yylval.number=strtol(yytext+2,NULL,16);return(TOK_NUMBER);} - \[ {BEGIN(KEYNAME);return(TOK_SB);} - beep {return(TOK_BEEP);} -} - -{ - deadkey {return(TOK_DEADKEY);} - dk {return(TOK_DEADKEY);} - outs {return(TOK_OUTS);} - nul {return(TOK_NUL);} - [a-z][a-z0-9]* {return(TOK_ERROR);} -} - -{ - {SPACES}* {/* ignore spaces */} - c{SPACES}.*/\r {/* ignore comments */} - c{SPACES}.*/\n {/* before either EOL */} - \" {return TOK_QM;} - [0-9] {yylval.number=*yytext;return TOK_CHAR;} - \. {yylval.number=*yytext;return TOK_CHAR;} - . {BEGIN(SKIP);} -} - -{ - {SPACES}.*/\r {/* ignore anything after a space */} - {SPACES}.*/\n {/* including comments */} - \'/.*\' {qchar='\'';BEGIN(QUOTE);return(TOK_QM);} - \"/.*\" {qchar='"';BEGIN(QUOTE);return(TOK_QM);} - . {yylval.number=*yytext;return TOK_CHAR;} - ,.*/\r {/* also ignore anything after a comma */} - ,.*/\n {/* before either EOL */} -} - -{ - {SPACES}* {/* ignore spaces */} - c{SPACES}.*/\r {/* ignore comments */} - c{SPACES}.*/\n {/* before either EOL */} - [0-7]+ {yylval.number=strtoul(yytext,NULL,8);return(TOK_NUMBER);} - d[0-9]+ {yylval.number=strtoul(yytext+1,NULL,10);return(TOK_NUMBER);} - x[0-9a-f]+ {yylval.number=strtoul(yytext+1,NULL,16);return(TOK_NUMBER);} - , {/* ignore comma separator */} -} - -{ - . {if (*yytext==qchar) - {BEGIN(caller);return(TOK_QM);} - else - {yylval.number=*yytext;return(TOK_CHAR);} - } -} - -{ - {SPACES}* - \) {BEGIN(caller);return(TOK_BRKT);} - . {yylval.number=*yytext;return(TOK_CHAR);} -} - -{ - {SPACES}* {/* ignore */} - \, { return(TOK_COMMA);} - \( { return(TOK_BRKT);} - \) {BEGIN(caller);return(TOK_BRKT);} - . {yylval.number=*yytext;return(TOK_CHAR);} -} - -{ - [a-z0-9] {yylval.number=*yytext;return(TOK_CHAR);} - . {BEGIN(caller);} -} - -{ - {SPACES}* {/* ignore */} - LShift {yylval.number=KS_LSHIFT;return(TOK_SHIFT);} - Caps {yylval.number=KS_CAPS;return(TOK_SHIFT);} - LCtrl {yylval.number=KS_LCTRL;return(TOK_SHIFT);} - LAlt {yylval.number=KS_LALT;return(TOK_SHIFT);} - RShift {yylval.number=KS_RSHIFT;return(TOK_SHIFT);} - NCaps {yylval.number=KS_NCAPS;return(TOK_SHIFT);} - RCtrl {yylval.number=KS_RCTRL;return(TOK_SHIFT);} - RAlt|AltGr {yylval.number=KS_RALT;return(TOK_SHIFT);} - Shift {yylval.number=KS_SHIFT;return(TOK_SHIFT);} - Ctrl|Control {yylval.number=KS_CTRL;return(TOK_SHIFT);} - Alt {yylval.number=KS_ALT;return(TOK_SHIFT);} - - K_SPACE {yylval.number=0x20;return(TOK_RAWKEY);} - K_QUOTE {yylval.number=0x27;return(TOK_RAWKEY);} - K_0 {yylval.number=0x30;return(TOK_RAWKEY);} - K_1 {yylval.number=0x31;return(TOK_RAWKEY);} - K_2 {yylval.number=0x32;return(TOK_RAWKEY);} - K_3 {yylval.number=0x33;return(TOK_RAWKEY);} - K_4 {yylval.number=0x34;return(TOK_RAWKEY);} - K_5 {yylval.number=0x35;return(TOK_RAWKEY);} - K_6 {yylval.number=0x36;return(TOK_RAWKEY);} - K_7 {yylval.number=0x37;return(TOK_RAWKEY);} - K_8 {yylval.number=0x38;return(TOK_RAWKEY);} - K_9 {yylval.number=0x39;return(TOK_RAWKEY);} - K_A {yylval.number=0x41;return(TOK_RAWKEY);} - K_B {yylval.number=0x42;return(TOK_RAWKEY);} - K_C {yylval.number=0x43;return(TOK_RAWKEY);} - K_D {yylval.number=0x44;return(TOK_RAWKEY);} - K_E {yylval.number=0x45;return(TOK_RAWKEY);} - K_F {yylval.number=0x46;return(TOK_RAWKEY);} - K_G {yylval.number=0x47;return(TOK_RAWKEY);} - K_H {yylval.number=0x48;return(TOK_RAWKEY);} - K_I {yylval.number=0x49;return(TOK_RAWKEY);} - K_J {yylval.number=0x4a;return(TOK_RAWKEY);} - K_K {yylval.number=0x4b;return(TOK_RAWKEY);} - K_L {yylval.number=0x4c;return(TOK_RAWKEY);} - K_M {yylval.number=0x4d;return(TOK_RAWKEY);} - K_N {yylval.number=0x4e;return(TOK_RAWKEY);} - K_O {yylval.number=0x4f;return(TOK_RAWKEY);} - K_P {yylval.number=0x50;return(TOK_RAWKEY);} - K_Q {yylval.number=0x51;return(TOK_RAWKEY);} - K_R {yylval.number=0x52;return(TOK_RAWKEY);} - K_S {yylval.number=0x53;return(TOK_RAWKEY);} - K_T {yylval.number=0x54;return(TOK_RAWKEY);} - K_U {yylval.number=0x55;return(TOK_RAWKEY);} - K_V {yylval.number=0x56;return(TOK_RAWKEY);} - K_W {yylval.number=0x57;return(TOK_RAWKEY);} - K_X {yylval.number=0x58;return(TOK_RAWKEY);} - K_Y {yylval.number=0x59;return(TOK_RAWKEY);} - K_Z {yylval.number=0x5a;return(TOK_RAWKEY);} - K_BKQUOTE {yylval.number=0x60;return(TOK_RAWKEY);} - K_COMMA {yylval.number=0x2c;return(TOK_RAWKEY);} - K_HYPHEN {yylval.number=0x2d;return(TOK_RAWKEY);} - K_PERIOD {yylval.number=0x2e;return(TOK_RAWKEY);} - K_SLASH {yylval.number=0x2f;return(TOK_RAWKEY);} - K_COLON {yylval.number=0x3a;return(TOK_RAWKEY);} - K_EQUAL {yylval.number=0x3d;return(TOK_RAWKEY);} - K_LBRKT {yylval.number=0x5b;return(TOK_RAWKEY);} - K_BKSLASH {yylval.number=0x5c;return(TOK_RAWKEY);} - K_RBRKT {yylval.number=0x5d;return(TOK_RAWKEY);} - K_BKSP {yylval.number=0xff08;return(TOK_RAWKEY);} - K_TAB {yylval.number=0xff09;return(TOK_RAWKEY);} - K_ENTER {yylval.number=0xff0d;return(TOK_RAWKEY);} - K_PAUSE {yylval.number=0xff13;return(TOK_RAWKEY);} - K_SCROLL {yylval.number=0xff14;return(TOK_RAWKEY);} - K_ESC {yylval.number=0xff1b;return(TOK_RAWKEY);} - K_HOME {yylval.number=0xff50;return(TOK_RAWKEY);} - K_LEFT {yylval.number=0xff51;return(TOK_RAWKEY);} - K_UP {yylval.number=0xff52;return(TOK_RAWKEY);} - K_RIGHT {yylval.number=0xff53;return(TOK_RAWKEY);} - K_DOWN {yylval.number=0xff54;return(TOK_RAWKEY);} - K_PGUP {yylval.number=0xff55;return(TOK_RAWKEY);} - K_PGDN {yylval.number=0xff56;return(TOK_RAWKEY);} - K_END {yylval.number=0xff57;return(TOK_RAWKEY);} - K_INS {yylval.number=0xff63;return(TOK_RAWKEY);} - K_NUMLOCK {yylval.number=0xff7f;return(TOK_RAWKEY);} - K_NPSTAR {yylval.number=0xffaa;return(TOK_RAWKEY);} - K_NPPLUS {yylval.number=0xffab;return(TOK_RAWKEY);} - K_NPMINUS {yylval.number=0xffad;return(TOK_RAWKEY);} - K_NPDOT {yylval.number=0xffae;return(TOK_RAWKEY);} - K_NPSLASH {yylval.number=0xffaf;return(TOK_RAWKEY);} - K_NP0 {yylval.number=0xffb0;return(TOK_RAWKEY);} - K_NP1 {yylval.number=0xffb1;return(TOK_RAWKEY);} - K_NP2 {yylval.number=0xffb2;return(TOK_RAWKEY);} - K_NP3 {yylval.number=0xffb3;return(TOK_RAWKEY);} - K_NP4 {yylval.number=0xffb4;return(TOK_RAWKEY);} - K_NP5 {yylval.number=0xffb5;return(TOK_RAWKEY);} - K_NP6 {yylval.number=0xffb6;return(TOK_RAWKEY);} - K_NP7 {yylval.number=0xffb7;return(TOK_RAWKEY);} - K_NP8 {yylval.number=0xffb8;return(TOK_RAWKEY);} - K_NP9 {yylval.number=0xffb9;return(TOK_RAWKEY);} - K_F1 {yylval.number=0xffbe;return(TOK_RAWKEY);} - K_F2 {yylval.number=0xffbf;return(TOK_RAWKEY);} - K_F3 {yylval.number=0xffc0;return(TOK_RAWKEY);} - K_F4 {yylval.number=0xffc1;return(TOK_RAWKEY);} - K_F5 {yylval.number=0xffc2;return(TOK_RAWKEY);} - K_F6 {yylval.number=0xffc3;return(TOK_RAWKEY);} - K_F7 {yylval.number=0xffc4;return(TOK_RAWKEY);} - K_F8 {yylval.number=0xffc5;return(TOK_RAWKEY);} - K_F9 {yylval.number=0xffc6;return(TOK_RAWKEY);} - K_F10 {yylval.number=0xffc7;return(TOK_RAWKEY);} - K_F11 {yylval.number=0xffc8;return(TOK_RAWKEY);} - K_F12 {yylval.number=0xffc9;return(TOK_RAWKEY);} - K_F13 {yylval.number=0xffca;return(TOK_RAWKEY);} - K_F14 {yylval.number=0xffcb;return(TOK_RAWKEY);} - K_F15 {yylval.number=0xffcc;return(TOK_RAWKEY);} - K_F16 {yylval.number=0xffcd;return(TOK_RAWKEY);} - K_F17 {yylval.number=0xffce;return(TOK_RAWKEY);} - K_F18 {yylval.number=0xffcf;return(TOK_RAWKEY);} - K_F19 {yylval.number=0xffd0;return(TOK_RAWKEY);} - K_F20 {yylval.number=0xffd1;return(TOK_RAWKEY);} - K_F21 {yylval.number=0xffd2;return(TOK_RAWKEY);} - K_F22 {yylval.number=0xffd3;return(TOK_RAWKEY);} - K_F23 {yylval.number=0xffd4;return(TOK_RAWKEY);} - K_F24 {yylval.number=0xffd5;return(TOK_RAWKEY);} - K_SHIFT {yylval.number=0xffe1;return(TOK_RAWKEY);} - K_CONTROL {yylval.number=0xffe3;return(TOK_RAWKEY);} - K_CAPS {yylval.number=0xffe5;return(TOK_RAWKEY);} - K_ALT {yylval.number=0xffe9;return(TOK_RAWKEY);} - K_DEL {yylval.number=0xffff;return(TOK_RAWKEY);} - K_oE2 {yylval.number=0x3c;return(TOK_RAWKEY); /* on German kbds only!*/} - - XK_[a-zA-Z0-9]+ {yylval.number=text_to_keysym(yytext); if (yylval.number == -1) yyerror("unrecognised raw key"); else return(TOK_XKEYSYM);} - K_[A-Z0-9]+ { yyerror("unrecognised raw key");} - \' {caller0=caller;caller=KEYNAME;qchar='\'';BEGIN(QUOTE);return(TOK_QM);} - \" {caller0=caller;caller=KEYNAME;qchar='\"';BEGIN(QUOTE);return(TOK_QM);} - - \] { - if(caller==KEYNAME) caller=caller0; - BEGIN(caller);return(TOK_SB); - } -} - -<*>\\{SPACES}*\n {lineno++; /* Join lines */} -<*>\\{SPACES}*\r\n {lineno++; /* Join lines */} -<*>{SPACES}+c{SPACES}.*\\{SPACES}*\n {lineno++; /* Join lines */} -<*>{SPACES}+c{SPACES}.*\\{SPACES}*\r\n {lineno++; /* Join lines */} - -^c/\r {/* ignore, use both /\r and /\n, not to work $ */} -^c/\n {/* with either CR or CR/LF line ending */} -^c{SPACES}*/\r {/* ignore */} -^c{SPACES}*/\n {/* ignore */} -{SPACES}+c/\r {/* ignore */} -{SPACES}+c/\n {/* ignore */} - -^[ ]*c{SPACES} {BEGIN(SKIP);} - -^$keyman:? {/* Keyman platform conditional - just drop marker */} -^$kmfl:? {/* Kmfl platform conditional - just drop marker */} -^$[a-zA-Z0-9]*:? {BEGIN(SKIP);} /* Platform Conditional */ - -{ - . {/* ignore everything until nl or EOF */} -} - -\) {fprintf(stderr,"Line %d: Unmatched closing parenthesis\n",lineno);return(TOK_BRKT);} -[a-z][a-z0-9]* {yylval.number=yytext[0];fprintf(stderr,"Line %d: Unrecognized keyword '%s'\n", - (int)lineno, yytext);errcount++;return(TOK_ERROR);} -. {yylval.number=yytext[0];fprintf(stderr,"Line %d: Unexpected char (%d) `%c'\n", - (int)lineno, (int) yytext[0],(char) yytext[0]);errcount++;return(TOK_CHAR);} diff --git a/linux/legacy/kmflcomp/src/memman.c b/linux/legacy/kmflcomp/src/memman.c deleted file mode 100644 index c3fc9d3ab3..0000000000 --- a/linux/legacy/kmflcomp/src/memman.c +++ /dev/null @@ -1,146 +0,0 @@ -/* memman.c - * Copyright (C) 2005 SIL International - * - */ - -#include -#include -#include - -#include "memman.h" - -// Memory Management -typedef struct memnod -{ - struct memnod * mh_next; - struct memnod * mh_prev; -} MEMHDR; - -#define CLIENT_TO_HDR(a) ((MEMHDR *) (((char *) (a)) - sizeof(MEMHDR))) -#define HDR_TO_CLIENT(a) ((void *) (((char *) (a)) + sizeof(MEMHDR))) - -static MEMHDR * memlist= NULL; - -static void mem_list_add(MEMHDR * p) -{ - p->mh_next= memlist; - p->mh_prev= NULL; - - if (memlist != NULL) - { - memlist->mh_prev= p; - } - memlist= p; - -} - -static void mem_list_delete(MEMHDR * p) -{ - if (p->mh_next != NULL) - p->mh_next->mh_prev= p->mh_prev; - - if (p->mh_prev != NULL) - p->mh_prev->mh_next= p->mh_next; - else - memlist= p->mh_next; -} - -static int PointerInList(MEMHDR * ptr) -{ - MEMHDR * p; - - p= memlist; - - while (p != NULL) - { - if (p == ptr) - return 1; - - p= p->mh_next; - } - - return 0; -} - -void * mem_calloc(size_t n, size_t sz) -{ - void * p; - p = mem_alloc(n*sz); - if (p) - memset(p, 0, n*sz); - return p; -} - -void * mem_alloc(size_t size) -{ - MEMHDR * p; - - p= malloc(sizeof(MEMHDR) + size); - - if (p == NULL) - return(NULL); - - mem_list_add(p); - return HDR_TO_CLIENT(p); -} - -void * mem_realloc(void * ptr, size_t size) -{ - MEMHDR *p; - - if (ptr == NULL) - p= NULL; - else - { - p= CLIENT_TO_HDR(ptr); - - mem_list_delete(p); - } - p= (MEMHDR *) realloc(p, sizeof(MEMHDR) + size); - - if (p == NULL) - return(NULL); - - mem_list_add(p); - - return HDR_TO_CLIENT(p); -} - -char * mem_strdup(char * str) -{ - char * s; - - s= mem_alloc(strlen(str) + 1); - - if (s != NULL) - strcpy(s, str); - - return(s); -} - -void mem_free(void * ptr) -{ - MEMHDR *p; - - p= CLIENT_TO_HDR(ptr); - if (!PointerInList(p)) - { - fprintf(stderr, "Error: freeing unallocated memory\n"); - return; - } - - mem_list_delete(p); - free(p); -} - -void mem_free_all(void) -{ - MEMHDR *p; - - while (memlist != NULL) - { - p = memlist; - mem_list_delete(memlist); - free(p); - } -} diff --git a/linux/legacy/kmflcomp/src/memman.h b/linux/legacy/kmflcomp/src/memman.h deleted file mode 100644 index 47dc80448a..0000000000 --- a/linux/legacy/kmflcomp/src/memman.h +++ /dev/null @@ -1,11 +0,0 @@ -/* memman.h - * Copyright (C) 2005 SIL International - * - */ - -void * mem_calloc(size_t n, size_t sz); -void * mem_alloc(size_t size); -void * mem_realloc(void * ptr, size_t size); -char * mem_strdup(char * str); -void mem_free(void * ptr); -void mem_free_all(void); diff --git a/linux/legacy/kmflcomp/src/utfconv.c b/linux/legacy/kmflcomp/src/utfconv.c deleted file mode 100644 index 312b5640c8..0000000000 --- a/linux/legacy/kmflcomp/src/utfconv.c +++ /dev/null @@ -1,82 +0,0 @@ -/* utfconv.c - * Copyright (C) 2006 SIL International - * - */ - -#include -#include "kmflutfconv.h" - - -#define UTF8MODE "UTF-8" -#define UTF16MODE "UTF-16LE" -#define UTF32MODE "UTF-32LE" - -size_t UTFConvert ( - char * sourceCode, char * targetCode, - const void ** sourceStart, const void * sourceEnd, - void ** targetStart, void * targetEnd) -{ - size_t result = 0; - char * source = *(char**)sourceStart; - char * target = *(char**)targetStart; - size_t inbytesleft = sourceEnd - *sourceStart; - size_t outbytesleft = targetEnd - *targetStart; - - iconv_t ic; - - - ic=iconv_open(targetCode, sourceCode); - - while (inbytesleft > 0 && result != (size_t) -1) { - result=iconv(ic, &source, &inbytesleft, &target, &outbytesleft); - } - *sourceStart = source; - *targetStart = target; - - iconv_close(ic); - - return result; -} - -size_t IConvertUTF8toUTF16 ( - const UTF8** sourceStart, const UTF8* sourceEnd, - UTF16** targetStart, UTF16* targetEnd) -{ - return UTFConvert(UTF8MODE, UTF16MODE, (const void**)sourceStart, (const void *)sourceEnd, (void**)targetStart, (void *)targetEnd); -} - -size_t IConvertUTF16toUTF8 ( - const UTF16** sourceStart, const UTF16* sourceEnd, - UTF8** targetStart, UTF8* targetEnd) -{ - return UTFConvert(UTF16MODE, UTF8MODE, (const void**)sourceStart, (const void *)sourceEnd, (void**)targetStart, (void *)targetEnd); -} - - -size_t IConvertUTF8toUTF32 ( - const UTF8** sourceStart, const UTF8* sourceEnd, - UTF32** targetStart, UTF32* targetEnd) -{ - return UTFConvert(UTF8MODE, UTF32MODE, (const void**)sourceStart, (const void *)sourceEnd, (void**)targetStart, (void *)targetEnd); -} - -size_t IConvertUTF32toUTF8 ( - const UTF32** sourceStart, const UTF32* sourceEnd, - UTF8** targetStart, UTF8* targetEnd) -{ - return UTFConvert(UTF32MODE, UTF8MODE, (const void**)sourceStart, (const void *)sourceEnd, (void**)targetStart, (void *)targetEnd); -} - -size_t IConvertUTF16toUTF32 ( - const UTF16** sourceStart, const UTF16* sourceEnd, - UTF32** targetStart, UTF32* targetEnd) -{ - return UTFConvert(UTF16MODE, UTF32MODE, (const void**)sourceStart, (const void *)sourceEnd, (void**)targetStart, (void *)targetEnd); -} - -size_t IConvertUTF32toUTF16 ( - const UTF32** sourceStart, const UTF32* sourceEnd, - UTF16** targetStart, UTF16* targetEnd) -{ - return UTFConvert(UTF32MODE, UTF16MODE, (const void**)sourceStart, (const void *)sourceEnd, (void**)targetStart, (void *)targetEnd); -} diff --git a/linux/legacy/kmflcomp/src/yacc.c b/linux/legacy/kmflcomp/src/yacc.c deleted file mode 100644 index fbd29ab91d..0000000000 --- a/linux/legacy/kmflcomp/src/yacc.c +++ /dev/null @@ -1,2405 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "3.0.4" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - - - - -/* Copy the first part of user declarations. */ -#line 1 "../../kmflcomp/src/yacc.y" /* yacc.c:339 */ - -/* - YACC grammar for reading Keyman-style keyboard definition files - and outputting UTF-8 byte code for the Linux interpreter -*/ -#include -#include -#include - -#include "compiler.h" - -extern char *fname; /* Current file name */ -extern int yylex(); /* Reference needed by yacc.c */ - -int lineno = 1; /* Current line number in file */ -int errcount = 0; /* Count of errors */ - -int n; /* Temporary index value */ -GROUP *gp = NULL; /* Temporary group pointer */ - -#define YYDEBUG 1 /* Allow compiler debugging (if yydebug true) */ - -#line 89 "yacc.c" /* yacc.c:339 */ - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "y.tab.h". */ -#ifndef YY_YY_YACC_H_INCLUDED -# define YY_YY_YACC_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - TOK_ANY = 258, - TOK_ANSI = 259, - TOK_AUTHOR = 260, - TOK_BEEP = 261, - TOK_BITMAP = 262, - TOK_BRKT = 263, - TOK_CALL = 264, - TOK_CAPSFREE = 265, - TOK_CAPSOFF = 266, - TOK_CAPSON = 267, - TOK_COMMA = 268, - TOK_CONTEXT = 269, - TOK_COPYRIGHT = 270, - TOK_CHAR = 271, - TOK_DEADKEY = 272, - TOK_DOLLAR = 273, - TOK_ERROR = 274, - TOK_ETHNOLOGUE = 275, - TOK_GROUP = 276, - TOK_GT = 277, - TOK_HOTKEY = 278, - TOK_INDEX = 279, - TOK_LANGUAGE = 280, - TOK_LAYOUT = 281, - TOK_KEYBOARDVERSION = 282, - TOK_MATCH = 283, - TOK_MESSAGE = 284, - TOK_MNEMONIC = 285, - TOK_NOMATCH = 286, - TOK_NAME = 287, - TOK_NOTANY = 288, - TOK_NUL = 289, - TOK_NUMBER = 290, - TOK_NL = 291, - TOK_OUTS = 292, - TOK_RAWKEY = 293, - TOK_PLUS = 294, - TOK_QM = 295, - TOK_RTN = 296, - TOK_SB = 297, - TOK_SHIFT = 298, - TOK_STORE = 299, - TOK_STOREINSTORE = 300, - TOK_SWITCH = 301, - TOK_TARGETS = 302, - TOK_UNICODE = 303, - TOK_USE = 304, - TOK_USINGKEYS = 305, - TOK_UTF = 306, - TOK_VERSION = 307, - TOK_VISUALKEYBOARD = 308, - TOK_XKEYSYM = 309 - }; -#endif -/* Tokens. */ -#define TOK_ANY 258 -#define TOK_ANSI 259 -#define TOK_AUTHOR 260 -#define TOK_BEEP 261 -#define TOK_BITMAP 262 -#define TOK_BRKT 263 -#define TOK_CALL 264 -#define TOK_CAPSFREE 265 -#define TOK_CAPSOFF 266 -#define TOK_CAPSON 267 -#define TOK_COMMA 268 -#define TOK_CONTEXT 269 -#define TOK_COPYRIGHT 270 -#define TOK_CHAR 271 -#define TOK_DEADKEY 272 -#define TOK_DOLLAR 273 -#define TOK_ERROR 274 -#define TOK_ETHNOLOGUE 275 -#define TOK_GROUP 276 -#define TOK_GT 277 -#define TOK_HOTKEY 278 -#define TOK_INDEX 279 -#define TOK_LANGUAGE 280 -#define TOK_LAYOUT 281 -#define TOK_KEYBOARDVERSION 282 -#define TOK_MATCH 283 -#define TOK_MESSAGE 284 -#define TOK_MNEMONIC 285 -#define TOK_NOMATCH 286 -#define TOK_NAME 287 -#define TOK_NOTANY 288 -#define TOK_NUL 289 -#define TOK_NUMBER 290 -#define TOK_NL 291 -#define TOK_OUTS 292 -#define TOK_RAWKEY 293 -#define TOK_PLUS 294 -#define TOK_QM 295 -#define TOK_RTN 296 -#define TOK_SB 297 -#define TOK_SHIFT 298 -#define TOK_STORE 299 -#define TOK_STOREINSTORE 300 -#define TOK_SWITCH 301 -#define TOK_TARGETS 302 -#define TOK_UNICODE 303 -#define TOK_USE 304 -#define TOK_USINGKEYS 305 -#define TOK_UTF 306 -#define TOK_VERSION 307 -#define TOK_VISUALKEYBOARD 308 -#define TOK_XKEYSYM 309 - -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - -union YYSTYPE -{ -#line 25 "../../kmflcomp/src/yacc.y" /* yacc.c:355 */ - - int simple; - ITEM number; - char *string; - ITEM *items; - RULE *rule; - GROUP *group; - - -#line 247 "yacc.c" /* yacc.c:355 */ -}; - -typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 -#endif - - -extern YYSTYPE yylval; - -int yyparse (void); - -#endif /* !YY_YY_YACC_H_INCLUDED */ - -/* Copy the second part of user declarations. */ - -#line 264 "yacc.c" /* yacc.c:358 */ - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#else -typedef signed char yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif - -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - -#ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -#endif - -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -# define YY_INITIAL_VALUE(Value) Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 61 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 279 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 55 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 16 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 83 -/* YYNSTATES -- Number of states. */ -#define YYNSTATES 171 - -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 309 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 -}; - -#if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 105, 105, 111, 120, 121, 125, 129, 133, 137, - 141, 145, 149, 153, 157, 161, 165, 169, 173, 177, - 181, 185, 189, 193, 197, 201, 205, 209, 214, 218, - 222, 226, 230, 234, 235, 239, 243, 250, 257, 268, - 274, 282, 286, 293, 297, 301, 308, 312, 316, 320, - 327, 331, 335, 339, 351, 363, 375, 379, 383, 395, - 400, 404, 408, 412, 416, 420, 424, 428, 433, 438, - 452, 459, 464, 471, 478, 483, 488, 492, 496, 500, - 507, 511, 518, 522 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || 0 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "TOK_ANY", "TOK_ANSI", "TOK_AUTHOR", - "TOK_BEEP", "TOK_BITMAP", "TOK_BRKT", "TOK_CALL", "TOK_CAPSFREE", - "TOK_CAPSOFF", "TOK_CAPSON", "TOK_COMMA", "TOK_CONTEXT", "TOK_COPYRIGHT", - "TOK_CHAR", "TOK_DEADKEY", "TOK_DOLLAR", "TOK_ERROR", "TOK_ETHNOLOGUE", - "TOK_GROUP", "TOK_GT", "TOK_HOTKEY", "TOK_INDEX", "TOK_LANGUAGE", - "TOK_LAYOUT", "TOK_KEYBOARDVERSION", "TOK_MATCH", "TOK_MESSAGE", - "TOK_MNEMONIC", "TOK_NOMATCH", "TOK_NAME", "TOK_NOTANY", "TOK_NUL", - "TOK_NUMBER", "TOK_NL", "TOK_OUTS", "TOK_RAWKEY", "TOK_PLUS", "TOK_QM", - "TOK_RTN", "TOK_SB", "TOK_SHIFT", "TOK_STORE", "TOK_STOREINSTORE", - "TOK_SWITCH", "TOK_TARGETS", "TOK_UNICODE", "TOK_USE", "TOK_USINGKEYS", - "TOK_UTF", "TOK_VERSION", "TOK_VISUALKEYBOARD", "TOK_XKEYSYM", "$accept", - "T_FILE", "T_HEADER", "T_HEADLINE", "T_GROUPS", "T_GROUP", "T_GHEADER", - "T_RULES", "T_RULELINE", "T_ITEMS", "T_ITEM", "T_STRING", "T_PARAMETER", - "T_KEYDEF", "T_KEYMODS", "T_BYTES", YY_NULLPTR -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309 -}; -# endif - -#define YYPACT_NINF -49 - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-49))) - -#define YYTABLE_NINF -1 - -#define yytable_value_is_error(Yytable_value) \ - 0 - - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 106, -19, -36, -4, -25, -17, -16, -36, 17, -36, - 35, 4, -36, -4, -4, -36, -36, -4, -49, 35, - -36, 30, -4, -36, 54, 34, 156, -49, 34, 188, - 7, -1, 33, 17, 36, 39, -49, -49, -49, 40, - 41, 42, 17, -34, 10, 43, 44, 45, 46, 47, - 48, 49, 50, 52, 53, 230, 56, 19, 57, 58, - 59, -49, -49, -49, -49, 35, -49, 35, 62, 35, - 17, -49, 63, -49, -49, 35, -49, -49, -49, 35, - -49, -49, 10, 35, 35, 35, -49, 188, 68, 230, - 230, 35, -49, 60, -49, -49, -49, -49, -49, -49, - -49, 88, -49, 65, -49, -49, -49, -49, 61, 20, - -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, - 66, -49, 35, -49, -49, -49, -49, -49, 17, -49, - -49, 17, -49, -49, 64, 230, -49, -49, -49, 230, - -49, -49, -28, -49, -49, -49, 69, -49, -49, -49, - -49, -49, 71, 90, 32, -49, 72, 73, -49, 35, - -49, -49, -49, -49, 17, -49, -49, 76, 91, -49, - -49 -}; - - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, - 0, 0, 0, 0, 0, 0, 4, 3, 35, 37, - 0, 0, 0, 82, 0, 0, 23, 21, 22, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 5, 36, 0, 61, 0, 62, 0, - 0, 70, 0, 65, 66, 0, 57, 50, 45, 0, - 52, 60, 0, 0, 0, 0, 38, 41, 0, 46, - 47, 0, 72, 0, 28, 83, 15, 14, 16, 33, - 32, 0, 39, 0, 77, 81, 79, 74, 0, 0, - 9, 18, 19, 20, 13, 12, 17, 31, 7, 6, - 0, 29, 0, 11, 10, 30, 53, 67, 0, 56, - 69, 0, 54, 55, 0, 0, 68, 64, 42, 0, - 48, 49, 0, 71, 73, 40, 0, 76, 80, 78, - 75, 24, 0, 0, 0, 51, 0, 0, 25, 0, - 8, 26, 63, 59, 0, 44, 43, 0, 0, 27, - 58 -}; - - /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -49, -49, 89, -49, -15, -49, -49, 27, -49, -48, - -49, 15, -18, 37, -49, -8 -}; - - /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 24, 25, 26, 27, 28, 29, 86, 87, 88, - 89, 90, 43, 108, 109, 35 -}; - - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = -{ - 40, 55, 102, 30, 31, 48, 50, 120, 158, 54, - 62, 36, 33, 64, 59, 33, 103, 32, 34, 37, - 38, 159, 39, 93, 41, 95, 45, 46, 47, 49, - 51, 52, 53, 33, 101, 56, 31, 58, 60, 92, - 163, 140, 141, 42, 31, 164, 44, 126, 104, 127, - 31, 129, 57, 105, 61, 10, 91, 132, 147, 107, - 31, 133, 130, 148, 106, 135, 136, 137, 122, 94, - 128, 131, 96, 142, 149, 97, 98, 99, 100, 110, - 111, 112, 113, 114, 115, 116, 117, 156, 118, 119, - 139, 157, 121, 123, 124, 125, 144, 107, 162, 170, - 143, 145, 151, 146, 152, 160, 155, 161, 165, 166, - 1, 2, 169, 3, 138, 63, 4, 5, 6, 134, - 153, 7, 0, 154, 150, 8, 9, 10, 0, 11, - 0, 12, 13, 14, 0, 15, 16, 0, 17, 0, - 0, 167, 18, 0, 0, 0, 0, 0, 0, 0, - 19, 0, 0, 20, 21, 0, 168, 0, 22, 23, - 1, 2, 0, 3, 0, 0, 4, 5, 6, 0, - 0, 7, 0, 0, 0, 8, 9, 0, 0, 11, - 0, 12, 13, 14, 0, 15, 16, 0, 17, 0, - 0, 65, 18, 0, 66, 0, 0, 67, 0, 0, - 19, 0, 68, 20, 21, 69, 70, 71, 22, 23, - 0, 0, 72, 0, 0, 0, 73, 0, 0, 74, - 0, 75, 76, 77, 78, 79, 0, 80, 31, 81, - 82, 0, 83, 65, 84, 0, 66, 85, 0, 67, - 0, 0, 0, 0, 68, 0, 0, 69, 70, 71, - 0, 0, 0, 0, 72, 0, 0, 0, 73, 0, - 0, 74, 0, 75, 76, 77, 0, 79, 0, 80, - 31, 81, 82, 0, 0, 0, 84, 0, 0, 85 -}; - -static const yytype_int16 yycheck[] = -{ - 8, 19, 36, 22, 40, 13, 14, 55, 36, 17, - 25, 36, 16, 28, 22, 16, 50, 2, 3, 36, - 36, 49, 7, 31, 9, 33, 11, 12, 13, 14, - 15, 16, 17, 16, 42, 20, 40, 22, 23, 40, - 8, 89, 90, 8, 40, 13, 42, 65, 38, 67, - 40, 69, 22, 43, 0, 21, 49, 75, 38, 44, - 40, 79, 70, 43, 54, 83, 84, 85, 49, 36, - 8, 8, 36, 91, 54, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 135, 36, 36, - 22, 139, 36, 36, 36, 36, 8, 82, 8, 8, - 40, 36, 36, 42, 122, 36, 42, 36, 36, 36, - 4, 5, 36, 7, 87, 26, 10, 11, 12, 82, - 128, 15, -1, 131, 109, 19, 20, 21, -1, 23, - -1, 25, 26, 27, -1, 29, 30, -1, 32, -1, - -1, 159, 36, -1, -1, -1, -1, -1, -1, -1, - 44, -1, -1, 47, 48, -1, 164, -1, 52, 53, - 4, 5, -1, 7, -1, -1, 10, 11, 12, -1, - -1, 15, -1, -1, -1, 19, 20, -1, -1, 23, - -1, 25, 26, 27, -1, 29, 30, -1, 32, -1, - -1, 3, 36, -1, 6, -1, -1, 9, -1, -1, - 44, -1, 14, 47, 48, 17, 18, 19, 52, 53, - -1, -1, 24, -1, -1, -1, 28, -1, -1, 31, - -1, 33, 34, 35, 36, 37, -1, 39, 40, 41, - 42, -1, 44, 3, 46, -1, 6, 49, -1, 9, - -1, -1, -1, -1, 14, -1, -1, 17, 18, 19, - -1, -1, -1, -1, 24, -1, -1, -1, 28, -1, - -1, 31, -1, 33, 34, 35, -1, 37, -1, 39, - 40, 41, 42, -1, -1, -1, 46, -1, -1, 49 -}; - - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 4, 5, 7, 10, 11, 12, 15, 19, 20, - 21, 23, 25, 26, 27, 29, 30, 32, 36, 44, - 47, 48, 52, 53, 56, 57, 58, 59, 60, 61, - 22, 40, 66, 16, 66, 70, 36, 36, 36, 66, - 70, 66, 8, 67, 42, 66, 66, 66, 70, 66, - 70, 66, 66, 66, 70, 67, 66, 22, 66, 70, - 66, 0, 59, 57, 59, 3, 6, 9, 14, 17, - 18, 19, 24, 28, 31, 33, 34, 35, 36, 37, - 39, 41, 42, 44, 46, 49, 62, 63, 64, 65, - 66, 49, 40, 70, 36, 70, 36, 36, 36, 36, - 36, 70, 36, 50, 38, 43, 54, 66, 68, 69, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 64, 36, 49, 36, 36, 36, 67, 67, 8, 67, - 70, 8, 67, 67, 68, 67, 67, 67, 62, 22, - 64, 64, 67, 40, 8, 36, 42, 38, 43, 54, - 66, 36, 67, 70, 70, 42, 64, 64, 36, 49, - 36, 36, 8, 8, 13, 36, 36, 67, 70, 36, - 8 -}; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 55, 56, 56, 57, 57, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 59, 59, 60, 60, 61, - 61, 62, 62, 63, 63, 63, 64, 64, 64, 64, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 65, 66, 66, 67, 68, 68, 68, 68, 68, 68, - 69, 69, 70, 70 -}; - - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 2, 1, 1, 2, 3, 3, 5, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 2, 2, 4, 5, 5, 7, 3, 3, - 3, 3, 3, 3, 1, 1, 2, 1, 2, 3, - 4, 1, 2, 4, 4, 1, 1, 1, 2, 2, - 1, 3, 1, 2, 2, 2, 2, 1, 6, 4, - 1, 1, 1, 4, 2, 1, 1, 2, 2, 2, - 1, 3, 2, 3, 1, 2, 2, 1, 2, 1, - 2, 1, 1, 2 -}; - - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - - -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ - -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - YYUSE (yytype); -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -{ - YYFPRINTF (yyoutput, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) -{ - unsigned long int yylno = yyrline[yyrule]; - int yynrhs = yyr2[yyrule]; - int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, Rule); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -{ - YYUSE (yyvaluep); - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); - YY_IGNORE_MAYBE_UNINITIALIZED_END -} - - - - -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; - - -/*----------. -| yyparse. | -`----------*/ - -int -yyparse (void) -{ - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = yylex (); - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - '$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: -#line 106 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - kbp->groups = (yyvsp[0].group); - kbp->ngroups = count_groups((yyvsp[0].group)); - kbp->nstores = count_stores(kbp->stores); - } -#line 1486 "yacc.c" /* yacc.c:1646 */ - break; - - case 3: -#line 112 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - kbp->groups = (yyvsp[0].group); - kbp->ngroups = count_groups((yyvsp[0].group)); - kbp->nstores = count_stores(kbp->stores); - } -#line 1496 "yacc.c" /* yacc.c:1646 */ - break; - - case 6: -#line 126 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&name",(yyvsp[-1].string),lineno); - } -#line 1504 "yacc.c" /* yacc.c:1646 */ - break; - - case 7: -#line 130 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&name",(yyvsp[-1].string),lineno); - } -#line 1512 "yacc.c" /* yacc.c:1646 */ - break; - - case 8: -#line 134 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store("&hotkey",new_list((yyvsp[-2].number)),lineno); - } -#line 1520 "yacc.c" /* yacc.c:1646 */ - break; - - case 9: -#line 138 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&hotkey",(yyvsp[-1].string),lineno); - } -#line 1528 "yacc.c" /* yacc.c:1646 */ - break; - - case 10: -#line 142 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&version",(yyvsp[-1].string),lineno); - } -#line 1536 "yacc.c" /* yacc.c:1646 */ - break; - - case 11: -#line 146 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&version",(yyvsp[-1].string),lineno); - } -#line 1544 "yacc.c" /* yacc.c:1646 */ - break; - - case 12: -#line 150 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&keyboardversion",(yyvsp[-1].string),lineno); - } -#line 1552 "yacc.c" /* yacc.c:1646 */ - break; - - case 13: -#line 154 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&keyboardversion",(yyvsp[-1].string),lineno); - } -#line 1560 "yacc.c" /* yacc.c:1646 */ - break; - - case 14: -#line 158 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&bitmap",(yyvsp[-1].string),lineno); - } -#line 1568 "yacc.c" /* yacc.c:1646 */ - break; - - case 15: -#line 162 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&bitmap",(yyvsp[-1].string),lineno); - } -#line 1576 "yacc.c" /* yacc.c:1646 */ - break; - - case 16: -#line 166 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("©right",(yyvsp[-1].string),lineno); - } -#line 1584 "yacc.c" /* yacc.c:1646 */ - break; - - case 17: -#line 170 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&message",(yyvsp[-1].string),lineno); - } -#line 1592 "yacc.c" /* yacc.c:1646 */ - break; - - case 18: -#line 174 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&language",(yyvsp[-1].string),lineno); - } -#line 1600 "yacc.c" /* yacc.c:1646 */ - break; - - case 19: -#line 178 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&layout",(yyvsp[-1].string),lineno); - } -#line 1608 "yacc.c" /* yacc.c:1646 */ - break; - - case 20: -#line 182 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&layout",(yyvsp[-1].string),lineno); - } -#line 1616 "yacc.c" /* yacc.c:1646 */ - break; - - case 21: -#line 186 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&capsalwaysoff","1",lineno); - } -#line 1624 "yacc.c" /* yacc.c:1646 */ - break; - - case 22: -#line 190 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&capsononly","1",lineno); - } -#line 1632 "yacc.c" /* yacc.c:1646 */ - break; - - case 23: -#line 194 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&shiftfreescaps","1",lineno); - } -#line 1640 "yacc.c" /* yacc.c:1646 */ - break; - - case 24: -#line 198 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store((yyvsp[-2].string),(yyvsp[-1].items),lineno); - } -#line 1648 "yacc.c" /* yacc.c:1646 */ - break; - - case 25: -#line 202 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - set_start_group((yyvsp[-1].string),KF_ANSI, lineno); - } -#line 1656 "yacc.c" /* yacc.c:1646 */ - break; - - case 26: -#line 206 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - set_start_group((yyvsp[-1].string),KF_UNICODE, lineno); - } -#line 1664 "yacc.c" /* yacc.c:1646 */ - break; - - case 27: -#line 210 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - kmflcomp_error(lineno,"alternate starting groups not supported"); - fail(11,"obsolete syntax"); - } -#line 1673 "yacc.c" /* yacc.c:1646 */ - break; - - case 28: -#line 215 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&author",(yyvsp[-1].string),lineno); - } -#line 1681 "yacc.c" /* yacc.c:1646 */ - break; - - case 29: -#line 219 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&targets",(yyvsp[-1].string),lineno); - } -#line 1689 "yacc.c" /* yacc.c:1646 */ - break; - - case 30: -#line 223 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&visualkeyboard",(yyvsp[-1].string),lineno); - } -#line 1697 "yacc.c" /* yacc.c:1646 */ - break; - - case 31: -#line 227 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("&mnemoniclayout",(yyvsp[-1].string),lineno); - } -#line 1705 "yacc.c" /* yacc.c:1646 */ - break; - - case 32: -#line 231 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store_from_string("ðnologuecode",(yyvsp[-1].string),lineno); - } -#line 1713 "yacc.c" /* yacc.c:1646 */ - break; - - case 35: -#line 240 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.group) = kbp->groups; - } -#line 1721 "yacc.c" /* yacc.c:1646 */ - break; - - case 36: -#line 244 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.group) = kbp->groups; - } -#line 1729 "yacc.c" /* yacc.c:1646 */ - break; - - case 37: -#line 251 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.group) = (yyvsp[0].group); - ((yyval.group))->rules = NULL; - ((yyval.group))->nrules = 0; - kmflcomp_warn(0,"group(%s) is empty!",((yyvsp[0].group))->name); - } -#line 1740 "yacc.c" /* yacc.c:1646 */ - break; - - case 38: -#line 258 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.group) = (yyvsp[-1].group); - ((yyval.group))->rules = (yyvsp[0].rule); - ((yyval.group))->nrules = count_rules((yyvsp[0].rule)); - if(((yyval.group))->nrules == 0) - kmflcomp_warn(0,"group(%s) is empty!",((yyvsp[-1].group))->name); - } -#line 1752 "yacc.c" /* yacc.c:1646 */ - break; - - case 39: -#line 269 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.group) = gp = new_group((yyvsp[-1].string), lineno); - if(gp) gp->flags = 0; - } -#line 1761 "yacc.c" /* yacc.c:1646 */ - break; - - case 40: -#line 275 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.group) = gp = new_group((yyvsp[-2].string), lineno); - if(gp) gp->flags = GF_USEKEYS; - } -#line 1770 "yacc.c" /* yacc.c:1646 */ - break; - - case 41: -#line 283 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.rule) = (yyvsp[0].rule); - } -#line 1778 "yacc.c" /* yacc.c:1646 */ - break; - - case 42: -#line 287 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.rule) = add_rule((yyvsp[-1].rule), (yyvsp[0].rule)); - } -#line 1786 "yacc.c" /* yacc.c:1646 */ - break; - - case 43: -#line 294 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.rule) = new_rule(gp, (yyvsp[-3].items), (yyvsp[-1].items), lineno); - } -#line 1794 "yacc.c" /* yacc.c:1646 */ - break; - - case 44: -#line 298 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - new_store((yyvsp[-2].string),(yyvsp[-1].items),lineno); (yyval.rule) = NULL; - } -#line 1802 "yacc.c" /* yacc.c:1646 */ - break; - - case 45: -#line 302 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.rule) = NULL; - } -#line 1810 "yacc.c" /* yacc.c:1646 */ - break; - - case 46: -#line 309 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.items) = new_list((yyvsp[0].number)); - } -#line 1818 "yacc.c" /* yacc.c:1646 */ - break; - - case 47: -#line 313 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.items) = items_from_string((yyvsp[0].string),lineno); - } -#line 1826 "yacc.c" /* yacc.c:1646 */ - break; - - case 48: -#line 317 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.items) = add_item_to_list((yyvsp[0].items),(yyvsp[-1].number)); - } -#line 1834 "yacc.c" /* yacc.c:1646 */ - break; - - case 49: -#line 321 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.items) = add_lists((yyvsp[0].items),items_from_string((yyvsp[-1].string),lineno)); - } -#line 1842 "yacc.c" /* yacc.c:1646 */ - break; - - case 50: -#line 328 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = MAKE_ITEM(ITEM_CHAR,(yyvsp[0].number)); - } -#line 1850 "yacc.c" /* yacc.c:1646 */ - break; - - case 51: -#line 332 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = MAKE_ITEM(ITEM_KEYSYM,(yyvsp[-1].number)); - } -#line 1858 "yacc.c" /* yacc.c:1646 */ - break; - - case 52: -#line 336 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = MAKE_ITEM(ITEM_PLUS,0); /* include in item list - remove later when testing validity */ - } -#line 1866 "yacc.c" /* yacc.c:1646 */ - break; - - case 53: -#line 340 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - if((n=store_number((yyvsp[0].string),lineno)) != UNDEFINED) - { - (yyval.number) = MAKE_ITEM(ITEM_ANY,n); - } - else - { - kmflcomp_warn(lineno,"store (%s) is undefined!",(yyvsp[0].string)); - (yyval.number) = 0; - } - } -#line 1882 "yacc.c" /* yacc.c:1646 */ - break; - - case 54: -#line 352 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - if((n=store_number((yyvsp[0].string),lineno)) != UNDEFINED) - { - (yyval.number) = MAKE_ITEM(ITEM_NOTANY,n); - } - else - { - kmflcomp_warn(lineno,"store (%s) is undefined!",(yyvsp[0].string)); - (yyval.number) = 0; - } - } -#line 1898 "yacc.c" /* yacc.c:1646 */ - break; - - case 55: -#line 364 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - if((n=store_number((yyvsp[0].string),lineno)) != UNDEFINED) - { - (yyval.number) = MAKE_ITEM(ITEM_OUTS,n); - } - else - { - kmflcomp_warn(lineno,"store (%s) is undefined!",(yyvsp[0].string)); - (yyval.number) = 0; - } - } -#line 1914 "yacc.c" /* yacc.c:1646 */ - break; - - case 56: -#line 376 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = MAKE_ITEM(ITEM_DEADKEY,deadkey_number((yyvsp[0].string), lineno)); - } -#line 1922 "yacc.c" /* yacc.c:1646 */ - break; - - case 57: -#line 380 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = MAKE_ITEM(ITEM_NUL,0); - } -#line 1930 "yacc.c" /* yacc.c:1646 */ - break; - - case 58: -#line 384 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - if((n=store_number((yyvsp[-3].string),lineno)) != UNDEFINED) - { - (yyval.number) = MAKE_PARAMETER_ITEM(ITEM_INDEX,atoi((yyvsp[-1].string)),n); - } - else - { - kmflcomp_warn(lineno,"store (%s) is undefined!",(yyvsp[-3].string)); - (yyval.number) = 0; - } - } -#line 1946 "yacc.c" /* yacc.c:1646 */ - break; - - case 59: -#line 396 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - kmflcomp_warn(lineno,"index(%s) must have TWO parameters!",(yyvsp[-1].string)); - (yyval.number) = 0; - } -#line 1955 "yacc.c" /* yacc.c:1646 */ - break; - - case 60: -#line 401 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = MAKE_ITEM(ITEM_RETURN,0); - } -#line 1963 "yacc.c" /* yacc.c:1646 */ - break; - - case 61: -#line 405 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = MAKE_ITEM(ITEM_BEEP,0); - } -#line 1971 "yacc.c" /* yacc.c:1646 */ - break; - - case 62: -#line 409 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = MAKE_ITEM(ITEM_CONTEXT,0); - } -#line 1979 "yacc.c" /* yacc.c:1646 */ - break; - - case 63: -#line 413 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = MAKE_ITEM(ITEM_CONTEXT,atoi((yyvsp[-1].string))); - } -#line 1987 "yacc.c" /* yacc.c:1646 */ - break; - - case 64: -#line 417 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = MAKE_ITEM(ITEM_USE,group_number((yyvsp[0].string), lineno)); - } -#line 1995 "yacc.c" /* yacc.c:1646 */ - break; - - case 65: -#line 421 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = MAKE_ITEM(ITEM_MATCH,0); - } -#line 2003 "yacc.c" /* yacc.c:1646 */ - break; - - case 66: -#line 425 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = MAKE_ITEM(ITEM_NOMATCH,0); - } -#line 2011 "yacc.c" /* yacc.c:1646 */ - break; - - case 67: -#line 429 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - kmflcomp_error(lineno,"call keyword not implemented"); - fail(12,"unsupported keyword"); - } -#line 2020 "yacc.c" /* yacc.c:1646 */ - break; - - case 68: -#line 434 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - kmflcomp_error(lineno,"switch keyword not implemented"); - fail(11,"obsolete syntax"); - } -#line 2029 "yacc.c" /* yacc.c:1646 */ - break; - - case 69: -#line 439 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - STORE *sp; /* check for named constants */ - sp = find_store((yyvsp[0].string)); - if(sp) - { - (yyval.number) = *sp->items; - } - else - { - (yyval.number) = 0; - kmflcomp_error(lineno,"undefined constant"); - } - } -#line 2047 "yacc.c" /* yacc.c:1646 */ - break; - - case 70: -#line 453 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - kmflcomp_error(lineno,"illegal or unrecognized item in rule or store"); - } -#line 2055 "yacc.c" /* yacc.c:1646 */ - break; - - case 71: -#line 460 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.string) = (yyvsp[-1].string); - } -#line 2063 "yacc.c" /* yacc.c:1646 */ - break; - - case 72: -#line 465 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.string) = new_string(0); /* allow for empty strings */ - } -#line 2071 "yacc.c" /* yacc.c:1646 */ - break; - - case 73: -#line 472 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.string) = (yyvsp[-1].string); - } -#line 2079 "yacc.c" /* yacc.c:1646 */ - break; - - case 74: -#line 479 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = make_keysym(lineno, 0,string_to_keysym((yyvsp[0].string),lineno)); - } -#line 2087 "yacc.c" /* yacc.c:1646 */ - break; - - case 75: -#line 484 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = make_keysym(lineno, 0,string_to_keysym((yyvsp[0].string),lineno)); - } -#line 2095 "yacc.c" /* yacc.c:1646 */ - break; - - case 76: -#line 489 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = make_keysym(lineno, (yyvsp[-1].number),(yyvsp[0].number)); - } -#line 2103 "yacc.c" /* yacc.c:1646 */ - break; - - case 77: -#line 493 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = make_keysym(lineno, 0,(yyvsp[0].number)); - } -#line 2111 "yacc.c" /* yacc.c:1646 */ - break; - - case 78: -#line 497 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = make_xkeysym(lineno, (yyvsp[-1].number), (yyvsp[0].number)); - } -#line 2119 "yacc.c" /* yacc.c:1646 */ - break; - - case 79: -#line 501 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = make_xkeysym(lineno, 0, (yyvsp[0].number)); - } -#line 2127 "yacc.c" /* yacc.c:1646 */ - break; - - case 80: -#line 508 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = (yyvsp[-1].number) | (yyvsp[0].number); - } -#line 2135 "yacc.c" /* yacc.c:1646 */ - break; - - case 81: -#line 512 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.number) = (yyvsp[0].number); - } -#line 2143 "yacc.c" /* yacc.c:1646 */ - break; - - case 82: -#line 519 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.string) = new_string((yyvsp[0].number)); - } -#line 2151 "yacc.c" /* yacc.c:1646 */ - break; - - case 83: -#line 523 "../../kmflcomp/src/yacc.y" /* yacc.c:1646 */ - { - (yyval.string) = add_char((yyvsp[0].string),(yyvsp[-1].number)); - } -#line 2159 "yacc.c" /* yacc.c:1646 */ - break; - - -#line 2163 "yacc.c" /* yacc.c:1646 */ - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now 'shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*--------------------------------------. -| yyerrlab -- here on detecting error. | -`--------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule whose action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - } - /* Do not reclaim the symbols of the rule whose action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - return yyresult; -} -#line 529 "../../kmflcomp/src/yacc.y" /* yacc.c:1906 */ - - -void yyerror(char *str) -{ - fflush (stdout); (void) fflush (stderr); - fprintf (stderr, "Error: %s (line %d)\n", str, lineno); - fflush (stderr); errcount++; -} - -#ifdef _WIN32 -int yywrap(void) -{ - return 1; -} -#endif diff --git a/linux/legacy/kmflcomp/src/yacc.h b/linux/legacy/kmflcomp/src/yacc.h deleted file mode 100644 index 8b7a4ebc55..0000000000 --- a/linux/legacy/kmflcomp/src/yacc.h +++ /dev/null @@ -1,184 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -#ifndef YY_YY_YACC_H_INCLUDED -# define YY_YY_YACC_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - TOK_ANY = 258, - TOK_ANSI = 259, - TOK_AUTHOR = 260, - TOK_BEEP = 261, - TOK_BITMAP = 262, - TOK_BRKT = 263, - TOK_CALL = 264, - TOK_CAPSFREE = 265, - TOK_CAPSOFF = 266, - TOK_CAPSON = 267, - TOK_COMMA = 268, - TOK_CONTEXT = 269, - TOK_COPYRIGHT = 270, - TOK_CHAR = 271, - TOK_DEADKEY = 272, - TOK_DOLLAR = 273, - TOK_ERROR = 274, - TOK_ETHNOLOGUE = 275, - TOK_GROUP = 276, - TOK_GT = 277, - TOK_HOTKEY = 278, - TOK_INDEX = 279, - TOK_LANGUAGE = 280, - TOK_LAYOUT = 281, - TOK_KEYBOARDVERSION = 282, - TOK_MATCH = 283, - TOK_MESSAGE = 284, - TOK_MNEMONIC = 285, - TOK_NOMATCH = 286, - TOK_NAME = 287, - TOK_NOTANY = 288, - TOK_NUL = 289, - TOK_NUMBER = 290, - TOK_NL = 291, - TOK_OUTS = 292, - TOK_RAWKEY = 293, - TOK_PLUS = 294, - TOK_QM = 295, - TOK_RTN = 296, - TOK_SB = 297, - TOK_SHIFT = 298, - TOK_STORE = 299, - TOK_STOREINSTORE = 300, - TOK_SWITCH = 301, - TOK_TARGETS = 302, - TOK_UNICODE = 303, - TOK_USE = 304, - TOK_USINGKEYS = 305, - TOK_UTF = 306, - TOK_VERSION = 307, - TOK_VISUALKEYBOARD = 308, - TOK_XKEYSYM = 309 - }; -#endif -/* Tokens. */ -#define TOK_ANY 258 -#define TOK_ANSI 259 -#define TOK_AUTHOR 260 -#define TOK_BEEP 261 -#define TOK_BITMAP 262 -#define TOK_BRKT 263 -#define TOK_CALL 264 -#define TOK_CAPSFREE 265 -#define TOK_CAPSOFF 266 -#define TOK_CAPSON 267 -#define TOK_COMMA 268 -#define TOK_CONTEXT 269 -#define TOK_COPYRIGHT 270 -#define TOK_CHAR 271 -#define TOK_DEADKEY 272 -#define TOK_DOLLAR 273 -#define TOK_ERROR 274 -#define TOK_ETHNOLOGUE 275 -#define TOK_GROUP 276 -#define TOK_GT 277 -#define TOK_HOTKEY 278 -#define TOK_INDEX 279 -#define TOK_LANGUAGE 280 -#define TOK_LAYOUT 281 -#define TOK_KEYBOARDVERSION 282 -#define TOK_MATCH 283 -#define TOK_MESSAGE 284 -#define TOK_MNEMONIC 285 -#define TOK_NOMATCH 286 -#define TOK_NAME 287 -#define TOK_NOTANY 288 -#define TOK_NUL 289 -#define TOK_NUMBER 290 -#define TOK_NL 291 -#define TOK_OUTS 292 -#define TOK_RAWKEY 293 -#define TOK_PLUS 294 -#define TOK_QM 295 -#define TOK_RTN 296 -#define TOK_SB 297 -#define TOK_SHIFT 298 -#define TOK_STORE 299 -#define TOK_STOREINSTORE 300 -#define TOK_SWITCH 301 -#define TOK_TARGETS 302 -#define TOK_UNICODE 303 -#define TOK_USE 304 -#define TOK_USINGKEYS 305 -#define TOK_UTF 306 -#define TOK_VERSION 307 -#define TOK_VISUALKEYBOARD 308 -#define TOK_XKEYSYM 309 - -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - -union YYSTYPE -{ -#line 25 "../../kmflcomp/src/yacc.y" /* yacc.c:1909 */ - - int simple; - ITEM number; - char *string; - ITEM *items; - RULE *rule; - GROUP *group; - - -#line 172 "yacc.h" /* yacc.c:1909 */ -}; - -typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 -#endif - - -extern YYSTYPE yylval; - -int yyparse (void); - -#endif /* !YY_YY_YACC_H_INCLUDED */ diff --git a/linux/legacy/kmflcomp/src/yacc.y b/linux/legacy/kmflcomp/src/yacc.y deleted file mode 100755 index d0f3b5232e..0000000000 --- a/linux/legacy/kmflcomp/src/yacc.y +++ /dev/null @@ -1,543 +0,0 @@ -%{ -/* - YACC grammar for reading Keyman-style keyboard definition files - and outputting UTF-8 byte code for the Linux interpreter -*/ -#include -#include -#include - -#include "compiler.h" - -extern char *fname; /* Current file name */ -extern int yylex(); /* Reference needed by yacc.c */ - -int lineno = 1; /* Current line number in file */ -int errcount = 0; /* Count of errors */ - -int n; /* Temporary index value */ -GROUP *gp = NULL; /* Temporary group pointer */ - -#define YYDEBUG 1 /* Allow compiler debugging (if yydebug true) */ -%} - -%union - { - int simple; - ITEM number; - char *string; - ITEM *items; - RULE *rule; - GROUP *group; - } - -%type T_BYTES -%type T_FILE -%type T_GHEADER -%type T_GROUP -%type T_GROUPS -%type T_HEADER -%type T_HEADLINE -%type T_KEYDEF -%type T_KEYMODS -%type T_ITEM -%type T_ITEMS -%type T_PARAMETER -%type T_RULELINE -%type T_RULES -%type T_STRING - -%token TOK_ANY -%token TOK_ANSI -%token TOK_AUTHOR -%token TOK_BEEP -%token TOK_BITMAP -%token TOK_BRKT -%token TOK_CALL -%token TOK_CAPSFREE -%token TOK_CAPSOFF -%token TOK_CAPSON -%token TOK_COMMA -%token TOK_CONTEXT -%token TOK_COPYRIGHT -%token TOK_CHAR -%token TOK_DEADKEY -%token TOK_DOLLAR -%token TOK_ERROR -%token TOK_ETHNOLOGUE -%token TOK_GROUP -%token TOK_GT -%token TOK_HOTKEY -%token TOK_INDEX -%token TOK_LANGUAGE -%token TOK_LAYOUT -%token TOK_KEYBOARDVERSION -%token TOK_MATCH -%token TOK_MESSAGE -%token TOK_MNEMONIC -%token TOK_NOMATCH -%token TOK_NAME -%token TOK_NOTANY -%token TOK_NUL -%token TOK_NUMBER -%token TOK_NL -%token TOK_OUTS -%token TOK_RAWKEY -%token TOK_PLUS -%token TOK_QM -%token TOK_RTN -%token TOK_SB -%token TOK_SHIFT -%token TOK_STORE -%token TOK_STOREINSTORE -%token TOK_SWITCH -%token TOK_TARGETS -%token TOK_UNICODE -%token TOK_USE -%token TOK_USINGKEYS -%token TOK_UTF -%token TOK_VERSION -%token TOK_VISUALKEYBOARD -%token TOK_XKEYSYM - -%% -T_FILE : - T_HEADER T_GROUPS - { - kbp->groups = $2; - kbp->ngroups = count_groups($2); - kbp->nstores = count_stores(kbp->stores); - } - | T_GROUPS - { - kbp->groups = $1; - kbp->ngroups = count_groups($1); - kbp->nstores = count_stores(kbp->stores); - } - ; - -T_HEADER : - T_HEADLINE - | T_HEADLINE T_HEADER - ; - -T_HEADLINE : - TOK_NAME T_BYTES TOK_NL - { - new_store_from_string("&name",$2,lineno); - } - | TOK_NAME T_STRING TOK_NL - { - new_store_from_string("&name",$2,lineno); - } - | TOK_HOTKEY TOK_SB T_KEYDEF TOK_SB TOK_NL - { - new_store("&hotkey",new_list($3),lineno); - } - | TOK_HOTKEY T_STRING TOK_NL - { - new_store_from_string("&hotkey",$2,lineno); - } - | TOK_VERSION T_BYTES TOK_NL - { - new_store_from_string("&version",$2,lineno); - } - | TOK_VERSION T_STRING TOK_NL - { - new_store_from_string("&version",$2,lineno); - } - | TOK_KEYBOARDVERSION T_BYTES TOK_NL - { - new_store_from_string("&keyboardversion",$2,lineno); - } - | TOK_KEYBOARDVERSION T_STRING TOK_NL - { - new_store_from_string("&keyboardversion",$2,lineno); - } - | TOK_BITMAP T_BYTES TOK_NL - { - new_store_from_string("&bitmap",$2,lineno); - } - | TOK_BITMAP T_STRING TOK_NL - { - new_store_from_string("&bitmap",$2,lineno); - } - | TOK_COPYRIGHT T_STRING TOK_NL - { - new_store_from_string("©right",$2,lineno); - } - | TOK_MESSAGE T_STRING TOK_NL - { - new_store_from_string("&message",$2,lineno); - } - | TOK_LANGUAGE T_STRING TOK_NL - { - new_store_from_string("&language",$2,lineno); - } - | TOK_LAYOUT T_STRING TOK_NL - { - new_store_from_string("&layout",$2,lineno); - } - | TOK_LAYOUT T_BYTES TOK_NL - { - new_store_from_string("&layout",$2,lineno); - } - | TOK_CAPSOFF TOK_NL - { - new_store_from_string("&capsalwaysoff","1",lineno); - } - | TOK_CAPSON TOK_NL - { - new_store_from_string("&capsononly","1",lineno); - } - | TOK_CAPSFREE TOK_NL - { - new_store_from_string("&shiftfreescaps","1",lineno); - } - | TOK_STORE T_PARAMETER T_ITEMS TOK_NL - { - new_store($2,$3,lineno); - } - | TOK_ANSI TOK_GT TOK_USE T_PARAMETER TOK_NL - { - set_start_group($4,KF_ANSI, lineno); - } - | TOK_UNICODE TOK_GT TOK_USE T_PARAMETER TOK_NL - { - set_start_group($4,KF_UNICODE, lineno); - } - | TOK_ANSI TOK_GT TOK_USE T_PARAMETER TOK_USE T_PARAMETER TOK_NL - { - kmflcomp_error(lineno,"alternate starting groups not supported"); - fail(11,"obsolete syntax"); - } - | TOK_AUTHOR T_STRING TOK_NL - { - new_store_from_string("&author",$2,lineno); - } - | TOK_TARGETS T_STRING TOK_NL - { - new_store_from_string("&targets",$2,lineno); - } - | TOK_VISUALKEYBOARD T_STRING TOK_NL - { - new_store_from_string("&visualkeyboard",$2,lineno); - } - | TOK_MNEMONIC T_STRING TOK_NL - { - new_store_from_string("&mnemoniclayout",$2,lineno); - } - | TOK_ETHNOLOGUE T_STRING TOK_NL - { - new_store_from_string("ðnologuecode",$2,lineno); - } - | TOK_ERROR T_BYTES TOK_NL - | TOK_NL - ; - -T_GROUPS : - T_GROUP - { - $$ = kbp->groups; - } - | T_GROUP T_GROUPS - { - $$ = kbp->groups; - } - ; - -T_GROUP : - T_GHEADER - { - $$ = $1; - ($$)->rules = NULL; - ($$)->nrules = 0; - kmflcomp_warn(0,"group(%s) is empty!",($1)->name); - } - | T_GHEADER T_RULES - { - $$ = $1; - ($$)->rules = $2; - ($$)->nrules = count_rules($2); - if(($$)->nrules == 0) - kmflcomp_warn(0,"group(%s) is empty!",($1)->name); - } - ; - -T_GHEADER : - TOK_GROUP T_PARAMETER TOK_NL - { - $$ = gp = new_group($2, lineno); - if(gp) gp->flags = 0; - } - | - TOK_GROUP T_PARAMETER TOK_USINGKEYS TOK_NL - { - $$ = gp = new_group($2, lineno); - if(gp) gp->flags = GF_USEKEYS; - } - ; - -T_RULES : - T_RULELINE - { - $$ = $1; - } - | T_RULELINE T_RULES - { - $$ = add_rule($1, $2); - } - ; - -T_RULELINE : - T_ITEMS TOK_GT T_ITEMS TOK_NL - { - $$ = new_rule(gp, $1, $3, lineno); - } - | TOK_STORE T_PARAMETER T_ITEMS TOK_NL - { - new_store($2,$3,lineno); $$ = NULL; - } - | TOK_NL - { - $$ = NULL; - } - ; - -T_ITEMS : - T_ITEM - { - $$ = new_list($1); - } - | T_STRING - { - $$ = items_from_string($1,lineno); - } - | T_ITEM T_ITEMS - { - $$ = add_item_to_list($2,$1); - } - | T_STRING T_ITEMS - { - $$ = add_lists($2,items_from_string($1,lineno)); - } - ; - -T_ITEM : - TOK_NUMBER - { - $$ = MAKE_ITEM(ITEM_CHAR,$1); - } - | TOK_SB T_KEYDEF TOK_SB - { - $$ = MAKE_ITEM(ITEM_KEYSYM,$2); - } - | TOK_PLUS - { - $$ = MAKE_ITEM(ITEM_PLUS,0); /* include in item list - remove later when testing validity */ - } - | TOK_ANY T_PARAMETER - { - if((n=store_number($2,lineno)) != UNDEFINED) - { - $$ = MAKE_ITEM(ITEM_ANY,n); - } - else - { - kmflcomp_warn(lineno,"store (%s) is undefined!",$2); - $$ = 0; - } - } - | TOK_NOTANY T_PARAMETER - { - if((n=store_number($2,lineno)) != UNDEFINED) - { - $$ = MAKE_ITEM(ITEM_NOTANY,n); - } - else - { - kmflcomp_warn(lineno,"store (%s) is undefined!",$2); - $$ = 0; - } - } - | TOK_OUTS T_PARAMETER - { - if((n=store_number($2,lineno)) != UNDEFINED) - { - $$ = MAKE_ITEM(ITEM_OUTS,n); - } - else - { - kmflcomp_warn(lineno,"store (%s) is undefined!",$2); - $$ = 0; - } - } - | TOK_DEADKEY T_PARAMETER - { - $$ = MAKE_ITEM(ITEM_DEADKEY,deadkey_number($2, lineno)); - } - | TOK_NUL - { - $$ = MAKE_ITEM(ITEM_NUL,0); - } - | TOK_INDEX TOK_BRKT T_BYTES TOK_COMMA T_BYTES TOK_BRKT - { - if((n=store_number($3,lineno)) != UNDEFINED) - { - $$ = MAKE_PARAMETER_ITEM(ITEM_INDEX,atoi($5),n); - } - else - { - kmflcomp_warn(lineno,"store (%s) is undefined!",$3); - $$ = 0; - } - } - | TOK_INDEX TOK_BRKT T_BYTES TOK_BRKT - { - kmflcomp_warn(lineno,"index(%s) must have TWO parameters!",$3); - $$ = 0; - } - | TOK_RTN - { - $$ = MAKE_ITEM(ITEM_RETURN,0); - } - | TOK_BEEP - { - $$ = MAKE_ITEM(ITEM_BEEP,0); - } - | TOK_CONTEXT - { - $$ = MAKE_ITEM(ITEM_CONTEXT,0); - } - | TOK_CONTEXT TOK_BRKT T_BYTES TOK_BRKT - { - $$ = MAKE_ITEM(ITEM_CONTEXT,atoi($3)); - } - | TOK_USE T_PARAMETER - { - $$ = MAKE_ITEM(ITEM_USE,group_number($2, lineno)); - } - | TOK_MATCH - { - $$ = MAKE_ITEM(ITEM_MATCH,0); - } - | TOK_NOMATCH - { - $$ = MAKE_ITEM(ITEM_NOMATCH,0); - } - | TOK_CALL T_PARAMETER - { - kmflcomp_error(lineno,"call keyword not implemented"); - fail(12,"unsupported keyword"); - } - | TOK_SWITCH T_PARAMETER - { - kmflcomp_error(lineno,"switch keyword not implemented"); - fail(11,"obsolete syntax"); - } - | TOK_DOLLAR T_BYTES - { - STORE *sp; /* check for named constants */ - sp = find_store($2); - if(sp) - { - $$ = *sp->items; - } - else - { - $$ = 0; - kmflcomp_error(lineno,"undefined constant"); - } - } - | TOK_ERROR - { - kmflcomp_error(lineno,"illegal or unrecognized item in rule or store"); - } - ; - -T_STRING : - TOK_QM T_BYTES TOK_QM - { - $$ = $2; - } - | - TOK_QM TOK_QM - { - $$ = new_string(0); /* allow for empty strings */ - } - ; - -T_PARAMETER: - TOK_BRKT T_BYTES TOK_BRKT - { - $$ = $2; - } - ; - -T_KEYDEF : - T_STRING - { - $$ = make_keysym(lineno, 0,string_to_keysym($1,lineno)); - } - | - T_KEYMODS T_STRING - { - $$ = make_keysym(lineno, 0,string_to_keysym($2,lineno)); - } - | - T_KEYMODS TOK_RAWKEY - { - $$ = make_keysym(lineno, $1,$2); - } - | TOK_RAWKEY - { - $$ = make_keysym(lineno, 0,$1); - } - | T_KEYMODS TOK_XKEYSYM - { - $$ = make_xkeysym(lineno, $1, $2); - } - | TOK_XKEYSYM - { - $$ = make_xkeysym(lineno, 0, $1); - } - ; - -T_KEYMODS : - T_KEYMODS TOK_SHIFT - { - $$ = $1 | $2; - } - | TOK_SHIFT - { - $$ = $1; - } - ; - -T_BYTES : - TOK_CHAR - { - $$ = new_string($1); - } - | TOK_CHAR T_BYTES - { - $$ = add_char($2,$1); - } - ; - - -%% - -void yyerror(char *str) -{ - fflush (stdout); (void) fflush (stderr); - fprintf (stderr, "Error: %s (line %d)\n", str, lineno); - fflush (stderr); errcount++; -} - -#ifdef _WIN32 -int yywrap(void) -{ - return 1; -} -#endif diff --git a/linux/legacy/libkmfl/AUTHORS b/linux/legacy/libkmfl/AUTHORS deleted file mode 100644 index 03bd9268e7..0000000000 --- a/linux/legacy/libkmfl/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -John Durdin (jmdurdin@tavultesoft.com) -Doug Rintoul (doug_rintoul@sil.org) diff --git a/linux/legacy/libkmfl/COPYING b/linux/legacy/libkmfl/COPYING deleted file mode 100644 index 4587de8ab2..0000000000 --- a/linux/legacy/libkmfl/COPYING +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2017 SIL International - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/linux/legacy/libkmfl/ChangeLog b/linux/legacy/libkmfl/ChangeLog deleted file mode 100644 index a218f58328..0000000000 --- a/linux/legacy/libkmfl/ChangeLog +++ /dev/null @@ -1,93 +0,0 @@ -libkmfl (10.99.1) - - * Change license to MIT as it is being moved into Keyman 11 - * Keyman is now owned by SIL - - -- Doug Rintoul Thu, 17 May 2018 11:43:22 +0700 - -libkmfl (0.9.12) - - * fix debug messages - - -- Doug Rintoul Wed, 17 Nov 2010 13:27:38 -0800 - -libkmfl (0.9.11) - - * fix bug when nomatch is used with "use" keyword - - -- Doug Rintoul Mon, 08 Nov 2010 09:39:31 -0800 - -libkmfl (0.9.10) - - * fix support for differentiating between right and left ctrl, alt, and shift states when matching "any" statements - - -- Doug Rintoul Wed, 03 Nov 2010 14:25:45 -0700 - -libkmfl (0.9.9) - - * change handling of escape character - - -- Doug Rintoul Mon, 19 Jul 2010 15:37:32 -0700 - -libkmfl (0.9.8) - - * add support for the notany key. - * Keyman version 7 support - - -- Doug Rintoul Mon, 26 Jan 2009 15:59:54 -0800 - -libkmfl (0.9.7) - - * Commit a complete string in one go instead of a single character at a time - - -- Doug Rintoul Thu, 16 Oct 2008 16:51:57 -0700 - -libkmfl (0.9.6) - - * add support for get_surrounding_text to provide context sensitive input - methods - * add the ability to reload keyboards on the fly - - -- Doug Rintoul Tue, 7 Nov 2006 15:08:24 -0800 - -libkmfl (0.9.5-1) - - * Fix deadkeys in "any" statement problem - * Fix problem when a mixture of backspaces interspersed with characters - was output when processing a single keystroke - - -- Doug Rintoul Fri, 15 Sep 2006 11:10:00 -0700 - -libkmfl (0.9.4-1) - - * Use UTF conversion routines in kmflcomp rather than a local copy - - -- Doug Rintoul Fri, 16 Jun 2006 11:10:00 -0700 - - -libkmfl (0.9.2-1) - - * Replace UTF Conversion library with a GPLed implementation - * fix any/index bug - - -- Doug Rintoul Thu, 02 Mar 2006 11:10:00 -0800 - -libkmfl (0.9.1-1) - - * further fix for the shift key problem - * AMD64 fixes - - -- Doug Rintoul Wed, 12 Oct 2005 09:45:00 -0800 - -0.9 30-Aug-2005 - Fix shift key problem -0.8 4-Jul-2005 - Add full support for virtual keys. -0.7 2-Jun-2005 - Fix bug when keyboard name was greater than 31 characters. - Increase maximum size of names to 64 characters and add warnings when names exceed this amount - Allow stores to be used before they are defined -0.6 31-May-2005 - Add the ability to load uncompiled keyboards on the fly - - diff --git a/linux/legacy/libkmfl/Makefile.am b/linux/legacy/libkmfl/Makefile.am deleted file mode 100644 index 108c62349d..0000000000 --- a/linux/legacy/libkmfl/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -## Process this file with automake to produce Makefile.in - -SUBDIRS = include src -ACLOCAL_AMFLAGS = -I m4 -libkmfldocdir = ${docdir} -libkmfldoc_DATA = \ - README\ - COPYING\ - AUTHORS\ - ChangeLog\ - INSTALL\ - NEWS - -EXTRA_DIST = $(libkmfldoc_DATA) VERSION - -# Copy all the spec files. Of cource, only one is actually used. -dist-hook: - for specfile in *.spec; do \ - if test -f $$specfile; then \ - cp -p $$specfile $(distdir); \ - fi \ - done - diff --git a/linux/legacy/libkmfl/NEWS b/linux/legacy/libkmfl/NEWS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/linux/legacy/libkmfl/README b/linux/legacy/libkmfl/README deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/linux/legacy/libkmfl/README.repo b/linux/legacy/libkmfl/README.repo deleted file mode 100644 index 31f68244ff..0000000000 --- a/linux/legacy/libkmfl/README.repo +++ /dev/null @@ -1,3 +0,0 @@ -You need autoconf, automake and libtool to generate the build system - -Run ./autogen.sh to run them diff --git a/linux/legacy/libkmfl/VERSION b/linux/legacy/libkmfl/VERSION deleted file mode 120000 index 558194c5a5..0000000000 --- a/linux/legacy/libkmfl/VERSION +++ /dev/null @@ -1 +0,0 @@ -../../VERSION \ No newline at end of file diff --git a/linux/legacy/libkmfl/acinclude.m4 b/linux/legacy/libkmfl/acinclude.m4 deleted file mode 100644 index 7e553f36d9..0000000000 --- a/linux/legacy/libkmfl/acinclude.m4 +++ /dev/null @@ -1 +0,0 @@ -AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff --git a/linux/legacy/libkmfl/autogen.sh b/linux/legacy/libkmfl/autogen.sh deleted file mode 100755 index 905970e6df..0000000000 --- a/linux/legacy/libkmfl/autogen.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -autoreconf -if diff --git a/linux/legacy/libkmfl/configure.ac b/linux/legacy/libkmfl/configure.ac deleted file mode 100644 index f05c3ea89c..0000000000 --- a/linux/legacy/libkmfl/configure.ac +++ /dev/null @@ -1,103 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl Created by Anjuta - will be overwritten -dnl If you don't want it to overwrite it, -dnl Please disable it in the Anjuta project configuration - -AC_INIT(libkmfl, m4_esyscmd_s([cat VERSION])) -AM_INIT_AUTOMAKE - -AM_CONFIG_HEADER(config.h) - -AC_CONFIG_MACRO_DIR([m4]) - -AC_ISC_POSIX -AC_SUBST(CFLAGS,$CFLAGS) -AC_PROG_CC -AM_PROG_CC_STDC -AC_HEADER_STDC -AM_PROG_LIBTOOL - -dnl Checks for programs. -dnl Checks for libraries. -dnl Checks for header files. -dnl Checks for typedefs, structures, and compiler characteristics. -dnl Checks for library functions. -dnl Checks for Additional stuffs. - -dnl Set PACKAGE SOURCE DIR in config.h. -packagesrcdir=`cd $srcdir && pwd` - -dnl Set PACKAGE PREFIX -if test "x${prefix}" = "xNONE"; then - packageprefix=${ac_default_prefix} -else - packageprefix=${prefix} -fi - -dnl Set PACKAGE DATA & DOC DIR -packagedatadir=share/${PACKAGE} -packagedocdir=doc/${PACKAGE} - -dnl Set PACKAGE DIRS in config.h. -packagepixmapsdir=${packagedatadir}/pixmaps -packagehelpdir=${packagedatadir}/help -packagemenudir=${packagedatadir} - -dnl Subst PACKAGE_DATA_DIR. -NO_PREFIX_PACKAGE_DATA_DIR="${packagedatadir}" -AC_SUBST(NO_PREFIX_PACKAGE_DATA_DIR) -PACKAGE_DATA_DIR="${packageprefix}/${packagedatadir}" -AC_SUBST(PACKAGE_DATA_DIR) - -dnl Subst PACKAGE_DOC_DIR. -NO_PREFIX_PACKAGE_DOC_DIR="${packagedocdir}" -AC_SUBST(NO_PREFIX_PACKAGE_DOC_DIR) -PACKAGE_DOC_DIR="${packageprefix}/${packagedocdir}" -AC_SUBST(PACKAGE_DOC_DIR) - -dnl Subst PACKAGE_PIXMAPS_DIR. -NO_PREFIX_PACKAGE_PIXMAPS_DIR="${packagepixmapsdir}" -AC_SUBST(NO_PREFIX_PACKAGE_PIXMAPS_DIR) -PACKAGE_PIXMAPS_DIR="${packageprefix}/${packagepixmapsdir}" -AC_SUBST(PACKAGE_PIXMAPS_DIR) - -dnl Subst PACKAGE_HELP_DIR. -NO_PREFIX_PACKAGE_HELP_DIR="${packagehelpdir}" -AC_SUBST(NO_PREFIX_PACKAGE_HELP_DIR) -PACKAGE_HELP_DIR="${packageprefix}/${packagehelpdir}" -AC_SUBST(PACKAGE_HELP_DIR) - -dnl Subst PACKAGE_MENU_DIR. -NO_PREFIX_PACKAGE_MENU_DIR="${packagemenudir}" -AC_SUBST(NO_PREFIX_PACKAGE_MENU_DIR) -PACKAGE_MENU_DIR="${packageprefix}/${packagemenudir}" -AC_SUBST(PACKAGE_MENU_DIR) - -AH_TEMPLATE([ENABLE_NLS]) -AH_TEMPLATE([HAVE_CATGETS]) -AH_TEMPLATE([HAVE_GETTEXT]) -AH_TEMPLATE([HAVE_LC_MESSAGES]) -AH_TEMPLATE([HAVE_STPCPY]) -AH_TEMPLATE([HAVE_LIBSM]) -AH_TEMPLATE([PACKAGE_LOCALE_DIR]) -AH_TEMPLATE([PACKAGE_DOC_DIR]) -AH_TEMPLATE([PACKAGE_DATA_DIR]) -AH_TEMPLATE([PACKAGE_PIXMAPS_DIR]) -AH_TEMPLATE([PACKAGE_HELP_DIR]) -AH_TEMPLATE([PACKAGE_MENU_DIR]) -AH_TEMPLATE([PACKAGE_SOURCE_DIR]) -AH_TEMPLATE([GETTEXT_PACKAGE]) - -AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${packageprefix}/${packagedatadir}") -AC_DEFINE_UNQUOTED(PACKAGE_DOC_DIR, "${packageprefix}/${packagedocdir}") -AC_DEFINE_UNQUOTED(PACKAGE_PIXMAPS_DIR, "${packageprefix}/${packagepixmapsdir}") -AC_DEFINE_UNQUOTED(PACKAGE_HELP_DIR, "${packageprefix}/${packagehelpdir}") -AC_DEFINE_UNQUOTED(PACKAGE_MENU_DIR, "${packageprefix}/${packagemenudir}") -AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}") - -AC_OUTPUT([ -Makefile -include/Makefile -src/Makefile -]) - diff --git a/linux/legacy/libkmfl/debian/changelog b/linux/legacy/libkmfl/debian/changelog deleted file mode 100644 index 64a9bf29f0..0000000000 --- a/linux/legacy/libkmfl/debian/changelog +++ /dev/null @@ -1,162 +0,0 @@ -libkmfl (14.0.284-1) unstable; urgency=medium - - * New upstream release - * Re-release to Debian - - -- Eberhard Beilharz Fri, 14 Jan 2022 18:00:05 +0100 - -libkmfl (14.0.283-2) unstable; urgency=medium - - * New upstream release - * Re-release to Debian - - -- Eberhard Beilharz Thu, 02 Dec 2021 12:02:19 +0100 - -libkmfl (14.0.282-1) unstable; urgency=medium - - * New upstream release - * Re-release to Debian - - -- Eberhard Beilharz Wed, 29 Sep 2021 12:47:15 +0200 - -libkmfl (14.0.280-1) unstable; urgency=medium - - * New upstream release - * Re-release to Debian - - -- Eberhard Beilharz Mon, 23 Aug 2021 17:38:05 +0200 - -libkmfl (14.0.276-1) experimental; urgency=medium - - * New upstream release - * Re-release to Debian - - -- Eberhard Beilharz Fri, 11 Jun 2021 14:43:29 +0200 - -libkmfl (14.0.273-1) experimental; urgency=medium - - * Keyman 14 - - -- Eberhard Beilharz Mon, 26 Apr 2021 18:24:41 +0200 - -libkmfl (11.0.101-1) unstable; urgency=medium - - * New upstream - Keyman for Linux 11.0 beta 1 - * d/control multi-arch - standards 4.3.0 no changes - * d/watch update for beta/stable - - -- Daniel Glassey Thu, 03 Jan 2019 17:14:50 +0700 - -libkmfl (10.99.33-3) unstable; urgency=medium - - * source only upload to fix amd64 dependency - - -- Daniel Glassey Wed, 31 Oct 2018 10:49:37 +0700 - -libkmfl (10.99.33-2) unstable; urgency=medium - - * change to Debian Input Method team maintainership - - -- Daniel Glassey Wed, 24 Oct 2018 23:07:50 +0700 - -libkmfl (10.99.33-1) unstable; urgency=medium - - * Change license to MIT as libkmfl is being moved into Keyman 11 - * Keyman is now owned by SIL - * New upstream pre-release - * d/control standards 4.2.1, no changes - * d/compat 11 - * I am now the maintainer as I am the one working - on Keyman for Linux upstream - * change from cdbs to dh - - -- Daniel Glassey Mon, 22 Oct 2018 10:18:16 +0700 - -libkmfl (0.9.12-1) unstable; urgency=low - - * fix debug messages - * bring debhelper compat up to level 9 (closes: #817535) - * empty dependency_libs in .la files (closes: #633329) - * remove double maintainer/uploader from debian control file (closes: #511534) - * added dh-autoreconf to the build depends (closes: #802761) - - -- Doug Rintoul Wed, 12 Oct 2016 10:27:38 -0700 - -libkmfl (0.9.11-1) UNRELEASED; urgency=low - - * fix bug when nomatch is used with "use" keyword - - -- Doug Rintoul Wed, 17 Nov 2010 13:27:33 -0800 - -libkmfl (0.9.10-1) UNRELEASED; urgency=low - - * fix support for differentiating between right and left ctrl, alt, and shift states when matching "any" statements - - -- Doug Rintoul Wed, 03 Nov 2010 14:25:45 -0700 - -libkmfl (0.9.9-1) UNRELEASED; urgency=low - - * change handling of escape character - - -- Doug Rintoul Mon, 19 Jul 2010 15:37:32 -0700 - -libkmfl (0.9.8-1) unstable; urgency=low - - * add support for the notany key. - * Keyman version 7 support - - -- Doug Rintoul Mon, 26 Jan 2009 15:59:54 -0800 - -lilibkmfl (0.9.7-1) unstable; urgency=low - - * Commit a complete string in one go instead of a single character at a time - - -- Doug Rintoul Thu, 16 Oct 2008 16:51:57 -0700 - -libkmfl (0.9.6-1) unstable; urgency=low - - * add support for get_surrounding_text to provide context sensitive input - methods - * add the ability to reload keyboards on the fly - - -- Doug Rintoul Tue, 7 Nov 2006 15:08:24 -0800 - -libkmfl (0.9.3-1) unstable; urgency=low - - * Fix some packaging issues - - -- Daniel Glassey Sat, 4 Mar 2006 10:58:37 +0000 - -libkmfl (0.9.2-1) unstable; urgency=low - - * Replace UTF Conversion library with a GPLed implementation - * fix any/index bug - - -- Doug Rintoul Thu, 02 Mar 2006 11:10:00 +0800 - -libkmfl (0.9.1-1) unstable; urgency=low - - * further fix for the shift key problem - * AMD64 fixes - - -- Doug Rintoul Wed, 12 Oct 2005 09:45:00 +0800 - -libkmfl (0.9-1) unstable; urgency=low - - * fix shift key problem - - -- Doug Rintoul Tue, 30 Aug 2005 11:20:00 +0800 - -libkmfl (0.8-1) unstable; urgency=low - - * Add full virtual key support - - -- Doug Rintoul Mon, 04 Jul 2005 11:20:00 +0800 - - -libkmfl (0.7-1) unstable; urgency=low - - * first debian release - - -- Doug Rintoul Mon, 21 Jun 2005 19:57:17 +0800 diff --git a/linux/legacy/libkmfl/debian/compat b/linux/legacy/libkmfl/debian/compat deleted file mode 100644 index b4de394767..0000000000 --- a/linux/legacy/libkmfl/debian/compat +++ /dev/null @@ -1 +0,0 @@ -11 diff --git a/linux/legacy/libkmfl/debian/control b/linux/legacy/libkmfl/debian/control deleted file mode 100644 index 126c694c92..0000000000 --- a/linux/legacy/libkmfl/debian/control +++ /dev/null @@ -1,40 +0,0 @@ -Source: libkmfl -Priority: optional -Section: libs -Maintainer: Debian Input Method Team -Uploaders: - Keyman team , - Eberhard Beilharz , -Build-Depends: - debhelper (>= 11), - libkmflcomp-dev (>=10.99.30), -Standards-Version: 4.5.1 -Vcs-Git: https://github.com/keymanapp/keyman.git -Vcs-Browser: https://github.com/keymanapp/keyman/tree/master/linux/libkmfl -Homepage: https://www.keyman.com - -Package: libkmfl-dev -Section: libdevel -Architecture: any -Depends: - libkmfl0 (= ${binary:Version}), - ${misc:Depends}, -Multi-Arch: same -Description: KMFL library - development - The kmfl library is a multilingual text processing library that implements - the Keyman(C) text processing language. - . - This package contains the header and development files needed to build - programs and packages using libkmfl. - -Package: libkmfl0 -Architecture: any -Depends: - ${misc:Depends}, - ${shlibs:Depends}, -Multi-Arch: same -Description: KMFL library - runtime - The kmfl library is a multilingual text processing library that implements - the Keyman(C) text processing language. - . - This package contains the runtime part of libkmfl. diff --git a/linux/legacy/libkmfl/debian/copyright b/linux/legacy/libkmfl/debian/copyright deleted file mode 100644 index 93ab911f4f..0000000000 --- a/linux/legacy/libkmfl/debian/copyright +++ /dev/null @@ -1,27 +0,0 @@ -Format: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?view=markup&pathrev=174 -Upstream-Name: libkmfl -Upstream-Contact: Doug Rintoul - -Files: * -Copyright: Copyright (C) 2005-2021 SIL International -License: MIT - -License: MIT - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - . - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/linux/legacy/libkmfl/debian/gbp.conf b/linux/legacy/libkmfl/debian/gbp.conf deleted file mode 100644 index 01571b6b1e..0000000000 --- a/linux/legacy/libkmfl/debian/gbp.conf +++ /dev/null @@ -1,6 +0,0 @@ -[DEFAULT] -sign-tags = True -pristine-tar = False -pristine-tar-commit = False -[import-orig] -merge-mode = merge diff --git a/linux/legacy/libkmfl/debian/libkmfl-dev.install b/linux/legacy/libkmfl/debian/libkmfl-dev.install deleted file mode 100644 index 1bb6265387..0000000000 --- a/linux/legacy/libkmfl/debian/libkmfl-dev.install +++ /dev/null @@ -1,3 +0,0 @@ -usr/include/* -/usr/lib/*/lib*.a -/usr/lib/*/lib*.so diff --git a/linux/legacy/libkmfl/debian/libkmfl0.install b/linux/legacy/libkmfl/debian/libkmfl0.install deleted file mode 100644 index d6a64d3957..0000000000 --- a/linux/legacy/libkmfl/debian/libkmfl0.install +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/*/lib*.so.* diff --git a/linux/legacy/libkmfl/debian/libkmfl0.symbols b/linux/legacy/libkmfl/debian/libkmfl0.symbols deleted file mode 100644 index 1018d4c4f1..0000000000 --- a/linux/legacy/libkmfl/debian/libkmfl0.symbols +++ /dev/null @@ -1,43 +0,0 @@ -libkmfl.so.0 libkmfl0 #MINVER# -* Build-Depends-Package: libkmfl-dev - DBGMSG@Base 0.9.12 - ERRMSG@Base 0.9.12 - add_to_history@Base 0.9.12 - clear_history@Base 0.9.12 - compare_state@Base 0.9.12 - deadkey_in_history@Base 0.9.12 - delete_from_history@Base 0.9.12 - erase_char_int@Base 0.9.12 - keyboard_filename@Base 0.9.12 - kmfl_attach_keyboard@Base 0.9.12 - kmfl_check_keyboard@Base 0.9.12 - kmfl_debug@Base 0.9.12 - kmfl_delete_all_keyboard_instances@Base 0.9.12 - kmfl_delete_keyboard_instance@Base 0.9.12 - kmfl_detach_keyboard@Base 0.9.12 - kmfl_get_header@Base 0.9.12 - kmfl_icon_file@Base 0.9.12 - kmfl_interpret@Base 0.9.12 - kmfl_keyboard_name@Base 0.9.12 - kmfl_keyboard_number@Base 0.9.12 - kmfl_load_keyboard@Base 0.9.12 - kmfl_load_keyboard_from_file@Base 0.9.12 - kmfl_make_keyboard_instance@Base 0.9.12 - kmfl_reload_all_keyboards@Base 0.9.12 - kmfl_reload_keyboard@Base 0.9.12 - kmfl_unload_all_keyboards@Base 0.9.12 - kmfl_unload_keyboard@Base 0.9.12 - match_rule@Base 0.9.12 - modified_state@Base 0.9.12 - n_keyboards@Base 0.9.12 - output_item@Base 0.9.12 - p_first_instance@Base 0.9.12 - p_installed_kbd@Base 0.9.12 - process_group@Base 0.9.12 - process_output_queue@Base 0.9.12 - process_rule@Base 0.9.12 - queue_item_for_output@Base 0.9.12 - search_for_match@Base 0.9.12 - set_history@Base 0.9.12 - store_content@Base 0.9.12 - store_length@Base 0.9.12 diff --git a/linux/legacy/libkmfl/debian/rules b/linux/legacy/libkmfl/debian/rules deleted file mode 100755 index d4d9844bbc..0000000000 --- a/linux/legacy/libkmfl/debian/rules +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/make -f -# -*- mode: makefile; coding: utf-8 -*- - -export DEB_BUILD_MAINT_OPTIONS = hardening=+all - -%: - dh $@ diff --git a/linux/legacy/libkmfl/debian/source/format b/linux/legacy/libkmfl/debian/source/format deleted file mode 100644 index 163aaf8d82..0000000000 --- a/linux/legacy/libkmfl/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/linux/legacy/libkmfl/debian/upstream/signing-key.asc b/linux/legacy/libkmfl/debian/upstream/signing-key.asc deleted file mode 100644 index a235c64d44..0000000000 --- a/linux/legacy/libkmfl/debian/upstream/signing-key.asc +++ /dev/null @@ -1,51 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQINBF46PusBEAC9veJYGsAAGnu5ug4RFELBXCwYTXK6aSaRFJ7ItW75EJUQWcIo -FaDCWiiP9ZEXfS7JeG+RZ4MHp6pNnvNCX/Ww4QEfiI4NefMIon6cy2pWfKZRFBDG -Y0x/9Mm+Wzx4vfuGP/TeFwkFy0syFYBsCkoV7KV3VxKNN73k6ZvkRn6tChebwVeM -1FIldfeQw6KeTfdlE12wP4sI3MaaMh/QG1CnPRB4lTCK1WkpFqzxe3Y9XT6w+qxu -tRV2xyAgbe19Q4SlDNvH4bgE/RlaWZ5zjnJLybP80t3qcEGKibUYEkQDuTPC44pn -aqbRmEaihTHhMD/Ye0Oul1OQG13Io5jOm9OEKIzbwzOSlbZML+KVAIN85N1t0TW1 -N1gNZOZDwzXeHAUu+yKZdXliGM8Irb0nxQMWnZqIFtV6GQUNGskCUtd/tGcPe7Y6 -MXaPI7d5FLDGZmyUFsumazW0UN672PqHOlmrlwC+mSlmjFYPakg02Y8MiqPBZ5VB -Uyf0YRBDYMc3WdmIxIYkgzjnSAuoDU3taSAFflS4AxfS5ebTw9ydxrrYEvZzPX4m -hRpX2zt+DGfz/zovinO3kLn4Rch7g/ab6XCmQ/TbQ4GqTEq6XLnjXHSZLXr/Z+lD -u3xtj9iAlxC48NspV/GGzIgsKJzTXXOfazIsgVjHDr/x+mmWZ9e5MwNu/wARAQAB -tCFrZXltYW4tYmEgPGJ1aWxkYWdlbnRAa2V5bWFuLmNvbT6JAk4EEwEKADgWIQRs -jureYH1DTHT9NP3I5hT1jxtl4AUCXjo+6wIbAwULCQgHAgYVCgkICwIEFgIDAQIe -AQIXgAAKCRDI5hT1jxtl4LxHEAC4Lq+c48Q5q3UkfNxcGP2SkE++kco7haxnoQwT -H1cJSqY+X+eHhAPYyhrriT3CwwQ3w5RT73v69tUrrpiIK6dc4ltQca0qrwppLzOc -hZji61KWXYGHYIpqI+PpayxcJ1Vxz154EiFQk7Hbbo+x/5I0qzl6QmROHhenez06 -51hr5WGwonscnX7ReDuBA296XS5GCFQ1h+080xNkqiUt0SYWBhWzqQizEnF3VBrS -Be5pNGqp5Md11In7ZsRNhGBs2ewpY0As6D9Ll0x4CulAAeMhXqbPnNhqE0uehbdR -ks15fcBXwiVwUFN/dMacTFJovRgkXLU/c0OwHM6cnHBBHFDmKTohIYY8/g8eDt4m -413XIJREOXaWa3UWrfwfup9FI/PI1g2KnGHEFP2PBS+77/3PVpQlYOnJ52Mc19ON -BzAE5qFlXwLIyktcpvzaFz+mw5S5YvccjoLLRcTV9er/64ZhQxz87Sqn2l94wo4f -V989CMfy2ujh4G80xcLJDDpovGQpdgflD7eZjaYyD1maYp+FlhYuDGT7nTzkX8nm -G6RWICeHFJrk3OXyx3ir+IXSUc+B0NjQS/6rtTr5qCntm/R/WYnS5eDhwcForHB5 -KryJtkJBkIqZ8PalUWrSfSHWQjbJZgVEsJVKReBS0srW95j1Bi3gvsKLPf1/9zv2 -PmzVXLkCDQReOj7rARAAubQWo/upxgAUI4d8kGqIooyWgSbVbWnW4Ra/1FjP1RLn -zChmJTYm5QTGEs2u2J0jhhdP/o2xYFdaD3BOVaDTCTV0Ron5Y2EI5T0WEqLuGcu0 -YmaGtR0fj1qw/0IJ1CtOfv3V0XIGuSM2NQtCiS80oo1sRBwpi+eDWn19UClT7F0T -PVwX2eXwgb1UR6CWbxu4nUMyq0lTfYyk2L+XiC/gbtVLs4I2UaxvO0DOxPbEoKyK -SUA5Jxae/QsLrJ4HvqlGekgqSH5gLAr6zH1jWKn0bnwRX92ka/yTIzQQg5+vgJQH -inOOhIg5Gii55KgQjLL7atL48w/Df9ftJohm9LN6YUzF5qCSAs1BQ7p3G2LKR8Vw -CMYH9Fp6dHeb/83w6pSth/kYfx/GyI5tXCuCCzgTvEFW9/qjhvSNk6hW7NhwmiRz -oqPnOub2NewgIu3EBgme7f5U6M/zAtTGoJn6+ftfILsW9SxKJgZWkxzmndvZ/hZn -SAGmBQNylq0/xGKjGjoeKbkR0oNlUGYWJ4svFrd4VFk65a502JdTU5ZxoJGFKGgh -UNWvqqL0ruTQmtXWFOfZdCKOIbHjoTP/xsnmnKIbPpe09J3kgJc6zsplHEPO5dXJ -kfD4oTQQsrUG3dmNBJU3jbSV0jcHzrMGRTpYw2+ptsk/PWJc9XSUpJAAQP+/mvUA -EQEAAYkCNgQYAQoAIBYhBGyO6t5gfUNMdP00/cjmFPWPG2XgBQJeOj7rAhsMAAoJ -EMjmFPWPG2Xg4D8QAJr7v8Ly2DYd7e3ilk3LWURXpvi79U5fsy3qLglZt/8c52mf -DGo+s3XjVhVqFMYlhs1ezmVPgORtDky+57aS5cgPU5Lqo4fYZoLwDS0LUvMEO5Im -pTo/7rtdRpVsmSgyJ48t0eh3qi/mf8ONFqho53elb5IdROrpM1pZm3vWvM/vdEMi -kGN1R6BdajKEvofdc2x/3YQhQyfekCxKa/RXRQ5M+JtW4iHrDuyAFksoCVk2p4dO -OdZoNaMMYi6egcHbph+LR2CYsnijUr7vlTOBfF2XUom+vq5audySc4+NqeaWyXtD -mmoriz8IF0hIt2mWpQCqC/gftR9K2SDd8TYn2Z8OH4/h8cLRQssN/VsZie3jDh4u -ZD+A/1IF5q+Ayx+pXRpoDMDl+vvHHBfHpnLt4iFuPNZgJO5xSBd5Ra6/PRPs26wV -y+ArzNhdA5ImhOPHF08qwBxDeS7476N7j3yTGv1vPJTOmIII1/60bUI/u8cAjXWa -tMHDsIAIfJF2A8bkukbNEQUcWw3HUIA3lCq7cV6xs9LT5/xa1XfMQoj9vHMogCcT -YykbTr9QHLLX62htZijKU1REYuxwEoFXIm7y7HpBIWNBjSLkE53K9RaZP3z01xcX -B0e/y1m02FicU+owqJC38pXpUogyw+ZLj+VNFbv/dSDaG+00eRdqGGmTTIgo -=jcZL ------END PGP PUBLIC KEY BLOCK----- diff --git a/linux/legacy/libkmfl/include/Makefile.am b/linux/legacy/libkmfl/include/Makefile.am deleted file mode 100644 index e12b294bdb..0000000000 --- a/linux/legacy/libkmfl/include/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -## Process this file with automake to produce Makefile.in - -## Created by Anjuta - will be overwritten -## If you don't want it to overwrite it, -## Please disable it in the Anjuta project configuration - -libkmfl_includedir = $(includedir)/kmfl - -libkmfl_include_DATA = \ - libkmfl.h - -EXTRA_DIST = $(libkmfl_include_DATA) diff --git a/linux/legacy/libkmfl/include/libkmfl.h b/linux/legacy/libkmfl/include/libkmfl.h deleted file mode 100644 index 3d26b3ff55..0000000000 --- a/linux/legacy/libkmfl/include/libkmfl.h +++ /dev/null @@ -1,68 +0,0 @@ -/* libkmfl.h - * Copyright (C) 2005 SIL International - * - * This file is part of the KMFL library. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - */ - -// LIBKMFL.H: Header for interpreter for Keyboard Mapping for Linux - -#ifndef LIBKMFL_H - -#ifdef __cplusplus -extern "C" { -#endif - -int kmfl_interpret(KMSI *p_kmsi, UINT key, UINT state); - -int kmfl_load_keyboard(const char *file); -int kmfl_check_keyboard(const char *file); -int kmfl_reload_keyboard(int keyboard_number); -int kmfl_reload_all_keyboards(void); -int kmfl_unload_keyboard(int keyboard_number); -int kmfl_unload_all_keyboards(void); - -KMSI *kmfl_make_keyboard_instance(void *connection); -int kmfl_delete_keyboard_instance(KMSI *p_kmsi); -int kmfl_delete_all_keyboard_instances(void); - -int kmfl_attach_keyboard(KMSI *p_kmsi, int keyboard_number); -int kmfl_detach_keyboard(KMSI *p_kmsi); - -int kmfl_keyboard_number(char *name); -const char *kmfl_keyboard_name(int keyboard_number); -const char *kmfl_icon_file(int keyboard_number); - -int kmfl_get_header(KMSI *p_kmsi,int hdrID,char *buf,int buflen); - -void DBGMSG(int debug,const char *fmt,...); -void *ERRMSG(const char *fmt,...); -void clear_history(KMSI *p_kmsi); -int deadkey_in_history(KMSI *p_kmsi); -void set_history(KMSI *p_kmsi, ITEM * items, UINT nitems); - -extern int kmfl_debug; - -#ifdef __cplusplus -} -#endif - -#endif /* *** end of LIBKMFL.H *** */ diff --git a/linux/legacy/libkmfl/libkmfl.spec b/linux/legacy/libkmfl/libkmfl.spec deleted file mode 100644 index 2979d1e019..0000000000 --- a/linux/legacy/libkmfl/libkmfl.spec +++ /dev/null @@ -1,102 +0,0 @@ -# created by RPM Builder for Anjuta, v0.1.2 -# http://arpmbuilder.sourceforge.net -# Wed Feb 25 12:14:17 2004 - -%define _prefix /usr - -%define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0) -%define is_mandriva %(test -e /etc/mandriva-release && echo 1 || echo 0) -%define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0) -%define is_opensuse %(grep open /etc/SuSE-release 2> /dev/null 1>/dev/null && echo 1 || echo 0) -%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0) - -%if %is_mandrake -%define dist mandrake -%define disttag mdk -%endif -%if %is_mandriva -%define dist mandriva -%define disttag mdk -%endif -%if %is_suse -%define dist suse -%define disttag suse -%define kde_path /opt/kde3 -%endif -%if %is_opensuse -%define dist openSUSE -%define disttag openSUSE -%define kde_path /opt/kde3 -%endif -%if %is_fedora -%define dist fedora -%define disttag fc -%endif - -%define distver %(release="`rpm -q --queryformat='%{VERSION}' %{dist}-release 2> /dev/null | tr . : | sed s/://g`" ; if test $? != 0 ; then release="" ; fi ; echo "$release") - -Summary: %{name} -Name: libkmfl -Version: 0.9.12 -Release: 1%{disttag}%{distver} -Vendor: SIL -Packager: Doug Rintoul -Group: User Interface/X -License: GPL -Source0: %{name}-%{version}.tar.gz -# Url: (none) -BuildRoot: /var/tmp/libkmfl -Requires: kmflcomp -Buildrequires: kmflcomp-devel -# Conflicts: (none) -# Provides: (none) -# Obsoletes: (none) - -%description -Keystroke interpreter for KMFL - -%package devel -Summary: Development libraries and headers to use %{name} in an application -Group: Development/Libraries -Requires: kmflcomp -Buildrequires: kmflcomp-devel -# Conflicts: (none) -# Provides: (none) -# Obsoletes: (none) - -%description devel -Keystroke interpreter for KMFL - -%prep -%setup -q - -%build -[ ! -f Makefile ] || make distclean -%configure -make - -%install -[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT - -%makeinstall -for doc in ABOUT-NLS AUTHORS README COPYING INSTALL NEWS TODO ChangeLog; do - rm -f $RPM_BUILD_ROOT%{_prefix}/doc/libkmfl/$doc; -done; - -%clean -[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) -%{_libdir}/libkmfl.so.0.0.0 -%{_libdir}/libkmfl.so.0 - -%doc AUTHORS COPYING ChangeLog README INSTALL NEWS TODO - -%files devel -%defattr(-,root,root) -%{_includedir}/kmfl/libkmfl.h -%{_libdir}/libkmfl.la -%{_libdir}/libkmfl.a -%{_libdir}/libkmfl.so - diff --git a/linux/legacy/libkmfl/src/Makefile.am b/linux/legacy/libkmfl/src/Makefile.am deleted file mode 100644 index a3b74861bd..0000000000 --- a/linux/legacy/libkmfl/src/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -## Process this file with automake to produce Makefile.in - -## Created by Anjuta - will be overwritten -## If you don't want it to overwrite it, -## Please disable it in the Anjuta project configuration - -AM_CPPFLAGS =\ - -I$(top_srcdir)/include - -libkmfl_la_CFLAGS =\ - -Wall\ - -g - -lib_LTLIBRARIES = libkmfl.la - -libkmfl_la_SOURCES = \ - kmfl_interpreter.c\ - kmfl_load_keyboard.c\ - kmfl_messages.c - -libkmfl_la_LDFLAGS = -lkmflcomp - -libkmfl_la_LIBADD = diff --git a/linux/legacy/libkmfl/src/kmfl_interpreter.c b/linux/legacy/libkmfl/src/kmfl_interpreter.c deleted file mode 100644 index a881f90bec..0000000000 --- a/linux/legacy/libkmfl/src/kmfl_interpreter.c +++ /dev/null @@ -1,754 +0,0 @@ -/* kmfl_interpreter.c - * Copyright (C) 2005 SIL International - * - * This file is part of the KMFL library. - * - */ - -/* - - Keystroke interpreter for keyboard mapping for Linux project - - Version 1.000, January 2004, John Durdin, Tavultesoft - - Main interpreter module - - Notes: - History is a reverse ordered array of (Unicode) characters passed to the - output and deadkeys that are pending, most recent first. For groups that - process using the current keystroke, the keysym and state for that keystroke - are prepended to the history before matching rules. - - The main entry point is the routine kmfl_interpret() which will return a value of - zero if the current keystroke is not matched or output, one if it is either - matched or passed directly to the output routine, and a negative value if any - error is detected. - - Each store and group offset from the start of the table is saved, using two - arrays in the table header. The first MAX_HEADER_STORES are reserved for - headers, but the references may be null. The number of stores must always be - at least MAX_HEADER_STORES. - - Based on the "K_TTY" console-based keyboard mapping project - developed by David Gardner, but completely rewritten for use - with X-applications. -*/ - -#include -#include - -#include -#include -#include "libkmfl.h" - -// Macros to find index offsets and referenced stores or groups -#define INDEX_OFFSET(x) (((x)>>16)&0xff) -#define STORE_NUMBER(x) ((x)&0x0000ffff) -#define GROUP_NUMBER(x) ((x)&0x0000ffff) -#define CONTEXT_CHAR(x) ((x)&0x0000ffff) - -// Macro to return a string from the string table -#define ITEMSTRING(x) (strings+(x)) - -int process_group(KMSI *p_kmsi, XGROUP *gp); -int match_rule(KMSI *p_kmsi, XRULE *rp, ITEM *any_index, int usekeys); -int process_rule(KMSI *p_kmsi, XRULE *rp, ITEM *any_index, int usekeys); -UINT modified_state(UINT state); -UINT compare_state(ITEM rule_key, ITEM keystroke); - -void erase_char_int(KMSI *p_kmsi); -void queue_item_for_output(KMSI *p_kmsi, ITEM item); -void process_output_queue(KMSI *p_kmsi); -void output_item(void *connection, ITEM x); -void add_to_history(KMSI *p_kmsi,ITEM key); -void delete_from_history(KMSI *p_kmsi,UINT nchars); -void clear_history(KMSI *p_kmsi); - -ITEM *store_content(KMSI *p_kmsi, UINT nstore); -UINT store_length(KMSI *p_kmsi, UINT nstore); - -// External routines -void output_string(void *connection, char *p); -void output_char(void *connection, BYTE q); -void output_beep(void *connection); -void forward_keyevent(void *connection, UINT key, UINT state); - -void erase_char(void *connection); - -int kmfl_interpret(KMSI *p_kmsi, UINT key, UINT state) -{ - XKEYBOARD *p_kbd; - XGROUP *p_group1; - ITEM keysym; - - p_kmsi->noutput_queue=0; - - // Test first for modifier key keystrokes and do nothing - switch(key) - { - case 0xff67: // menu - case 0xff7f: // Num Lock - case 0xffe1: // L shift - case 0xffe2: // R shift - case 0xffe3: // L ctrl - case 0xffe4: // R ctrl - case 0xffe5: // Caps Lock - case 0xffe9: // L alt - case 0xffea: // R alt - case 0xffeb: // L win - case 0xffec: // R win - return 0; - } - - if(p_kmsi == NULL || p_kmsi->keyboard == NULL) return 0; - - // Pack the state bits into a single byte - state = modified_state(state); - - // Get the memory address of the keyboard header - p_kbd = p_kmsi->keyboard; - p_group1 = p_kmsi->groups+p_kbd->group1; - - // Place the current keystroke at the start of the history array - keysym = (key & 0xffff) | (state<<16); - keysym = MAKE_ITEM(ITEM_KEYSYM,keysym); - p_kmsi->history[0] = keysym; - - // Pass control to the first group for processing, and return if key was matched - if(process_group(p_kmsi, p_group1) > 0) - { - process_output_queue(p_kmsi); - return 1; - } - - /* need some kind of error notification if error value returned */ - - // If the keystroke is a valid Unicode character, and not a control or alt combination, - // output it and add it to the history - if(((key & 0xff00) == 0) && ((state & 0xcc) == 0)) - { - add_to_history(p_kmsi,(ITEM)key); - queue_item_for_output(p_kmsi,(ITEM)key); - process_output_queue(p_kmsi); - return 1; - } - - // Handle special case keystrokes - switch(key) - { - - case 0xff08: // backspace - erase last character from history - delete_from_history(p_kmsi,1); - erase_char_int(p_kmsi); - return 1; - case 0xff09: // tab - clear history, let app handle key - case 0xff0d: // return - clear history, let app handle key - clear_history(p_kmsi); - return 0; - case 0xff1b: // escape - add to history, let app handle key - add_to_history(p_kmsi,(ITEM)0x1b); - return 0; - default: - clear_history(p_kmsi); - return 0; // let application handle key, but erase history - } -} - -int search_for_match(KMSI *p_kmsi, XGROUP *gp, XRULE **rp, ITEM * any_index, int usekeys) -{ - UINT nrules, n, nhistory; - int matched=0; - DBGMSG(1, "DAR: search_for_match\n"); - - if(p_kmsi->nhistory > MAX_HISTORY) - p_kmsi->nhistory = MAX_HISTORY; - - nhistory = p_kmsi->nhistory; - - if(usekeys) - nhistory++; - - p_kmsi->history[nhistory+1-usekeys] = 0; - - nrules = gp->nrules; - - // Match rules until either a match is found or all rules have been tried - for(n=0,*rp=p_kmsi->rules+gp->rule1; nilen > nhistory+1) || (((*rp)->ilen == nhistory+1) - && (ITEM_TYPE(*(p_kmsi->strings+(*rp)->lhs)) != ITEM_NUL))) continue; - - // Compare the current rule with the history - if((matched=match_rule(p_kmsi,*rp,any_index,usekeys))) - break; - } - - return matched; -} - -// Process a keystroke with a given group of rules -int process_group(KMSI *p_kmsi, XGROUP *gp) -{ - XRULE *rp, trule; - ITEM any_index[MAX_HISTORY+2]; - int matched, result=0, usekeys, enable_global_matching; - - DBGMSG(1, "DAR: process_group\n"); - - usekeys = ((gp->flags & GF_USEKEYS) != 0); - - matched=search_for_match(p_kmsi, gp, &rp, any_index, usekeys); - - if (!matched) - { - DBGMSG(1, "DAR: process_group not matched\n"); - // Now try without shift state - if ((p_kmsi->history[0] & (KS_SHIFT<<16)) != 0) - { - p_kmsi->history[0] &= ~((unsigned long)KS_SHIFT<<16); - matched=search_for_match(p_kmsi, gp, &rp, any_index, usekeys); - } - } - - DBGMSG(1, "DAR: process_group 2\n"); - - if (matched) - // Then determine the output for this rule - result = process_rule(p_kmsi,rp,any_index,usekeys); - - DBGMSG(1, "DAR: process_group 3\n"); - - // Determine if we need to consider processing match or nomatch rules - if((gp->flags & GF_USEKEYS) != 0) - enable_global_matching = ((*p_kmsi->history & 0xff00) != 0xff00); - else - enable_global_matching = 1; - - // Conditionally process nomatch and match rules here, if result = 0 or 1 respectively - if((result == 0) && (gp->nmrlen > 0) && enable_global_matching) - { - trule.ilen = 0; - trule.olen = gp->nmrlen; - trule.rhs = gp->nomatch; - result = process_rule(p_kmsi,&trule,any_index,usekeys); - } - else if((result == 1) && (gp->mrlen > 0) && enable_global_matching) - { - trule.ilen = 0; - trule.olen = gp->mrlen; - trule.rhs = gp->match; - process_rule(p_kmsi,&trule,any_index,usekeys); - } - - return result; -} - -// Match the history with each rule in turn and return if a match is found -int match_rule(KMSI *p_kmsi, XRULE *rp, ITEM *any_index, int usekeys) -{ - - UINT k, m, n, nmax, rulelen, nhistory, index; - ITEM *pr, *ph, *ps; - - rulelen = rp->ilen; - pr = p_kmsi->strings+rp->lhs; - ph = p_kmsi->history+rulelen - (usekeys ? 1 : 0); - nhistory = p_kmsi->nhistory + (usekeys ? 1 : 0); - - for(m=0; milen; pr++,ph--,m++) - { - unsigned char item_type; - item_type=ITEM_TYPE(*pr); - switch(item_type) - { - case ITEM_CHAR: - if(*pr != *ph) return 0; - break; // matched - continue matching string - - case ITEM_KEYSYM: - if((*pr & 0xffff) != (*ph & 0xffff)) return 0; - if(compare_state(*pr,*ph)) return 0; - break; // matched - continue matching string - - case ITEM_DEADKEY: - if(*pr != *ph) return 0; - break; // matched - continue matching string - - case ITEM_ANY: // will need to allow for matching keysyms in any() - case ITEM_NOTANY: - ps = store_content(p_kmsi,STORE_NUMBER(*pr)); - nmax = store_length(p_kmsi,STORE_NUMBER(*pr)); - - for(n=0; n= store_length(p_kmsi,STORE_NUMBER(*pr))) - { - ERRMSG("\"any index\" out of range\n"); - return 0; - } else { - ps = store_content(p_kmsi,STORE_NUMBER(*pr)); - if(*pr != *(ps + any_index[INDEX_OFFSET(*pr)-1])) return 0; - } - break; // matched - continue matching string - - - case ITEM_CONTEXT: - k = CONTEXT_CHAR(*pr); - if(k == m+1) break; // wild-card match of input - if((k == 0) || (k > rulelen) // arg cannot be 0 (on LHS of rule) - || (*ph != *(ph+m+1-k))) return 0; // no match - break; // matched - continue matching string - - case ITEM_NUL: // nhistory (+ key) must be equal to the rule length - if(rp->ilen != nhistory+usekeys) return 0; - break; - -// case ITEM_OUTS: // not allowed on LHS of rule - must be expanded by compiler -// return 0; - -// case ITEM_MATCH: // match and nomatch rules are be dealt with elsewhere -// case ITEM_NOMATCH: -// return 0; - -// case ITEM_BEEP: // all other commands are only allowed on RHS of rule -// case ITEM_USE: -// case ITEM_CALL: -// return 0; - - default: // all other commands are only allowed on RHS of rule - return 0; - } - } - return 1; // Return 1 if history matches rule -} - -// Process a matched rule, return codes are: -// 1 rule processed -// 2 rule processed, return encountered (in rule or in subgroup rule) -// -1 error - pass keystroke transparently -int process_rule(KMSI *p_kmsi, XRULE *rp, ITEM *any_index, int usekeys) -{ - XGROUP *gp; - UINT i, k, m, n, nout, itp, index; - ITEM *p, *pr, *ps, output[MAX_OUTPUT+1], history[MAX_HISTORY], *it; - int erase, retCode=1, nhistory; - - DBGMSG(1, "DAR - libkmfl - process_rule\n"); - pr = p_kmsi->strings+rp->rhs; // Pointer to start of output rule - - // Make a temporary copy of the history before any modifications are made - nhistory = p_kmsi->nhistory; - for(i=0; (int)ihistory[i]; - } - - // Must erase the number of characters matched, - // excluding the keystroke, and deadkeys, and nul, match or nomatch items - erase = rp->ilen - (usekeys ? 1 : 0); - for(p=p_kmsi->strings+rp->lhs; erase>0 && p_kmsi->history>0; erase--,p++) - { - itp = ITEM_TYPE(*p); - switch(itp) - { - case ITEM_NUL: - case ITEM_MATCH: - case ITEM_NOMATCH: - break; - default: - if(ITEM_TYPE(p_kmsi->history[1]) != ITEM_DEADKEY) - erase_char_int(p_kmsi); - for(i=1; inhistory; i++) - p_kmsi->history[i] = p_kmsi->history[i+1]; - p_kmsi->nhistory--; - break; - } - } - - // Assemble the output needed (to replace the matched string) - for(m=0,p=output; molen; m++,pr++) - { - switch(ITEM_TYPE(*pr)) - { - case ITEM_CHAR: - *p++ = *pr; - break; - - case ITEM_INDEX: // note that indexes start from 1, not 0 - index= any_index[INDEX_OFFSET(*pr)-1]; - if (index >= store_length(p_kmsi,STORE_NUMBER(*pr))) - { - ERRMSG("\"any index\" out of range\n"); - return -1; - } else { - ps = store_content(p_kmsi,STORE_NUMBER(*pr)); - it=ps + index; - if (ITEM_TYPE(*it) == ITEM_BEEP) - { - DBGMSG(1, "DAR -libkmfl - *** index beep*** \n"); - output_beep(p_kmsi->connection); - } else { - *p++ = *it; - } - } - - break; - - case ITEM_OUTS: // only allowed on RHS of rule - ps = store_content(p_kmsi,STORE_NUMBER(*pr)); - nout = store_length(p_kmsi,STORE_NUMBER(*pr)); - if(p-output+nout >= MAX_OUTPUT) return -2; - - for(n=0; nilen; i>(UINT)usekeys; i--) - { - *p++ = history[i-usekeys]; // was [i-1], corrected 2004/04/23 - } - } - else if(k <= rp->ilen-usekeys) - { - *p++ = history[rp->ilen-k+1-usekeys]; - } - else return -1; // this should be prevented by the compiler - break; - - case ITEM_NUL: // output nothing - break; - - case ITEM_RETURN: // return as soon as the output from this rule is finished - retCode = 2; // set return code to prevent processing match, nomatch, or use - break; - - case ITEM_BEEP: // output an audible signal - DBGMSG(1, "DAR -libkmfl - ***beep*** \n"); - output_beep(p_kmsi->connection); - break; - - case ITEM_USE: // process another rule group then return here - if(retCode == 2) break; // do not process subgroup rules if return encountered - - gp = p_kmsi->groups+GROUP_NUMBER(*pr); - if((retCode=process_group(p_kmsi,gp)) < 0) - { - return -1; // error processing subgroup rules - } - break; - - case ITEM_CALL: // not implemented, but not illegal - break; - - case ITEM_KEYSYM: - *p++ = *pr; - break; - -// case ITEM_ANY: // should be prevented by compiler -// case ITEM_MATCH: -// case ITEM_NOMATCH: -// return (-1); - - default: - return -1; - } - - // Get length of output string for this element - nout = (UINT)(p-output); - - // Then output the output string (excepting deadkeys), and add it to the history - for(n=0, p=output; n> 16) & 0xFF; - DBGMSG(1, "DAR - libkmfl - ITEM_KEYSYM key:%x, state: %x\n", key, state); - forward_keyevent(p_kmsi->connection, key, state); - clear_history(p_kmsi); - } - else - { - queue_item_for_output(p_kmsi,*p); - add_to_history(p_kmsi,*p); - } - } - } - - // Reset pointer and continue - p = output; - } - - return retCode; // Return 1 (or 2) to indicate that the keystroke has been matched and processed -} - -// Check to see if there are deadkeys in the current history -int deadkey_in_history(KMSI *p_kmsi) -{ - ITEM * pitem =p_kmsi->history+1; - UINT nitems= p_kmsi->nhistory; - UINT iitem; - - for (iitem=0; iitem < nitems; iitem++, pitem++) { - if(ITEM_TYPE(*pitem) == ITEM_DEADKEY) { - return 1; - } - } - - return 0; -} - -// Sets the history to the surrounding context -void set_history(KMSI *p_kmsi, ITEM * items, UINT nitems) -{ - - if (nitems > MAX_HISTORY) - nitems = MAX_HISTORY; - - memcpy(p_kmsi->history+1, items, nitems * sizeof(ITEM)); - p_kmsi->nhistory=nitems; -} - -// Add a character item (or deadkey) to the start of the history stack (to item 1) -void add_to_history(KMSI *p_kmsi,ITEM item) -{ - ITEM *ip,*ip0=p_kmsi->history+1; - UINT n=p_kmsi->nhistory; - - if(n >= MAX_HISTORY) n = MAX_HISTORY-1; - p_kmsi->nhistory = n+1; - - for(ip=ip0+n-1; n>0; n--,ip--) *(ip+1) = *ip; - - *ip0 = item; - -} - -// Delete items (or deadkeys) from the start of the history stack (from item 1) -void delete_from_history(KMSI *p_kmsi,UINT nitems) -{ - UINT nleft; - - if(p_kmsi->nhistory > MAX_HISTORY) - p_kmsi->nhistory = MAX_HISTORY; - - if(nitems > p_kmsi->nhistory) - nitems = p_kmsi->nhistory; - nleft = p_kmsi->nhistory - nitems; - if(nleft > 0 && nitems > 0) - { - memmove(p_kmsi->history+1,p_kmsi->history+nitems+1,nleft*sizeof(ITEM)); - } - p_kmsi->nhistory = nleft; -// *(p_kmsi->history+1+nleft) = 0; -} - -// Clear history -void clear_history(KMSI *p_kmsi) -{ - p_kmsi->nhistory = 0; -} - -// a single key event we queue items for output. If the keyboard needs to delete a -// character, this queue is checked first and characters are deleted first from -// here. If this queue is empty, then characters are delete from the application -// This avoids cases such where and are -// characters and is a backspace. What the application will see is -// OB -void queue_item_for_output(KMSI *p_kmsi, ITEM item) -{ - if (p_kmsi->noutput_queue < MAX_OUTPUT) - { - p_kmsi->output_queue[p_kmsi->noutput_queue]= item; - (p_kmsi->noutput_queue)++; - } else { - ERRMSG("Exceeded maximum length of output allowed from any one key event.\n"); - } -} - -void process_output_queue(KMSI *p_kmsi) -{ - int i; - - UTF32 utfin[2]={0}; - UTF32 *pin; - UTF8 utfout[MAX_OUTPUT*4+1]={0}; - UTF8 *pout; - size_t result; - - pout = &utfout[0]; - for (i=0; i < p_kmsi->noutput_queue; i++) { -#if 0 - output_item(p_kmsi->connection, p_kmsi->output_queue[i]); -#else - pin = &utfin[0]; - utfin[0] = p_kmsi->output_queue[i]; - result = IConvertUTF32toUTF8((const UTF32 **)&pin,utfin+1,&pout,utfout+MAX_OUTPUT*4); - if (result == (size_t)-1) { - ERRMSG("Exceeded maximum length of output allowed from any one key event.\n"); - return; - } - } - *pout = 0; - output_string(p_kmsi->connection, (char *)utfout); -#endif -} - -void erase_char_int(KMSI *p_kmsi) -{ - if (p_kmsi->noutput_queue > 0) - (p_kmsi->noutput_queue)--; - else - erase_char(p_kmsi->connection); -} - -// Because some apps cannot handle a mixture of erases and commits when processing -// Output a Unicode character (as a multi-byte string) -void output_item(void *connection, ITEM x) -{ - UTF32 utfin[2]={0}, *pin; - UTF8 utfout[16]={0}, *pout; - size_t result; - utfin[0] = x; - pin = &utfin[0]; - pout = &utfout[0]; - - result = IConvertUTF32toUTF8((const UTF32 **)&pin,utfin+1,&pout,utfout+15); - - if (result != (size_t)-1) - { - *pout = 0; - output_string(connection, (char *)utfout); - } -} - -// Return the address of the referenced store -ITEM *store_content(KMSI *p_kmsi, UINT nstore) -{ - XSTORE *sp; - - sp = p_kmsi->stores + nstore; - return(p_kmsi->strings+sp->items); -} - -// Return the length of the referenced store -UINT store_length(KMSI *p_kmsi, UINT nstore) -{ - XSTORE *sp; - - sp = p_kmsi->stores + nstore; - return(sp->len); -} - -// Translate the state integer received from scim_kmfl_server -UINT modified_state(UINT state) -{ - UINT right; - - right = (state & 0x0d00) >> 8; // mask out all except RShift, RCtrl, RAlt - state &= 0x0f; // and all except LShift, Caps, LCtrl, LAlt - state &= ~right; // clear left bit if corresponding right bit set - state |= (right << 4); // and merge right bits - - return state; -} - -// Compare the shift state with the state required by the rule (return 0 if matched) -UINT compare_state(ITEM rule_key, ITEM input_key) -{ - if((rule_key & (KS_SHIFT<<16)) == (KS_SHIFT<<16)) // test Shift first - { - if((input_key & (KS_SHIFT<<16)) == 0) return 1; - } - else // then LShift/RShift - { - if((rule_key & (KS_SHIFT<<16)) != (input_key & (KS_SHIFT<<16))) return 2; - } - - if((rule_key & (KS_CTRL<<16)) == (KS_CTRL<<16)) // test Ctrl - { - if((input_key & (KS_CTRL<<16)) == 0) return 3; - } - else // then LCtrl/RCtrl - { - if((rule_key & (KS_CTRL<<16)) != (input_key & (KS_CTRL<<16))) return 4; - } - - if((rule_key & (KS_ALT<<16)) == (KS_ALT<<16)) // test Alt first - { - if((input_key & (KS_ALT<<16)) == 0) return 5; - } - else // then LAlt/RAlt - { - if((rule_key & (KS_ALT<<16)) != (input_key & (KS_ALT<<16))) return 6; - } - - if((rule_key & (KS_CAPS<<16)) == (KS_CAPS<<16)) // test Caps - { - if((input_key & (KS_CAPS<<16)) == 0) return 7; - } - - if((rule_key & (KS_NCAPS<<16)) == (KS_NCAPS<<16)) // and NCaps - { - if((input_key & (KS_CAPS<<16)) != 0) return 8; - } - - return 0; // input state matches state in rule -} - -// Return a header referenced by special header ID number -int kmfl_get_header(KMSI *p_kmsi,int hdrID,char *buf,int buflen) -{ - UTF32 *p32; - UTF8 *p8; - - int nitems; - - if(!p_kmsi) return -1; - - if(hdrID < 0 || hdrID > SS_KEYBOARDVERSION) return -2; - - p32 = (UTF32 *)store_content(p_kmsi,hdrID); - p8 = (UTF8 *)buf; - - if(p32 == NULL) return -3; - - nitems = store_length(p_kmsi,hdrID); - if(nitems == 0) return -4; - - memset(buf,0,buflen); - return IConvertUTF32toUTF8((const UTF32**)&p32,p32+nitems,&p8,p8+buflen-1); -} - diff --git a/linux/legacy/libkmfl/src/kmfl_load_keyboard.c b/linux/legacy/libkmfl/src/kmfl_load_keyboard.c deleted file mode 100644 index 0d29526677..0000000000 --- a/linux/legacy/libkmfl/src/kmfl_load_keyboard.c +++ /dev/null @@ -1,470 +0,0 @@ -/* kmfl_load_keyboard.c - * Copyright (C) 2005 SIL International - * - * This file is part of the KMFL library. - * - */ - -/* - - Keystroke interpreter for keyboard mapping for Linux project - - Version 1.000, January 2004, John Durdin, Tavultesoft - - Keyboard and loading and instance management -*/ - -#include -#include -#include - -#include -#include -#include - -#ifndef _WIN32 - #include -#endif - -#include -#include -#include -#include "libkmfl.h" - -// Globally loaded keyboards and instances -XKEYBOARD *p_installed_kbd[MAX_KEYBOARDS]={NULL}; -char * keyboard_filename[MAX_KEYBOARDS]; - -KMSI *p_first_instance={NULL}; -unsigned int n_keyboards=0; - -// Create a new keyboard mapping server instance -KMSI *kmfl_make_keyboard_instance(void *connection) -{ - KMSI *p_kmsi, *p; - - if((p_kmsi=(KMSI *)malloc(sizeof(KMSI)))) - { - p_kmsi->history = (ITEM *)malloc((MAX_HISTORY+2)*sizeof(ITEM)); - if(p_kmsi->history) - { - p_kmsi->connection = connection; - *p_kmsi->kbd_name = 0; - p_kmsi->keyboard = NULL; - p_kmsi->groups = NULL; - p_kmsi->rules = NULL; - p_kmsi->stores = NULL; - p_kmsi->strings = NULL; - p_kmsi->nhistory = 0; - - // Link to other keyboard instances - if(p_first_instance == NULL) - { - p_first_instance = p_kmsi; - p_kmsi->last = NULL; - } - else - { - for(p=p_first_instance; p->next!=NULL; p=p->next); - p->next = p_kmsi; - p_kmsi->last = p; - } - p_kmsi->next = NULL; - DBGMSG(1,"Keyboard instance created\n"); - return p_kmsi; - } - else - { - free(p_kmsi); - } - } - DBGMSG(1,"Unable to create keyboard instance!\n"); - return NULL; -} - -// Delete a keyboard mapping server instance -int kmfl_delete_keyboard_instance(KMSI *p_kmsi) -{ - KMSI *p1, *p2; - - // Remove this instance from chain of linked instances - p1 = p_kmsi->last; p2 = p_kmsi->next; - if(p1) p1->next = p2; else p_first_instance = p2; - if(p2) p2->last = p1; - - // Free allocated memory - if(p_kmsi->history) free(p_kmsi->history); - free(p_kmsi); - - DBGMSG(1,"Keyboard instance deleted\n"); - return 0; -} - -// Delete all server instances -int kmfl_delete_all_keyboard_instances(void) -{ - KMSI *p, *p1; - for(p=p_first_instance; p!=NULL; p=p1) - { - p1 = p->next; - kmfl_delete_keyboard_instance(p); - } - - return 0; -} - -// Attach a keyboard to a server instance -int kmfl_attach_keyboard(KMSI *p_kmsi, int keyboard_number) -{ - XKEYBOARD *p_kbd=NULL; - XGROUP *gp; - unsigned int n, nrules; - - if (p_installed_kbd[keyboard_number] == NULL) { - DBGMSG(1,"Invalid keyboard number\n"); - return -1; - } - - p_kbd=p_installed_kbd[keyboard_number]; - p_kmsi->keyboard = p_kbd; - p_kmsi->keyboard_number = keyboard_number; - - // Fill group, rule, store and string pointers - p_kmsi->stores = (XSTORE *)(p_kbd+1); - p_kmsi->groups = (XGROUP *)(p_kmsi->stores+p_kbd->nstores); - p_kmsi->rules = (XRULE *)(p_kmsi->groups+p_kbd->ngroups); - - for(n=nrules=0,gp=p_kmsi->groups; nngroups; n++, gp++) - { - nrules += gp->nrules; - } - - p_kmsi->strings = (ITEM *)(p_kmsi->rules+nrules); - - // Initialize history unless keyboard hasn't changed - if(strcmp(p_kbd->name,p_kmsi->kbd_name) != 0) - { - strncpy(p_kmsi->kbd_name,p_kbd->name, NAMELEN); - p_kmsi->kbd_name[NAMELEN]=0; - *p_kmsi->history = 0; - p_kmsi->nhistory = 0; - } - - DBGMSG(1,"Keyboard %s attached\n",p_kbd->name); - return 0; -} - -// Detach a keyboard from a server instance -int kmfl_detach_keyboard(KMSI *p_kmsi) -{ - if(p_kmsi) - DBGMSG(1,"Keyboard %s detached\n",p_kmsi->kbd_name); - - *p_kmsi->kbd_name = 0; - p_kmsi->keyboard = NULL; - p_kmsi->groups = NULL; - p_kmsi->rules = NULL; - p_kmsi->stores = NULL; - p_kmsi->strings = NULL; - return 0; -} - -XKEYBOARD * kmfl_load_keyboard_from_file(const char *filename) -{ - XKEYBOARD *p_kbd; - FILE *fp; - char version_string[6]={0}; - unsigned int filelen, kbver=0; - struct stat fstat; - const char * extension; - int errcode; - - DBGMSG(1,"DAR: kmfl_load_keyboard_from_file %s\n",filename); - - extension = strrchr(filename, '.'); - - if (extension && (strcmp(extension, ".kmn") == 0)) - { - - errcode = setjmp(fatal_error_buf); - - if (errcode == 0) - { - compile_keyboard_to_buffer(filename, (void *) &p_kbd); - memcpy(version_string,p_kbd->version,4); // Copy to ensure terminated - kbver = (unsigned)atoi(version_string); - } - else - { - return NULL; - } - } - else - { - // Get the file size - if(stat(filename,&fstat) != 0) - return NULL; - filelen = fstat.st_size; - - // Allocate memory for the installed keyboard - if((p_kbd=(XKEYBOARD *)malloc(filelen)) == NULL) - return NULL; - - // Open the file - if((fp=fopen(filename,"rb")) != NULL) - { - if (fread(p_kbd, 1, filelen, fp) != filelen) - { - fclose(fp); - return NULL; - } - fclose(fp); - memcpy(version_string,p_kbd->version,4); // Copy to ensure terminated - kbver = (unsigned)atoi(version_string); - } - } - // Check the loaded file is valid and has the correct version - if((memcmp(p_kbd->id,"KMFL",4) != 0) - || (p_kbd->version[4] != *FILE_VERSION) - || (kbver < (unsigned)atoi(BASE_VERSION)) - || (kbver > (unsigned)atoi(LAST_VERSION))) - { - DBGMSG(1, "Invalid version %s\n", version_string); - free(p_kbd); - return NULL; - } - - DBGMSG(1,"DAR: kmfl_load_keyboard_from_file - %s loaded\n",filename); - - return p_kbd; -} - -// Load the keyboard table into memory and assign it to an empty keyboard slot -int kmfl_load_keyboard(const char *file) -{ - XKEYBOARD *p_kbd; - int keyboard_number; - - // Check number of installed keyboards - if(n_keyboards >= MAX_KEYBOARDS) return -1; - - // initialize the installed keyboards array - if(n_keyboards == 0) - memset(p_installed_kbd, 0, sizeof(XKEYBOARD *) * MAX_KEYBOARDS); - - p_kbd = kmfl_load_keyboard_from_file(file); - - if (p_kbd == NULL) - return -1; - - // Find an empty slot - for (keyboard_number=0;keyboard_number < MAX_KEYBOARDS; keyboard_number++) - if (p_installed_kbd[keyboard_number] == NULL) - break; - - // Sanity check - if (keyboard_number == MAX_KEYBOARDS) { - DBGMSG(1, "Could not find an empty keyboard slot even though there was supposed to be one\n"); - free(p_kbd); - return -1; - } - - // Copy pointer and increment number of installed keyboards - p_installed_kbd[keyboard_number] = p_kbd; - keyboard_filename[keyboard_number]=strdup(file); - - n_keyboards++; - DBGMSG(1,"Keyboard %s loaded\n",p_kbd->name); - - return keyboard_number; -} - -// Check that a keyboard file is valid -int kmfl_check_keyboard(const char *file) -{ - XKEYBOARD xkb; - FILE *fp; - char version_string[6]={0}; - unsigned int kbver=0; - - // Open the file - if((fp=fopen(file,"rb")) == NULL) - return(-1); - - if (fread(&xkb, 1, sizeof(XKEYBOARD), fp) != sizeof(XKEYBOARD)) - { - fclose(fp); - return(-1); - } - - fclose(fp); - - memcpy(version_string,xkb.version,3); // Copy to ensure terminated - kbver = (unsigned)atoi(version_string); - - // Check the loaded file is valid and has the correct version - if(memcmp(xkb.id,"KMFL",4) != 0) - return(-2); - if(xkb.version[3] != *FILE_VERSION) - return(-2); - if(kbver < (unsigned)atoi(BASE_VERSION)) - return(-3); - if(kbver > (unsigned)atoi(LAST_VERSION)) - return(-4); - - return 0; // file appears to be valid -} - -// Reload a keyboard from a file -int kmfl_reload_keyboard(int keyboard_number) -{ - KMSI *p; - XKEYBOARD *p_kbd; - XKEYBOARD *p_newkbd; - - p_kbd =p_installed_kbd[keyboard_number]; - - if (p_kbd == NULL) - return -1; - - // Detach any instances of this keyboard - for(p=p_first_instance; p; p=p->next) - { - if(p->keyboard_number == keyboard_number) - kmfl_detach_keyboard(p); - } - - p_newkbd=kmfl_load_keyboard_from_file(keyboard_filename[keyboard_number]); - - if (p_newkbd == NULL) - return -1; - - p_installed_kbd[keyboard_number]=p_newkbd; - - free(p_kbd); - - // reattach this keyboard to instances using this keyboard - for(p=p_first_instance; p; p=p->next) - { - if(p->keyboard_number == keyboard_number) - kmfl_attach_keyboard(p, keyboard_number); - } - - return 0; -} - -// Reload all keyboards -int kmfl_reload_all_keyboards(void) -{ - int n; - - for(n=0; n < MAX_KEYBOARDS; n++) - { - if(p_installed_kbd[n] != NULL) - kmfl_reload_keyboard(n); - } - return 0; -} - -// Unload a keyboard that has been installed -int kmfl_unload_keyboard(int keyboard_number) -{ - KMSI *p; - XKEYBOARD *p_kbd=p_installed_kbd[keyboard_number]; - - if (p_kbd == NULL) - return -1; - - // Enumerate instances and ensure that no instances are using this keyboard - for(p=p_first_instance; p; p=p->next) - { - if(p->keyboard_number == keyboard_number) return 1; - } - - - // Remove keyboard from list and free memory - DBGMSG(1,"Keyboard %s unloaded\n",p_kbd->name); - free(keyboard_filename[keyboard_number]); - free(p_kbd); - - p_installed_kbd[keyboard_number]=NULL; - - n_keyboards--; - - return 0; -} - -// Unload all keyboards from memory -int kmfl_unload_all_keyboards(void) -{ - int n; - - for(n=0; n < MAX_KEYBOARDS; n++) - { - if(p_installed_kbd[n] != NULL) - kmfl_unload_keyboard(n); - } - n_keyboards = 0; - return 0; -} - -// Get the number of an installed keyboard from the name -int kmfl_keyboard_number(char *name) -{ - unsigned int n; - - for(n=0; nname,name) == 0) - return n; - } - return UNDEFINED; -} - -// Get the name of an installed keyboard from the number -const char *kmfl_keyboard_name(int keyboard_number) -{ - if(p_installed_kbd[keyboard_number] != NULL) - return p_installed_kbd[keyboard_number]->name; - else - return NULL; -} - -const char *kmfl_icon_file(int keyboard_number) -{ - XKEYBOARD *p_kbd; - XSTORE *stores; - XGROUP *groups, *gp; - XRULE *rules; - ITEM * strings; - UTF32 *p32; - UTF8 *p8; - unsigned int n, nrules; - static char icon_name[256]; - - *icon_name = 0; - - if((p_kbd=p_installed_kbd[keyboard_number]) != NULL) - { - stores = (XSTORE *)(p_kbd+1); - groups = (XGROUP *)(stores+p_kbd->nstores); - rules = (XRULE *)(groups+p_kbd->ngroups); - - for(n=nrules=0,gp=groups; nngroups; n++, gp++) - { - nrules += gp->nrules; - } - - strings = (ITEM *)(rules+nrules); - - if(stores[SS_BITMAP].len >= 0) - { - p32 = strings + stores[SS_BITMAP].items; - p8 = (UTF8 *)icon_name; - IConvertUTF32toUTF8((const UTF32**)&p32,p32+stores[SS_BITMAP].len,&p8,p8+255); - *p8 = 0; - } - } - return icon_name; -} diff --git a/linux/legacy/libkmfl/src/kmfl_messages.c b/linux/legacy/libkmfl/src/kmfl_messages.c deleted file mode 100644 index 033c86613c..0000000000 --- a/linux/legacy/libkmfl/src/kmfl_messages.c +++ /dev/null @@ -1,47 +0,0 @@ -/* kmfl_messages.c - * Copyright (C) 2005 SIL International - * - * This file is part of the KMFL library. - * - */ - -/* - - Keystroke interpreter for keyboard mapping for Linux project - - Version 1.000, January 2004, John Durdin, Tavultesoft - - Error reporting - -*/ - -#include -#include - -int kmfl_debug=0; - -void DBGMSG(int debug,const char *fmt,...) -{ - FILE * debugfile; - va_list args; - - if((debug<0) || ((kmfl_debug&debug)!=0)) - { - debugfile=fopen("/tmp/libkmfldebug.log", "a"); - fprintf(debugfile,"debug: "); - va_start(args,fmt); - vfprintf(debugfile,fmt,args); - va_end(args); - fclose(debugfile); - } -} - -void *ERRMSG(const char *fmt,...) -{ - va_list args; - fprintf(stderr,"error: "); - va_start(args, fmt); - vfprintf(stderr, fmt, args); - va_end(args); - return(NULL); -} diff --git a/linux/scripts/build.sh b/linux/scripts/build.sh index 9a6b960f4b..e8770b888f 100755 --- a/linux/scripts/build.sh +++ b/linux/scripts/build.sh @@ -1,24 +1,18 @@ #!/bin/bash # Build Keyman for Linux: keyboardprocessor ibus-keyman -# If BUILD_LEGACY is set instead, additionally build KMFL in the required order: -# kmflcomp libkmfl ibus-kmfl # It must be run from the keyman/linux directory set -e -BASEDIR=`pwd` +BASEDIR=$(pwd) INSTALLDIR=${INSTALLDIR:-"/usr/local"} CONFIGUREONLY=${CONFIGUREONLY:="no"} BUILDONLY=${BUILDONLY:="no"} -legacy_projects="" -if [ -n "$BUILD_LEGACY" ]; then - legacy_projects="kmflcomp libkmfl ibus-kmfl" -fi projects="ibus-keyman" if [[ "${CONFIGUREONLY}" != "no" && "${BUILDONLY}" != "no" ]]; then @@ -31,8 +25,8 @@ if [[ "${BUILDONLY}" == "no" ]]; then cd keyboardprocessor/arch/release echo "reconfiguring keyboardprocessor meson with prefix ${INSTALLDIR}" - meson configure -Dprefix=${INSTALLDIR} && ninja reconfigure - cd $BASEDIR + meson configure -Dprefix="${INSTALLDIR}" && ninja reconfigure + cd "$BASEDIR" fi if [[ "${CONFIGUREONLY}" == "no" ]]; then @@ -48,33 +42,28 @@ function buildproject() { local subdir=$2 echo "buildproject: proj=$proj, subdir=$subdir; pwd=$(pwd)" - if [ ! -f ${subdir}${proj}/configure ]; then + if [ ! -f "${subdir}${proj}/configure" ]; then echo "$proj is not set up with autoreconf. First run 'make reconf' or 'make devreconf'" exit 1 fi if [[ "${BUILDONLY}" == "no" ]]; then - rm -rf build-$proj + rm -rf "build-$proj" fi - mkdir -p build-$proj - cd build-$proj + mkdir -p "build-$proj" + cd "build-$proj" if [[ "${BUILDONLY}" == "no" ]]; then echo "Configuring $proj" - if [[ "${INSTALLDIR}" == "/tmp/kmfl" ]]; then # don't install ibus-kmfl or ibus-keyman into ibus - ../${subdir}$proj/configure KEYMAN_PROC_CFLAGS="-I\$(top_builddir)/../keyboardprocessor/arch/release/include -I\$(top_builddir)/../../common/include -I\$(top_builddir)/../../core/include" \ - CPPFLAGS="-I\$(top_builddir)/../build-kmflcomp -I\$(top_builddir)/../build-libkmfl" \ - KEYMAN_PROC_LIBS="-L`pwd`/../build-libkmfl/src -L`pwd`/../keyboardprocessor/arch/release/src -lkmnkbp0" \ - LDFLAGS="-L`pwd`/../build-kmflcomp/src -L`pwd`/../build-libkmfl/src" --prefix=${INSTALLDIR} --libexecdir=${INSTALLDIR}/lib/ibus - else # install ibus-kmfl and ibus-keyman into ibus - ../${subdir}$proj/configure KEYMAN_PROC_CFLAGS="-I\$(top_builddir)/../keyboardprocessor/arch/release/include -I\$(top_builddir)/../../common/include -I\$(top_builddir)/../../core/include" \ - CPPFLAGS="-I\$(top_builddir)/../build-kmflcomp -I\$(top_builddir)/../build-libkmfl" \ - LDFLAGS="-L`pwd`/../build-kmflcomp/src -L`pwd`/../build-libkmfl/src" \ - KEYMAN_PROC_LIBS="-L`pwd`/../build-libkmfl/src -L`pwd`/../keyboardprocessor/arch/release/src -lkmnkbp0" \ - --prefix=${INSTALLDIR} --libexecdir=${INSTALLDIR}/lib/ibus --datadir=/usr/share - fi - if [ -d ../${subdir}$proj/include ]; then - echo "copying $proj include files to kmfl dir" - mkdir kmfl - cp -a ../${subdir}$proj/include/*.h kmfl + if [[ "${INSTALLDIR}" == "/tmp/keyman" ]]; then # don't install ibus-keyman into ibus + "../${subdir}$proj/configure" KEYMAN_PROC_CFLAGS="-I\$(top_builddir)/../keyboardprocessor/arch/release/include -I\$(top_builddir)/../../common/include -I\$(top_builddir)/../../core/include" \ + CPPFLAGS="-I\$(top_builddir)/../build-keymancomp -I\$(top_builddir)/../build-libkeyman" \ + KEYMAN_PROC_LIBS="-L$(pwd)/../build-libkeyman/src -L$(pwd)/../keyboardprocessor/arch/release/src -lkmnkbp0" \ + LDFLAGS="-L$(pwd)/../build-keymancomp/src -L$(pwd)/../build-libkeyman/src" --prefix="${INSTALLDIR}" --libexecdir="${INSTALLDIR}/lib/ibus" + else # install ibus-keyman into ibus + "../${subdir}$proj/configure" KEYMAN_PROC_CFLAGS="-I\$(top_builddir)/../keyboardprocessor/arch/release/include -I\$(top_builddir)/../../common/include -I\$(top_builddir)/../../core/include" \ + CPPFLAGS="-I\$(top_builddir)/../build-keymancomp -I\$(top_builddir)/../build-libkeyman" \ + LDFLAGS="-L$(pwd)/../build-keymancomp/src -L$(pwd)/../build-libkeyman/src" \ + KEYMAN_PROC_LIBS="-L$(pwd)/../build-libkeyman/src -L$(pwd)/../keyboardprocessor/arch/release/src -lkmnkbp0" \ + --prefix="${INSTALLDIR}" --libexecdir="${INSTALLDIR}/lib/ibus" --datadir=/usr/share fi fi if [[ "${CONFIGUREONLY}" == "no" ]]; then @@ -85,13 +74,9 @@ function buildproject() { echo "Building $proj" make fi - cd $BASEDIR + cd "$BASEDIR" } -for proj in $legacy_projects; do - buildproject $proj legacy/ -done - for proj in $projects; do buildproject $proj done @@ -103,5 +88,5 @@ if [[ "${CONFIGUREONLY}" == "no" ]]; then fi make clean make - cd $BASEDIR + cd "$BASEDIR" fi diff --git a/linux/scripts/deb-packaging.sh b/linux/scripts/deb-packaging.sh new file mode 100755 index 0000000000..35416cc370 --- /dev/null +++ b/linux/scripts/deb-packaging.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +# Actions for creating a Debian source package. Used by deb-packaging.yml GHA. + +set -eu + +## START STANDARD BUILD SCRIPT INCLUDE +# adjust relative paths as necessary +THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")" +. "$(dirname "$THIS_SCRIPT")/../../resources/build/build-utils.sh" +## END STANDARD BUILD SCRIPT INCLUDE + +builder_describe \ + "Helper for building Debian packages." \ + "dependencies Install dependencies as found in debian/control" \ + "source+ Build source package" \ + "verify Verify API" \ + "--gha Build from GitHub Action" + +builder_parse "$@" + +cd "$REPO_ROOT/linux" + +if builder_has_option --gha; then + START_STEP="::group::${COLOR_GREEN}" + END_STEP="::endgroup::" +else + START_STEP="${COLOR_GREEN}" + END_STEP="" +fi + +if builder_start_action dependencies; then + sudo mk-build-deps --install --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control + builder_finish_action success dependencies + exit 0 +fi + +if builder_start_action source; then + echo "${START_STEP}Make source package for keyman${COLOR_RESET}" + + echo "${START_STEP}reconfigure${COLOR_RESET}" + ./scripts/reconf.sh keyman + echo "${END_STEP}" + + echo "${START_STEP}Make origdist${COLOR_RESET}" + ./scripts/dist.sh origdist keyman + echo "${END_STEP}" + + echo "${START_STEP}Make deb source${COLOR_RESET}" + ./scripts/deb.sh sourcepackage keyman + echo "${END_STEP}" + + mv builddebs/* "${OUTPUT_PATH:-..}" + + builder_finish_action success source + exit 0 +fi + +if builder_start_action verify; then + tar xf "${SRC_PKG}" + if [ ! -f debian/libkmnkbp0-0.symbols ]; then + echo ":warning: Missing libkmnkbp0-0.symbols file" + else + tmpDir=$(mktemp -d) + dpkg -x "${BIN_PKG}" "$tmpDir" + cd debian + dpkg-gensymbols -v"${PKG_VERSION}" -plibkmnkbp0-0 -e"${tmpDir}"/usr/lib/x86_64-linux-gnu/libkmnkbp0.so* -Olibkmnkbp0-0.symbols -c4 + echo ":heavy_check_mark: libkmnkbp0-0 API didn't change" + fi + builder_finish_action success verify + exit 0 +fi diff --git a/linux/scripts/deb.sh b/linux/scripts/deb.sh index 2c2effdfb2..f35d9e6a85 100755 --- a/linux/scripts/deb.sh +++ b/linux/scripts/deb.sh @@ -5,20 +5,16 @@ # It must be run from the keyman/linux directory -# parameters: [BUILD_LEGACY=1] ./deb.sh [sourcepackage] [proj] [dist] +# parameters: ./deb.sh [sourcepackage] [proj] [dist] # sourcepackage = only create Debian source package # proj = only build for this project # dist = only build for this distribution -# BUILD_LEGACY = also build legacy KMFL packages set -e all_distributions="focal" distributions="" all_projects="keyman" -if [ -n "$BUILD_LEGACY" ]; then - all_projects="keyman kmflcomp libkmfl ibus-kmfl" -fi projects="" echo "all_distributions: ${all_distributions}" echo "all_projects: ${all_projects}" @@ -87,27 +83,25 @@ mkdir -p builddebs # make the source packages cd builddebs for proj in ${projects}; do - vers=`ls ../dist/${proj}_*.orig.tar.gz` + vers=$(ls ../dist/${proj}_*.orig.tar.gz) #echo "vers1:${vers}" vers=${vers##*_} #echo "vers2:${vers}" vers=${vers%*.orig.tar.gz} #echo "vers3:${vers}" - cp -a ../dist/${proj}_${vers}.orig.tar.gz . - tar xfz ${proj}_${vers}.orig.tar.gz + cp -a "../dist/${proj}_${vers}.orig.tar.gz" . + tar xfz "${proj}_${vers}.orig.tar.gz" if [ "keyman" == "$proj" ]; then - cp -a ../../debian ${proj}-${vers} - else - cp -a ../legacy/${proj}/debian ${proj}-${vers} + cp -a ../../debian "${proj}-${vers}" fi - cd ${proj}-${vers} - dch -v ${vers}-1 "local build" + cd "${proj}-${vers}" + dch -v "${vers}-1" "local build" echo "${proj}-${vers}" debuild -d -S -sa -Zxz -us -uc - cd $BASEDIR/builddebs - rm -rf ${proj}-${vers} + cd "$BASEDIR/builddebs" + rm -rf "${proj}-${vers}" done -cd $BASEDIR +cd "$BASEDIR" if [ "$1" == "sourcepackage" ]; then exit 0 @@ -117,13 +111,13 @@ fi for proj in ${projects}; do cd builddebs echo "$proj version ${vers}" - rm -rf ${proj}-${vers} - dpkg-source -x ${proj}_${vers}-1.dsc - cd ${proj}-${vers} + rm -rf "${proj}-${vers}" + dpkg-source -x "${proj}_${vers}-1.dsc" + cd "${proj}-${vers}" for dist in ${distributions}; do - dch -v ${vers}-1+${dist} "local build for ${dist}" + dch -v "${vers}-1+${dist}" "local build for ${dist}" echo "dist: $dist" DIST=${dist} pdebuild --pbuilder cowbuilder --buildresult /var/cache/pbuilder/result/${dist} -- --basepath /var/cache/pbuilder/base-${dist}.cow --distribution ${dist} --override-config --othermirror="deb [trusted=yes] file:/var/cache/pbuilder/result/${dist} ./" --bindmounts /var/cache/pbuilder/result/${dist} --hookdir /var/cache/pbuilder/hook.d/${dist} done - cd ${BASEDIR} + cd "${BASEDIR}" done diff --git a/linux/scripts/dist.sh b/linux/scripts/dist.sh index 7bc54e3722..056bf44aaa 100755 --- a/linux/scripts/dist.sh +++ b/linux/scripts/dist.sh @@ -3,10 +3,9 @@ # Build dist tarballs or Debian orig tarballs # and put them in dist/ -# parameters: [BUILD_LEGACY=1] ./dist.sh [origdist] [proj] +# parameters: ./dist.sh [origdist] [proj] # origdist = create Debian orig.tar.gz # proj = only make tarball for this project -# BUILD_LEGACY = additionaly build legacy KMFL tarballs set -e @@ -17,13 +16,8 @@ THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BA ## END STANDARD BUILD SCRIPT INCLUDE BASEDIR=$(pwd) -legacy_projects="" extra_projects="keyman" -if [ -n "$BUILD_LEGACY" ]; then - legacy_projects="kmflcomp libkmfl ibus-kmfl" -fi - if [ "$1" == "origdist" ]; then create_origdist=1 shift @@ -32,11 +26,7 @@ fi if [ "$1" != "" ]; then echo "$1" if [ "$1" == "keyman" ]; then - legacy_projects="" extra_projects="$1" - elif [ -d "legacy/$1" ]; then - legacy_projects="$1" - extra_projects="" else echo "project $1 does not exist" exit 1 @@ -47,24 +37,12 @@ rm -rf dist mkdir -p dist # configure and make dist for autotool projects -for proj in ${legacy_projects}; do - echo "configure $proj" - cd legacy/$proj - rm -rf ../../build-$proj - mkdir -p ../../build-$proj - cd ../../build-$proj - GTK_CFLAGS="-I/usr/include/gtk-3.0" GTK_LIBS="-lgtk-3 -lgdk-3" JSON_GLIB_CFLAGS="-I/usr/include/json-glib-1.0" JSON_GLIB_LIBS="-ljson-glib-1.0" KEYMAN_PROC_CFLAGS="-I/usr/include/keyman" KEYMAN_PROC_LIBS="-lkmnkbp" ../legacy/$proj/configure - make dist - mv *.tar.gz ../dist - cd $BASEDIR -done - for proj in ${extra_projects}; do # dist for keyman cp -a debian ../ cd .. echo "3.0 (native)" > debian/source/format - dch keyman --newversion ${VERSION} --force-bad-version --nomultimaint + dch keyman --newversion "${VERSION}" --force-bad-version --nomultimaint dpkg-source --tar-ignore=*~ --tar-ignore=.git --tar-ignore=.gitattributes \ --tar-ignore=.gitignore --tar-ignore=experiments --tar-ignore=debian \ --tar-ignore=.github --tar-ignore=.vscode --tar-ignore=android \ @@ -74,7 +52,7 @@ for proj in ${extra_projects}; do --tar-ignore=developer --tar-ignore=docs --tar-ignore=ios \ --tar-ignore=linux/keyman-config/buildtools/build-langtags.py --tar-ignore=__pycache__ \ --tar-ignore=linux/help --tar-ignore=linux/Jenkinsfile \ - --tar-ignore=linux/keyboardprocessor --tar-ignore=linux/legacy \ + --tar-ignore=linux/keyboardprocessor \ --tar-ignore=mac --tar-ignore=node_modules --tar-ignore=oem \ --tar-ignore=linux/build* --tar-ignore=core/build \ --tar-ignore=resources/devbox --tar-ignore=resources/git-hooks \ @@ -84,27 +62,18 @@ for proj in ${extra_projects}; do --tar-ignore=web --tar-ignore=windows --tar-ignore=keyman_1* \ --tar-ignore=dist --tar-ignore=.pbuilderrc --tar-ignore=VERSION \ --tar-ignore=scripts -Zgzip -b . - mv ../keyman_${VERSION}.tar.gz linux/dist/keyman-${VERSION}.tar.gz + mv ../keyman_"${VERSION}".tar.gz linux/dist/keyman-"${VERSION}".tar.gz echo "3.0 (quilt)" > debian/source/format - cd $BASEDIR + cd "$BASEDIR" done # create orig.tar.gz if [ -n "$create_origdist" ]; then cd dist - for proj in ${legacy_projects}; do - tmp=$(basename ${proj}*.tar.gz .tar.gz) - origname=${tmp/$proj-/$proj\_} - index=$(expr index "${origname}" _) - mv $proj*.tar.gz ${origname}.orig.tar.gz - done - - for proj in ${extra_projects}; do - pkgvers="keyman-$VERSION" - tar xfz keyman-${VERSION}.tar.gz - mv -v keyman ${pkgvers} 2>/dev/null || mv -v $(find . -mindepth 1 -maxdepth 1 -type d) ${pkgvers} - tar cfz keyman_${VERSION}.orig.tar.gz ${pkgvers} - rm keyman-${VERSION}.tar.gz - rm -rf ${pkgvers} - done + pkgvers="keyman-$VERSION" + tar xfz keyman-"${VERSION}".tar.gz + mv -v keyman "${pkgvers}" 2>/dev/null || mv -v "$(find . -mindepth 1 -maxdepth 1 -type d)" "${pkgvers}" + tar cfz "keyman_${VERSION}.orig.tar.gz" "${pkgvers}" + rm "keyman-${VERSION}.tar.gz" + rm -rf "${pkgvers}" fi diff --git a/linux/scripts/install.sh b/linux/scripts/install.sh index f0edce2f4f..081f44e93f 100755 --- a/linux/scripts/install.sh +++ b/linux/scripts/install.sh @@ -1,27 +1,17 @@ #!/bin/bash # Install keyboardprocessor, ibus-keyman and keyman-config -# If BUILD_LEGACY is set this also install kmflcomp, libkmfl, and ibus-kmfl. # It must be run from the keyman/linux directory -# To install the ibus-kmfl xml file and icons to /usr/share so that ibus -# will use ibus-kmfl you must run SUDOINSTALL="yes" ./scripts/build.sh -# This will install everything else to /usr/local - set -e -BASEDIR=`pwd` +BASEDIR=$(pwd) SUDOINSTALL=${SUDOINSTALL:-"no"} INSTALLDIR=${INSTALLDIR:-"/usr/local"} -legacy_projects="" -if [ -n "$BUILD_LEGACY" ]; then - legacy_projects="kmflcomp libkmfl ibus-kmfl" -fi - if [[ "${SUDOINSTALL}" != "no" ]]; then if [ "$EUID" -ne 0 ] then @@ -30,17 +20,6 @@ if [[ "${SUDOINSTALL}" != "no" ]]; then fi fi -if [ -f "/usr/share/ibus/component/kmfl.xml" ] && [ "${SUDOINSTALL}" == "yes" ]; then - if grep -Fq "/usr/lib/ibus" /usr/share/ibus/component/kmfl.xml - then - echo "component file is in ibus-kmfl package version so move it" - echo "run 'sudo make uninstall' to put it back" - mv /usr/share/ibus/component/kmfl.xml /usr/share/doc/ibus-kmfl/ - else - echo "component file is local one so overwrite it" - fi -fi - if [ -f "/usr/share/ibus/component/keyman.xml" ] && [ "${SUDOINSTALL}" == "yes" ]; then if grep -Fq "/usr/lib/ibus" /usr/share/ibus/component/keyman.xml then @@ -52,30 +31,27 @@ if [ -f "/usr/share/ibus/component/keyman.xml" ] && [ "${SUDOINSTALL}" == "yes" fi fi - cd keyboardprocessor/arch/release ninja install -cd $BASEDIR +cd "$BASEDIR" -for proj in ${legacy_projects} ibus-keyman; do - cd build-$proj - if [[ "${SUDOINSTALL}" == "uninstall" ]]; then - if [ ! -f Makefile ]; then - echo "$proj must be configured before it is uninstalled. First run 'make configure'" - exit 1 - fi - echo "doing make uninstall of $proj" - make uninstall - else - if [ ! -f Makefile ]; then - echo "$proj must be configured and built before it is installed. First run 'make' or 'make tmpinstall'" - exit 1 - fi - echo "doing make install of $proj" - make install - fi - cd $BASEDIR -done +cd build-ibus-keyman +if [[ "${SUDOINSTALL}" == "uninstall" ]]; then + if [ ! -f Makefile ]; then + echo "ibus-keyman must be configured before it is uninstalled. First run 'make configure'" + exit 1 + fi + echo "doing make uninstall of ibus-keyman" + make uninstall +else + if [ ! -f Makefile ]; then + echo "ibus-keyman must be configured and built before it is installed. First run 'make' or 'make tmpinstall'" + exit 1 + fi + echo "doing make install of ibus-keyman" + make install +fi +cd "$BASEDIR" cd keyman-config echo "SUDOINSTALL: ${SUDOINSTALL}" @@ -96,12 +72,7 @@ else echo "doing /tmp install of keyman-config" make install-temp fi -cd $BASEDIR - -if [ -f "/usr/share/doc/ibus-kmfl/kmfl.xml" ] && [ "${SUDOINSTALL}" == "uninstall" ]; then - echo "putting ibus-kmfl package component file back" - mv /usr/share/doc/ibus-kmfl/kmfl.xml /usr/share/ibus/component/ -fi +cd "$BASEDIR" if [ -f "/usr/share/doc/ibus-keyman/keyman.xml" ] && [ "${SUDOINSTALL}" == "uninstall" ]; then echo "putting ibus-keyman package component file back" diff --git a/linux/scripts/jenkins.sh b/linux/scripts/jenkins.sh index da62e6b74d..edac87d30f 100755 --- a/linux/scripts/jenkins.sh +++ b/linux/scripts/jenkins.sh @@ -1,5 +1,5 @@ #!/bin/bash -# $1 - project name with appended tier, e.g. ibus-kmfl-alpha +# $1 - project name with appended tier, e.g. keyman-alpha # $2 - GPG key used for signing the source package set -e @@ -51,7 +51,7 @@ checkAndInstallRequirements() if [ -n "$TOINSTALL" ]; then sudo apt-get update - sudo apt-get -qy install $TOINSTALL + sudo apt-get -qy install "$TOINSTALL" fi sudo mk-build-deps debian/control @@ -65,8 +65,8 @@ checkAndInstallRequirements echo_heading "cleaning previous builds of $1" rm -rf builddebs -rm -rf $sourcedir/${1}_*.{dsc,build,buildinfo,changes,tar.?z,log} -rm -rf $sourcedir/../${1}_*.{dsc,build,buildinfo,changes,tar.?z,log} +rm -rf "$sourcedir/${1}"_*.{dsc,build,buildinfo,changes,tar.?z,log} +rm -rf "$sourcedir/../${1}"_*.{dsc,build,buildinfo,changes,tar.?z,log} echo_heading "Make source package for $fullsourcename" echo_heading "reconfigure" @@ -75,17 +75,17 @@ TIER="$tier" ./scripts/reconf.sh $sourcename echo_heading "Make origdist" ./scripts/dist.sh origdist $sourcename echo_heading "Make deb source" -./scripts/deb.sh sourcepackage $proj +./scripts/deb.sh sourcepackage "$proj" #sign source package -for file in $(ls builddebs/*.dsc); do +for file in builddebs/*.dsc; do echo_heading "Signing source package $file" - debsign -k$2 $file + debsign -k"$2" "$file" done if [ "$proj" == "keyman" ]; then mv builddebs/* .. else - mkdir -p $sourcedir - mv builddebs/* $sourcedir + mkdir -p "$sourcedir" + mv builddebs/* "$sourcedir" fi diff --git a/linux/scripts/package-build.inc.sh b/linux/scripts/package-build.inc.sh index 8ef2610c55..ee85f29a22 100644 --- a/linux/scripts/package-build.inc.sh +++ b/linux/scripts/package-build.inc.sh @@ -13,15 +13,13 @@ function checkPrerequisites() { exit 1 fi - if [ ! $(which xmllint) ]; then + if ! which xmllint > /dev/null; then echo "you must install xmllint (libxml2-utils package) to use this script" exit 1 fi if [ "${PROJECT}" != "" ]; then projects="${PROJECT}" - elif [ -n "${BUILD_LEGACY}" ]; then - projects="keyman kmflcomp libkmfl ibus-kmfl" else projects="keyman" fi @@ -32,9 +30,7 @@ function downloadSource() { packageDir=$1 if [ "${proj}" == "keyman" ]; then - cd ${BASEDIR} - else - cd legacy/${proj} + cd "${BASEDIR}" || exit fi if [ "${proj}" == "keyman" ]; then @@ -42,19 +38,19 @@ function downloadSource() { fi # Update tier in Debian watch files (replacing any previously set tier) and remove comment - sed -e "s/\$tier\|alpha\|beta\|stable/${TIER}/g" -e "s/^# .*$//" $BASEDIR/scripts/watch.in > debian/watch + sed -e "s/\$tier\|alpha\|beta\|stable/${TIER}/g" -e "s/^# .*$//" "$BASEDIR"/scripts/watch.in > debian/watch version=$(uscan --report --dehs|xmllint --xpath "//dehs/upstream-version/text()" -) dirversion=$(uscan --report --dehs|xmllint --xpath "//dehs/upstream-url/text()" - | cut -d/ -f6) echo "${proj} version is ${version}" uscan || (echo "ERROR: No new version available for ${proj}" >&2 && exit 1) cd .. - mv ${proj}-${version} ${BASEDIR}/${packageDir} - mv ${proj}_${version}.orig.tar.gz ${BASEDIR}/${packageDir} - mv ${proj}-${version}.tar.gz ${BASEDIR}/${packageDir} - mv ${proj}*.asc ${BASEDIR}/${packageDir} - rm ${proj}*.debian.tar.xz - cd ${BASEDIR}/${packageDir} + mv "${proj}-${version}" "${BASEDIR}/${packageDir}" + mv "${proj}_${version}.orig.tar.gz" "${BASEDIR}/${packageDir}" + mv "${proj}-${version}.tar.gz" "${BASEDIR}/${packageDir}" + mv "${proj}"*.asc "${BASEDIR}/${packageDir}" + rm "${proj}"*.debian.tar.xz + cd "${BASEDIR}/${packageDir}" || exit wget -N https://downloads.keyman.com/linux/${TIER}/${dirversion}/SHA256SUMS - sha256sum -c --ignore-missing SHA256SUMS |grep ${proj} + sha256sum -c --ignore-missing SHA256SUMS |grep "${proj}" } diff --git a/linux/scripts/reconf.sh b/linux/scripts/reconf.sh index 458c2397e9..858b0e2484 100755 --- a/linux/scripts/reconf.sh +++ b/linux/scripts/reconf.sh @@ -2,8 +2,7 @@ # autoreconf autotool projects -# parameters: [BUILD_LEGACY=1] ./reconf.sh [proj] -# BUILD_LEGACY=1 to also build legacy KMFL projects +# parameters: ./reconf.sh [proj] # proj = only reconf this project set -e @@ -16,10 +15,6 @@ THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BA BASEDIR="$KEYMAN_ROOT/linux" echo "basedir is $BASEDIR" -legacy_projects="" -if [ -n "$BUILD_LEGACY" ]; then - legacy_projects="kmflcomp libkmfl ibus-kmfl" -fi autotool_projects="ibus-keyman" extra_projects="keyboardprocessor keyman-config" @@ -27,27 +22,19 @@ if [ "$1" != "" ]; then if [ "$1" == "keyman" ]; then echo "reconfiguring only keyman" extra_projects="keyman" - legacy_projects="" autotool_projects="" elif [ "$1" == "keyboardprocessor" ]; then echo "reconfiguring only keyboardprocessor" extra_projects="keyboardprocessor" - legacy_projects="" autotool_projects="" elif [ "$1" == "keyman-config" ]; then echo "reconfiguring only keyman-config" extra_projects="keyman-config" - legacy_projects="" autotool_projects="" elif [ -d "$1" ]; then echo "reconfiguring only $1" extra_projects="" - legacy_projects="" autotool_projects="$1" - elif [ -d "legacy/$1" ]; then - extra_projects="" - legacy_projects="$1" - autotool_projects="" else echo "project $1 does not exist" exit 1 @@ -58,28 +45,20 @@ echo "Found tier ${TIER}, version ${VERSION}" # autoreconf the projects for proj in ${autotool_projects}; do - cd $proj + cd "$proj" echo "Reconfiguring $proj to version ${VERSION}" autoreconf -if rm -rf autom4te.cache - cd $BASEDIR -done - -for proj in ${legacy_projects}; do - cd legacy/$proj - echo "Reconfiguring $proj to version ${VERSION}" - autoreconf -if - rm -rf autom4te.cache - cd $BASEDIR + cd "$BASEDIR" done for proj in ${extra_projects}; do - if [ "${proj}" == "keyboardprocessor" -o "${proj}" == "keyman" ]; then + if [ "${proj}" == "keyboardprocessor" ] || [ "${proj}" == "keyman" ]; then rm -rf keyboardprocessor cp ../VERSION.md ../core/ ../core/build.sh -t keyboardprocessor configure fi - if [ "${proj}" == "keyman-config" -o "${proj}" == "keyman" ]; then + if [ "${proj}" == "keyman-config" ] || [ "${proj}" == "keyman" ]; then cd keyman-config make clean cd keyman_config @@ -95,5 +74,5 @@ for proj in ${extra_projects}; do version.py.in > version.py cd ../buildtools && python3 ./build-langtags.py fi - cd $BASEDIR + cd "$BASEDIR" done diff --git a/linux/scripts/upload-to-debian.sh b/linux/scripts/upload-to-debian.sh index 1474b281b4..23622f86a6 100755 --- a/linux/scripts/upload-to-debian.sh +++ b/linux/scripts/upload-to-debian.sh @@ -104,7 +104,7 @@ cp debianpackage/keyman-*/debian/changelog debian/ git add debian/changelog git commit -m "chore(linux): Update debian changelog" if [ -n "$PUSH" ]; then - $NOOP git push origin chore/linux/changelog + $NOOP git push --force-with-lease origin chore/linux/changelog fi if $ISBETA; then @@ -116,7 +116,7 @@ fi git checkout -B chore/linux/cherry-pick/changelog ${CLBRANCH} git cherry-pick -x chore/linux/changelog if [ -n "$PUSH" ]; then - $NOOP git push origin chore/linux/cherry-pick/changelog + $NOOP git push --force-with-lease origin chore/linux/cherry-pick/changelog fi echo_heading "Finishing" diff --git a/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj b/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj index f208b87d0f..a7ca883cf1 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj +++ b/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj @@ -166,6 +166,24 @@ 298566BF29802963004ACA95 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/KMKeyboardHelpWindowController.strings; sourceTree = ""; }; 298566C029802963004ACA95 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/MainMenu.strings; sourceTree = ""; }; 298566C129802970004ACA95 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = ""; }; + 298566C82980C9AD004ACA95 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/KMAboutWindowController.strings; sourceTree = ""; }; + 298566C92980C9AD004ACA95 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/preferences.strings; sourceTree = ""; }; + 298566CA2980C9AD004ACA95 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/KMInfoWindowController.strings; sourceTree = ""; }; + 298566CB2980C9AE004ACA95 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/KMKeyboardHelpWindowController.strings; sourceTree = ""; }; + 298566CC2980C9AE004ACA95 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/MainMenu.strings; sourceTree = ""; }; + 298566CD2980C9B9004ACA95 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = ""; }; + 298566D42980D47C004ACA95 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/KMAboutWindowController.strings; sourceTree = ""; }; + 298566D52980D47D004ACA95 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/preferences.strings; sourceTree = ""; }; + 298566D62980D47D004ACA95 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/KMInfoWindowController.strings; sourceTree = ""; }; + 298566D72980D47D004ACA95 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/KMKeyboardHelpWindowController.strings; sourceTree = ""; }; + 298566D82980D47E004ACA95 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/MainMenu.strings; sourceTree = ""; }; + 298566D92980D489004ACA95 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/Localizable.strings; sourceTree = ""; }; + 298566E02980E579004ACA95 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/KMAboutWindowController.strings; sourceTree = ""; }; + 298566E12980E579004ACA95 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/preferences.strings; sourceTree = ""; }; + 298566E22980E57A004ACA95 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/KMInfoWindowController.strings; sourceTree = ""; }; + 298566E32980E57A004ACA95 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/KMKeyboardHelpWindowController.strings; sourceTree = ""; }; + 298566E42980E57A004ACA95 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/MainMenu.strings; sourceTree = ""; }; + 298566E52980E584004ACA95 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = ""; }; 299B5E1E29126CA20070841D /* keyman-icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "keyman-icon@2x.png"; sourceTree = ""; }; 299B5E1F29126CA20070841D /* keyman-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "keyman-icon.png"; sourceTree = ""; }; 29A4730527E9D6D500DE07C7 /* ha */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ha; path = ha.lproj/KMAboutWindowController.strings; sourceTree = ""; }; @@ -760,8 +778,11 @@ nl, "zh-Hans", "ff-NG", - kn, cs, + kn, + sv, + uk, + ru, ); mainGroup = 989C9BFF1A7876DE00A20425; productRefGroup = 989C9C091A7876DE00A20425 /* Products */; @@ -1009,8 +1030,11 @@ 29B27FF229062FF50036917E /* nl */, 29B6BB5B292239B4008F04BD /* zh-Hans */, 2901BA8A292332B3009903EC /* ff-NG */, - 29781101297FB262007C886D /* kn */, 298566BC29802962004ACA95 /* cs */, + 29781101297FB262007C886D /* kn */, + 298566C82980C9AD004ACA95 /* sv */, + 298566D42980D47C004ACA95 /* uk */, + 298566E02980E579004ACA95 /* ru */, ); name = KMAboutWindowController.xib; sourceTree = ""; @@ -1031,8 +1055,11 @@ 29B27FF329062FF50036917E /* nl */, 29B6BB5C292239B4008F04BD /* zh-Hans */, 2901BA8B292332B3009903EC /* ff-NG */, - 29781102297FB262007C886D /* kn */, 298566BD29802963004ACA95 /* cs */, + 29781102297FB262007C886D /* kn */, + 298566C92980C9AD004ACA95 /* sv */, + 298566D52980D47D004ACA95 /* uk */, + 298566E12980E579004ACA95 /* ru */, ); name = preferences.xib; path = Keyman4MacIM/KMConfiguration; @@ -1053,8 +1080,11 @@ 29B27FF7290630170036917E /* nl */, 29B6BB60292239DC008F04BD /* zh-Hans */, 2901BA8F292332CF009903EC /* ff-NG */, - 29781106297FB27E007C886D /* kn */, 298566C129802970004ACA95 /* cs */, + 29781106297FB27E007C886D /* kn */, + 298566CD2980C9B9004ACA95 /* sv */, + 298566D92980D489004ACA95 /* uk */, + 298566E52980E584004ACA95 /* ru */, ); name = Localizable.strings; sourceTree = ""; @@ -1075,8 +1105,11 @@ 29B27FF429062FF50036917E /* nl */, 29B6BB5D292239B4008F04BD /* zh-Hans */, 2901BA8C292332B3009903EC /* ff-NG */, - 29781103297FB263007C886D /* kn */, 298566BE29802963004ACA95 /* cs */, + 29781103297FB263007C886D /* kn */, + 298566CA2980C9AD004ACA95 /* sv */, + 298566D62980D47D004ACA95 /* uk */, + 298566E22980E57A004ACA95 /* ru */, ); name = KMInfoWindowController.xib; path = Keyman4MacIM/KMInfoWindow; @@ -1098,8 +1131,11 @@ 29B27FF529062FF60036917E /* nl */, 29B6BB5E292239B4008F04BD /* zh-Hans */, 2901BA8D292332B3009903EC /* ff-NG */, - 29781104297FB263007C886D /* kn */, 298566BF29802963004ACA95 /* cs */, + 29781104297FB263007C886D /* kn */, + 298566CB2980C9AE004ACA95 /* sv */, + 298566D72980D47D004ACA95 /* uk */, + 298566E32980E57A004ACA95 /* ru */, ); name = KMKeyboardHelpWindowController.xib; path = Keyman4MacIM/KMKeyboardHelpWindow; @@ -1121,8 +1157,11 @@ 29B27FF629062FF60036917E /* nl */, 29B6BB5F292239B4008F04BD /* zh-Hans */, 2901BA8E292332B4009903EC /* ff-NG */, - 29781105297FB263007C886D /* kn */, 298566C029802963004ACA95 /* cs */, + 29781105297FB263007C886D /* kn */, + 298566CC2980C9AE004ACA95 /* sv */, + 298566D82980D47E004ACA95 /* uk */, + 298566E42980E57A004ACA95 /* ru */, ); name = MainMenu.xib; sourceTree = ""; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMAboutWindow/ru.lproj/KMAboutWindowController.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMAboutWindow/ru.lproj/KMAboutWindowController.strings new file mode 100644 index 0000000000..4f3099f1e1 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMAboutWindow/ru.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/KMAboutWindow/shu-latn-n.lproj/KMAboutWindowController.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMAboutWindow/shu-latn-n.lproj/KMAboutWindowController.strings new file mode 100644 index 0000000000..f98a1ec607 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMAboutWindow/shu-latn-n.lproj/KMAboutWindowController.strings @@ -0,0 +1,8 @@ +/* button text to close the About window */ +"Kab-Up-fYH.title" = "Sidda"; + +/* text of link to the license agreement */ +"hYC-Bx-aoP.title" = "Muwafiqa hana izin"; + +/* button text to open Configuration window */ +"vkh-b5-vO7.title" = "Wasiyana..."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMAboutWindow/sv.lproj/KMAboutWindowController.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMAboutWindow/sv.lproj/KMAboutWindowController.strings new file mode 100644 index 0000000000..a83caa4a49 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMAboutWindow/sv.lproj/KMAboutWindowController.strings @@ -0,0 +1,8 @@ +/* button text to close the About window */ +"Kab-Up-fYH.title" = "Stäng"; + +/* text of link to the license agreement */ +"hYC-Bx-aoP.title" = "Licensavtal"; + +/* button text to open Configuration window */ +"vkh-b5-vO7.title" = "Konfiguration..."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMAboutWindow/uk.lproj/KMAboutWindowController.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMAboutWindow/uk.lproj/KMAboutWindowController.strings new file mode 100644 index 0000000000..bc2095eafa --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMAboutWindow/uk.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/ru.lproj/preferences.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/ru.lproj/preferences.strings new file mode 100644 index 0000000000..24b4393b03 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/ru.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" = "Использовать подробное ведение журнала Консоли"; + +/* Support button text */ +"93O-x6-RLF.label" = "Поддержка"; + +/* Download Keyboard button text */ +"CTw-kf-WNS.title" = "Скачать клавиатуру..."; + +/* Keyman Configuration window title */ +"F0z-JX-Cv5.title" = "Настройки Keyman"; + +/* button text to go back to previous page */ +"JOK-JV-n8w.title" = "Назад"; + +/* Keyboards button text */ +"MPN-9N-wWc.label" = "Keyboards"; + +/* text to explain verbose Console logging option */ +"MrI-GM-7d6.title" = "Когда включена опция ведения подробного журнала, Keyman будет записывать действия, которые могут помочь в диагностировании проблемы с помощью Keyman Support. Программа консоли может быть использована для просмотра журнала сообщений от Keyman. В консоли фильтровать для показа всех сообщений из процесса \"Keyman\". Этот журнал можно экспортировать и при необходимости отправлять в службу поддержки Keyman."; + +/* 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" = "Включите это, если у вас возникли проблемы с определенной клавиатурой или с Keyman в целом."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/shu-latn-n.lproj/preferences.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/shu-latn-n.lproj/preferences.strings new file mode 100644 index 0000000000..537a73e885 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/shu-latn-n.lproj/preferences.strings @@ -0,0 +1,38 @@ +/* Checkbox text to always show on-screen keyboard */ +"4UX-80-0Vo.title" = "Matakula war keyboard albinshaf"; + +/* Checkbox text to enable verbose Console logging */ +"7J6-zy-R20.title" = "Annaf bey verbose console logging"; + +/* Support button text */ +"93O-x6-RLF.label" = "Mi'awana"; + +/* Download Keyboard button text */ +"CTw-kf-WNS.title" = "Dyssal keyboard..."; + +/* Keyman Configuration window title */ +"F0z-JX-Cv5.title" = "Ta'adil hana Keyman"; + +/* button text to go back to previous page */ +"JOK-JV-n8w.title" = "Wara"; + +/* Keyboards button text */ +"MPN-9N-wWc.label" = "Keyboards"; + +/* text to explain verbose Console logging option */ +"MrI-GM-7d6.title" = "Kan verbose logging mafkuk da, alshu'ul bi'awwun Keyman ley eirfiyan shunu min mashakil kan gamma. Alshu'ul hanal console binnafu beya ley shafian risalat min Keyman. Fyl console da, dyssa ley eiwari risalat chatta min darb albisawwi hana \"Keyman\". Alshu'ul da bikun bisullu wa biluzzu ley Keyman kan murada gamma."; + +/* button text to move forward to the next page */ +"eXr-8V-h1g.title" = "Giddam"; + +/* button text to return to the home help page */ +"fXS-aC-CMH.title" = "Bidaya"; + +/* Options button text */ +"frd-No-seV.label" = "Durub"; + +/* Installed Keyboard column heading */ +"jex-Nd-Qzg.headerCell.title" = "Dyssal keyboard"; + +/* Verbose logging tooltip text */ +"uWx-3J-U0D.ibShadowedToolTip" = "Fukkal shu'ul da kan ligyt mashakil bey keyboard khassa walla bey Keyman zaata."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/sv.lproj/preferences.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/sv.lproj/preferences.strings new file mode 100644 index 0000000000..88d3107cba --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/sv.lproj/preferences.strings @@ -0,0 +1,38 @@ +/* Checkbox text to always show on-screen keyboard */ +"4UX-80-0Vo.title" = "Visa alltid skärmtangentbord"; + +/* Checkbox text to enable verbose Console logging */ +"7J6-zy-R20.title" = "Använd verbose Console-loggning"; + +/* Support button text */ +"93O-x6-RLF.label" = "Stöd"; + +/* Download Keyboard button text */ +"CTw-kf-WNS.title" = "Ladda ner tangentbord..."; + +/* Keyman Configuration window title */ +"F0z-JX-Cv5.title" = "Keyman konfiguration"; + +/* button text to go back to previous page */ +"JOK-JV-n8w.title" = "Tillbaka"; + +/* Keyboards button text */ +"MPN-9N-wWc.label" = "Keyboards"; + +/* text to explain verbose Console logging option */ +"MrI-GM-7d6.title" = "När verbose loggning alternativet är på, kommer Keyman logga åtgärder som kan hjälpa Keyman Support diagnostisera ett problem. Programmet Konsol kan användas för att se en logg av meddelanden från Keyman. I Console, filter för att visa alla meddelanden från \"Keyman\" processen. Denna logg kan exporteras och skickas till Keyman support om det behövs."; + +/* button text to move forward to the next page */ +"eXr-8V-h1g.title" = "Framåt"; + +/* button text to return to the home help page */ +"fXS-aC-CMH.title" = "Hem"; + +/* Options button text */ +"frd-No-seV.label" = "Alternativ"; + +/* Installed Keyboard column heading */ +"jex-Nd-Qzg.headerCell.title" = "Installerat tangentbord"; + +/* Verbose logging tooltip text */ +"uWx-3J-U0D.ibShadowedToolTip" = "Aktivera detta om du har problem med ett specifikt tangentbord eller med Keyman i allmänhet."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/uk.lproj/preferences.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/uk.lproj/preferences.strings new file mode 100644 index 0000000000..040cb82624 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/uk.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" = "Використати докладне ведення журналу"; + +/* Support button text */ +"93O-x6-RLF.label" = "Підтримка"; + +/* Download Keyboard button text */ +"CTw-kf-WNS.title" = "Завантажити клавіатуру..."; + +/* Keyman Configuration window title */ +"F0z-JX-Cv5.title" = "Налаштування Keyman"; + +/* button text to go back to previous page */ +"JOK-JV-n8w.title" = "Відмінити"; + +/* Keyboards button text */ +"MPN-9N-wWc.label" = "Keyboards"; + +/* text to explain verbose Console logging option */ +"MrI-GM-7d6.title" = "Коли відбувається докладне ведення журналу, Keyman буде журналювати, які можуть допомогти Keyman підтримувати проблему. Програма Консолі може бути використана щоб побачити журнал повідомлень з Keyman. У Console, фільтр для показу всіх повідомлень з процесу \"Keyman\". За необхідності, цей журнал можна експортувати та відправляти в підтримку Keyman."; + +/* 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" = "Увімкніть це, якщо у вас виникають проблеми з певною клавіатурою або з Keyman загалом."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/ru.lproj/KMInfoWindowController.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/ru.lproj/KMInfoWindowController.strings new file mode 100644 index 0000000000..d466f39f8d --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/ru.lproj/KMInfoWindowController.strings @@ -0,0 +1,8 @@ +/* Package Information window title */ +"F0z-JX-Cv5.title" = "Package Information"; + +/* 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/KMInfoWindow/shu-latn-n.lproj/KMInfoWindowController.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/shu-latn-n.lproj/KMInfoWindowController.strings new file mode 100644 index 0000000000..f46b5aec51 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/shu-latn-n.lproj/KMInfoWindowController.strings @@ -0,0 +1,8 @@ +/* Package Information window title */ +"F0z-JX-Cv5.title" = "Package Information"; + +/* button text to show Details */ +"Fvy-XJ-s38.label" = "Shu'ul alfiya"; + +/* button text to show Read Me */ +"waA-IW-Qyn.label" = "Agurni"; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/sv.lproj/KMInfoWindowController.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/sv.lproj/KMInfoWindowController.strings new file mode 100644 index 0000000000..296a10433a --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/sv.lproj/KMInfoWindowController.strings @@ -0,0 +1,8 @@ +/* Package Information window title */ +"F0z-JX-Cv5.title" = "Package Information"; + +/* button text to show Details */ +"Fvy-XJ-s38.label" = "Detaljer"; + +/* button text to show Read Me */ +"waA-IW-Qyn.label" = "Läs mig"; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/uk.lproj/KMInfoWindowController.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/uk.lproj/KMInfoWindowController.strings new file mode 100644 index 0000000000..e887a8a345 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/uk.lproj/KMInfoWindowController.strings @@ -0,0 +1,8 @@ +/* Package Information window title */ +"F0z-JX-Cv5.title" = "Package Information"; + +/* 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/ru.lproj/KMKeyboardHelpWindowController.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/ru.lproj/KMKeyboardHelpWindowController.strings new file mode 100644 index 0000000000..21ff5e91b8 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/ru.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" = "Print..."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/shu-latn-n.lproj/KMKeyboardHelpWindowController.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/shu-latn-n.lproj/KMKeyboardHelpWindowController.strings new file mode 100644 index 0000000000..4467b08e38 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/shu-latn-n.lproj/KMKeyboardHelpWindowController.strings @@ -0,0 +1,8 @@ +/* Keyboard Help window title */ +"F0z-JX-Cv5.title" = "Mi'awana faougal Keyboard"; + +/* OK button text */ +"Zla-QF-m0K.title" = "Zayn"; + +/* Print button text */ +"fYY-Uj-y4S.title" = "Sulla..."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/sv.lproj/KMKeyboardHelpWindowController.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/sv.lproj/KMKeyboardHelpWindowController.strings new file mode 100644 index 0000000000..ba364d59ba --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/sv.lproj/KMKeyboardHelpWindowController.strings @@ -0,0 +1,8 @@ +/* Keyboard Help window title */ +"F0z-JX-Cv5.title" = "Tangentbord Hjälp"; + +/* OK button text */ +"Zla-QF-m0K.title" = "Ok"; + +/* Print button text */ +"fYY-Uj-y4S.title" = "Print..."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/uk.lproj/KMKeyboardHelpWindowController.strings b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/uk.lproj/KMKeyboardHelpWindowController.strings new file mode 100644 index 0000000000..deeeecc477 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/uk.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" = "Print..."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/ff.lproj/Localizable.strings b/mac/Keyman4MacIM/Keyman4MacIM/ff.lproj/Localizable.strings index 3e5b3f4c65..bb07294b4c 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/ff.lproj/Localizable.strings +++ b/mac/Keyman4MacIM/Keyman4MacIM/ff.lproj/Localizable.strings @@ -68,4 +68,4 @@ "copyright-label" = "Copyright:"; /* message displayed to alert user to need grant accessibility permission */ -"privacy-alert-text" = "To function properly, Keyman requires accessibility features:\n\nGrant access in System Preferences, Security & Privacy.\nRestart your system."; +"privacy-alert-text" = "Ngam waawde huutoreede, Keyman ena laaɓndii fannuuji heɓindaare:\n\nYamir ɗum to Cuɓoraaɗe Yuɓɓo toh, Kisnal & Suturo.\nHurmitin yuɓɓomaa."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/ru.lproj/Localizable.strings b/mac/Keyman4MacIM/Keyman4MacIM/ru.lproj/Localizable.strings new file mode 100644 index 0000000000..3403c18d14 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/ru.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" = "Установить клавиатуру Keyman?"; + +/* Message displayed to confirm installation of a keyboard from the specifed .kmp file double-clicked by the user */ +"info-install-keyboard-filename" = "Вы хотите, чтобы Keyman установил клавиатуру из файла '%@'?"; + +/* 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" = "Не удалось прочитать файл Keyman '%@'."; + +/* Message displayed in Configuration window when keyboard cannot be loaded */ +"message-error-loading-keyboard" = "(error loading keyboard)"; + +/* Message displayed in Configuration window when keyboard metadata cannot be loaded */ +"message-error-unknown-metadata" = "unknown"; + +/* 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" = "Keyboards:"; + +/* fonts label in the Package Information window */ +"fonts-label" = "Fonts:"; + +/* package version label in the Package Information window */ +"package-version-label" = "Package Version:"; + +/* author label in the Package Information window */ +"author-label" = "Author:"; + +/* website label in the Package Information window */ +"website-label" = "Website:"; + +/* copyright label in the Package Information window */ +"copyright-label" = "Copyright:"; + +/* message displayed to alert user to need grant accessibility permission */ +"privacy-alert-text" = "To function properly, Keyman requires accessibility features:\n\nGrant access in System Preferences, Security & Privacy.\nRestart your system."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/ru.lproj/MainMenu.strings b/mac/Keyman4MacIM/Keyman4MacIM/ru.lproj/MainMenu.strings new file mode 100644 index 0000000000..bf236a609a --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/ru.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/mac/Keyman4MacIM/Keyman4MacIM/shu-latn-n.lproj/Localizable.strings b/mac/Keyman4MacIM/Keyman4MacIM/shu-latn-n.lproj/Localizable.strings new file mode 100644 index 0000000000..578a15b5b1 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/shu-latn-n.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" = "Tabbat tador tasulal keyboard wah '%@'?"; + +/* Delete keyboard confirmation info indicating that the delete action cannot be undone */ +"info-cannot-undo-delete-keyboard" = "Ma taddar tagulbal shu'ul da."; + +/* Button text to cancel delete of the specified installed Keyman keyboard */ +"button-cancel-delete-keyboard" = "Halla"; + +/* Button text to confirm delete of the specified installed Keyman keyboard */ +"button-delete-keyboard" = "Chinna"; + +/* Message displayed to confirm installation of a keyboard from the specifed .kmp file double-clicked by the user */ +"message-confirm-install-keyboard" = "Dys keyman keyboard?"; + +/* Message displayed to confirm installation of a keyboard from the specifed .kmp file double-clicked by the user */ +"info-install-keyboard-filename" = "Tador Keyman eidissal keyboard minal shu'ul wah '%@'?"; + +/* Button text to cancel installation of the double-clicked Keyman file */ +"button-cancel-install-keyboard" = "Halla"; + +/* Button text to confirm installation of the double-clicked Keyman file */ +"button-install-keyboard" = "Dyssa"; + +/* Message displayed to inform user that .kmp file could not be read/unzipped */ +"message-keyboard-file-unreadable" = "Ma gudur gara shu'ul alfyl Keyman '%@'."; + +/* Message displayed in Configuration window when keyboard cannot be loaded */ +"message-error-loading-keyboard" = "(error loading keyboard)"; + +/* Message displayed in Configuration window when keyboard metadata cannot be loaded */ +"message-error-unknown-metadata" = "unknown"; + +/* Button text to acknowledge that .kmp file could not be read */ +"button-keyboard-file-unreadable" = "Zayn"; + +/* label text to identify Keyman version */ +"version-label-text" = "Nafar: %@"; + +/* Status text for keyboard downloading */ +"message-keyboard-downloading" = "Dakhalan..."; + +/* Status text for keyboard download complete */ +"message-keyboard-download-complete" = "Tammam dakhalan."; + +/* Button text to cancel downloading keyboard */ +"button-cancel-downloading" = "Halla"; + +/* Button text keyboard download complete */ +"button-download-complete" = "Tamma"; + +/* keyboards label in the Package Information window */ +"keyboards-label" = "Keyboards:"; + +/* fonts label in the Package Information window */ +"fonts-label" = "Fonts:"; + +/* package version label in the Package Information window */ +"package-version-label" = "Package Version:"; + +/* author label in the Package Information window */ +"author-label" = "Author:"; + +/* website label in the Package Information window */ +"website-label" = "Website:"; + +/* copyright label in the Package Information window */ +"copyright-label" = "Copyright:"; + +/* message displayed to alert user to need grant accessibility permission */ +"privacy-alert-text" = "To function properly, Keyman requires accessibility features:\n\nGrant access in System Preferences, Security & Privacy.\nRestart your system."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/shu-latn-n.lproj/MainMenu.strings b/mac/Keyman4MacIM/Keyman4MacIM/shu-latn-n.lproj/MainMenu.strings new file mode 100644 index 0000000000..cea35d0deb --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/shu-latn-n.lproj/MainMenu.strings @@ -0,0 +1,14 @@ +/* Configuration window menu text */ +"P1b-lE-yFw.title" = "Wasiyana..."; + +/* Keyboards menu text */ +"bQa-j9-nHe.title" = "Keyboards"; + +/* Keyboards menu text */ +"goP-aK-3WB.title" = "Keyboards"; + +/* About menu text */ +"kb2-ww-RS3.title" = "Faoug"; + +/* On-Screen Keyboard menu text */ +"s96-JI-YDh.title" = "Keyboard albinshaf"; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/sv.lproj/Localizable.strings b/mac/Keyman4MacIM/Keyman4MacIM/sv.lproj/Localizable.strings new file mode 100644 index 0000000000..bd5a351933 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/sv.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" = "Är du säker på att du vill ta bort tangentbordet%@'?"; + +/* Delete keyboard confirmation info indicating that the delete action cannot be undone */ +"info-cannot-undo-delete-keyboard" = "Du kan inte ångra denna åtgärd."; + +/* Button text to cancel delete of the specified installed Keyman keyboard */ +"button-cancel-delete-keyboard" = "Avbryt"; + +/* Button text to confirm delete of the specified installed Keyman keyboard */ +"button-delete-keyboard" = "Radera"; + +/* Message displayed to confirm installation of a keyboard from the specifed .kmp file double-clicked by the user */ +"message-confirm-install-keyboard" = "Installera Keyman-tangentbordet?"; + +/* Message displayed to confirm installation of a keyboard from the specifed .kmp file double-clicked by the user */ +"info-install-keyboard-filename" = "Vill du att Keyman ska installera tangentbordet från filen '%@'?"; + +/* Button text to cancel installation of the double-clicked Keyman file */ +"button-cancel-install-keyboard" = "Avbryt"; + +/* Button text to confirm installation of the double-clicked Keyman file */ +"button-install-keyboard" = "Installera"; + +/* Message displayed to inform user that .kmp file could not be read/unzipped */ +"message-keyboard-file-unreadable" = "Kunde inte läsa Nyckelmansfilen '%@'."; + +/* Message displayed in Configuration window when keyboard cannot be loaded */ +"message-error-loading-keyboard" = "(error loading keyboard)"; + +/* Message displayed in Configuration window when keyboard metadata cannot be loaded */ +"message-error-unknown-metadata" = "unknown"; + +/* Button text to acknowledge that .kmp file could not be read */ +"button-keyboard-file-unreadable" = "Ok"; + +/* label text to identify Keyman version */ +"version-label-text" = "Version %@"; + +/* Status text for keyboard downloading */ +"message-keyboard-downloading" = "Hämtar..."; + +/* Status text for keyboard download complete */ +"message-keyboard-download-complete" = "Nedladdning slutförd."; + +/* Button text to cancel downloading keyboard */ +"button-cancel-downloading" = "Avbryt"; + +/* Button text keyboard download complete */ +"button-download-complete" = "Klar"; + +/* keyboards label in the Package Information window */ +"keyboards-label" = "Keyboards:"; + +/* fonts label in the Package Information window */ +"fonts-label" = "Fonts:"; + +/* package version label in the Package Information window */ +"package-version-label" = "Package Version:"; + +/* author label in the Package Information window */ +"author-label" = "Author:"; + +/* website label in the Package Information window */ +"website-label" = "Website:"; + +/* copyright label in the Package Information window */ +"copyright-label" = "Copyright:"; + +/* message displayed to alert user to need grant accessibility permission */ +"privacy-alert-text" = "To function properly, Keyman requires accessibility features:\n\nGrant access in System Preferences, Security & Privacy.\nRestart your system."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/sv.lproj/MainMenu.strings b/mac/Keyman4MacIM/Keyman4MacIM/sv.lproj/MainMenu.strings new file mode 100644 index 0000000000..d7d876bb0e --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/sv.lproj/MainMenu.strings @@ -0,0 +1,14 @@ +/* Configuration window menu text */ +"P1b-lE-yFw.title" = "Konfiguration..."; + +/* Keyboards menu text */ +"bQa-j9-nHe.title" = "Tangentbord"; + +/* Keyboards menu text */ +"goP-aK-3WB.title" = "Tangentbord"; + +/* About menu text */ +"kb2-ww-RS3.title" = "Om"; + +/* On-Screen Keyboard menu text */ +"s96-JI-YDh.title" = "Tangentbord på skärmen"; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/uk.lproj/Localizable.strings b/mac/Keyman4MacIM/Keyman4MacIM/uk.lproj/Localizable.strings new file mode 100644 index 0000000000..e5a48d86b2 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/uk.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" = "Встановити клавіатуру Keyman?"; + +/* Message displayed to confirm installation of a keyboard from the specifed .kmp file double-clicked by the user */ +"info-install-keyboard-filename" = "Бажаєте, щоб Keyman встановив клавіатуру з файлу '%@'?"; + +/* 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" = "Не вдалося прочитати файл Keyman '%@."; + +/* Message displayed in Configuration window when keyboard cannot be loaded */ +"message-error-loading-keyboard" = "(error loading keyboard)"; + +/* Message displayed in Configuration window when keyboard metadata cannot be loaded */ +"message-error-unknown-metadata" = "unknown"; + +/* 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" = "Keyboards:"; + +/* fonts label in the Package Information window */ +"fonts-label" = "Fonts:"; + +/* package version label in the Package Information window */ +"package-version-label" = "Package Version:"; + +/* author label in the Package Information window */ +"author-label" = "Author:"; + +/* website label in the Package Information window */ +"website-label" = "Website:"; + +/* copyright label in the Package Information window */ +"copyright-label" = "Copyright:"; + +/* message displayed to alert user to need grant accessibility permission */ +"privacy-alert-text" = "To function properly, Keyman requires accessibility features:\n\nGrant access in System Preferences, Security & Privacy.\nRestart your system."; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/uk.lproj/MainMenu.strings b/mac/Keyman4MacIM/Keyman4MacIM/uk.lproj/MainMenu.strings new file mode 100644 index 0000000000..977e359d09 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/uk.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/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVDownloadResultReceiver.java b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVDownloadResultReceiver.java index 5c0bcb5d1b..aad514b527 100644 --- a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVDownloadResultReceiver.java +++ b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVDownloadResultReceiver.java @@ -8,8 +8,8 @@ import android.os.ResultReceiver; import android.widget.Toast; import com.firstvoices.android.FVKmpInstallMode; -import com.tavultesoft.kmea.BaseActivity; -import com.tavultesoft.kmea.util.FileUtils; +import com.keyman.engine.BaseActivity; +import com.keyman.engine.util.FileUtils; import java.io.File; diff --git a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVKeyboardListAdapter.java b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVKeyboardListAdapter.java index 6deba05efd..460d878949 100644 --- a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVKeyboardListAdapter.java +++ b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVKeyboardListAdapter.java @@ -16,8 +16,8 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.data.KeyboardController; +import com.keyman.engine.KMManager; +import com.keyman.engine.data.KeyboardController; class FVKeyboardListAdapter extends ArrayAdapter { diff --git a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVKeyboardSettingsActivity.java b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVKeyboardSettingsActivity.java index 17b051258a..7309115326 100644 --- a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVKeyboardSettingsActivity.java +++ b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVKeyboardSettingsActivity.java @@ -21,22 +21,22 @@ import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.SwitchCompat; import androidx.appcompat.widget.Toolbar; -import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KeyboardPickerActivity; -import com.tavultesoft.kmea.ModelInfoActivity; -import com.tavultesoft.kmea.ModelPickerActivity; -import com.tavultesoft.kmea.cloud.CloudApiTypes; -import com.tavultesoft.kmea.cloud.CloudDownloadMgr; -import com.tavultesoft.kmea.cloud.impl.CloudLexicalModelMetaDataDownloadCallback; -import com.tavultesoft.kmea.data.CloudRepository; -import com.tavultesoft.kmea.data.Dataset; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.data.KeyboardController; -import com.tavultesoft.kmea.data.LexicalModel; -import com.tavultesoft.kmea.util.BCP47; -import com.tavultesoft.kmea.util.KMLog; -import com.tavultesoft.kmea.util.MapCompat; +import com.keyman.engine.KMKeyboardDownloaderActivity; +import com.keyman.engine.KMManager; +import com.keyman.engine.KeyboardPickerActivity; +import com.keyman.engine.ModelInfoActivity; +import com.keyman.engine.ModelPickerActivity; +import com.keyman.engine.cloud.CloudApiTypes; +import com.keyman.engine.cloud.CloudDownloadMgr; +import com.keyman.engine.cloud.impl.CloudLexicalModelMetaDataDownloadCallback; +import com.keyman.engine.data.CloudRepository; +import com.keyman.engine.data.Dataset; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.data.KeyboardController; +import com.keyman.engine.data.LexicalModel; +import com.keyman.engine.util.BCP47; +import com.keyman.engine.util.KMLog; +import com.keyman.engine.util.MapCompat; import java.io.File; import java.util.ArrayList; diff --git a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVShared.java b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVShared.java index 3e5f052c1a..95158826ba 100644 --- a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVShared.java +++ b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/FVShared.java @@ -7,10 +7,10 @@ import android.content.res.AssetManager; import android.net.Uri; import android.util.Log; import android.widget.Toast; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.packages.PackageProcessor; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.KMManager; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.packages.PackageProcessor; +import com.keyman.engine.util.KMLog; import java.io.BufferedReader; import java.io.File; diff --git a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/MainActivity.java b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/MainActivity.java index 5e7550261b..305cf968b6 100644 --- a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/MainActivity.java +++ b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/MainActivity.java @@ -17,11 +17,11 @@ import androidx.appcompat.app.AppCompatActivity; import io.sentry.android.core.SentryAndroid; -import com.tavultesoft.kmea.*; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.util.BCP47; -import com.tavultesoft.kmea.util.DownloadFileUtils; -import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardDownloadEventListener; +import com.keyman.engine.*; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.util.BCP47; +import com.keyman.engine.util.DownloadFileUtils; +import com.keyman.engine.KeyboardEventHandler.OnKeyboardDownloadEventListener; import java.io.File; import java.util.HashMap; diff --git a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/PackageActivity.java b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/PackageActivity.java index 95fd3edfa2..a34da65b41 100644 --- a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/PackageActivity.java +++ b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/PackageActivity.java @@ -12,12 +12,12 @@ import android.os.Bundle; import android.widget.Toast; import com.firstvoices.android.FVKmpInstallMode; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KeyboardEventHandler; -import com.tavultesoft.kmea.packages.PackageProcessor; -import com.tavultesoft.kmea.packages.LexicalModelPackageProcessor; -import com.tavultesoft.kmea.util.FileUtils; -import com.tavultesoft.kmea.util.KMLog; +import com.keyman.engine.KMManager; +import com.keyman.engine.KeyboardEventHandler; +import com.keyman.engine.packages.PackageProcessor; +import com.keyman.engine.packages.LexicalModelPackageProcessor; +import com.keyman.engine.util.FileUtils; +import com.keyman.engine.util.KMLog; import org.json.JSONObject; diff --git a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/SystemKeyboard.java b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/SystemKeyboard.java index b125c6e5f5..95d0c51b37 100644 --- a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/SystemKeyboard.java +++ b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/SystemKeyboard.java @@ -20,14 +20,14 @@ import android.view.inputmethod.ExtractedTextRequest; import android.view.inputmethod.InputConnection; import android.widget.FrameLayout; -import com.tavultesoft.kmea.KMManager; -import com.tavultesoft.kmea.KMManager.KeyboardType; -import com.tavultesoft.kmea.KMHardwareKeyboardInterpreter; -import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardEventListener; -import com.tavultesoft.kmea.R; -import com.tavultesoft.kmea.data.Keyboard; -import com.tavultesoft.kmea.util.DependencyUtil; -import com.tavultesoft.kmea.util.DependencyUtil.LibraryType; +import com.keyman.engine.KMManager; +import com.keyman.engine.KMManager.KeyboardType; +import com.keyman.engine.KMHardwareKeyboardInterpreter; +import com.keyman.engine.KeyboardEventHandler.OnKeyboardEventListener; +import com.keyman.engine.R; +import com.keyman.engine.data.Keyboard; +import com.keyman.engine.util.DependencyUtil; +import com.keyman.engine.util.DependencyUtil.LibraryType; import io.sentry.android.core.SentryAndroid; import io.sentry.Sentry; diff --git a/package-lock.json b/package-lock.json index ad3d5461d7..cd4f22521c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "developer/src/kmlmc", "developer/src/server", "common/models/*", + "common/tools/*", "common/web/*", "common/predictive-text", "web" @@ -19,8 +20,8 @@ "chai": "^4.3.4", "mocha": "^10.0.0", "mocha-teamcity-reporter": "^4.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" } }, "common/core/web/input-processor": { @@ -43,7 +44,7 @@ "mocha": "^8.4.0", "mocha-teamcity-reporter": "^4.0.0", "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "common/core/web/keyboard-processor": { @@ -62,7 +63,7 @@ "mocha": "^8.4.0", "mocha-teamcity-reporter": "^4.0.0", "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "common/core/web/tools/recorder": { @@ -77,7 +78,7 @@ "@types/node": "^11.9.4" }, "devDependencies": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "common/core/web/tools/sentry-manager": { @@ -89,7 +90,7 @@ "@sentry/browser": "^5.27.4" }, "devDependencies": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "common/core/web/utils": { @@ -100,7 +101,7 @@ "@keymanapp/keyman-version": "*", "@keymanapp/resources-gosh": "*", "@types/node": "^14.0.5", - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "common/models/templates": { @@ -117,7 +118,7 @@ "@types/node": "^14.0.4", "chai": "^4.3.4", "mocha": "^10.0.0", - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "common/models/templates/node_modules/@types/node": { @@ -130,7 +131,7 @@ "name": "@keymanapp/models-types", "license": "MIT", "devDependencies": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "common/models/wordbreakers": { @@ -145,8 +146,8 @@ "@types/mocha": "^7.0.2", "chai": "^4.3.4", "mocha": "^10.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" } }, "common/models/wordbreakers/node_modules/@types/node": { @@ -187,8 +188,8 @@ "mocha": "^10.0.0", "mocha-teamcity-reporter": "^4.0.0", "sinon": "^14.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" } }, "common/predictive-text/node_modules/@types/node": { @@ -197,6 +198,122 @@ "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", "dev": true }, + "common/tools/sourcemap-path-remapper": { + "name": "@keymanapp/sourcemap-path-remapper", + "license": "MIT", + "dependencies": { + "convert-source-map": "^2.0.0" + }, + "devDependencies": { + "@keymanapp/resources-gosh": "*", + "@types/node": "^10.17.21", + "chai": "^4.3.4", + "mocha": "^10.0.0", + "mocha-teamcity-reporter": "^4.0.0", + "sinon": "^7.1.1", + "ts-node": "^10.9.1", + "typescript": "^4.9.5" + } + }, + "common/tools/sourcemap-path-remapper/node_modules/@sinonjs/samsam": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.3.tgz", + "integrity": "sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.3.0", + "array-from": "^2.1.1", + "lodash": "^4.17.15" + } + }, + "common/tools/sourcemap-path-remapper/node_modules/@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", + "dev": true + }, + "common/tools/sourcemap-path-remapper/node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "common/tools/sourcemap-path-remapper/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "common/tools/sourcemap-path-remapper/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, + "common/tools/sourcemap-path-remapper/node_modules/nise": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.3.tgz", + "integrity": "sha512-Ymbac/94xeIrMf59REBPOv0thr+CJVFMhrlAkW/gjCIE58BGQdCj0x7KRCb3yz+Ga2Rz3E9XXSvUyyxqqhjQAQ==", + "dev": true, + "dependencies": { + "@sinonjs/formatio": "^3.2.1", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "lolex": "^5.0.1", + "path-to-regexp": "^1.7.0" + } + }, + "common/tools/sourcemap-path-remapper/node_modules/nise/node_modules/lolex": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-5.1.2.tgz", + "integrity": "sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.7.0" + } + }, + "common/tools/sourcemap-path-remapper/node_modules/path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "dependencies": { + "isarray": "0.0.1" + } + }, + "common/tools/sourcemap-path-remapper/node_modules/sinon": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.5.0.tgz", + "integrity": "sha512-AoD0oJWerp0/rY9czP/D6hDTTUYGpObhZjMpd7Cl/A6+j0xBE+ayL/ldfggkBXUs0IkvIiM1ljM8+WkOc5k78Q==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.4.0", + "@sinonjs/formatio": "^3.2.1", + "@sinonjs/samsam": "^3.3.3", + "diff": "^3.5.0", + "lolex": "^4.2.0", + "nise": "^1.5.2", + "supports-color": "^5.5.0" + } + }, + "common/tools/sourcemap-path-remapper/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "common/web/es6-shim": { "name": "@keymanapp/es6-shim", "extraneous": true, @@ -216,7 +333,7 @@ "@types/node": "^11.9.4", "@types/sinon": "^10.0.13", "chai": "^4.3.4", - "karma": "^6.3.4", + "karma": "^6.4.1", "karma-browserstack-launcher": "^1.6.0", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^2.2.0", @@ -237,6 +354,41 @@ "typescript": "^4.5.4" } }, + "common/web/gesture-recognizer/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "common/web/gesture-recognizer/node_modules/ts-node": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", + "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", + "dev": true, + "dependencies": { + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "typescript": ">=2.7" + } + }, "common/web/input-processor": { "name": "@keymanapp/input-processor", "license": "MIT", @@ -255,8 +407,8 @@ "chai": "^4.3.4", "mocha": "^10.0.0", "mocha-teamcity-reporter": "^4.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" } }, "common/web/keyboard-processor": { @@ -273,15 +425,15 @@ "chai": "^4.3.4", "mocha": "^10.0.0", "mocha-teamcity-reporter": "^4.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" } }, "common/web/keyman-version": { "name": "@keymanapp/keyman-version", "license": "MIT", "devDependencies": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "common/web/keyman-version-node": { @@ -289,7 +441,7 @@ "extraneous": true, "license": "MIT", "devDependencies": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "common/web/keyman-version/node": { @@ -298,14 +450,14 @@ "license": "MIT", "devDependencies": { "@keymanapp/resources-gosh": "*", - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "common/web/lm-message-types": { "name": "@keymanapp/lm-message-types", "license": "MIT", "devDependencies": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "common/web/lm-worker": { @@ -342,8 +494,8 @@ "mocha": "^10.0.0", "mocha-teamcity-reporter": "^4.0.0", "sinon": "^14.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" } }, "common/web/lm-worker/node_modules/@types/node": { @@ -363,7 +515,7 @@ "@types/node": "^11.9.4" }, "devDependencies": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "common/web/sentry-manager": { @@ -374,7 +526,7 @@ "@sentry/browser": "^5.27.4" }, "devDependencies": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "common/web/utils": { @@ -384,7 +536,7 @@ "@keymanapp/keyman-version": "*", "@keymanapp/resources-gosh": "*", "@types/node": "^14.0.5", - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "common/web/utils/node_modules/@types/node": { @@ -400,7 +552,7 @@ "dependencies": { "@keymanapp/models-types": "*", "commander": "^3.0.0", - "typescript": "^4.5.4", + "typescript": "^4.9.5", "xml2js": "^0.4.19" }, "bin": { @@ -453,7 +605,7 @@ "mocha": "^9.1.4", "ts-node": "^10.4.0", "tsc-watch": "^4.5.0", - "typescript": "^4.5.4" + "typescript": "^4.9.5" }, "optionalDependencies": { "hetrodo-node-hide-console-window-napi": "git+ssh://git@github.com/keymanapp/hetrodo-node-hide-console-window-napi.git#858b23036a9963b40ad6ff3c5bacd421e5839b92", @@ -464,9 +616,10 @@ "name": "@keymanapp/lexical-model-compiler", "license": "MIT", "dependencies": { + "@keymanapp/keyman-version": "*", "@keymanapp/models-types": "*", "commander": "^3.0.0", - "typescript": "^4.5.4", + "typescript": "^4.9.5", "xml2js": "^0.4.19" }, "bin": { @@ -475,7 +628,6 @@ "kmlmp": "dist/kmlmp.js" }, "devDependencies": { - "@keymanapp/keyman-version": "*", "@keymanapp/models-templates": "*", "@keymanapp/models-wordbreakers": "*", "@types/chai": "^4.1.7", @@ -486,7 +638,7 @@ "chalk": "^2.4.2", "jszip": "^3.7.0", "mocha": "^10.0.0", - "ts-node": "^9.1.1" + "ts-node": "^10.9.1" }, "engines": { "node": ">=16.0.0" @@ -590,13 +742,13 @@ "chai": "^4.3.4", "copyfiles": "^2.4.1", "mocha": "^10.0.0", - "ts-node": "^10.4.0", + "ts-node": "^10.9.1", "tsc-watch": "^4.5.0", - "typescript": "^4.5.4" + "typescript": "^4.9.5" }, "optionalDependencies": { - "hetrodo-node-hide-console-window-napi": "git+ssh://git@github.com/keymanapp/hetrodo-node-hide-console-window-napi.git#858b23036a9963b40ad6ff3c5bacd421e5839b92", - "node-windows-trayicon": "git+ssh://git@github.com/keymanapp/node-windows-trayicon.git#1e46786082213f3edcddd5953e33f5abdc7ea05f" + "hetrodo-node-hide-console-window-napi": "keymanapp/hetrodo-node-hide-console-window-napi#keyman-15.0", + "node-windows-trayicon": "keymanapp/node-windows-trayicon#keyman-16.0" } }, "developer/src/server/node_modules/@types/mocha": { @@ -647,58 +799,6 @@ "node": ">=10.0.0" } }, - "developer/src/server/node_modules/ts-node": { - "version": "10.8.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.8.1.tgz", - "integrity": "sha512-Wwsnao4DQoJsN034wePSg5nZiw4YKXf56mPIAeD6wVmiv+RytNSWqc2f3fKvcUoV+Yn2+yocD71VOfQHbmVX4g==", - "dev": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "developer/src/server/node_modules/ts-node/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/@actions/core": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", @@ -840,6 +940,10 @@ "resolved": "resources/gosh", "link": true }, + "node_modules/@keymanapp/sourcemap-path-remapper": { + "resolved": "common/tools/sourcemap-path-remapper", + "link": true + }, "node_modules/@keymanapp/web-sentry-manager": { "resolved": "common/web/sentry-manager", "link": true @@ -1335,6 +1439,27 @@ "@sinonjs/commons": "^1.7.0" } }, + "node_modules/@sinonjs/formatio": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.2.tgz", + "integrity": "sha512-B8SEsgd8gArBLMD6zpRw3juQ2FVSsmdd7qlevyDqzS9WTCtvF55/gAL+h6gue8ZvPYcdiPdvueM/qm//9XzyTQ==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^3.1.0" + } + }, + "node_modules/@sinonjs/formatio/node_modules/@sinonjs/samsam": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.3.tgz", + "integrity": "sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.3.0", + "array-from": "^2.1.1", + "lodash": "^4.17.15" + } + }, "node_modules/@sinonjs/samsam": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", @@ -1352,14 +1477,11 @@ "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "dev": true }, - "node_modules/@socket.io/base64-arraybuffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@socket.io/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", - "integrity": "sha512-dOlCBKnDw4iShaIsH/bxujKTM18+2TOAsYz+KSc11Am38H4q5Xw8Bbz97ZYdrVNM+um3p7w86Bvvmcn9q+5+eQ==", - "dev": true, - "engines": { - "node": ">= 0.6.0" - } + "node_modules/@socket.io/component-emitter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", + "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==", + "dev": true }, "node_modules/@szmarczak/http-timer": { "version": "4.0.6", @@ -1423,12 +1545,6 @@ "integrity": "sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw==", "dev": true }, - "node_modules/@types/component-emitter": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.11.tgz", - "integrity": "sha512-SRXjM+tfsSlA9VuG8hGO2nft2p8zjXCK1VcC6N4NXbBbYbSia9kzCChYQajIjzIqOOOuh5Ock6MmV2oux4jDZQ==", - "dev": true - }, "node_modules/@types/connect": { "version": "3.4.35", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", @@ -1445,10 +1561,13 @@ "dev": true }, "node_modules/@types/cors": { - "version": "2.8.12", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", - "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==", - "dev": true + "version": "2.8.13", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz", + "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } }, "node_modules/@types/express": { "version": "4.17.13", @@ -1595,12 +1714,6 @@ "@types/node": "*" } }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -1750,6 +1863,12 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "node_modules/array-from": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", + "integrity": "sha512-GQTc6Uupx1FCavi5mPzBvVT7nEOeWMmUA9P95wpfpW1XwMSKs+KaymD5C2Up7KAUKg/mYwbsUYzdZWcoajlNZg==", + "dev": true + }, "node_modules/asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -2238,12 +2357,6 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==" }, - "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, "node_modules/compress-brotli": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/compress-brotli/-/compress-brotli-1.3.6.tgz", @@ -2331,6 +2444,11 @@ "node": ">= 0.6" } }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" + }, "node_modules/cookie": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", @@ -2638,9 +2756,9 @@ } }, "node_modules/engine.io": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.1.3.tgz", - "integrity": "sha512-rqs60YwkvWTLLnfazqgZqLa/aKo+9cueVfEi/dZ8PyGyaf8TLOxj++4QMIgeG3Gn0AhrWiFXvghsoY9L9h25GA==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.0.tgz", + "integrity": "sha512-OgxY1c/RuCSeO/rTr8DIFXx76IzUUft86R7/P7MMbbkuzeqJoTNw2lmeD91IyGz41QYleIIjWeMJGgug043sfQ==", "dev": true, "dependencies": { "@types/cookie": "^0.4.1", @@ -2652,43 +2770,19 @@ "cors": "~2.8.5", "debug": "~4.3.1", "engine.io-parser": "~5.0.3", - "ws": "~8.2.3" + "ws": "~8.11.0" }, "engines": { "node": ">=10.0.0" } }, "node_modules/engine.io-parser": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.3.tgz", - "integrity": "sha512-BtQxwF27XUNnSafQLvDi0dQ8s3i6VgzSoQMJacpIcGNrlUdfHSKbgm3jmjCVvQluGzqwujQMPAoMai3oYSTurg==", - "dev": true, - "dependencies": { - "@socket.io/base64-arraybuffer": "~1.0.2" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/engine.io/node_modules/ws": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", - "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.6.tgz", + "integrity": "sha512-tjuoZDMAdEhVnSFleYPCtdL2GXwVTGtNjoeJd9IhIG3C1xs9uwxqRNEu5WpnDZCaozwVlK/nuQhpodhXSIMaxw==", "dev": true, "engines": { "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } } }, "node_modules/ent": { @@ -3387,9 +3481,9 @@ "optional": true }, "node_modules/http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, "node_modules/http-errors": { "version": "1.8.1", @@ -4134,6 +4228,12 @@ } } }, + "node_modules/lolex": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.2.0.tgz", + "integrity": "sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==", + "dev": true + }, "node_modules/lowercase-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", @@ -4315,12 +4415,11 @@ } }, "node_modules/mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", "dev": true, "dependencies": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", @@ -5696,36 +5795,38 @@ } }, "node_modules/socket.io": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.4.1.tgz", - "integrity": "sha512-s04vrBswdQBUmuWJuuNTmXUVJhP0cVky8bBDhdkf8y0Ptsu7fKU2LuLbts9g+pdmAdyMMn8F/9Mf1/wbtUN0fg==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.0.tgz", + "integrity": "sha512-b65bp6INPk/BMMrIgVvX12x3Q+NqlGqSlTuvKQWt0BUJ3Hyy3JangBl7fEoWZTXbOKlCqNPbQ6MbWgok/km28w==", "dev": true, "dependencies": { "accepts": "~1.3.4", "base64id": "~2.0.0", "debug": "~4.3.2", - "engine.io": "~6.1.0", - "socket.io-adapter": "~2.3.3", - "socket.io-parser": "~4.0.4" + "engine.io": "~6.4.0", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.1" }, "engines": { "node": ">=10.0.0" } }, "node_modules/socket.io-adapter": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.3.3.tgz", - "integrity": "sha512-Qd/iwn3VskrpNO60BeRyCyr8ZWw9CPZyitW4AQwmRZ8zCiyDiL+znRnWX6tDHXnWn1sJrM1+b6Mn6wEDJJ4aYQ==", - "dev": true - }, - "node_modules/socket.io-parser": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.5.tgz", - "integrity": "sha512-sNjbT9dX63nqUFIOv95tTVm6elyIU4RvB1m8dOeZt+IgWwcWklFDOdmGcfo3zSiRsnR/3pJkjY5lfoGqEe4Eig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz", + "integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==", "dev": true, "dependencies": { - "@types/component-emitter": "^1.2.10", - "component-emitter": "~1.3.0", + "ws": "~8.11.0" + } + }, + "node_modules/socket.io-parser": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.2.tgz", + "integrity": "sha512-DJtziuKypFkMMHCm2uIshOYC7QaylbtzQwiMYDuCKy3OPkjLzu4B2vAhTlqipRHHzrI0NJeBAizTK7X+6m1jVw==", + "dev": true, + "dependencies": { + "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1" }, "engines": { @@ -5759,9 +5860,9 @@ } }, "node_modules/source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "dependencies": { "buffer-from": "^1.0.0", @@ -6062,29 +6163,46 @@ "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, "node_modules/ts-node": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", - "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", "arg": "^4.1.0", "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", - "source-map-support": "^0.5.17", + "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, "bin": { "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", "ts-node-script": "dist/bin-script.js", "ts-node-transpile-only": "dist/bin-transpile.js", "ts-script": "dist/bin-script-deprecated.js" }, - "engines": { - "node": ">=10.0.0" - }, "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } } }, "node_modules/ts-node/node_modules/diff": { @@ -6197,9 +6315,9 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "node_modules/typescript": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", - "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -6209,9 +6327,9 @@ } }, "node_modules/ua-parser-js": { - "version": "0.7.31", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz", - "integrity": "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==", + "version": "0.7.33", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.33.tgz", + "integrity": "sha512-s8ax/CeZdK9R/56Sui0WM6y9OFREJarMRHqLB2EwkovemBxNQ+Bqu8GAsUnVcXKgphb++ghr/B2BZx4mahujPw==", "dev": true, "funding": [ { @@ -6461,9 +6579,9 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "engines": { "node": ">=10.0.0" }, @@ -6686,17 +6804,17 @@ "dependencies": { "@actions/core": "^1.9.1", "@actions/github": "^2.1.0", - "typescript": "^4.5.4", + "typescript": "^4.9.5", "yargs": "^15.1.0" }, "devDependencies": { "@types/node": "^13.7.0", "@types/semver": "^7.1.0", "semver": "^7.1.2", - "ts-node": "^8.6.2" + "ts-node": "^10.9.1" }, "engines": { - "node": "16" + "node": ">=16.0" } }, "resources/build/version/node_modules/@types/node": { @@ -6723,15 +6841,6 @@ "wrap-ansi": "^6.2.0" } }, - "resources/build/version/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "resources/build/version/node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -6812,31 +6921,6 @@ "node": ">=8" } }, - "resources/build/version/node_modules/ts-node": { - "version": "8.10.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", - "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", - "dev": true, - "dependencies": { - "arg": "^4.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.17", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "engines": { - "node": ">=6.0.0" - }, - "peerDependencies": { - "typescript": ">=2.7" - } - }, "resources/build/version/node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -6931,8 +7015,8 @@ "karma-teamcity-reporter": "^1.1.0", "mocha": "^10.0.0", "modernizr": "^3.11.7", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" } } }, @@ -7019,8 +7103,8 @@ "@types/node": "^13.7.0", "@types/semver": "^7.1.0", "semver": "^7.1.2", - "ts-node": "^8.6.2", - "typescript": "^4.5.4", + "ts-node": "^10.9.1", + "typescript": "^4.9.5", "yargs": "^15.1.0" }, "dependencies": { @@ -7045,12 +7129,6 @@ "wrap-ansi": "^6.2.0" } }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -7107,19 +7185,6 @@ "ansi-regex": "^5.0.1" } }, - "ts-node": { - "version": "8.10.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", - "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", - "dev": true, - "requires": { - "arg": "^4.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.17", - "yn": "3.1.1" - } - }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -7180,15 +7245,15 @@ "chalk": "^4.1.2", "copyfiles": "^2.4.1", "express": "^4.17.2", - "hetrodo-node-hide-console-window-napi": "git+ssh://git@github.com/keymanapp/hetrodo-node-hide-console-window-napi.git#858b23036a9963b40ad6ff3c5bacd421e5839b92", + "hetrodo-node-hide-console-window-napi": "keymanapp/hetrodo-node-hide-console-window-napi#keyman-15.0", "mocha": "^10.0.0", "multer": "^1.4.5-lts.1", "ngrok": "^4.2.2", - "node-windows-trayicon": "git+ssh://git@github.com/keymanapp/node-windows-trayicon.git#1e46786082213f3edcddd5953e33f5abdc7ea05f", + "node-windows-trayicon": "keymanapp/node-windows-trayicon#keyman-16.0", "open": "^8.4.0", - "ts-node": "^10.4.0", + "ts-node": "^10.9.1", "tsc-watch": "^4.5.0", - "typescript": "^4.5.4", + "typescript": "^4.9.5", "ws": "^8.3.0" }, "dependencies": { @@ -7230,35 +7295,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==" - }, - "ts-node": { - "version": "10.8.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.8.1.tgz", - "integrity": "sha512-Wwsnao4DQoJsN034wePSg5nZiw4YKXf56mPIAeD6wVmiv+RytNSWqc2f3fKvcUoV+Yn2+yocD71VOfQHbmVX4g==", - "dev": true, - "requires": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "dependencies": { - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - } - } } } }, @@ -7270,7 +7306,7 @@ "@types/sinon": "^10.0.13", "chai": "^4.3.4", "eventemitter3": "^4.0.0", - "karma": "^6.3.4", + "karma": "^6.4.1", "karma-browserstack-launcher": "^1.6.0", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^2.2.0", @@ -7285,10 +7321,32 @@ "karma-teamcity-reporter": "^1.1.0", "mocha": "^10.0.0", "mocha-teamcity-reporter": "^4.0.0", - "promise-status-async": "*", + "promise-status-async": "^1.2.10", "sinon": "^14.0.0", "ts-node": "^9.1.1", "typescript": "^4.5.4" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "ts-node": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", + "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + } + } } }, "@keymanapp/input-processor": { @@ -7306,8 +7364,8 @@ "eventemitter3": "^4.0.0", "mocha": "^10.0.0", "mocha-teamcity-reporter": "^4.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" } }, "@keymanapp/keyboard-processor": { @@ -7321,14 +7379,14 @@ "chai": "^4.3.4", "mocha": "^10.0.0", "mocha-teamcity-reporter": "^4.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" } }, "@keymanapp/keyman-version": { "version": "file:common/web/keyman-version", "requires": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "@keymanapp/lexical-model-compiler": { @@ -7347,8 +7405,8 @@ "commander": "^3.0.0", "jszip": "^3.7.0", "mocha": "^10.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4", + "ts-node": "^10.9.1", + "typescript": "^4.9.5", "xml2js": "^0.4.19" }, "dependencies": { @@ -7446,8 +7504,8 @@ "mocha-teamcity-reporter": "^4.0.0", "sinon": "^14.0.0", "string.prototype.codepointat": "^0.2.1", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" }, "dependencies": { "@types/node": { @@ -7461,7 +7519,7 @@ "@keymanapp/lm-message-types": { "version": "file:common/web/lm-message-types", "requires": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "@keymanapp/lm-worker": { @@ -7495,8 +7553,8 @@ "sinon": "^14.0.0", "string.prototype.codepointat": "^0.2.1", "string.prototype.startswith": "^0.2.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" }, "dependencies": { "@types/node": { @@ -7518,7 +7576,7 @@ "@types/node": "^14.0.4", "chai": "^4.3.4", "mocha": "^10.0.0", - "typescript": "^4.5.4" + "typescript": "^4.9.5" }, "dependencies": { "@types/node": { @@ -7532,7 +7590,7 @@ "@keymanapp/models-types": { "version": "file:common/models/types", "requires": { - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "@keymanapp/models-wordbreakers": { @@ -7544,8 +7602,8 @@ "@types/node": "^14.0.3", "chai": "^4.3.4", "mocha": "^10.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" }, "dependencies": { "@types/node": { @@ -7563,18 +7621,126 @@ "@keymanapp/models-types": "*", "@keymanapp/web-utils": "*", "@types/node": "^11.9.4", - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "@keymanapp/resources-gosh": { "version": "file:resources/gosh" }, + "@keymanapp/sourcemap-path-remapper": { + "version": "file:common/tools/sourcemap-path-remapper", + "requires": { + "@keymanapp/resources-gosh": "*", + "@types/node": "^10.17.21", + "chai": "^4.3.4", + "convert-source-map": "^2.0.0", + "mocha": "^10.0.0", + "mocha-teamcity-reporter": "^4.0.0", + "sinon": "^7.1.1", + "ts-node": "^10.9.1", + "typescript": "^4.9.5" + }, + "dependencies": { + "@sinonjs/samsam": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.3.tgz", + "integrity": "sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.3.0", + "array-from": "^2.1.1", + "lodash": "^4.17.15" + } + }, + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, + "nise": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.3.tgz", + "integrity": "sha512-Ymbac/94xeIrMf59REBPOv0thr+CJVFMhrlAkW/gjCIE58BGQdCj0x7KRCb3yz+Ga2Rz3E9XXSvUyyxqqhjQAQ==", + "dev": true, + "requires": { + "@sinonjs/formatio": "^3.2.1", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "lolex": "^5.0.1", + "path-to-regexp": "^1.7.0" + }, + "dependencies": { + "lolex": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-5.1.2.tgz", + "integrity": "sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + } + } + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + } + }, + "sinon": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.5.0.tgz", + "integrity": "sha512-AoD0oJWerp0/rY9czP/D6hDTTUYGpObhZjMpd7Cl/A6+j0xBE+ayL/ldfggkBXUs0IkvIiM1ljM8+WkOc5k78Q==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.4.0", + "@sinonjs/formatio": "^3.2.1", + "@sinonjs/samsam": "^3.3.3", + "diff": "^3.5.0", + "lolex": "^4.2.0", + "nise": "^1.5.2", + "supports-color": "^5.5.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "@keymanapp/web-sentry-manager": { "version": "file:common/web/sentry-manager", "requires": { "@keymanapp/keyman-version": "*", "@sentry/browser": "^5.27.4", - "typescript": "^4.5.4" + "typescript": "^4.9.5" } }, "@keymanapp/web-utils": { @@ -7583,7 +7749,7 @@ "@keymanapp/keyman-version": "*", "@keymanapp/resources-gosh": "*", "@types/node": "^14.0.5", - "typescript": "^4.5.4" + "typescript": "^4.9.5" }, "dependencies": { "@types/node": { @@ -8016,6 +8182,29 @@ "@sinonjs/commons": "^1.7.0" } }, + "@sinonjs/formatio": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.2.tgz", + "integrity": "sha512-B8SEsgd8gArBLMD6zpRw3juQ2FVSsmdd7qlevyDqzS9WTCtvF55/gAL+h6gue8ZvPYcdiPdvueM/qm//9XzyTQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^3.1.0" + }, + "dependencies": { + "@sinonjs/samsam": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.3.tgz", + "integrity": "sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.3.0", + "array-from": "^2.1.1", + "lodash": "^4.17.15" + } + } + } + }, "@sinonjs/samsam": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", @@ -8033,10 +8222,10 @@ "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "dev": true }, - "@socket.io/base64-arraybuffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@socket.io/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", - "integrity": "sha512-dOlCBKnDw4iShaIsH/bxujKTM18+2TOAsYz+KSc11Am38H4q5Xw8Bbz97ZYdrVNM+um3p7w86Bvvmcn9q+5+eQ==", + "@socket.io/component-emitter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", + "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==", "dev": true }, "@szmarczak/http-timer": { @@ -8098,12 +8287,6 @@ "integrity": "sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw==", "dev": true }, - "@types/component-emitter": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.11.tgz", - "integrity": "sha512-SRXjM+tfsSlA9VuG8hGO2nft2p8zjXCK1VcC6N4NXbBbYbSia9kzCChYQajIjzIqOOOuh5Ock6MmV2oux4jDZQ==", - "dev": true - }, "@types/connect": { "version": "3.4.35", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", @@ -8120,10 +8303,13 @@ "dev": true }, "@types/cors": { - "version": "2.8.12", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", - "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==", - "dev": true + "version": "2.8.13", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz", + "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==", + "dev": true, + "requires": { + "@types/node": "*" + } }, "@types/express": { "version": "4.17.13", @@ -8270,12 +8456,6 @@ "@types/node": "*" } }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -8391,6 +8571,12 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "array-from": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", + "integrity": "sha512-GQTc6Uupx1FCavi5mPzBvVT7nEOeWMmUA9P95wpfpW1XwMSKs+KaymD5C2Up7KAUKg/mYwbsUYzdZWcoajlNZg==", + "dev": true + }, "asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -8795,12 +8981,6 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==" }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, "compress-brotli": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/compress-brotli/-/compress-brotli-1.3.6.tgz", @@ -8875,6 +9055,11 @@ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" }, + "convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" + }, "cookie": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", @@ -9114,9 +9299,9 @@ } }, "engine.io": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.1.3.tgz", - "integrity": "sha512-rqs60YwkvWTLLnfazqgZqLa/aKo+9cueVfEi/dZ8PyGyaf8TLOxj++4QMIgeG3Gn0AhrWiFXvghsoY9L9h25GA==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.0.tgz", + "integrity": "sha512-OgxY1c/RuCSeO/rTr8DIFXx76IzUUft86R7/P7MMbbkuzeqJoTNw2lmeD91IyGz41QYleIIjWeMJGgug043sfQ==", "dev": true, "requires": { "@types/cookie": "^0.4.1", @@ -9128,26 +9313,14 @@ "cors": "~2.8.5", "debug": "~4.3.1", "engine.io-parser": "~5.0.3", - "ws": "~8.2.3" - }, - "dependencies": { - "ws": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", - "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", - "dev": true, - "requires": {} - } + "ws": "~8.11.0" } }, "engine.io-parser": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.3.tgz", - "integrity": "sha512-BtQxwF27XUNnSafQLvDi0dQ8s3i6VgzSoQMJacpIcGNrlUdfHSKbgm3jmjCVvQluGzqwujQMPAoMai3oYSTurg==", - "dev": true, - "requires": { - "@socket.io/base64-arraybuffer": "~1.0.2" - } + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.6.tgz", + "integrity": "sha512-tjuoZDMAdEhVnSFleYPCtdL2GXwVTGtNjoeJd9IhIG3C1xs9uwxqRNEu5WpnDZCaozwVlK/nuQhpodhXSIMaxw==", + "dev": true }, "ent": { "version": "2.2.0", @@ -9692,9 +9865,9 @@ "optional": true }, "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, "http-errors": { "version": "1.8.1", @@ -10238,8 +10411,8 @@ "karma-teamcity-reporter": "^1.1.0", "mocha": "^10.0.0", "modernizr": "^3.11.7", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" } }, "keyv": { @@ -10328,6 +10501,12 @@ } } }, + "lolex": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.2.0.tgz", + "integrity": "sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==", + "dev": true + }, "lowercase-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", @@ -10461,12 +10640,11 @@ } }, "mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", "dev": true, "requires": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", @@ -11512,17 +11690,17 @@ } }, "socket.io": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.4.1.tgz", - "integrity": "sha512-s04vrBswdQBUmuWJuuNTmXUVJhP0cVky8bBDhdkf8y0Ptsu7fKU2LuLbts9g+pdmAdyMMn8F/9Mf1/wbtUN0fg==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.0.tgz", + "integrity": "sha512-b65bp6INPk/BMMrIgVvX12x3Q+NqlGqSlTuvKQWt0BUJ3Hyy3JangBl7fEoWZTXbOKlCqNPbQ6MbWgok/km28w==", "dev": true, "requires": { "accepts": "~1.3.4", "base64id": "~2.0.0", "debug": "~4.3.2", - "engine.io": "~6.1.0", - "socket.io-adapter": "~2.3.3", - "socket.io-parser": "~4.0.4" + "engine.io": "~6.4.0", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.1" }, "dependencies": { "debug": { @@ -11537,19 +11715,21 @@ } }, "socket.io-adapter": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.3.3.tgz", - "integrity": "sha512-Qd/iwn3VskrpNO60BeRyCyr8ZWw9CPZyitW4AQwmRZ8zCiyDiL+znRnWX6tDHXnWn1sJrM1+b6Mn6wEDJJ4aYQ==", - "dev": true - }, - "socket.io-parser": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.5.tgz", - "integrity": "sha512-sNjbT9dX63nqUFIOv95tTVm6elyIU4RvB1m8dOeZt+IgWwcWklFDOdmGcfo3zSiRsnR/3pJkjY5lfoGqEe4Eig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz", + "integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==", "dev": true, "requires": { - "@types/component-emitter": "^1.2.10", - "component-emitter": "~1.3.0", + "ws": "~8.11.0" + } + }, + "socket.io-parser": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.2.tgz", + "integrity": "sha512-DJtziuKypFkMMHCm2uIshOYC7QaylbtzQwiMYDuCKy3OPkjLzu4B2vAhTlqipRHHzrI0NJeBAizTK7X+6m1jVw==", + "dev": true, + "requires": { + "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1" } }, @@ -11560,9 +11740,9 @@ "dev": true }, "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -11798,16 +11978,23 @@ "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, "ts-node": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", - "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, "requires": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", "arg": "^4.1.0", "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", - "source-map-support": "^0.5.17", + "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, "dependencies": { @@ -11895,14 +12082,14 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "typescript": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", - "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==" + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==" }, "ua-parser-js": { - "version": "0.7.31", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz", - "integrity": "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==", + "version": "0.7.33", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.33.tgz", + "integrity": "sha512-s8ax/CeZdK9R/56Sui0WM6y9OFREJarMRHqLB2EwkovemBxNQ+Bqu8GAsUnVcXKgphb++ghr/B2BZx4mahujPw==", "dev": true }, "uc.micro": { @@ -12089,9 +12276,9 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "requires": {} }, "xml2js": { diff --git a/package.json b/package.json index df60de59f8..4cf7efa68e 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "chai": "^4.3.4", "mocha": "^10.0.0", "mocha-teamcity-reporter": "^4.0.0", - "ts-node": "^9.1.1", - "typescript": "^4.5.4" + "ts-node": "^10.9.1", + "typescript": "^4.9.5" }, "scripts": {}, "workspaces": [ @@ -15,6 +15,7 @@ "developer/src/kmlmc", "developer/src/server", "common/models/*", + "common/tools/*", "common/web/*", "common/predictive-text", "web" diff --git a/resources/build/build-utils.md b/resources/build/build-utils.md index db797a087c..2960bce4c3 100644 --- a/resources/build/build-utils.md +++ b/resources/build/build-utils.md @@ -14,7 +14,9 @@ objectives are: 2. to be self-documenting in usage (`--help` should always tell you all you need to know) 3. for the scripts to be easily readable, coherent, and straightforward for - anyone involved in the project to maintain. + anyone involved in the project to maintain +4. for dependencies to be simple (a module dependency will always be to a whole + module, not to a specific target within that module) * [Jump to API definitions](#builder-api-functions-and-variables) @@ -124,6 +126,14 @@ another script: prefixed with a `:`, for example `:app`. If no target is defined for a script, then the default target `:project` is used. + If a folder exists with the same name as a target, then that automatically + denotes the target as a "child project". This can simplify parent-child style + scripts, using the [`builder_run_child_actions`] function. + + A child project with an alternate folder can also be specified by appending + `=path` to the target definition, for example `:app=src/app`. Where possible, + avoid differences in names of child projects and folders. + * **actions**: these are the various actions that a build script can take, such as `clean`, or `build`. If no action is passed in to on a given script invocation, then the default action is `build` (unless the script defines an @@ -214,22 +224,6 @@ The following parameters are pre-defined and should not be overridden: # Builder API functions and variables - -## `builder_check_color` function - -If you wish to provide [formatting variables] in your [`builder_describe`] call, you -will need to use `builder_check_color` first. This function takes the same -parameters as [`builder_parse`]. - -### Usage - -```bash -builder_check_color "$@" -builder_describe "sample" \ - "--ci For use with action ${BUILDER_TERM_START}test${BUILDER_TERM_END} - emits CI-friendly test reports" -``` - - ## `builder_describe` function Describes a build script, defines available parameters and their meanings. Use @@ -290,10 +284,18 @@ own in the call: * `:module`: `"this module"` * `:tools`: `"build tools for this project"` +If a folder exists with the same name as a target, then that automatically +denotes the target as a "child project". This can simplify parent-child style +scripts, using the [`builder_run_child_actions`] function. + +A child project with an alternate folder can also be specified by appending +`=path` to the target definition, for example `:app=src/app`. Where possible, +avoid differences in names of child projects and folders. + **Actions** are defined as single words, for example: ```bash -builder_describe "Sample script build "install installs app on local system" +builder_describe "Sample script" build "install installs app on local system" ``` There are several predefined actions. Again, these will not be available to @@ -338,6 +340,7 @@ this, you should use `--debug,-d` to enable the shorthand form. Note that you should not include any of the [standard builder parameters] here. +-------------------------------------------------------------------------------- ## `builder_display_usage` function @@ -351,6 +354,7 @@ builder_describe "sample" clean build test builder_display_usage ``` +-------------------------------------------------------------------------------- ## `$builder_extra_params` variable @@ -370,6 +374,7 @@ array expansion format: npm test -- "${builder_extra_params[@]}" ``` +-------------------------------------------------------------------------------- ## `builder_finish_action` function @@ -412,6 +417,7 @@ with a non-zero exit code: ## [common/web/keyman-version] action:target failed with message: yeah, something failed ``` +-------------------------------------------------------------------------------- ## `builder_has_action` function @@ -429,6 +435,7 @@ fi See [`builder_start_action`] for more details. +-------------------------------------------------------------------------------- ## `builder_has_option` function @@ -464,6 +471,7 @@ if builder_has_option --path; then fi ``` +-------------------------------------------------------------------------------- ## `builder_parse` function @@ -483,6 +491,35 @@ Generally, you will always pass `"$@"` as the parameter for this call, to pass all the command line parameters from the script invocation, with automatically correct quoting and escaping. +-------------------------------------------------------------------------------- + +## `builder_run_child_actions` function + +Executes the specified actions on or all child targets, or on the specified +targets. A child target is any target which has a sub-folder of the same name as +the target. Like [`builder_start_action`], the actions will only actually be run +if they have been specified by the user on the command-line. + +The child script will be called with the applicable action, for all targets. No +options apart from standard builder options are passed through. + +### Usage + +```bash +builder_run_child_actions action1 [...] +``` + +### Parameters + + 1...: action[:target] name of action:target to run + +### Example + +```bash +builder_run_child_actions configure build test install +``` + +-------------------------------------------------------------------------------- ## `builder_start_action` function @@ -523,6 +560,22 @@ also print a log message indicating that the action has started, for example: ## [common/web/keyman-version] build:project starting... ``` +-------------------------------------------------------------------------------- + +## `builder_term` function + +Emits the parameters passed to the function, wrapped with the helper function +`builder_term`, which wraps the passed string with `$BUILDER_TERM_START` and +`$BUILDER_TERM_END`, e.g.: `$(builder_term text)`. + +### Usage + +```bash +builder_describe "sample" \ + "--ci For use with action $(builder_term test) - emits CI-friendly test reports" +``` + +-------------------------------------------------------------------------------- ## `builder_use_color` function @@ -535,6 +588,8 @@ builder_use_color true builder_use_color false ``` +-------------------------------------------------------------------------------- + ## `$builder_verbose` variable This standard variable will be set to `"--verbose"`, if the `--verbose` or `-v` @@ -553,6 +608,8 @@ if builder_has_option --verbose; then fi ``` +-------------------------------------------------------------------------------- + ## Formatting variables These helper variables define ANSI color escapes when running in color mode, and @@ -571,9 +628,10 @@ resolve either to empty string (for `$COLOR_*`), or equivalent plain-text forms * `$HEADING_SETMARK`: Add a setmark, e.g. with VSCode +Note: it is recommended that you use `$(builder_term text)` instead of +`${BUILDER_TERM_START}text${BUILDER_TERM_END}`. [standard builder parameters]: #standard-builder-parameters -[`builder_check_color`]: #buildercheckcolor-function [`builder_describe`]: #builderdescribe-function [`builder_display_usage`]: #builderdisplayusage-function [`$builder_extra_params`]: #builderextraparams-variable @@ -585,3 +643,4 @@ resolve either to empty string (for `$COLOR_*`), or equivalent plain-text forms [`builder_use_color`]: #builderusecolor-function [`$builder_verbose`]: #builderverbose-variable [formatting variables]: #formatting-variables +[`builder_run_child_actions`]: #builderrunchildactions-function \ No newline at end of file diff --git a/resources/build/increment-version.sh b/resources/build/increment-version.sh index fd0bc7add8..4e57f04cb3 100755 --- a/resources/build/increment-version.sh +++ b/resources/build/increment-version.sh @@ -143,7 +143,7 @@ if [ "$action" == "commit" ]; then popd > /dev/null # - # Trigger builds for the previous version on TeamCity and Jenkins + # Trigger builds for the previous version on TeamCity, Jenkins and GitHub # triggerBuilds diff --git a/resources/build/run-required-test-builds.sh b/resources/build/run-required-test-builds.sh index 5213c6b5c7..400dd4f8bc 100755 --- a/resources/build/run-required-test-builds.sh +++ b/resources/build/run-required-test-builds.sh @@ -58,6 +58,10 @@ function triggerTestBuilds() { local job=${test_build%_Jenkins} echo " -- Triggering build configuration $job/$branch on Jenkins" triggerJenkinsBuild "$job" "$branch" "$force" + elif [ "${test_build:(-7)}" == "_GitHub" ]; then + local job=${test_build%_GitHub} + echo " -- Triggering GitHub action build $job/$branch" + triggerGitHubActionsBuild true "$job" "$branch" else echo " -- Triggering build configuration $test_build on teamcity" triggerTeamCityBuild true "$test_build" "$vcs_test" "$branch" @@ -172,11 +176,21 @@ while IFS= read -r line; do done <<< "$prfiles" debug_echo "Build platforms: ${build_platforms[*]}" -# -# Start the test builds -# -echo ". Start test builds" -triggerTestBuilds "`echo ${build_platforms[@]}`" "$PRNUM" +if (( ${#build_platforms[@]} > 0)); then + # + # Start the test builds + # + echo ". Start test builds" + triggerTestBuilds "`echo ${build_platforms[@]}`" "$PRNUM" +else + echo ". No builds to start" + curl --silent --write-out '\n' \ + --request POST \ + --header "Accept: application/vnd.github+json" \ + --header "Authorization: token $GITHUB_TOKEN" \ + --data '{"state":"success","description":"Skipping since no platform builds necessary","context":"Test Build (Keyman)"}' \ + "https://api.github.com/repos/keymanapp/keyman/statuses/${BUILD_VCS_NUMBER}" +fi exit 0 diff --git a/resources/build/tests/dependencies/.gitignore b/resources/build/tests/dependencies/.gitignore new file mode 100644 index 0000000000..78f329d318 --- /dev/null +++ b/resources/build/tests/dependencies/.gitignore @@ -0,0 +1 @@ +**/out.* \ No newline at end of file diff --git a/resources/build/tests/dependencies/app/build.sh b/resources/build/tests/dependencies/app/build.sh new file mode 100755 index 0000000000..83bf37f91f --- /dev/null +++ b/resources/build/tests/dependencies/app/build.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +set -eu + +## START STANDARD BUILD SCRIPT INCLUDE +# adjust relative paths as necessary +THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")" +. "$(dirname "$THIS_SCRIPT")/../../../build-utils.sh" +# END STANDARD BUILD SCRIPT INCLUDE + +cd "$THIS_SCRIPT_PATH" + +# Test builder_describe_outputs and dependencies + +builder_describe "app test module" \ + @../library \ + configure \ + build + +builder_parse "$@" + +builder_describe_outputs \ + configure:project out.configure \ + build:project out.build + +if builder_start_action clean:project; then + rm -f out.configure out.build + builder_finish_action success clean:project +fi + +if builder_start_action configure:project; then + echo " ... doing the 'configure' action for 'app'" + touch out.configure + builder_finish_action success configure:project +fi + +if builder_start_action build:project; then + echo " ... doing the 'build' action for 'app'" + touch out.build + builder_finish_action success build:project +fi diff --git a/resources/build/tests/dependencies/library/build.sh b/resources/build/tests/dependencies/library/build.sh new file mode 100755 index 0000000000..34dae97fe8 --- /dev/null +++ b/resources/build/tests/dependencies/library/build.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +set -eu + +## START STANDARD BUILD SCRIPT INCLUDE +# adjust relative paths as necessary +THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")" +. "$(dirname "$THIS_SCRIPT")/../../../build-utils.sh" +# END STANDARD BUILD SCRIPT INCLUDE + +cd "$THIS_SCRIPT_PATH" + +# Test builder_describe_outputs and dependencies + +builder_describe "library test module" \ + clean \ + configure \ + build + +builder_parse "$@" + +builder_describe_outputs \ + configure:project out.configure \ + build:project out.build + +if builder_start_action clean:project; then + rm -f out.configure out.build + builder_finish_action success clean:project +fi + +if builder_start_action configure:project; then + echo " ... doing the 'configure' action for 'library'" + touch out.configure + builder_finish_action success configure:project +fi + +if builder_start_action build:project; then + echo " ... doing the 'build' action for 'library'" + touch out.build + builder_finish_action success build:project +fi diff --git a/resources/build/tests/trees/.gitignore b/resources/build/tests/trees/.gitignore new file mode 100644 index 0000000000..4ed4ecc8ed --- /dev/null +++ b/resources/build/tests/trees/.gitignore @@ -0,0 +1 @@ +child?.* \ No newline at end of file diff --git a/resources/build/tests/trees/build.sh b/resources/build/tests/trees/build.sh new file mode 100755 index 0000000000..13d3816367 --- /dev/null +++ b/resources/build/tests/trees/build.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash + +set -eu + +## START STANDARD BUILD SCRIPT INCLUDE +# adjust relative paths as necessary +THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")" +. "$(dirname "$THIS_SCRIPT")/../../build-utils.sh" +# END STANDARD BUILD SCRIPT INCLUDE + +cd "$THIS_SCRIPT_PATH" + +# Test builder_describe_outputs and dependencies + +builder_describe "parent test module" \ + :child1 \ + :child2 \ + :child3=child3_renamed/src \ + clean \ + configure \ + build \ + test \ + install \ + error + +builder_parse "$@" + +# All child actions will generate files which we need to verify for test +rm -f ./child?.* + +function test_present() { + local target=$1 + local action=$2 + + local CHECK="${COLOR_GREEN}✔${COLOR_RESET}" # ✔ + local CROSS="${COLOR_RED}❌${COLOR_RESET}" # ❌ + + if builder_has_action $action:$target; then + if [ ! -f $target.$action ]; then + builder_die "$CROSS FAIL: ./$target.$action to be present" + else + echo "$CHECK PASS: ./$target.$action found as expected" + fi + fi +} + +# We need to specify the order to run actions in the parent script +# +# This may looks as simple as: +# +# builder_run_child_actions clean configure build test install +# +builder_run_child_actions clean +test_present child1 clean +test_present child2 clean +test_present child3 clean + +builder_run_child_actions configure +test_present child1 configure +test_present child2 configure +test_present child3 configure + +# Test chaining commands in a single statement +builder_run_child_actions build test +test_present child1 build +test_present child2 build +test_present child3 build +test_present child1 test +test_present child2 test +test_present child3 test + +# We are customising the order in which child scripts are installed, so 2 goes before 1 +builder_run_child_actions install:child2 +test_present child2 install + +builder_run_child_actions install:child1 +test_present child1 install + +builder_run_child_actions error + +echo Done \ No newline at end of file diff --git a/resources/build/tests/trees/child1/build.sh b/resources/build/tests/trees/child1/build.sh new file mode 100755 index 0000000000..795e11e6d3 --- /dev/null +++ b/resources/build/tests/trees/child1/build.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +set -eu + +## START STANDARD BUILD SCRIPT INCLUDE +# adjust relative paths as necessary +THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")" +. "$(dirname "$THIS_SCRIPT")/../../../build-utils.sh" +# END STANDARD BUILD SCRIPT INCLUDE + +cd "$THIS_SCRIPT_PATH" + +# Test builder_describe_outputs and dependencies + +project=child1 + +builder_describe "$project test module" \ + clean \ + configure \ + build \ + test \ + install \ + error + +builder_parse "$@" + +function test_action() { + local action=$1 + + if builder_start_action $action; then + touch ../$project.$action + builder_finish_action success $action + fi +} + +test_action clean +test_action configure +test_action build +test_action test +test_action install + +if builder_start_action error; then + builder_die "This error action is supposed to die" +fi \ No newline at end of file diff --git a/resources/build/tests/trees/child2/build.sh b/resources/build/tests/trees/child2/build.sh new file mode 100755 index 0000000000..cbf048ea26 --- /dev/null +++ b/resources/build/tests/trees/child2/build.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +set -eu + +## START STANDARD BUILD SCRIPT INCLUDE +# adjust relative paths as necessary +THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")" +. "$(dirname "$THIS_SCRIPT")/../../../build-utils.sh" +# END STANDARD BUILD SCRIPT INCLUDE + +cd "$THIS_SCRIPT_PATH" + +# Test builder_describe_outputs and dependencies + +project=child2 + +builder_describe "$project test module" \ + clean \ + configure \ + build \ + test \ + install \ + error + +builder_parse "$@" + +function test_action() { + local action=$1 + + if builder_start_action $action; then + touch ../$project.$action + builder_finish_action success $action + fi +} + +test_action clean +test_action configure +test_action build +test_action test +test_action install + +if builder_start_action error; then + builder_die "This error action is supposed to die" +fi \ No newline at end of file diff --git a/resources/build/tests/trees/child3_renamed/src/build.sh b/resources/build/tests/trees/child3_renamed/src/build.sh new file mode 100755 index 0000000000..508cc0293f --- /dev/null +++ b/resources/build/tests/trees/child3_renamed/src/build.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +set -eu + +## START STANDARD BUILD SCRIPT INCLUDE +# adjust relative paths as necessary +THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")" +. "$(dirname "$THIS_SCRIPT")/../../../../build-utils.sh" +# END STANDARD BUILD SCRIPT INCLUDE + +cd "$THIS_SCRIPT_PATH" + +# Test builder_describe_outputs and dependencies + +project=child3 + +builder_describe "$project test module" \ + clean \ + configure \ + build \ + test \ + install \ + error + +builder_parse "$@" + +function test_action() { + local action=$1 + + if builder_start_action $action; then + touch ../../$project.$action + builder_finish_action success $action + fi +} + +test_action clean +test_action configure +test_action build +test_action test +test_action install + +if builder_start_action error; then + builder_die "This error action is supposed to die" +fi \ No newline at end of file diff --git a/resources/build/tests/trees/test.sh b/resources/build/tests/trees/test.sh new file mode 100755 index 0000000000..284e3ec8f7 --- /dev/null +++ b/resources/build/tests/trees/test.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -eu + +./build.sh clean configure build install test +if [ $(ls child?.* | wc -l) -ne 14 ]; then + echo unexpected output file count + exit 1 +fi + +./build.sh error && (echo should not have passed; exit 1) || (echo " ... build returned error as expected") + +./build.sh install:child1 test:child2 +if [ $(ls child?.* | wc -l) -ne 2 ]; then + echo unexpected output file count + exit 1 +fi \ No newline at end of file diff --git a/resources/build/trigger-builds.inc.sh b/resources/build/trigger-builds.inc.sh index 35234c43c0..ac8d519d4a 100644 --- a/resources/build/trigger-builds.inc.sh +++ b/resources/build/trigger-builds.inc.sh @@ -21,6 +21,10 @@ function triggerBuilds() { local job=${build%_Jenkins} echo Triggering Jenkins build "$job" "$base" "true" triggerJenkinsBuild "$job" "$base" "true" + elif [ "${build:(-7)}" == "_GitHub" ]; then + local job=${build%_GitHub} + echo Triggering GitHub action build "$job" "$base" + triggerGitHubActionsBuild false "$job" "$base" else echo Triggering TeamCity build false $build $TEAMCITY_VCS_ID $base triggerTeamCityBuild false $build $TEAMCITY_VCS_ID $base @@ -96,6 +100,7 @@ function triggerJenkinsBuild() { if echo "$OUTPUT" | grep -q "\"triggered\":true"; then echo -n " job triggered: " else + echo "##teamcity[buildProblem description='Triggering Jenkins build failed']" echo -n " triggering failed: " fi @@ -119,3 +124,47 @@ function triggerJenkinsBuild() { echo fi } + +function triggerGitHubActionsBuild() { + local IS_TEST_BUILD="$1" + local GITHUB_ACTION="$2" + local GIT_BRANCH="${3:-master}" + local GIT_REF GIT_SHA + + local GITHUB_SERVER=https://api.github.com/repos/keymanapp/keyman/dispatches + + if [ "${action:-""}" == "commit" ]; then + # This will only be true if we created and pushed a tag + GIT_REF="refs/tags/release@$VERSION_WITH_TAG" + GIT_SHA="$(git rev-parse "${GIT_REF}")" + GIT_EVENT_TYPE="${GITHUB_ACTION}: release@${VERSION_WITH_TAG}" + elif [[ $GIT_BRANCH != stable-* ]] && [[ $GIT_BRANCH =~ [0-9]+ ]]; then + GIT_REF="refs/pull/${GIT_BRANCH}/merge" + GIT_SHA="$(git rev-parse "refs/pull/${GIT_BRANCH}/head")" + GIT_EVENT_TYPE="${GITHUB_ACTION}: PR #${GIT_BRANCH}" + GIT_BRANCH="PR-${GIT_BRANCH}" + else + GIT_REF="refs/heads/${GIT_BRANCH}" + GIT_SHA="$(git rev-parse "${GIT_REF}")" + GIT_EVENT_TYPE="${GITHUB_ACTION}: ${GIT_BRANCH}" + fi + + local DATA="{\"event_type\": \"$GIT_EVENT_TYPE\", \ + \"client_payload\": { \ + \"ref\": \"$GIT_REF\", \ + \"sha\": \"$GIT_SHA\", \ + \"branch\": \"$GIT_BRANCH\", \ + \"isTestBuild\": \"$IS_TEST_BUILD\" \ + }}" + + echo "GitHub Action Data: $DATA" + + # adjust indentation for output of curl + echo -n " " + curl --silent --write-out '\n' \ + --request POST \ + --header "Accept: application/vnd.github+json" \ + --header "Authorization: token $GITHUB_TOKEN" \ + --data "$DATA" \ + $GITHUB_SERVER +} diff --git a/resources/build/trigger-definitions.inc.sh b/resources/build/trigger-definitions.inc.sh index 83f687d46d..70a1b89adc 100644 --- a/resources/build/trigger-definitions.inc.sh +++ b/resources/build/trigger-definitions.inc.sh @@ -27,6 +27,7 @@ watch_developer='common|core|web' # _Jenkins should be appended to any build configuration (pipeline) name that is from Jenkins, # not TeamCity. # +# _GitHub should be appended to any build configuration name that is from GitHub, not TeamCity. # Test Build Configurations @@ -35,7 +36,7 @@ bc_test_all=() bc_test_android=(KeymanAndroid_TestPullRequests KeymanAndroid_TestSamplesAndTestProjects) bc_test_ios=(Keyman_iOS_TestPullRequests Keyman_iOS_TestSamplesAndTestProjects) -bc_test_linux=(KeymanLinux_TestPullRequests Keyman_Common_KPAPI_TestPullRequests_Linux pipeline-keyman-packaging_Jenkins) +bc_test_linux=(KeymanLinux_TestPullRequests Keyman_Common_KPAPI_TestPullRequests_Linux pipeline-keyman-packaging_Jenkins deb-pr-packaging_GitHub) bc_test_mac=(Keyman_KeymanMac_PullRequests Keyman_Common_KPAPI_TestPullRequests_macOS) bc_test_windows=(KeymanDesktop_TestPullRequests KeymanDesktop_TestPrRenderOnScreenKeyboards Keyman_Common_KPAPI_TestPullRequests_Windows) bc_test_web=(Keymanweb_TestPullRequests Keyman_Common_LMLayer_TestPullRequests Keyman_Common_KPAPI_TestPullRequests_WASM) @@ -49,7 +50,7 @@ vcs_test=HttpsGithubComKeymanappKeymanPRs bc_master_android=(KeymanAndroid_Build) bc_master_ios=(Keyman_iOS_Master) -bc_master_linux=(KeymanLinux_Master pipeline-keyman-packaging_Jenkins) +bc_master_linux=(KeymanLinux_Master pipeline-keyman-packaging_Jenkins deb-release-packaging_GitHub) bc_master_mac=(KeymanMac_Master) bc_master_windows=(Keyman_Build) bc_master_web=(Keymanweb_Build) @@ -61,7 +62,7 @@ vcs_master=HttpsGithubComKeymanappKeyman bc_beta_android=(KeymanAndroid_Build) bc_beta_ios=(Keyman_iOS_Master) -bc_beta_linux=(KeymanLinux_Master pipeline-keyman-packaging_Jenkins) +bc_beta_linux=(KeymanLinux_Master pipeline-keyman-packaging_Jenkins deb-release-packaging_GitHub) bc_beta_mac=(KeymanMac_Master) bc_beta_windows=(Keyman_Build) bc_beta_web=(Keymanweb_Build) @@ -73,7 +74,7 @@ vcs_beta=HttpsGithubComKeymanappKeyman bc_stable_14_0_android=(KeymanAndroid_Build) bc_stable_14_0_ios=(Keyman_iOS_Master) -bc_stable_14_0_linux=(KeymanLinux_Master pipeline-keyman-packaging_Jenkins) +bc_stable_14_0_linux=(KeymanLinux_Master pipeline-keyman-packaging_Jenkins deb-release-packaging_GitHub) bc_stable_14_0_mac=(KeymanMac_Master) bc_stable_14_0_windows=(Keyman_Build) bc_stable_14_0_web=(Keymanweb_Build) @@ -88,9 +89,21 @@ vcs_stable_14_0=HttpsGithubComKeymanappKeyman bc_stable_15_0_android=(KeymanAndroid_Build) bc_stable_15_0_ios=(Keyman_iOS_Master) -bc_stable_15_0_linux=(KeymanLinux_Master pipeline-keyman-packaging_Jenkins) +bc_stable_15_0_linux=(KeymanLinux_Master pipeline-keyman-packaging_Jenkins deb-release-packaging_GitHub) bc_stable_15_0_mac=(KeymanMac_Master) bc_stable_15_0_windows=(Keyman_Build) bc_stable_15_0_web=(Keymanweb_Build) vcs_stable_15_0=HttpsGithubComKeymanappKeyman + +# Stable 16.0 Build Configurations + +bc_stable_16_0_android=(KeymanAndroid_Build) +bc_stable_16_0_ios=(Keyman_iOS_Master) +bc_stable_16_0_linux=(KeymanLinux_Master pipeline-keyman-packaging_Jenkins) +bc_stable_16_0_mac=(KeymanMac_Master) +bc_stable_16_0_windows=(Keyman_Build) +bc_stable_16_0_web=(Keymanweb_Build) +bc_stable_16_0_developer=(Keyman_Developer_Release) + +vcs_stable_16_0=HttpsGithubComKeymanappKeyman diff --git a/resources/build/version/package.json b/resources/build/version/package.json index 5902dce8cc..8f639b50cc 100644 --- a/resources/build/version/package.json +++ b/resources/build/version/package.json @@ -2,7 +2,7 @@ "dependencies": { "@actions/core": "^1.9.1", "@actions/github": "^2.1.0", - "typescript": "^4.5.4", + "typescript": "^4.9.5", "yargs": "^15.1.0" }, "description": "Automatically updates HISTORY.md based on pull requests", @@ -10,10 +10,10 @@ "@types/node": "^13.7.0", "@types/semver": "^7.1.0", "semver": "^7.1.2", - "ts-node": "^8.6.2" + "ts-node": "^10.9.1" }, "engines": { - "node": "16" + "node": ">=16.0" }, "files": [ "src" diff --git a/resources/builder.inc.sh b/resources/builder.inc.sh index 4234df67d7..9c81e3b38d 100755 --- a/resources/builder.inc.sh +++ b/resources/builder.inc.sh @@ -19,7 +19,7 @@ function _builder_init() { _builder_findRepoRoot _builder_setBuildScriptIdentifiers - if [[ -n "$TERM" ]] && [[ "$TERM" != "dumb" ]] && [[ "$TERM" != "unknown" ]]; then + if [[ -n "$TERM" ]] && [[ "$TERM" != "dumb" ]] && [[ "$TERM" != "unknown" ]] && [ -t 1 ]; then builder_use_color true else builder_use_color false @@ -109,13 +109,25 @@ builder_use_color() { fi } +# +# Wraps the input string in `builder_display_usage` with $BUILDER_TERM_START and +# $BUILDER_TERM_END +# +function builder_term() { + echo "${BUILDER_TERM_START}$*${BUILDER_TERM_END}" +} + function builder_die() { echo - echo "${COLOR_RED}$*" + echo "${COLOR_RED}$*${COLOR_RESET}" echo exit 1 } +function builder_warn() { + echo "${COLOR_YELLOW}$*${COLOR_RESET}" +} + #################################################################################### # # builder_ functions for standard build script parameter and process management @@ -126,7 +138,13 @@ function builder_die() { # builder_ names are reserved. # _builder_ names are internal use and subject to change # -_builder_debug=false +if [ -z ${_builder_debug+x} ]; then + _builder_debug=false +fi + +if $_builder_debug; then + echo "[DEBUG] Command line: $0 $@" +fi # # builder_extra_params: string containing all parameters after '--' @@ -241,6 +259,90 @@ _builder_cleanup_deps() { fi } +_builder_execute_child() { + local action=$1 + local target=$2 + + local scope="[$THIS_SCRIPT_IDENTIFIER] " + local script="$THIS_SCRIPT_PATH/${_builder_target_paths[$target]}/build.sh" + + if $_builder_debug; then + echo "${COLOR_BLUE}## $scope$action$target starting...${COLOR_RESET}" + fi + + "$script" $action \ + $builder_verbose \ + $builder_debug \ + && ( + if $_builder_debug; then + echo "${COLOR_GREEN}## $scope$action$target completed successfully${COLOR_RESET}" + fi + ) || ( + result=$? + echo "${COLOR_RED}## $scope$action$target failed with exit code $result${COLOR_RESET}" + exit $result + ) +} + +_builder_run_child_action() { + local action="$1" target + + if [[ $action =~ : ]]; then + IFS=: read -r action target <<< $action + target=:$target + else + target=':*' + fi + + if builder_has_action $action$target; then + if [[ $target == ':*' ]]; then + # run all children in order specified in builder_describe + for target in "${_builder_targets[@]}"; do + # We have to re-test the action because the user may not + # have specified all targets in their invocation + if builder_has_action $action$target; then + if [ -f "$THIS_SCRIPT_PATH/${_builder_target_paths[$target]}/build.sh" ]; then + _builder_execute_child $action $target + fi + fi + done + else + # If specified explicitly, we assume existence of a child build script. + _builder_execute_child $action $target + fi + fi +} + +# +# Executes the specified actions on all child targets, or on the specified +# targets. A child target is any target which has a sub-folder of the same name +# as the target. However, the actions will only be run if they have been +# specified by the user on the command-line. +# +# ### Usage +# +# ```bash +# builder_run_child_actions action1 [...] +# ``` +# +# ### Parameters +# +# 1...: action[:target] name of action:target to run +# +# ### Example +# +# ```bash +# builder_run_child_actions configure build test install +# ``` +# +builder_run_child_actions() { + while [[ $# -gt 0 ]]; do + local action="$1" + _builder_run_child_action "$action" + shift + done +} + # # Builds the standardized `action:target` string for the specified action-target # pairing and also returns 0 if the user has asked to perform it on the command @@ -256,9 +358,11 @@ _builder_cleanup_deps() { # if build_has_action action[:target]; then ...; fi # ```` # -# Parameters: +# ### Parameters +# # 1: action[:target] name of action:target -# Example: +# +# ### Example # # ```bash # if builder_has_action build:app; then ... @@ -462,9 +566,16 @@ _builder_expand_action_targets() { # default, append a `+` to the action name, e.g. `"test+ Test the project"`. # If there is no default specified, then it will be `build`. # -# * **Target:** `":target [One line description]"` +# * **Target:** `":target[=path] [One line description]"` # -# A target always starts with colon, e.g. `:project`. +# A target always starts with colon, e.g. `:project`. If a folder exists with +# the same name as a target, then that automatically denotes the target as a +# "child project". This can simplify parent-child style scripts, using the +# [`builder_run_child_actions`] function. +# +# A child project with an alternate folder can also be specified by appending +# `=path` to the target definition, for example `:app=src/app`. Where +# possible, avoid differences in names of child projects and folders. # # * **Dependency:** "@/path/to/dependency [action][:target] ..." # @@ -482,6 +593,8 @@ _builder_expand_action_targets() { # specified, space separated. # builder_describe() { + _builder_record_function_call builder_describe + _builder_description="$1" _builder_actions=() _builder_targets=() @@ -494,6 +607,7 @@ builder_describe() { declare -A -g _builder_dep_path # array of output files for action:target pairs declare -A -g _builder_dep_related_actions # array of action:targets associated with a given dependency declare -A -g _builder_internal_dep # array of internal action:targets dependency relationships + declare -A -g _builder_target_paths # array of target child project paths shift # describe each target, action, and option possibility while [[ $# -gt 0 ]]; do @@ -506,7 +620,25 @@ builder_describe() { if [[ $value =~ ^: ]]; then # Parameter is a target + local target_path= + if [[ $value =~ = ]]; then + # The target has a custom child project path + target_path="$(echo "$value" | cut -d= -f 2 -)" + value="$(echo "$value" | cut -d= -f 1 -)" + if [[ ! -d "$THIS_SCRIPT_PATH/$target_path" ]]; then + builder_die "Target path '$target_path' for $value does not exist." + fi + else + # If the target name matches a folder name, implicitly + # make it available as a child project + if [[ -d "$THIS_SCRIPT_PATH/${value:1}" ]]; then + target_path="${value:1}" + fi + fi _builder_targets+=($value) + if [[ ! -z "$target_path" ]]; then + _builder_target_paths[$value]="$target_path" + fi elif [[ $value =~ ^@ ]]; then # Parameter is a dependency local dependency="${value:1}" @@ -599,6 +731,8 @@ builder_describe() { # ``` # function builder_describe_outputs() { + _builder_record_function_call builder_describe_outputs + while [[ $# -gt 0 ]]; do local key="$1" path="$2" action target path="`_builder_expand_relative_path "$path"`" @@ -620,6 +754,11 @@ function builder_describe_outputs() { done _builder_define_default_internal_dependencies + + # We only want to define internal dependencies after both builder_parse and builder_describe_outputs have been called + if _builder_has_function_been_called builder_parse; then + _builder_add_chosen_action_target_dependencies + fi } _builder_get_default_description() { @@ -652,16 +791,14 @@ _builder_parameter_error() { } -# Pre-initializes the color setting based on the options specified to a -# a build.sh script, parsing the command line to do so. This is only -# needed if said script wishes to use this script's defined colors while -# respecting the options provided by the script's caller. # -# Usage: -# builder_check_color "$@" +# Pre-initializes the color setting based on the options specified to a +# a build.sh script. This is called automatically during init. +# # Parameters -# 1: $@ all command-line arguments (as with builder_parse) -builder_check_color() { +# 1: "$@" all command-line arguments +# +_builder_check_color() { # Process command-line arguments while [[ $# -gt 0 ]] ; do local key="$1" @@ -690,16 +827,18 @@ _builder_add_chosen_action_target_dependencies() { while (( $i < ${#_builder_chosen_action_targets[@]} )); do action_target=${_builder_chosen_action_targets[$i]} - # If we have an internal dependency for the chosen action:target pair, add - # it to the list, but only if there is a defined output and that output is - # missing + # If we have an internal dependency for the chosen action:target pair if [[ ! -z ${_builder_internal_dep[$action_target]+x} ]]; then local dep_output=${_builder_internal_dep[$action_target]} - if [[ ! -z ${_builder_dep_path[$dep_output]+x} ]] && - [[ ! -e "$KEYMAN_ROOT/${_builder_dep_path[$dep_output]}" ]]; then - if ! _builder_item_in_array "$dep_output" "${_builder_chosen_action_targets[@]}"; then - _builder_chosen_action_targets+=($dep_output) - new_actions+=($dep_output) + # If there is a defined output for this dependency + if [[ ! -z ${_builder_dep_path[$dep_output]+x} ]]; then + # If the output for the dependency is missing, or we have --force-deps + if [[ ! -e "$KEYMAN_ROOT/${_builder_dep_path[$dep_output]}" ]] || builder_is_full_dep_build; then + # Add the dependency to the chosen action:target list + if ! _builder_item_in_array "$dep_output" "${_builder_chosen_action_targets[@]}"; then + _builder_chosen_action_targets+=($dep_output) + new_actions+=($dep_output) + fi fi fi fi @@ -707,7 +846,11 @@ _builder_add_chosen_action_target_dependencies() { done if [[ ${#new_actions[@]} -gt 0 ]]; then - echo "Automatically running following required actions with missing outputs:" + if builder_is_full_dep_build; then + echo "Automatically running all dependency actions due to --force-deps:" + else + echo "Automatically running following required actions with missing outputs:" + fi for e in "${new_actions[@]}"; do echo "* $e" done @@ -752,6 +895,9 @@ _builder_define_default_internal_dep() { # Parameters # 1: $@ command-line arguments builder_parse() { + + _builder_record_function_call builder_parse + _builder_build_deps=--deps builder_verbose= builder_debug= @@ -876,7 +1022,10 @@ builder_parse() { done fi - _builder_add_chosen_action_target_dependencies + # We only want to define internal dependencies after both builder_parse and builder_describe_outputs have been called + if _builder_has_function_been_called builder_describe_outputs; then + _builder_add_chosen_action_target_dependencies + fi if $_builder_debug; then echo "[DEBUG] Selected actions and targets:" @@ -1118,7 +1267,7 @@ builder_is_dep_build() { # `--deps` parameter (which is the default). # builder_is_quick_dep_build() { - if builder_is_dep_build && [[ $_builder_build_deps == --deps ]]; then + if [[ $_builder_build_deps == --deps ]]; then return 0 fi return 1 @@ -1129,7 +1278,7 @@ builder_is_quick_dep_build() { # corresponds to the `--force-deps`` parameter. # builder_is_full_dep_build() { - if builder_is_dep_build && [[ $_builder_build_deps == --force-deps ]]; then + if [[ $_builder_build_deps == --force-deps ]]; then return 0 fi return 1 @@ -1246,7 +1395,33 @@ _builder_report_dependencies() { exit 0 } +# +# Track whether functions have already been called; +# later we may use this to prevent multiple calls to, e.g. +# builder_describe +# + +_builder_function_calls=() + +_builder_record_function_call() { + local func=$1 + if _builder_has_function_been_called $1; then + # builder_die "ERROR: $func cannot be called more than once." + return 0 + fi + _builder_function_calls+=($1) +} + +_builder_has_function_been_called() { + local func=$1 + if _builder_item_in_array $1 "${_builder_function_calls[@]}"; then + return 0 + fi + return 1 +} + # # Initialize builder once all functions are declared # _builder_init +_builder_check_color "$@" diff --git a/web/.build-builder b/web/.build-builder new file mode 100644 index 0000000000..6e3cca9a02 --- /dev/null +++ b/web/.build-builder @@ -0,0 +1 @@ +The presence of this file tells CI to use the new builder_ style parameters for source/build.sh and unit_tests/test.sh. \ No newline at end of file diff --git a/web/.gitignore b/web/.gitignore index fe29333720..d7d1e04036 100644 --- a/web/.gitignore +++ b/web/.gitignore @@ -8,7 +8,6 @@ release/ # Other local files. node_modules/ -unit_tests/modernizr.js source/environment.inc.ts **/.idea/**/*.xml **/*.iml diff --git a/web/README.md b/web/README.md index 90884d5e69..4f49dbdf08 100644 --- a/web/README.md +++ b/web/README.md @@ -14,11 +14,10 @@ The following folders contain the distribution for Keyman Engine for Web: keymanweb-osk.ttf is maintained at https://github.com/silnrsi/font-keymanweb-osk unit_tests Automated testing resources - intermediate Intermediate compiled code; TypeScript source is compiled here before it is minified. - release/web Fully-compiled KeymanWeb modules for testing - release/embedded Fully-compiled KMEA/KMEI modules for inclusion in mobile app builds - release/unminified/web Fully-compiled but non-minified KeymanWeb modules - release/unminified/embedded Fully-compiled KMEA/KMEI modules for inclusion in mobile app builds + build/web/release Fully-compiled KeymanWeb modules for release + build/embed/release Fully-compiled KMEA/KMEI modules for inclusion in mobile app builds + build/web/debug Fully-compiled but non-minified KeymanWeb modules + build/embed/debug Fully-compiled but non-minified KMEA/KMEI modules samples Sample pages demonstrating ways to link with KeymanWeb testing Test-case web-pages for various aspects of KeymanWeb functionality @@ -35,29 +34,7 @@ Refer to the samples for usage details. To view pages using compiled Keyman Engine for Web, 1. cd to **keyman/web/source** 2. Run `./build.sh` - -### `build.sh` options: - -* `-ui` - - to compile desktop user interface modules to output folder -* `-test` - - to compile for testing without copying resources or updating the saved - version number. -* `-embed` - - to compile only the KMEA/KMEI embedded engine. -* `-web` - - to compile only the KeymanWeb engine. -* `-debug_embedded` - - to compile a readable version of the embedded KMEA/KMEI code -* `-no_minify` - - to disable the minified '/release/web' and '/release/embedded' build - sections. - - the '/release/unminified/web' and '/release/unminified/embedded' folders - will still be built. -* `-clean` - - to erase pre-existing build products before the build. - -If more than one target is specified, the last one will take precedence. + - Use `./build.sh --help` for the script's documentation. ### Unit Testing ### @@ -74,7 +51,7 @@ the former command executes. `describe.only`. 2. From this directory, run `./unit_tests/test.sh -debug`. Alternatively, from `web/` or any `web/` subdirectory, - + ``` npm run test -- -debug ``` diff --git a/web/build.sh b/web/build.sh new file mode 100755 index 0000000000..ef2e15e1f3 --- /dev/null +++ b/web/build.sh @@ -0,0 +1,591 @@ +#!/usr/bin/env bash +# +# Compiles the Keyman Engine for Web and its various end-products +# + +# set -x +set -eu + +## START STANDARD BUILD SCRIPT INCLUDE +# adjust relative paths as necessary +THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")" +. "$(dirname "$THIS_SCRIPT")/../resources/build/build-utils.sh" +## END STANDARD BUILD SCRIPT INCLUDE + +. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" + +# This script runs from its own folder +cd "$THIS_SCRIPT_PATH" + +# ################################ Main script ################################ + +# Definition of global compile constants + +UI="app/ui" +WEB="app/web" +EMBEDDED="app/embed" + +BUILD_BASE="build" + +DEBUG="debug" +RELEASE="release" +INTERMEDIATE="obj" + +GESTURE_RECOGNIZER_BUILD="$KEYMAN_ROOT/common/web/gesture-recognizer/build/." +GESTURE_RECOGNIZER_TARGET="../build/engine/gesture-recognizer/" + +# Composites and outputs the output path corresponding to the build configuration +# specified by the parameters. +# +# ### Parameters +# +# * 1: - build product (app/embed, app/web, app/ui, engine) +# * 2: (optional) - build stage / config (obj, debug, release) +# +# ### Example +# +# ```bash +# cp index.js "$(output_path app/web debug)/index.js" +# ``` +# +# The block above would copy index.js into the build output folder for app/web's debug +# product. +# +# ``` bash +# rm -rf "$(output_path app/web)" +# ``` +# +# The block above is useful for deleting all app/web build products as part of a `clean` +# action. +# +# ### Other Notes +# +# In the future, we may opt to move $INTERMEDIATE stuff underneath both $DEBUG and $RELEASE, +# making it a third param. This is currently unclear, but if so, we'd do +# $DEBUG/$INTERMEDIATE and $RELEASE/$INTERMEDIATE via a third argument. +output_path ( ) { + if [ $# -lt 1 ]; then + builder_die "Insufficient argument count!" + elif [ $# -eq 1 ]; then + # Used by clean: actions + echo "$BUILD_BASE/$1" + else + echo "$BUILD_BASE/$1/$2" + fi +} + +SOURCE="src" + +SENTRY_RELEASE_VERSION="release@$VERSION_WITH_TAG" + +# Ensures that we rely first upon the local npm-based install of Typescript. +# (Facilitates automated setup for build agents.) +PATH="../node_modules/.bin:$PATH" + +compiler="npm run tsc --" +compilecmd="$compiler" + +PREDICTIVE_TEXT_SOURCE="../common/predictive-text/unit_tests/in_browser/resources/models/simple-trie.js" +PREDICTIVE_TEXT_OUTPUT="src/test/manual/web/prediction-ui/simple-en-trie.js" + +builder_describe "Builds Keyman Engine for Web (KMW)." \ + "@../common/web/keyman-version build" \ + "@../common/web/input-processor build" \ + "@../common/web/gesture-recognizer build:engine" \ + "@src/tools/building/sourcemap-root build" \ + "clean" \ + "configure" \ + "build" \ + "test Runs unit tests. Only $(builder_term test:web) is currently defined" \ + ":embed Builds the configuration of KMW used within the Keyman mobile apps" \ + ":engine Builds all common code used by other targets" \ + ":web Builds the website-oriented configuration of Keyman Engine for Web" \ + ":ui Builds the desktop UI modules used by the $(builder_term :web) build product" \ + ":samples Builds only sample & test pages found under src/samples and src/test" \ + ":tools Builds related development + unit-test resources" \ + "--no-minify Skips any minification steps in the build" \ + "--all Sets action to run on KMW's submodules as well if appropriate (actions - $(builder_term test))" + +# Possible TODO? +# "upload-symbols Uploads build product to Sentry for error report symbolification. Only defined for $(builder_term build:embed) and $(builder_term build:web)" \ + +builder_describe_outputs \ + configure ../node_modules \ + configure:embed ../node_modules \ + configure:engine ../node_modules \ + configure:web ../node_modules \ + configure:ui ../node_modules \ + configure:samples ../node_modules \ + configure:tools ../node_modules \ + build:embed $(output_path $EMBEDDED $RELEASE)/keyman.js \ + build:web $(output_path $WEB $RELEASE)/keymanweb.js \ + build:ui $(output_path $UI $RELEASE)/kmwuibutton.js \ + build:samples $PREDICTIVE_TEXT_OUTPUT +# Deliberately excluding build:tools b/c its script provides the definitions. + +builder_parse "$@" + +#### Build utility methods + definitions #### + +# Build products for each main target. +EMBED_TARGETS=( "keyman.js" ) +WEB_TARGETS=( "keymanweb.js" ) +UI_TARGETS=( "kmwuibutton.js" "kmwuifloat.js" "kmwuitoggle.js" "kmwuitoolbar.js" ) + +: ${CLOSURECOMPILERPATH:=../node_modules/google-closure-compiler-java} +: ${JAVA:=java} + +minifier="$CLOSURECOMPILERPATH/compiler.jar" + +# We'd love to add the argument --source_map_include_content for distribution in the future, +# but Closure doesn't include the TS sources properly at this time. +# +# `checkTypes` is blocked b/c TypeScript can perform our type checking... and it causes an error +# with TypeScript's `extend` implementation (it doesn't recognize a constructor without manual edits). +# We also get a global `this` warning from the same. +# +# `checkVars` is blocked b/c Closure will otherwise fail on TypeScript namespacing, as each original TS +# source file will redeclare the namespace variable, despite being merged into a single file post-compilation. +# +# `jsDocMissingType` prevents errors on type documentation Closure thinks is missing. TypeScript may not +# have the same requirements, and we trust TypeScript over Closure. +minifier_warnings="--jscomp_error=* --jscomp_off=lintChecks --jscomp_off=unusedLocalVariables --jscomp_off=globalThis --jscomp_off=checkTypes --jscomp_off=checkVars --jscomp_off=jsdocMissingType --jscomp_off=uselessCode --jscomp_off=missingRequire --jscomp_off=strictMissingRequire" + +# We use these to prevent Closure from auto-inserting its own polyfills. Turns out, they can break in the +# WebView used by Android API 19, which our app still supported when written. Unsure if it can still occur +# in Android API 21, our current minimum. +# +# Also, we currently apply all needed polyfills either manually or during TS compilation; we don't need the extra, +# excess code. +minifier_lang_specs="--language_in ECMASCRIPT5 --language_out ECMASCRIPT5" +minifycmd="$JAVA -jar $minifier --compilation_level WHITESPACE_ONLY $minifier_warnings --generate_exports $minifier_lang_specs" + +readonly minifier +readonly minifycmd + +minified_sourcemap_cleaner="build/tools/building/sourcemap-root/index.mjs" + +# Fails the build if a specified file does not exist. +assert_exists ( ) { + if ! [ -f $1 ]; then + echo "Build failed: expected file ${COLOR_GREY}$1${COLOR_RESET} is missing." + exit 1 + fi +} + +# $1 - base file name +# $2 - output path +# $3 - optimization level +# $4 - extra path info to add to minified sourcemap "sourceRoot" property. +# $5 - additional output wrapper +minify ( ) { + if [ $# -ge 4 ]; then + cleanerOptions="--clean --sourceRoot $4" + else + cleanerOptions="--clean" + fi + + if [ $# -ge 5 ]; then + wrapper=$5 + else + wrapper="%output%" + fi + + local INPUT="$1" + local INPUT_FILE="$(basename $1)" + local INPUT_DIR="$(dirname $1)" + local INPUT_SOURCEMAP="$INPUT_DIR/$INPUT_FILE.map" + local OUTPUT="$2" + local OUTPUT_FILE="$(basename $2)" + local OUTPUT_SOURCEMAP="$(dirname $2)/$OUTPUT_FILE.map" + + # --source_map_location_mapping - maps paths on INPUT source maps for consumption by Closure. + # ../../.. => keymanapp, ../.. => keymanapp/keyman. We have TS root sources on 'keyman'. + $minifycmd --source_map_input "$INPUT|$INPUT_SOURCEMAP" \ + --create_source_map "$OUTPUT_SOURCEMAP" --source_map_include_content \ + --source_map_location_mapping "$INPUT_DIR|../../.." \ + --js "$INPUT" --compilation_level $3 \ + --js_output_file "$OUTPUT" --warning_level VERBOSE --output_wrapper "$wrapper +//# sourceMappingURL=$INPUT_FILE.map" + + # Now to clean the source map. + assert_exists "$OUTPUT" + assert_exists "$OUTPUT_SOURCEMAP" + + # "Clean" the minified output sourcemaps. + node $minified_sourcemap_cleaner "$INPUT_SOURCEMAP" "$OUTPUT_SOURCEMAP" $cleanerOptions +} + +# Copies specified engine resources to the specified target's build output directories. +# +# ### Parameters +# +# * 1: `product` the product's source path under src/ +# * 2: `outputs` an array of resource types to copy over +# +# ### Example +# +# ```bash +# copy_resources app/web osk ui +# ``` +copy_resources ( ) { + local COMPILE_TARGET=$1 + shift + + local RESOURCES_TO_COPY=("$@") + + # We leave out $INTERMEDIATE here, as it's not a 'release' of any sort and + # thus doesn't need to publish sources or resources. + local CONFIGS=($DEBUG) + + if ! builder_has_option --skip-minify; then + CONFIGS+=($RELEASE) + fi + + echo + + for CONFIG in "${CONFIGS[@]}"; + do + local CONFIG_OUT_PATH="$(output_path $COMPILE_TARGET $CONFIG)" + + echo Copying resources to $CONFIG_OUT_PATH/src + + for RESOURCE in "${RESOURCES_TO_COPY[@]}"; + do + mkdir -p "$CONFIG_OUT_PATH/$RESOURCE" + mkdir -p "$CONFIG_OUT_PATH/src/resources/$RESOURCE" + + echo "- $SOURCE/resources/$RESOURCE/ => $CONFIG_OUT_PATH/$RESOURCE" + cp -Rf "$SOURCE/resources/$RESOURCE" "$CONFIG_OUT_PATH/" >/dev/null + done + + echo + done +} + +# Copies specified source folders corresponding to the specified target's build +# output directories. +# +# ### Parameters +# +# * 1: `product` the product's source path under src/ +# * 2: `outputs` an array of src/ subfolders to copy over +# +# ### Example +# +# ```bash +# copy_sources app/web engine resources/osk +# ``` +copy_sources ( ) { + local COMPILE_TARGET=$1 + shift + + local SOURCES_TO_COPY=("$@") + + # We leave out $INTERMEDIATE here, as it's not a 'release' of any sort and + # thus doesn't need to publish sources or resources. + CONFIGS=($DEBUG) + + if ! builder_has_option --skip-minify; then + CONFIGS+=($RELEASE) + fi + + for CONFIG in "${CONFIGS[@]}"; + do + CONFIG_OUT_PATH="$(output_path $COMPILE_TARGET $CONFIG)" + echo Copying $COMPILE_TARGET sources to $CONFIG_OUT_PATH/src + + rm -rf "$CONFIG_OUT_PATH/src" + mkdir -p "$CONFIG_OUT_PATH/src" + echo $VERSION_PATCH > "$CONFIG_OUT_PATH/src/version.txt" + + for SOURCE_FOLDER in "${SOURCES_TO_COPY[@]}"; + do + echo "- $SOURCE/$SOURCE_FOLDER/ => $CONFIG_OUT_PATH/src/$SOURCE_FOLDER/" + mkdir -p "$CONFIG_OUT_PATH/src/$SOURCE_FOLDER" + cp -Rf "$SOURCE/$SOURCE_FOLDER/"* "$CONFIG_OUT_PATH/src/$SOURCE_FOLDER/" + done + + echo + done +} + +# Compiles compiled scripts from the first folder specified to the second folder specified. +# +# ### Parameters +# +# * 1: `src` the folder containing scripts to be copied +# * 2: `dst` the destination folder for the copy operation +# * 3: `scripts` an array of filenames for expected compiled scripts +# +# ### Example +# +# ```bash +# compile_and_minify build/app/web/obj build/app/web/debug keymanweb.js +# ``` +copy_outputs ( ) { + local src="$1" + local dst="$2" + + shift + shift + + local BASE_SCRIPTS=("$@") + + mkdir -p "$dst" + + for SCRIPTJS in "${BASE_SCRIPTS[@]}"; + do + cp -Rf "$src/$SCRIPTJS" "$dst/" + cp -Rf "$src/$SCRIPTJS.map" "$dst/" + done +} + +# Compiles all build products corresponding to the specified target. +# +# ### Parameters +# +# * 1: `product` the product's source path under src/ +# +# ### Example +# +# ```bash +# compile app/embed +# ``` +compile ( ) { + if [ $# -lt 1 ]; then + fail "Scripting error: insufficient argument count!" + fi + + local COMPILE_TARGET=$1 + local COMPILED_INTERMEDIATE_PATH="$(output_path $COMPILE_TARGET $INTERMEDIATE)" + + $compilecmd -b src/$COMPILE_TARGET -v + + echo $COMPILE_TARGET TypeScript compiled under $COMPILED_INTERMEDIATE_PATH +} + +# Finalizes all build products corresponding to the specified target. +# This should be called after `compile` for all `app/` targets. +# +# ### Parameters +# +# * 1: `product` the product's source path under src/ +# * 2: `outputs` an array of expected output script files for the build +# +# ### Example +# +# ```bash +# compile app/embed +# finalize app/embed keyman.js +# ``` +finalize ( ) { + if [ $# -lt 2 ]; then + fail "Scripting error: insufficient argument count!" + fi + + local COMPILE_TARGET=$1 + local COMPILED_INTERMEDIATE_PATH="$(output_path $COMPILE_TARGET $INTERMEDIATE)" + local DEBUG_OUT_PATH="$(output_path $COMPILE_TARGET $DEBUG)" + local RELEASE_OUT_PATH="$(output_path $COMPILE_TARGET $RELEASE)" + + shift + + local OUTPUT_SCRIPTS=("$@") + + # START: debug output + + mkdir -p "$DEBUG_OUT_PATH" + copy_outputs "$COMPILED_INTERMEDIATE_PATH" "$DEBUG_OUT_PATH" "${OUTPUT_SCRIPTS[@]}" + + echo Compiled $COMPILE_TARGET debug version saved under $DEBUG_OUT_PATH: ${OUTPUT_SCRIPTS[*]} + + # START: release output + if ! builder_has_option --skip-minify; then + for SCRIPT in "${OUTPUT_SCRIPTS[@]}"; + do + minify "$COMPILED_INTERMEDIATE_PATH/$SCRIPT" "$RELEASE_OUT_PATH/$SCRIPT" SIMPLE_OPTIMIZATIONS + done + + echo Compiled $COMPILE_TARGET release version saved under $RELEASE_OUT_PATH: ${OUTPUT_SCRIPTS[*]} + else + # The prior 'release' is now outdated: delete it. + rm -rf "$RELEASE_OUT_PATH" + fi +} + +#### Build action definitions #### + +if builder_start_action configure; then + verify_npm_setup + + if ! builder_has_option --no-minify; then + # NPM install is required for the file to be present. + if ! [ -f $minifier ]; + then + echo File $minifier does not exist: have you set the environment variable \$CLOSURECOMPILERPATH? + exit 1 + fi + fi + + builder_finish_action success configure +fi + +## Clean actions + +# Possible issue: there's no clear rule to `clean` the engine, which is auto-built +# by build:embed and build:web. +# +# Some sort of command to run ONLY for a general `clean` (no target specified) would +# be perfect for that, I think. + +if builder_start_action clean:engine; then + src/engine/build.sh clean + builder_finish_action success clean:engine +fi + +if builder_start_action clean:embed; then + rm -rf "$(output_path $EMBEDDED)" + builder_finish_action success clean:embed +fi + +if builder_start_action clean:web; then + rm -rf "$(output_path $WEB)" + builder_finish_action success clean:web +fi + +if builder_start_action clean:ui; then + rm -rf "$(output_path $UI)" + builder_finish_action success clean:ui +fi + +if builder_start_action clean:samples; then + rm -f $PREDICTIVE_TEXT_OUTPUT + + builder_finish_action success clean:samples +fi + +if builder_start_action clean:tools; then + src/tools/build.sh clean + + builder_finish_action success clean:tools +fi + +## Build actions + +# Adds a simple version 'header' when there's a main engine build product. +if builder_has_action build:embed || \ + builder_has_action build:web || \ + builder_has_action build:ui; then + + echo "" + echo "${COLOR_PURPLE}Compiling version ${VERSION}${COLOR_RESET}" +fi + +echo "" + + +if builder_start_action build:engine; then + src/engine/build.sh build + + builder_finish_action success build:engine +fi + +if builder_start_action build:embed; then + compile $EMBEDDED + finalize $EMBEDDED ${EMBED_TARGETS[@]} + + # The embedded version doesn't use UI modules. + copy_resources $EMBEDDED osk + copy_sources $EMBEDDED app/embed engine resources/osk + + builder_finish_action success build:embed + + # TODO: handle this block somehow. + + # if [ $UPLOAD_EMBED_SENTRY = true ]; then # upload-symbols:embed + # if [ $BUILD_DEBUG_EMBED = true ]; then + # ARTIFACT_FOLDER="release/unminified/embedded" + # pushd $EMBED_OUTPUT_NO_MINI + # else + # ARTIFACT_FOLDER="release/embedded" + # pushd $EMBED_OUTPUTs + # fi + # echo "Uploading to Sentry..." + # npm run sentry-cli -- releases files "$SENTRY_RELEASE_VERSION" upload-sourcemaps --strip-common-prefix $ARTIFACT_FOLDER --rewrite --ext js --ext map --ext ts || fail "Sentry upload failed." + # echo "Upload successful." + # popd + # fi +fi + +### -embed section complete. + +if builder_start_action build:web; then + compile $WEB + finalize $WEB ${WEB_TARGETS[@]} + + # The testing pages need both osk & ui resources in the same place. + copy_resources $WEB osk ui + copy_sources $WEB app/web engine resources/osk + + builder_finish_action success build:web +fi + +if builder_start_action build:ui; then + compile $UI + finalize $UI ${UI_TARGETS[@]} + + copy_resources $UI ui + copy_sources $UI app/ui resources/ui + + builder_finish_action success build:ui +fi + +if builder_start_action build:tools; then + src/tools/build.sh + builder_finish_action success build:tools +fi + +if builder_start_action build:samples; then + # Some test pages actually have build scripts. + ./src/test/manual/embed/android-harness/build.sh # is not yet builder-based. + + echo "Copying samples & test page resources..." + # Should probably be changed into a build script for the `prediction-ui` test page. + cp "${PREDICTIVE_TEXT_SOURCE}" "${PREDICTIVE_TEXT_OUTPUT}" + + # Copy gesture-recognizer build artifacts into web-space for CI testing + if [ -f $GESTURE_RECOGNIZER_TARGET ]; then + # Note: make sure this doesn't break once KeymanWeb actually uses the module! + if ! [ -d $GESTURE_RECOGNIZER_TARGET ]; then + mkdir -p $GESTURE_RECOGNIZER_TARGET + fi + cp -a $GESTURE_RECOGNIZER_BUILD $GESTURE_RECOGNIZER_TARGET + fi + + # Which could then have a parallel script for `prediction-mtnt` that downloads + extracts + # the current MTNT model. + + builder_finish_action success build:samples; +fi + +if builder_start_action test:web; then + if builder_has_option --all; then + ./test.sh + else + ./test.sh :engine + fi + + builder_finish_action success test:web +fi + +# TODO: handle the block below somehow. + +# # We can only upload 'web' / 'native' artifacts after ALL are done compiling. +# if [ $UPLOAD_WEB_SENTRY = true ]; then +# pushd $WEB_OUTPUT +# echo "Uploading to Sentry..." +# npm run sentry-cli -- releases files "$SENTRY_RELEASE_VERSION" upload-sourcemaps --strip-common-prefix release/web/ --rewrite --ext js --ext map --ext ts || fail "Sentry upload failed." +# echo "Upload successful." +# popd +# fi diff --git a/web/bulk_rendering/tsconfig.json b/web/bulk_rendering/tsconfig.json deleted file mode 100644 index a1ba9c08f7..0000000000 --- a/web/bulk_rendering/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "extends": "../../tsconfig-base.json", - - "compilerOptions": { - "allowJs": true, - "inlineSources": true, - "module": "none", - "outFile": "../release/renderer/bulk_render.js", - "sourceMap": true, - "target": "es5" - }, - - "files": [ - "renderer_core.ts", - "../source/kmwdevice.ts", - "../source/utils/styleConstants.ts", - ], - - "references": [ - { "path": "../../common/web/utils", "prepend": true }, - { "path": "../../common/web/keyman-version", "prepend": true }, - { "path": "../../common/web/lm-message-types" }, - ] -} diff --git a/web/ci.sh b/web/ci.sh new file mode 100755 index 0000000000..d9dfcbf586 --- /dev/null +++ b/web/ci.sh @@ -0,0 +1,193 @@ +#!/usr/bin/env bash +# +# Provides a platform-independent implementation of the build steps used for CI when +# building the Keyman Engine for Web. +# + +# set -x +set -eu + +## START STANDARD BUILD SCRIPT INCLUDE +# adjust relative paths as necessary +THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")" +. "$(dirname "$THIS_SCRIPT")/../resources/build/build-utils.sh" +## END STANDARD BUILD SCRIPT INCLUDE + +. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" + +WORKING_DIRECTORY=`pwd` + +# This script runs from its own folder +cd "$THIS_SCRIPT_PATH" + +# ################################ Main script ################################ + +S_KEYMAN_COM= + +builder_describe "Defines and implements the CI build steps for Keyman Engine for Web (KMW)." \ + "build" \ + "test Runs all unit tests." \ + "post-test Runs post-test cleanup. Should be run even if a prior step fails." \ + "validate-size Runs the build-size comparison check" \ + "prepare Prepare upload artifacts for specified target(s)" \ + ":s.keyman.com Target: builds artifacts for s.keyman.com " \ + ":downloads.keyman.com Target: builds artifacts for downloads.keyman.com" \ + "--debug Runs this script in local-development mode; reports and tests will be locally logged" \ + "--s.keyman.com=S_KEYMAN_COM Sets the root location of a checked-out s.keyman.com repo" + +builder_parse "$@" + +#### + +if builder_start_action build; then + # Build step: since CI builds start (and should start) from scratch, run the following + # three actions: + # - configure: retrieve all NPM dependencies + # - clean: make extra-sure that no prior build products exist. + # - also useful when validating this script on a local dev machine! + # - build: then do the ACTUAL build. + ./build.sh configure clean build + + builder_finish_action success build +fi + +if builder_start_action test; then + # Testing step: run ALL unit tests, including those of the submodules. + + # For only top-level build-product tests, specify the :engine target + # For all others, specify only the :libraries target + FLAGS= + + if ! builder_has_option --debug; then + FLAGS=--ci + fi + + ./test.sh $FLAGS + + builder_finish_action success test +fi + +if builder_start_action post-test; then + # Always make sure BrowserStack stuff is terminated after the test step. + # Even if it fails and/or hangs. + # No matter what. Otherwise, it may leave a lock-file that breaks a later build! + ../common/test/resources/test_kill_browserstack.sh + + builder_finish_action success post-test +fi + +if builder_start_action validate-size; then + # Performs the web build product size check as reported on Web test PRs. + FLAGS= + + if ! builder_has_option --debug; then + FLAGS=--write-status + fi + + # Do not use --report when in --debug mode; it sets an error code that is VERY difficult to + # catch with our set -e & `trap` setup. + ./src/tools/building/check-build-size.sh $FLAGS + + builder_finish_action success validate-size +fi + +if builder_start_action prepare:s.keyman.com; then + if ! builder_has_option --s.keyman.com; then + builder_die "--s.keyman.com is unset!" + fi + + if builder_has_option --debug; then + # First phase: make sure the s.keyman.com repo is locally-available and up to date. + pushd "$S_KEYMAN_COM" + + # For testing on a local development machine / a machine with the repo already loaded. + git checkout master + git pull + popd + fi + + # Second phase: copy the artifacts over + + # The main build products are expected to reside at the root of this folder. + BASE_PUBLISH_FOLDER="$S_KEYMAN_COM/kmw/engine/$VERSION" + mkdir -p "$BASE_PUBLISH_FOLDER" + + cp -Rf build/app/web/release/* "$BASE_PUBLISH_FOLDER" + cp -Rf build/app/ui/release/* "$BASE_PUBLISH_FOLDER" + + # Third phase: tweak the sourcemaps + # We can use an alt-mode of Web's sourcemap-root tool for this. + for sourcemap in "$BASE_PUBLISH_FOLDER/"*.map; do + node build/tools/building/sourcemap-root/index.mjs null "$sourcemap" --sourceRoot "https://s.keyman.com/kmw/engine/$VERSION/src" + done + + # Actual construction of the PR will be left to CI-config scripting for now. + + builder_finish_action success prepare:s.keyman.com +fi + +# Note: for now, this command is used to prepare the artifacts used by the download site, but +# NOT to actually UPLOAD them via rsync or to produce related .download_info files. +if builder_start_action prepare:downloads.keyman.com; then + UPLOAD_PATH="build/upload/$VERSION" + + # --- First action artifact - the KMW zip file --- + ZIP="$UPLOAD_PATH/keymanweb-$VERSION.zip" + + mkdir -p "$UPLOAD_PATH" + + # On Windows, we use 7-zip (SEVEN_Z_HOME env var). On other platforms, we use zip. + + COMPRESS_CMD= + COMPRESS_ADD= + + # Marc's preference; use $SEVEN_Z_HOME and have the BAs set up with THAT as an env var. + if [ ! -z "${SEVEN_Z_HOME+x}" ]; then + COMPRESS_CMD="$SEVEN_Z_HOME/7z" + COMPRESS_ADD="a -bd -bb0 -r" # add, hide progress, log level 0, recursive + fi + + if [[ -z "${COMPRESS_CMD}" ]] ; then + if command -v zip &> /dev/null; then + # Note: does not support within-archive renames! + COMPRESS_CMD=zip + COMPRESS_ADD="-r" + else + builder_die "7z and zip commands are both unavailable" + fi + fi + + pushd build/app/web/release + "${COMPRESS_CMD}" $COMPRESS_ADD ../../../../$ZIP * + cd .. + "${COMPRESS_CMD}" $COMPRESS_ADD ../../../$ZIP debug + popd + + pushd build/app/ui/release + "${COMPRESS_CMD}" $COMPRESS_ADD ../../../../$ZIP * + cd .. + "${COMPRESS_CMD}" $COMPRESS_ADD ../../../$ZIP debug + popd + + # --- Second action artifact - the 'static' folder (hosted user testing on downloads.keyman.com) --- + + echo "" + echo "Building \`static/\` folder for long-term hosting of testing resources..." + STATIC="$UPLOAD_PATH/static" + mkdir -p "$STATIC" + + mkdir -p "$STATIC/build" + cp -rf build/app "$STATIC/build/app" + cp -rf build/engine "$STATIC/build/engine" + cp -rf build/tools "$STATIC/build/tools" + # avoid build/upload, since that's the folder we're building! + + cp -f index.html "$STATIC/index.html" + + mkdir -p "$STATIC/src/tools" + cp -rf src/tools/testing "$STATIC/src/tools/testing" + cp -rf src/test "$STATIC/src/test" + cp -rf src/samples "$STATIC/src/samples" + + builder_finish_action success prepare:downloads.keyman.com +fi \ No newline at end of file diff --git a/web/index.html b/web/index.html index be2a1c86b7..909d3fc4f3 100644 --- a/web/index.html +++ b/web/index.html @@ -2,17 +2,17 @@ - - + + - + - + - - + + KeymanWeb Testing - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + + - - + + - - + +

KeymanWeb Sample Page - Fully Compiled/Minified Source

- -
+

Type in your language in this text area:

- +

or in this input field:

- +

Add a keyboard by keyboard name:

- +

Add a keyboard by BCP-47 language code:

Add a keyboard by language name:

- +

Return to samples home page

- - + * + *** + --> diff --git a/web/samples/multilingual.html b/web/src/samples/multilingual.html similarity index 70% rename from web/samples/multilingual.html rename to web/src/samples/multilingual.html index d4646c5357..de2174a49a 100644 --- a/web/samples/multilingual.html +++ b/web/src/samples/multilingual.html @@ -2,30 +2,30 @@ - - + + - + - + - - + + KeymanWeb Multilingual Sample Page - - - - - + #KeymanWebControl {width:50%; min-width:600px;} + + + + - - + + - - + - - - + + +

KeymanWeb Multilingual Page Example

- -
- +
+

Type in the following text area in your language:

- +

or in this input field:

- +

Return to samples home page

diff --git a/web/samples/samplehdr.js b/web/src/samples/samplehdr.js similarity index 100% rename from web/samples/samplehdr.js rename to web/src/samples/samplehdr.js diff --git a/web/samples/unminified.html b/web/src/samples/unminified.html similarity index 77% rename from web/samples/unminified.html rename to web/src/samples/unminified.html index ca24b402af..8a9b82bac8 100644 --- a/web/samples/unminified.html +++ b/web/src/samples/unminified.html @@ -2,38 +2,38 @@ - - - + + + - + - - + + KeymanWeb Sample Page - Unminified Source - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - - + + - - + +

KeymanWeb Sample Page - Unminified Source

- -
+

Type in your language in this text area:

- +

or in this input field:

- +

Add a keyboard by keyboard name:

- +

Add a keyboard by BCP-47 language code:

Add a keyboard by language name:

- +

Return to samples home page

- - + * + *** + --> diff --git a/web/samples/us-1.0.js b/web/src/samples/us-1.0.js similarity index 100% rename from web/samples/us-1.0.js rename to web/src/samples/us-1.0.js diff --git a/web/src/test/auto/.gitignore b/web/src/test/auto/.gitignore new file mode 100644 index 0000000000..30259a5818 --- /dev/null +++ b/web/src/test/auto/.gitignore @@ -0,0 +1 @@ +modernizr.js \ No newline at end of file diff --git a/web/unit_tests/CI.conf.js b/web/src/test/auto/CI.conf.js similarity index 50% rename from web/unit_tests/CI.conf.js rename to web/src/test/auto/CI.conf.js index c06c62cb78..d3d2b02e40 100644 --- a/web/unit_tests/CI.conf.js +++ b/web/src/test/auto/CI.conf.js @@ -1,4 +1,4 @@ var BASE_CONFIG = require("./base.conf.js"); -var ci_config_adapter = require("../../common/test/resources/karma-browserstack-config.js"); +var ci_config_adapter = require("../../../../common/test/resources/karma-browserstack-config.js"); module.exports = ci_config_adapter(BASE_CONFIG, "full"); \ No newline at end of file diff --git a/web/unit_tests/base.conf.js b/web/src/test/auto/base.conf.js similarity index 60% rename from web/unit_tests/base.conf.js rename to web/src/test/auto/base.conf.js index 8ae6626be8..6a93275e02 100644 --- a/web/unit_tests/base.conf.js +++ b/web/src/test/auto/base.conf.js @@ -6,7 +6,7 @@ module.exports = { // base path that will be used to resolve all patterns (eg. files, exclude) // set to Keyman repo base. - basePath: '../..', + basePath: '../../../..', // Safeguards against disconnecting after starting tests. browserNoActivityTimeout: 60000, @@ -37,31 +37,34 @@ module.exports = { // list of files / patterns to load in the browser files: [ - 'web/unit_tests/modernizr.js', // A dependency-managed utility script that helps with browser feature detection. - 'web/tools/element-wrappers/build/index.js', // Defines com.keyman.dom objects separate from KMW for unit testing. - 'web/tools/device-detect/build/index.js', // Defines com.keyman.utils.Device, separated from KMW for use in unit test setup. - 'web/tools/recorder/build/index.js', // The object definitions used to generate/replicate key events for engine tests. + 'web/src/test/auto/modernizr.js', // A dependency-managed utility script that helps with browser feature detection. + 'web/build/engine/element-wrappers/obj/index.bundled.js', // Defines com.keyman.dom objects separate from KMW for unit testing. + 'web/build/engine/device-detect/obj/index.bundled.js', // Defines com.keyman.utils.Device, separated from KMW for use in unit test setup. + 'web/build/tools/testing/recorder/obj/index.js', // The object definitions used to generate/replicate key events for engine tests. // Includes KMW's Device class, which is used by test_utils below. - 'web/unit_tests/test_init_check.js', // Ensures that tests will initialize properly + 'web/src/test/auto/test_init_check.js', // Ensures that tests will initialize properly 'common/test/resources/timeout-adapter.js', // Handles configuration timeout setup at runtime. - 'web/unit_tests/test_utils.js', // A basic utility script useful for constructing tests - 'web/unit_tests/cases/**/*.js', // Where the tests actually reside. + 'web/src/test/auto/test_utils.js', // A basic utility script useful for constructing tests + 'web/src/test/auto/cases/**/*.js', // Where the tests actually reside. 'common/test/resources/json/**/*.json', // Where pre-loaded JSON resides. {pattern: 'common/test/resources/fixtures/**/*.html', watched: true}, // HTML structures useful for testing. {pattern: 'common/test/resources/**/*.*', watched: true, served: true, included: false}, // General testing resources. - {pattern: 'web/release/unminified/web/**/*.css', watched: false, served: true, included: false}, // OSK resources - {pattern: 'web/release/unminified/web/**/*.gif', watched: false, served: true, included: false}, // OSK resources - {pattern: 'web/release/unminified/web/**/*.png', watched: false, served: true, included: false}, // OSK resources - {pattern: 'web/release/unminified/web/**/*.ttf', watched: false, served: true, included: false}, // OSK resources - {pattern: 'web/release/unminified/web/*.js', watched: true, served: true, included: false}, // The actual KMW code. - {pattern: 'web/release/unminified/web/*.map', watched: true, served: true, included: false}, // + sourcemaps. - {pattern: 'web/tools/recorder/build/index.js.map', watched: true, served: true, included: false}, - {pattern: 'web/tools/element-wrappers/build/index.js.map', watched: true, served: true, included: false}, - {pattern: 'web/tools/device-detect/build/index.js.map', watched: true, served: true, included: false} + {pattern: 'web/build/app/web/debug/**/*.css', watched: false, served: true, included: false}, // OSK resources + {pattern: 'web/build/app/web/debug/**/*.gif', watched: false, served: true, included: false}, // OSK resources + {pattern: 'web/build/app/web/debug/**/*.png', watched: false, served: true, included: false}, // OSK resources + {pattern: 'web/build/app/web/debug/**/*.ttf', watched: false, served: true, included: false}, // OSK resources + {pattern: 'web/build/app/web/debug/*.js', watched: true, served: true, included: false}, // The actual KMW code. + {pattern: 'web/build/app/web/debug/*.map', watched: true, served: true, included: false}, // + sourcemaps. + {pattern: 'web/build/app/ui/debug/*.js', watched: true, served: true, included: false}, // The actual KMW UI code. + {pattern: 'web/build/app/ui/debug/*.map', watched: true, served: true, included: false}, // + sourcemaps. + {pattern: 'web/build/tools/testing/recorder/obj/index.js.map', watched: true, served: true, included: false}, + {pattern: 'web/build/engine/element-wrappers/obj/index.bundled.js.map', watched: true, served: true, included: false}, + {pattern: 'web/build/engine/device-detect/obj/index.bundled.js.map', watched: true, served: true, included: false} ], proxies: { - "/source/": "/base/web/release/unminified/web/", + "/source/": "/base/web/build/app/web/debug/", + "/ui-source/": "/base/web/build/app/ui/debug/", "/resources/": "/base/common/test/resources/", "/source/recorder_InputEvents.js.map": "/base/common/tests/recorder_InputEvents.js.map" }, diff --git a/web/unit_tests/cases/attachmentAPI.js b/web/src/test/auto/cases/attachmentAPI.js similarity index 99% rename from web/unit_tests/cases/attachmentAPI.js rename to web/src/test/auto/cases/attachmentAPI.js index 7cedb476b5..0fe4d933b2 100644 --- a/web/unit_tests/cases/attachmentAPI.js +++ b/web/src/test/auto/cases/attachmentAPI.js @@ -12,7 +12,7 @@ describe('Attachment API', function() { const kbd1 = loadKeyboardFromJSON("/keyboards/lao_2008_basic.json", testconfig.timeouts.scriptLoad, { passive: true }); const kbd2 = loadKeyboardFromJSON("/keyboards/khmer_angkor.json", testconfig.timeouts.scriptLoad, { passive: true }); return Promise.all([kbd1, kbd2]).then(() => { - return keyman.setActiveKeyboard("lao_2008_basic"); + return keyman.setActiveKeyboard("lao_2008_basic", "lo"); }); }); }); diff --git a/web/unit_tests/cases/basics.js b/web/src/test/auto/cases/basics.js similarity index 100% rename from web/unit_tests/cases/basics.js rename to web/src/test/auto/cases/basics.js diff --git a/web/unit_tests/cases/element_interfaces.js b/web/src/test/auto/cases/element_interfaces.js similarity index 100% rename from web/unit_tests/cases/element_interfaces.js rename to web/src/test/auto/cases/element_interfaces.js diff --git a/web/unit_tests/cases/engine.js b/web/src/test/auto/cases/engine.js similarity index 100% rename from web/unit_tests/cases/engine.js rename to web/src/test/auto/cases/engine.js diff --git a/web/unit_tests/cases/engine_chirality.js b/web/src/test/auto/cases/engine_chirality.js similarity index 100% rename from web/unit_tests/cases/engine_chirality.js rename to web/src/test/auto/cases/engine_chirality.js diff --git a/web/unit_tests/cases/events.js b/web/src/test/auto/cases/events.js similarity index 100% rename from web/unit_tests/cases/events.js rename to web/src/test/auto/cases/events.js diff --git a/web/unit_tests/cases/target_mocks.js b/web/src/test/auto/cases/target_mocks.js similarity index 100% rename from web/unit_tests/cases/target_mocks.js rename to web/src/test/auto/cases/target_mocks.js diff --git a/web/unit_tests/cases/test_config.js b/web/src/test/auto/cases/test_config.js similarity index 100% rename from web/unit_tests/cases/test_config.js rename to web/src/test/auto/cases/test_config.js diff --git a/web/unit_tests/cases/text_selection.js b/web/src/test/auto/cases/text_selection.js similarity index 100% rename from web/unit_tests/cases/text_selection.js rename to web/src/test/auto/cases/text_selection.js diff --git a/web/unit_tests/manual.conf.js b/web/src/test/auto/manual.conf.js similarity index 100% rename from web/unit_tests/manual.conf.js rename to web/src/test/auto/manual.conf.js diff --git a/web/unit_tests/modernizr.config.json b/web/src/test/auto/modernizr.config.json similarity index 100% rename from web/unit_tests/modernizr.config.json rename to web/src/test/auto/modernizr.config.json diff --git a/web/unit_tests/test_init_check.js b/web/src/test/auto/test_init_check.js similarity index 100% rename from web/unit_tests/test_init_check.js rename to web/src/test/auto/test_init_check.js diff --git a/web/unit_tests/test_utils.js b/web/src/test/auto/test_utils.js similarity index 99% rename from web/unit_tests/test_utils.js rename to web/src/test/auto/test_utils.js index 4656785c29..939badd473 100644 --- a/web/unit_tests/test_utils.js +++ b/web/src/test/auto/test_utils.js @@ -51,7 +51,7 @@ var setupKMW = function(kmwOptions, timeout) { let uiPromise; if(ui) { - uiPromise = setupScript('source/kmwui' + ui + '.js', timeout, (scriptEle) => { + uiPromise = setupScript('ui-source/kmwui' + ui + '.js', timeout, (scriptEle) => { fixture.el.appendChild(scriptEle); }); diff --git a/web/testing/android-harness/.gitignore b/web/src/test/manual/embed/android-harness/.gitignore similarity index 100% rename from web/testing/android-harness/.gitignore rename to web/src/test/manual/embed/android-harness/.gitignore diff --git a/web/src/test/manual/embed/android-harness/build.sh b/web/src/test/manual/embed/android-harness/build.sh new file mode 100755 index 0000000000..d0ca13f748 --- /dev/null +++ b/web/src/test/manual/embed/android-harness/build.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -eu + +## START STANDARD BUILD SCRIPT INCLUDE +# adjust relative paths as necessary +THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")" +. "$(dirname "$THIS_SCRIPT")/../../../../../../resources/build/build-utils.sh" +## END STANDARD BUILD SCRIPT INCLUDE + +THIS_DIR="$(dirname "$THIS_SCRIPT")" + +mkdir -p "$THIS_DIR/host" +cp -R "$KEYMAN_ROOT/android/KMEA/app/src/main/assets/"* "$THIS_DIR/host/" +cp "$KEYMAN_ROOT/web/build/app/embed/debug/keyman.js" "$THIS_DIR/host/keymanandroid.js" +cp "$KEYMAN_ROOT/web/build/app/embed/debug/keyman.js.map" "$THIS_DIR/host/keyman.js.map" +cp "$KEYMAN_ROOT/web/build/app/embed/debug/osk/kmwosk.css" "$THIS_DIR/host/kmwosk.css" +cp "$KEYMAN_ROOT/web/build/app/embed/debug/osk/globe-hint.css" "$THIS_DIR/host/globe-hint.css" +cp "$KEYMAN_ROOT/web/build/app/embed/debug/osk/keymanweb-osk.ttf" "$THIS_DIR/host/keymanweb-osk.ttf" + +# We shouldn't rely on a prior Android build for these files! We can retrieve them separately. +cp "$KEYMAN_ROOT/common/web/sentry-manager/build/index.js" "$THIS_DIR/host/keyman-sentry.js" +cp "$KEYMAN_ROOT/node_modules/es6-shim/es6-shim.min.js" "$THIS_DIR/host/es6-shim.min.js" + +# Test keyboards + +cp "$KEYMAN_ROOT/web/src/test/manual/web/web_context_tests.js" "$THIS_DIR/host/" +# android\KMEA\app\src\main\assets\keyboard.html \ No newline at end of file diff --git a/web/testing/android-harness/host.css b/web/src/test/manual/embed/android-harness/host.css similarity index 100% rename from web/testing/android-harness/host.css rename to web/src/test/manual/embed/android-harness/host.css diff --git a/web/testing/android-harness/host.js b/web/src/test/manual/embed/android-harness/host.js similarity index 100% rename from web/testing/android-harness/host.js rename to web/src/test/manual/embed/android-harness/host.js diff --git a/web/testing/android-harness/index.html b/web/src/test/manual/embed/android-harness/index.html similarity index 100% rename from web/testing/android-harness/index.html rename to web/src/test/manual/embed/android-harness/index.html diff --git a/web/testing/android-harness/jquery.min.js b/web/src/test/manual/embed/android-harness/jquery.min.js similarity index 100% rename from web/testing/android-harness/jquery.min.js rename to web/src/test/manual/embed/android-harness/jquery.min.js diff --git a/web/src/test/manual/embed/index.html b/web/src/test/manual/embed/index.html new file mode 100644 index 0000000000..8d74c612a2 --- /dev/null +++ b/web/src/test/manual/embed/index.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + KeymanWeb Testing + + + +

KeymanWeb 15 Testing - for embedded contexts

+

Android test harness

+

Return to main index. + + diff --git a/web/testing/attachment-api/editableFrame.html b/web/src/test/manual/web/attachment-api/editableFrame.html similarity index 100% rename from web/testing/attachment-api/editableFrame.html rename to web/src/test/manual/web/attachment-api/editableFrame.html diff --git a/web/testing/attachment-api/iframe.html b/web/src/test/manual/web/attachment-api/iframe.html similarity index 100% rename from web/testing/attachment-api/iframe.html rename to web/src/test/manual/web/attachment-api/iframe.html diff --git a/web/testing/attachment-api/index.html b/web/src/test/manual/web/attachment-api/index.html similarity index 96% rename from web/testing/attachment-api/index.html rename to web/src/test/manual/web/attachment-api/index.html index 69fb497c15..0ee6896af4 100644 --- a/web/testing/attachment-api/index.html +++ b/web/src/test/manual/web/attachment-api/index.html @@ -23,7 +23,7 @@ - + - + + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - + - +

KeymanWeb: Test IFrame connectivity

- -
+

This test page exists for IFrame functionality tests.


-
+

Return to testing home page

- - + + - - + * + *** + --> diff --git a/web/testing/build-visual-keyboard/index.html b/web/src/test/manual/web/build-visual-keyboard/index.html similarity index 92% rename from web/testing/build-visual-keyboard/index.html rename to web/src/test/manual/web/build-visual-keyboard/index.html index 5cef51b833..a572a638a7 100644 --- a/web/testing/build-visual-keyboard/index.html +++ b/web/src/test/manual/web/build-visual-keyboard/index.html @@ -24,7 +24,7 @@ - + - + + + + - +

KeymanWeb: Keyboard documentation rendering

diff --git a/web/testing/caps-lock-layer-3620/caps_lock_layer_3620.js b/web/src/test/manual/web/caps-lock-layer-3620/caps_lock_layer_3620.js similarity index 100% rename from web/testing/caps-lock-layer-3620/caps_lock_layer_3620.js rename to web/src/test/manual/web/caps-lock-layer-3620/caps_lock_layer_3620.js diff --git a/web/testing/caps-lock-layer-3620/full_caps_3620_3621.js b/web/src/test/manual/web/caps-lock-layer-3620/full_caps_3620_3621.js similarity index 100% rename from web/testing/caps-lock-layer-3620/full_caps_3620_3621.js rename to web/src/test/manual/web/caps-lock-layer-3620/full_caps_3620_3621.js diff --git a/web/testing/caps-lock-layer-3620/index.html b/web/src/test/manual/web/caps-lock-layer-3620/index.html similarity index 94% rename from web/testing/caps-lock-layer-3620/index.html rename to web/src/test/manual/web/caps-lock-layer-3620/index.html index 9acf2881be..0c8981a725 100644 --- a/web/testing/caps-lock-layer-3620/index.html +++ b/web/src/test/manual/web/caps-lock-layer-3620/index.html @@ -17,7 +17,7 @@ - + - + + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - - + + - - + +

KeymanWeb Sample Page - Chirality Testing

This page is designed to stress-test the new support for chiral modifiers and state keys.

Be sure to reference the developer console for additional feedback.


- + * + *** + --> diff --git a/web/testing/chirality/utilities.js b/web/src/test/manual/web/chirality/utilities.js similarity index 100% rename from web/testing/chirality/utilities.js rename to web/src/test/manual/web/chirality/utilities.js diff --git a/web/testing/ckeditor/index.html b/web/src/test/manual/web/ckeditor/index.html similarity index 94% rename from web/testing/ckeditor/index.html rename to web/src/test/manual/web/ckeditor/index.html index a7555db699..baa6f9e422 100644 --- a/web/testing/ckeditor/index.html +++ b/web/src/test/manual/web/ckeditor/index.html @@ -17,7 +17,7 @@ - + - + + - + + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - + - + + - - + +

KeymanWeb Testing Page - Desktop UI module Testing

This page is designed to facilitate testing of various aspects of the Button UI for KeymanWeb. @@ -62,16 +62,16 @@

  • Toolbar UI
  • - -
    +

    Type in your language in this text area:

    - +

    or in this input field:

    @@ -79,20 +79,20 @@
    - - + * + *** + --> diff --git a/web/testing/desktop-ui/float.html b/web/src/test/manual/web/desktop-ui/float.html similarity index 74% rename from web/testing/desktop-ui/float.html rename to web/src/test/manual/web/desktop-ui/float.html index e15381a032..049fa9d316 100644 --- a/web/testing/desktop-ui/float.html +++ b/web/src/test/manual/web/desktop-ui/float.html @@ -2,41 +2,41 @@ - - - + + + - + - - + + KeymanWeb Sample Page - Unminified Source - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - + - + + - - + +

    KeymanWeb Testing Page - Desktop UI module Testing

    This page is designed to facilitate testing of various aspects of the Float UI for KeymanWeb. @@ -61,10 +61,10 @@

  • Toggle UI
  • Toolbar UI
  • -
    +

    Type in your language in this text area:

    - +

    or in this input field:

    @@ -72,20 +72,20 @@
    - - + * + *** + --> diff --git a/web/testing/desktop-ui/index.html b/web/src/test/manual/web/desktop-ui/index.html similarity index 100% rename from web/testing/desktop-ui/index.html rename to web/src/test/manual/web/desktop-ui/index.html diff --git a/web/testing/desktop-ui/toggle.html b/web/src/test/manual/web/desktop-ui/toggle.html similarity index 74% rename from web/testing/desktop-ui/toggle.html rename to web/src/test/manual/web/desktop-ui/toggle.html index 9f7f79df7c..6aa99b1c5a 100644 --- a/web/testing/desktop-ui/toggle.html +++ b/web/src/test/manual/web/desktop-ui/toggle.html @@ -2,41 +2,41 @@ - - - + + + - + - - + + KeymanWeb Sample Page - Unminified Source - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - + - + + - - + +

    KeymanWeb Testing Page - Desktop UI module Testing

    This page is designed to facilitate testing of various aspects of the Toggle UI for KeymanWeb. @@ -61,10 +61,10 @@

  • Toggle UI (you are here)
  • Toolbar UI
  • -
    +

    Type in your language in this text area:

    - +

    or in this input field:

    @@ -72,20 +72,20 @@
    - - + * + *** + --> diff --git a/web/testing/desktop-ui/toolbar.html b/web/src/test/manual/web/desktop-ui/toolbar.html similarity index 74% rename from web/testing/desktop-ui/toolbar.html rename to web/src/test/manual/web/desktop-ui/toolbar.html index b7f0d3432f..8612bb37c9 100644 --- a/web/testing/desktop-ui/toolbar.html +++ b/web/src/test/manual/web/desktop-ui/toolbar.html @@ -2,49 +2,49 @@ - - - + + + - + - - + + KeymanWeb Sample Page - Unminified Source - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + + - - + +

    KeymanWeb Testing Page - Desktop UI module Testing

    This page is designed to facilitate testing of various aspects of the Toolbar UI for KeymanWeb. Originally developed to help address issue #1275. @@ -57,16 +57,16 @@

  • Toolbar UI (you are here)
  • - -
    +

    Type in your language in this text area:

    - +

    or in this input field:

    @@ -74,20 +74,20 @@
    - - + * + *** + --> diff --git a/web/testing/empty-row/afghan_turkmen-1.1.js b/web/src/test/manual/web/empty-row/afghan_turkmen-1.1.js similarity index 100% rename from web/testing/empty-row/afghan_turkmen-1.1.js rename to web/src/test/manual/web/empty-row/afghan_turkmen-1.1.js diff --git a/web/testing/empty-row/empty_row-1.0.js b/web/src/test/manual/web/empty-row/empty_row-1.0.js similarity index 100% rename from web/testing/empty-row/empty_row-1.0.js rename to web/src/test/manual/web/empty-row/empty_row-1.0.js diff --git a/web/testing/empty-row/index.html b/web/src/test/manual/web/empty-row/index.html similarity index 95% rename from web/testing/empty-row/index.html rename to web/src/test/manual/web/empty-row/index.html index c53b4dad5e..460d544b64 100644 --- a/web/testing/empty-row/index.html +++ b/web/src/test/manual/web/empty-row/index.html @@ -23,7 +23,7 @@ - + - + + - + + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - - + + - - + +

    KeymanWeb Sample Page - Keyboard Registration Check

    This page is designed to test KeymanWeb's behavior when being told to load a keyboard multiple times, both via @@ -57,51 +57,51 @@

    - -
    +

    Type in your language in this text area:

    - +

    or in this input field:

    - +

    Add a keyboard by keyboard name:

    - +

    Add a keyboard by BCP-47 language code:

    Add a keyboard by language name:

    - +

    Return to testing home page

    - - + * + *** + --> diff --git a/web/testing/issue103/samplehdr.js b/web/src/test/manual/web/issue103/samplehdr.js similarity index 100% rename from web/testing/issue103/samplehdr.js rename to web/src/test/manual/web/issue103/samplehdr.js diff --git a/web/testing/issue115/index.html b/web/src/test/manual/web/issue115/index.html similarity index 72% rename from web/testing/issue115/index.html rename to web/src/test/manual/web/issue115/index.html index b5b5b770d8..5c9ffeb3af 100644 --- a/web/testing/issue115/index.html +++ b/web/src/test/manual/web/issue115/index.html @@ -2,38 +2,38 @@ - - - + + + - + - - + + KeymanWeb Sample Page - Uncompiled Source - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - - + + + - - + +

    KeymanWeb: Long-press on numeric and symbolic layer testing

    - -
    +

    Type in your language in this text area:

    - +

    or in this input field:

    - +

    Return to testing home page

    - - + * + *** + --> diff --git a/web/testing/issue115/issue115a-layout.js b/web/src/test/manual/web/issue115/issue115a-layout.js similarity index 100% rename from web/testing/issue115/issue115a-layout.js rename to web/src/test/manual/web/issue115/issue115a-layout.js diff --git a/web/testing/issue115/issue115a.js b/web/src/test/manual/web/issue115/issue115a.js similarity index 100% rename from web/testing/issue115/issue115a.js rename to web/src/test/manual/web/issue115/issue115a.js diff --git a/web/testing/issue115/issue115a.kmn b/web/src/test/manual/web/issue115/issue115a.kmn similarity index 100% rename from web/testing/issue115/issue115a.kmn rename to web/src/test/manual/web/issue115/issue115a.kmn diff --git a/web/testing/issue115/issue115a.kmx b/web/src/test/manual/web/issue115/issue115a.kmx similarity index 100% rename from web/testing/issue115/issue115a.kmx rename to web/src/test/manual/web/issue115/issue115a.kmx diff --git a/web/testing/issue115/issue115a.kvk b/web/src/test/manual/web/issue115/issue115a.kvk similarity index 100% rename from web/testing/issue115/issue115a.kvk rename to web/src/test/manual/web/issue115/issue115a.kvk diff --git a/web/testing/issue115/issue115a.kvks b/web/src/test/manual/web/issue115/issue115a.kvks similarity index 100% rename from web/testing/issue115/issue115a.kvks rename to web/src/test/manual/web/issue115/issue115a.kvks diff --git a/web/testing/issue116/index.html b/web/src/test/manual/web/issue116/index.html similarity index 72% rename from web/testing/issue116/index.html rename to web/src/test/manual/web/issue116/index.html index 1b08ac3126..b8b49e1375 100644 --- a/web/testing/issue116/index.html +++ b/web/src/test/manual/web/issue116/index.html @@ -2,38 +2,38 @@ - - - + + + - + - - + + KeymanWeb Sample Page - Uncompiled Source - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - - + + + - - + +

    KeymanWeb: Next-layer processing testing

    - -
    +

    Type in your language in this text area:

    - +

    or in this input field:

    - +

    Return to testing home page

    - - + * + *** + --> diff --git a/web/testing/issue116/next_layer_tests-layout.js b/web/src/test/manual/web/issue116/next_layer_tests-layout.js similarity index 100% rename from web/testing/issue116/next_layer_tests-layout.js rename to web/src/test/manual/web/issue116/next_layer_tests-layout.js diff --git a/web/testing/issue116/next_layer_tests.js b/web/src/test/manual/web/issue116/next_layer_tests.js similarity index 100% rename from web/testing/issue116/next_layer_tests.js rename to web/src/test/manual/web/issue116/next_layer_tests.js diff --git a/web/testing/issue116/next_layer_tests.kmn b/web/src/test/manual/web/issue116/next_layer_tests.kmn similarity index 100% rename from web/testing/issue116/next_layer_tests.kmn rename to web/src/test/manual/web/issue116/next_layer_tests.kmn diff --git a/web/testing/issue1332/ANDIKAAFR-R.TTF b/web/src/test/manual/web/issue1332/ANDIKAAFR-R.TTF similarity index 100% rename from web/testing/issue1332/ANDIKAAFR-R.TTF rename to web/src/test/manual/web/issue1332/ANDIKAAFR-R.TTF diff --git a/web/testing/issue1332/header.js b/web/src/test/manual/web/issue1332/header.js similarity index 100% rename from web/testing/issue1332/header.js rename to web/src/test/manual/web/issue1332/header.js diff --git a/web/testing/issue1332/index.html b/web/src/test/manual/web/issue1332/index.html similarity index 73% rename from web/testing/issue1332/index.html rename to web/src/test/manual/web/issue1332/index.html index e2d6110f47..4b8715a7f1 100644 --- a/web/testing/issue1332/index.html +++ b/web/src/test/manual/web/issue1332/index.html @@ -2,38 +2,38 @@ - - - + + + - + - - + + KeymanWeb Issue 1332 - Mixed case of TTF files - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - - + + - - + +

    KeymanWeb Sample Page - Mixed Case of TTF font files

    Previously, KMW was not applying .TTF fonts on mobile devices.

    -

    See issue #1332 +

    See issue #1332 for details on what this test is all about.


    - + * + *** + --> diff --git a/web/testing/issue1332/sil_cameroon_qwerty.js b/web/src/test/manual/web/issue1332/sil_cameroon_qwerty.js similarity index 100% rename from web/testing/issue1332/sil_cameroon_qwerty.js rename to web/src/test/manual/web/issue1332/sil_cameroon_qwerty.js diff --git a/web/testing/issue160/index.html b/web/src/test/manual/web/issue160/index.html similarity index 71% rename from web/testing/issue160/index.html rename to web/src/test/manual/web/issue160/index.html index 74d8a2b5d6..ac3191008a 100644 --- a/web/testing/issue160/index.html +++ b/web/src/test/manual/web/issue160/index.html @@ -2,38 +2,38 @@ - - - + + + - + - - + + KeymanWeb #160 - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - - + + + - - + +

    KeymanWeb #160

    - -
    +

    Type in your language in this text area:

    - +

    or in this input field:

    - +

    Return to testing home page

    - - + * + *** + --> diff --git a/web/testing/issue160/issue160-layout.js b/web/src/test/manual/web/issue160/issue160-layout.js similarity index 100% rename from web/testing/issue160/issue160-layout.js rename to web/src/test/manual/web/issue160/issue160-layout.js diff --git a/web/testing/issue160/issue160.js b/web/src/test/manual/web/issue160/issue160.js similarity index 100% rename from web/testing/issue160/issue160.js rename to web/src/test/manual/web/issue160/issue160.js diff --git a/web/testing/issue160/issue160.kmn b/web/src/test/manual/web/issue160/issue160.kmn similarity index 100% rename from web/testing/issue160/issue160.kmn rename to web/src/test/manual/web/issue160/issue160.kmn diff --git a/web/testing/issue266/index.html b/web/src/test/manual/web/issue266/index.html similarity index 76% rename from web/testing/issue266/index.html rename to web/src/test/manual/web/issue266/index.html index 233c5e676a..aca186b178 100644 --- a/web/testing/issue266/index.html +++ b/web/src/test/manual/web/issue266/index.html @@ -2,38 +2,38 @@ - + - + - + - - + + KeymanWeb #160 - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - - + + + - - + +

    KeymanWeb #266

    - + * + *** + --> diff --git a/web/testing/issue266/issue266.js b/web/src/test/manual/web/issue266/issue266.js similarity index 100% rename from web/testing/issue266/issue266.js rename to web/src/test/manual/web/issue266/issue266.js diff --git a/web/testing/issue266/issue266.keyman-touch-layout b/web/src/test/manual/web/issue266/issue266.keyman-touch-layout similarity index 100% rename from web/testing/issue266/issue266.keyman-touch-layout rename to web/src/test/manual/web/issue266/issue266.keyman-touch-layout diff --git a/web/testing/issue266/issue266.kmn b/web/src/test/manual/web/issue266/issue266.kmn similarity index 100% rename from web/testing/issue266/issue266.kmn rename to web/src/test/manual/web/issue266/issue266.kmn diff --git a/web/testing/issue266/issue266.kvks b/web/src/test/manual/web/issue266/issue266.kvks similarity index 100% rename from web/testing/issue266/issue266.kvks rename to web/src/test/manual/web/issue266/issue266.kvks diff --git a/web/testing/issue271/header.js b/web/src/test/manual/web/issue271/header.js similarity index 100% rename from web/testing/issue271/header.js rename to web/src/test/manual/web/issue271/header.js diff --git a/web/testing/issue271/index.html b/web/src/test/manual/web/issue271/index.html similarity index 79% rename from web/testing/issue271/index.html rename to web/src/test/manual/web/issue271/index.html index ad3a27775b..8c055c4015 100644 --- a/web/testing/issue271/index.html +++ b/web/src/test/manual/web/issue271/index.html @@ -2,56 +2,56 @@ - - - + + + - + - - + + KeymanWeb Sample Page - Uncompiled Source - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - + - +

    KeymanWeb: Test page for interactions between setActiveKeyboard and the toolbar UI

    - +

    This version is used to test the interactions of SetActiveKeyboard with the Toolbar UI.

    Automatically-loaded keyboard IDs:

      @@ -65,52 +65,52 @@

    - -
    +

    -
    +

    Set active keyboard:

    Keyboard id: , Language Code:

    - +
    - +

    Add a keyboard by keyboard name:

    - +

    Add a keyboard by BCP-47 language code:

    Add a keyboard by language name:

    - +

    Return to testing home page

    - - + + - - + * + *** + --> diff --git a/web/testing/issue29/index.html b/web/src/test/manual/web/issue29/index.html similarity index 73% rename from web/testing/issue29/index.html rename to web/src/test/manual/web/issue29/index.html index 12e6b1e125..92fed6a8c1 100644 --- a/web/testing/issue29/index.html +++ b/web/src/test/manual/web/issue29/index.html @@ -2,87 +2,87 @@ - - - + + + - + - - + + KeymanWeb Sample Page - Uncompiled Source - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - + - +

    KeymanWeb: Test desktop MutationObserver functionality

    - -
    +

    This version is used to test KeymanWeb's ability to cope with page mutations.


    -
    +

    Return to testing home page

    - - + + - - + * + *** + --> diff --git a/web/testing/issue29/issue-29-iframe.html b/web/src/test/manual/web/issue29/issue-29-iframe.html similarity index 100% rename from web/testing/issue29/issue-29-iframe.html rename to web/src/test/manual/web/issue29/issue-29-iframe.html diff --git a/web/testing/issue29/issue-29.js b/web/src/test/manual/web/issue29/issue-29.js similarity index 100% rename from web/testing/issue29/issue-29.js rename to web/src/test/manual/web/issue29/issue-29.js diff --git a/web/testing/issue2924/dmg.dv.test.model.js b/web/src/test/manual/web/issue2924/dmg.dv.test.model.js similarity index 100% rename from web/testing/issue2924/dmg.dv.test.model.js rename to web/src/test/manual/web/issue2924/dmg.dv.test.model.js diff --git a/web/testing/issue2924/header.js b/web/src/test/manual/web/issue2924/header.js similarity index 100% rename from web/testing/issue2924/header.js rename to web/src/test/manual/web/issue2924/header.js diff --git a/web/testing/issue2924/index.html b/web/src/test/manual/web/issue2924/index.html similarity index 81% rename from web/testing/issue2924/index.html rename to web/src/test/manual/web/issue2924/index.html index 8f51a81270..61a1be97cd 100644 --- a/web/testing/issue2924/index.html +++ b/web/src/test/manual/web/issue2924/index.html @@ -6,8 +6,8 @@ KeymanWeb Issue 2924 - Variable Stores and Predictive Text - - + + diff --git a/web/testing/issue2924/oldtestvariable.js b/web/src/test/manual/web/issue2924/oldtestvariable.js similarity index 100% rename from web/testing/issue2924/oldtestvariable.js rename to web/src/test/manual/web/issue2924/oldtestvariable.js diff --git a/web/testing/issue2924/source/dmg.dv.test/HISTORY.md b/web/src/test/manual/web/issue2924/source/dmg.dv.test/HISTORY.md similarity index 100% rename from web/testing/issue2924/source/dmg.dv.test/HISTORY.md rename to web/src/test/manual/web/issue2924/source/dmg.dv.test/HISTORY.md diff --git a/web/testing/issue2924/source/dmg.dv.test/LICENSE.md b/web/src/test/manual/web/issue2924/source/dmg.dv.test/LICENSE.md similarity index 100% rename from web/testing/issue2924/source/dmg.dv.test/LICENSE.md rename to web/src/test/manual/web/issue2924/source/dmg.dv.test/LICENSE.md diff --git a/web/testing/issue2924/source/dmg.dv.test/README.md b/web/src/test/manual/web/issue2924/source/dmg.dv.test/README.md similarity index 100% rename from web/testing/issue2924/source/dmg.dv.test/README.md rename to web/src/test/manual/web/issue2924/source/dmg.dv.test/README.md diff --git a/web/testing/issue2924/source/dmg.dv.test/dmg.dv.test.kpj b/web/src/test/manual/web/issue2924/source/dmg.dv.test/dmg.dv.test.kpj similarity index 100% rename from web/testing/issue2924/source/dmg.dv.test/dmg.dv.test.kpj rename to web/src/test/manual/web/issue2924/source/dmg.dv.test/dmg.dv.test.kpj diff --git a/web/testing/issue2924/source/dmg.dv.test/dmg.dv.test.model_info b/web/src/test/manual/web/issue2924/source/dmg.dv.test/dmg.dv.test.model_info similarity index 100% rename from web/testing/issue2924/source/dmg.dv.test/dmg.dv.test.model_info rename to web/src/test/manual/web/issue2924/source/dmg.dv.test/dmg.dv.test.model_info diff --git a/web/testing/issue2924/source/dmg.dv.test/source/dmg.dv.test.model.kps b/web/src/test/manual/web/issue2924/source/dmg.dv.test/source/dmg.dv.test.model.kps similarity index 100% rename from web/testing/issue2924/source/dmg.dv.test/source/dmg.dv.test.model.kps rename to web/src/test/manual/web/issue2924/source/dmg.dv.test/source/dmg.dv.test.model.kps diff --git a/web/testing/issue2924/source/dmg.dv.test/source/dmg.dv.test.model.ts b/web/src/test/manual/web/issue2924/source/dmg.dv.test/source/dmg.dv.test.model.ts similarity index 100% rename from web/testing/issue2924/source/dmg.dv.test/source/dmg.dv.test.model.ts rename to web/src/test/manual/web/issue2924/source/dmg.dv.test/source/dmg.dv.test.model.ts diff --git a/web/testing/issue2924/source/dmg.dv.test/source/readme.htm b/web/src/test/manual/web/issue2924/source/dmg.dv.test/source/readme.htm similarity index 100% rename from web/testing/issue2924/source/dmg.dv.test/source/readme.htm rename to web/src/test/manual/web/issue2924/source/dmg.dv.test/source/readme.htm diff --git a/web/testing/issue2924/source/dmg.dv.test/source/welcome.htm b/web/src/test/manual/web/issue2924/source/dmg.dv.test/source/welcome.htm similarity index 100% rename from web/testing/issue2924/source/dmg.dv.test/source/welcome.htm rename to web/src/test/manual/web/issue2924/source/dmg.dv.test/source/welcome.htm diff --git a/web/testing/issue2924/source/dmg.dv.test/source/wordlist.tsv b/web/src/test/manual/web/issue2924/source/dmg.dv.test/source/wordlist.tsv similarity index 100% rename from web/testing/issue2924/source/dmg.dv.test/source/wordlist.tsv rename to web/src/test/manual/web/issue2924/source/dmg.dv.test/source/wordlist.tsv diff --git a/web/testing/issue2924/source/testvariable/HISTORY.md b/web/src/test/manual/web/issue2924/source/testvariable/HISTORY.md similarity index 100% rename from web/testing/issue2924/source/testvariable/HISTORY.md rename to web/src/test/manual/web/issue2924/source/testvariable/HISTORY.md diff --git a/web/testing/issue2924/source/testvariable/LICENSE.md b/web/src/test/manual/web/issue2924/source/testvariable/LICENSE.md similarity index 100% rename from web/testing/issue2924/source/testvariable/LICENSE.md rename to web/src/test/manual/web/issue2924/source/testvariable/LICENSE.md diff --git a/web/testing/issue2924/source/testvariable/README.md b/web/src/test/manual/web/issue2924/source/testvariable/README.md similarity index 100% rename from web/testing/issue2924/source/testvariable/README.md rename to web/src/test/manual/web/issue2924/source/testvariable/README.md diff --git a/web/testing/issue2924/source/testvariable/source/readme.htm b/web/src/test/manual/web/issue2924/source/testvariable/source/readme.htm similarity index 100% rename from web/testing/issue2924/source/testvariable/source/readme.htm rename to web/src/test/manual/web/issue2924/source/testvariable/source/readme.htm diff --git a/web/testing/issue2924/source/testvariable/source/testvariable.keyman-touch-layout b/web/src/test/manual/web/issue2924/source/testvariable/source/testvariable.keyman-touch-layout similarity index 100% rename from web/testing/issue2924/source/testvariable/source/testvariable.keyman-touch-layout rename to web/src/test/manual/web/issue2924/source/testvariable/source/testvariable.keyman-touch-layout diff --git a/web/testing/issue2924/source/testvariable/source/testvariable.kmn b/web/src/test/manual/web/issue2924/source/testvariable/source/testvariable.kmn similarity index 100% rename from web/testing/issue2924/source/testvariable/source/testvariable.kmn rename to web/src/test/manual/web/issue2924/source/testvariable/source/testvariable.kmn diff --git a/web/testing/issue2924/source/testvariable/source/testvariable.kps b/web/src/test/manual/web/issue2924/source/testvariable/source/testvariable.kps similarity index 100% rename from web/testing/issue2924/source/testvariable/source/testvariable.kps rename to web/src/test/manual/web/issue2924/source/testvariable/source/testvariable.kps diff --git a/web/testing/issue2924/source/testvariable/source/testvariable.kvks b/web/src/test/manual/web/issue2924/source/testvariable/source/testvariable.kvks similarity index 100% rename from web/testing/issue2924/source/testvariable/source/testvariable.kvks rename to web/src/test/manual/web/issue2924/source/testvariable/source/testvariable.kvks diff --git a/web/testing/issue2924/source/testvariable/source/welcome.htm b/web/src/test/manual/web/issue2924/source/testvariable/source/welcome.htm similarity index 100% rename from web/testing/issue2924/source/testvariable/source/welcome.htm rename to web/src/test/manual/web/issue2924/source/testvariable/source/welcome.htm diff --git a/web/testing/issue2924/source/testvariable/testvariable.keyboard_info b/web/src/test/manual/web/issue2924/source/testvariable/testvariable.keyboard_info similarity index 100% rename from web/testing/issue2924/source/testvariable/testvariable.keyboard_info rename to web/src/test/manual/web/issue2924/source/testvariable/testvariable.keyboard_info diff --git a/web/testing/issue2924/source/testvariable/testvariable.kpj b/web/src/test/manual/web/issue2924/source/testvariable/testvariable.kpj similarity index 100% rename from web/testing/issue2924/source/testvariable/testvariable.kpj rename to web/src/test/manual/web/issue2924/source/testvariable/testvariable.kpj diff --git a/web/testing/issue2924/testvariable.js b/web/src/test/manual/web/issue2924/testvariable.js similarity index 100% rename from web/testing/issue2924/testvariable.js rename to web/src/test/manual/web/issue2924/testvariable.js diff --git a/web/testing/issue3701/index.html b/web/src/test/manual/web/issue3701/index.html similarity index 80% rename from web/testing/issue3701/index.html rename to web/src/test/manual/web/issue3701/index.html index 4e30f4d118..ca2729133a 100644 --- a/web/testing/issue3701/index.html +++ b/web/src/test/manual/web/issue3701/index.html @@ -2,38 +2,38 @@ - - - + + + - + - - + + KeymanWeb Testing Page - Fat-Finger interactions with Beep feedback - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + + - - + +

    KeymanWeb Sample Page - Fat-finger Interactions with Beep Feedback

    Since erroneous input should not be considered with predictions & corrections, this page uses a US-style keyboard that prohibits use of the letter 'x'.

    - -
    +

    Type in your language in this text area:

    - +

    or in this input field:

    @@ -97,20 +97,20 @@
    - - + * + *** + --> diff --git a/web/testing/issue3701/test3701/HISTORY.md b/web/src/test/manual/web/issue3701/test3701/HISTORY.md similarity index 94% rename from web/testing/issue3701/test3701/HISTORY.md rename to web/src/test/manual/web/issue3701/test3701/HISTORY.md index 6682500b33..1df4155def 100644 --- a/web/testing/issue3701/test3701/HISTORY.md +++ b/web/src/test/manual/web/issue3701/test3701/HISTORY.md @@ -1,6 +1,6 @@ -test3701 Change History -==================== - -1.0 (2020-10-19) ----------------- -* Created by Marc Durdin +test3701 Change History +==================== + +1.0 (2020-10-19) +---------------- +* Created by Marc Durdin diff --git a/web/testing/issue3701/test3701/LICENSE.md b/web/src/test/manual/web/issue3701/test3701/LICENSE.md similarity index 98% rename from web/testing/issue3701/test3701/LICENSE.md rename to web/src/test/manual/web/issue3701/test3701/LICENSE.md index 973cee89ac..7c2a8c501b 100644 --- a/web/testing/issue3701/test3701/LICENSE.md +++ b/web/src/test/manual/web/issue3701/test3701/LICENSE.md @@ -1,21 +1,21 @@ -The MIT License (MIT) - -© SIL International - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The MIT License (MIT) + +© SIL International + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/web/testing/issue3701/test3701/README.md b/web/src/test/manual/web/issue3701/test3701/README.md similarity index 91% rename from web/testing/issue3701/test3701/README.md rename to web/src/test/manual/web/issue3701/test3701/README.md index deca8e95b1..0d04693d20 100644 --- a/web/testing/issue3701/test3701/README.md +++ b/web/src/test/manual/web/issue3701/test3701/README.md @@ -1,29 +1,29 @@ -test3701 keyboard -============== - -© SIL International - -Version 1.0 - -Description ------------ - -test3701 generated from template - -Links ------ - -Supported Platforms -------------------- - * Windows - * macOS - * Linux - * Web - * iPhone - * iPad - * Android phone - * Android tablet - * Mobile devices - * Desktop devices - * Tablet devices - +test3701 keyboard +============== + +© SIL International + +Version 1.0 + +Description +----------- + +test3701 generated from template + +Links +----- + +Supported Platforms +------------------- + * Windows + * macOS + * Linux + * Web + * iPhone + * iPad + * Android phone + * Android tablet + * Mobile devices + * Desktop devices + * Tablet devices + diff --git a/web/testing/issue3701/test3701/build/test3701.js b/web/src/test/manual/web/issue3701/test3701/build/test3701.js similarity index 100% rename from web/testing/issue3701/test3701/build/test3701.js rename to web/src/test/manual/web/issue3701/test3701/build/test3701.js diff --git a/web/testing/issue3701/test3701/debug.log b/web/src/test/manual/web/issue3701/test3701/debug.log similarity index 100% rename from web/testing/issue3701/test3701/debug.log rename to web/src/test/manual/web/issue3701/test3701/debug.log diff --git a/web/testing/issue3701/test3701/source/readme.htm b/web/src/test/manual/web/issue3701/test3701/source/readme.htm similarity index 95% rename from web/testing/issue3701/test3701/source/readme.htm rename to web/src/test/manual/web/issue3701/test3701/source/readme.htm index c15bef97a6..67a6a63781 100644 --- a/web/testing/issue3701/test3701/source/readme.htm +++ b/web/src/test/manual/web/issue3701/test3701/source/readme.htm @@ -1,24 +1,24 @@ - - - - - - test3701 - - - - -

    test3701

    - -

    - test3701 1.0 generated from template. -

    - -

    © SIL International

    - - - + + + + + + test3701 + + + + +

    test3701

    + +

    + test3701 1.0 generated from template. +

    + +

    © SIL International

    + + + diff --git a/web/testing/issue917-context-and-notany/test_917/source/test_917.keyman-touch-layout b/web/src/test/manual/web/issue3701/test3701/source/test3701.keyman-touch-layout similarity index 100% rename from web/testing/issue917-context-and-notany/test_917/source/test_917.keyman-touch-layout rename to web/src/test/manual/web/issue3701/test3701/source/test3701.keyman-touch-layout diff --git a/web/testing/issue3701/test3701/source/test3701.kmn b/web/src/test/manual/web/issue3701/test3701/source/test3701.kmn similarity index 96% rename from web/testing/issue3701/test3701/source/test3701.kmn rename to web/src/test/manual/web/issue3701/test3701/source/test3701.kmn index fa0f2d93d8..52b56ef8e1 100644 --- a/web/testing/issue3701/test3701/source/test3701.kmn +++ b/web/src/test/manual/web/issue3701/test3701/source/test3701.kmn @@ -1,16 +1,16 @@ -c test3701 generated from template at 2020-10-19 11:32:46 -c with name "test3701" -store(&VERSION) '10.0' -store(&NAME) 'test3701' -store(©RIGHT) '© SIL International' -store(&KEYBOARDVERSION) '1.0' -store(&TARGETS) 'web mobile' -store(&VISUALKEYBOARD) 'test3701.kvks' -store(&LAYOUTFILE) 'test3701.keyman-touch-layout' - -begin Unicode > use(main) - -group(main) using keys - -+ [K_X] > 'x' beep -+ [SHIFT K_X] > 'X' beep +c test3701 generated from template at 2020-10-19 11:32:46 +c with name "test3701" +store(&VERSION) '10.0' +store(&NAME) 'test3701' +store(©RIGHT) '© SIL International' +store(&KEYBOARDVERSION) '1.0' +store(&TARGETS) 'web mobile' +store(&VISUALKEYBOARD) 'test3701.kvks' +store(&LAYOUTFILE) 'test3701.keyman-touch-layout' + +begin Unicode > use(main) + +group(main) using keys + ++ [K_X] > 'x' beep ++ [SHIFT K_X] > 'X' beep diff --git a/web/testing/issue3701/test3701/source/test3701.kps b/web/src/test/manual/web/issue3701/test3701/source/test3701.kps similarity index 96% rename from web/testing/issue3701/test3701/source/test3701.kps rename to web/src/test/manual/web/issue3701/test3701/source/test3701.kps index 61924b3140..fdf625bc0c 100644 --- a/web/testing/issue3701/test3701/source/test3701.kps +++ b/web/src/test/manual/web/issue3701/test3701/source/test3701.kps @@ -1,61 +1,61 @@ - - - - 13.0.9999.0 - 7.0 - - - - readme.htm - - - - - - - - - - test3701 - © SIL International - Marc Durdin - - - - - ..\build\test3701.js - - 0 - .js - - - ..\build\test3701.kvk - - 0 - .kvk - - - welcome.htm - - 0 - .htm - - - readme.htm - - 0 - .htm - - - - - test3701 - test3701 - 1.0 - - English - - - - - + + + + 13.0.9999.0 + 7.0 + + + + readme.htm + + + + + + + + + + test3701 + © SIL International + Marc Durdin + + + + + ..\build\test3701.js + + 0 + .js + + + ..\build\test3701.kvk + + 0 + .kvk + + + welcome.htm + + 0 + .htm + + + readme.htm + + 0 + .htm + + + + + test3701 + test3701 + 1.0 + + English + + + + + diff --git a/web/testing/issue3701/test3701/source/test3701.kvks b/web/src/test/manual/web/issue3701/test3701/source/test3701.kvks similarity index 95% rename from web/testing/issue3701/test3701/source/test3701.kvks rename to web/src/test/manual/web/issue3701/test3701/source/test3701.kvks index 299f419922..6f09cc5182 100644 --- a/web/testing/issue3701/test3701/source/test3701.kvks +++ b/web/src/test/manual/web/issue3701/test3701/source/test3701.kvks @@ -1,8 +1,8 @@ - - -
    - 10.0 - - -
    -
    + + +
    + 10.0 + + +
    +
    diff --git a/web/testing/issue3701/test3701/source/welcome.htm b/web/src/test/manual/web/issue3701/test3701/source/welcome.htm similarity index 95% rename from web/testing/issue3701/test3701/source/welcome.htm rename to web/src/test/manual/web/issue3701/test3701/source/welcome.htm index a6dd6f8ce4..1d6d1b2b95 100644 --- a/web/testing/issue3701/test3701/source/welcome.htm +++ b/web/src/test/manual/web/issue3701/test3701/source/welcome.htm @@ -1,29 +1,29 @@ - - - - - - Start Using test3701 - - - - -

    Start Using test3701

    - -

    - test3701 1.0 generated from template for use in engine testing. - Emits error feedback whenever an 'x' or 'X' is typed. -

    - -

    Keyboard Layout

    - - - -

    © SIL International

    - - + + + + + + Start Using test3701 + + + + +

    Start Using test3701

    + +

    + test3701 1.0 generated from template for use in engine testing. + Emits error feedback whenever an 'x' or 'X' is typed. +

    + +

    Keyboard Layout

    + + + +

    © SIL International

    + + \ No newline at end of file diff --git a/web/testing/issue3701/test3701/test3701.keyboard_info b/web/src/test/manual/web/issue3701/test3701/test3701.keyboard_info similarity index 94% rename from web/testing/issue3701/test3701/test3701.keyboard_info rename to web/src/test/manual/web/issue3701/test3701/test3701.keyboard_info index 31cba8236b..b2b40a5d1e 100644 --- a/web/testing/issue3701/test3701/test3701.keyboard_info +++ b/web/src/test/manual/web/issue3701/test3701/test3701.keyboard_info @@ -1,7 +1,7 @@ -{ - "license": "mit", - "languages": [ - - ], - "description": "test3701 generated from template" -} +{ + "license": "mit", + "languages": [ + + ], + "description": "test3701 generated from template" +} diff --git a/web/testing/issue3701/test3701/test3701.kpj b/web/src/test/manual/web/issue3701/test3701/test3701.kpj similarity index 97% rename from web/testing/issue3701/test3701/test3701.kpj rename to web/src/test/manual/web/issue3701/test3701/test3701.kpj index 6288c84f1d..5db48cd115 100644 --- a/web/testing/issue3701/test3701/test3701.kpj +++ b/web/src/test/manual/web/issue3701/test3701/test3701.kpj @@ -1,94 +1,94 @@ - - - - $PROJECTPATH\build - True - True - True - keyboard - - - - id_4ace41d3c5da7a59be576737b6efdfa8 - test3701.kmn - source\test3701.kmn - 1.0 - .kmn -
    - test3701 - © SIL International -
    -
    - - id_6fde3bf09317bfb25c4710ea06bb0e21 - test3701.kps - source\test3701.kps - - .kps -
    - test3701 - © SIL International -
    -
    - - id_ede98e4633e239f933cbfd1f4e1b766c - HISTORY.md - HISTORY.md - - .md - - - id_53e892b8b41cc4caece1cfd5ef21d6e7 - LICENSE.md - LICENSE.md - - .md - - - id_0730bb7c2e8f9ea2438b52e419dd86c9 - README.md - README.md - - .md - - - id_e18bba9285544da2bad5cb8bf0b153d6 - test3701.keyboard_info - test3701.keyboard_info - - .keyboard_info - - - id_e944ee9b3d06f36294030601f3bd33ae - test3701.js - source\..\build\test3701.js - - .js - id_6fde3bf09317bfb25c4710ea06bb0e21 - - - id_4edf408fcc9bf07a24cd880189622197 - test3701.kvk - source\..\build\test3701.kvk - - .kvk - id_6fde3bf09317bfb25c4710ea06bb0e21 - - - id_356e5d149c1e539356d72698c1e401a6 - welcome.htm - source\welcome.htm - - .htm - id_6fde3bf09317bfb25c4710ea06bb0e21 - - - id_8da344c4cea6f467013357fe099006f5 - readme.htm - source\readme.htm - - .htm - id_6fde3bf09317bfb25c4710ea06bb0e21 - -
    -
    + + + + $PROJECTPATH\build + True + True + True + keyboard + + + + id_4ace41d3c5da7a59be576737b6efdfa8 + test3701.kmn + source\test3701.kmn + 1.0 + .kmn +
    + test3701 + © SIL International +
    +
    + + id_6fde3bf09317bfb25c4710ea06bb0e21 + test3701.kps + source\test3701.kps + + .kps +
    + test3701 + © SIL International +
    +
    + + id_ede98e4633e239f933cbfd1f4e1b766c + HISTORY.md + HISTORY.md + + .md + + + id_53e892b8b41cc4caece1cfd5ef21d6e7 + LICENSE.md + LICENSE.md + + .md + + + id_0730bb7c2e8f9ea2438b52e419dd86c9 + README.md + README.md + + .md + + + id_e18bba9285544da2bad5cb8bf0b153d6 + test3701.keyboard_info + test3701.keyboard_info + + .keyboard_info + + + id_e944ee9b3d06f36294030601f3bd33ae + test3701.js + source\..\build\test3701.js + + .js + id_6fde3bf09317bfb25c4710ea06bb0e21 + + + id_4edf408fcc9bf07a24cd880189622197 + test3701.kvk + source\..\build\test3701.kvk + + .kvk + id_6fde3bf09317bfb25c4710ea06bb0e21 + + + id_356e5d149c1e539356d72698c1e401a6 + welcome.htm + source\welcome.htm + + .htm + id_6fde3bf09317bfb25c4710ea06bb0e21 + + + id_8da344c4cea6f467013357fe099006f5 + readme.htm + source\readme.htm + + .htm + id_6fde3bf09317bfb25c4710ea06bb0e21 + +
    +
    diff --git a/web/testing/issue382/index.html b/web/src/test/manual/web/issue382/index.html similarity index 89% rename from web/testing/issue382/index.html rename to web/src/test/manual/web/issue382/index.html index 10148666f0..12ab6cd7a3 100644 --- a/web/testing/issue382/index.html +++ b/web/src/test/manual/web/issue382/index.html @@ -23,7 +23,7 @@ - + - + diff --git a/web/testing/issue382/issue382-layout.js b/web/src/test/manual/web/issue382/issue382-layout.js similarity index 100% rename from web/testing/issue382/issue382-layout.js rename to web/src/test/manual/web/issue382/issue382-layout.js diff --git a/web/testing/issue382/issue382.js b/web/src/test/manual/web/issue382/issue382.js similarity index 100% rename from web/testing/issue382/issue382.js rename to web/src/test/manual/web/issue382/issue382.js diff --git a/web/testing/issue382/issue382.kmn b/web/src/test/manual/web/issue382/issue382.kmn similarity index 100% rename from web/testing/issue382/issue382.kmn rename to web/src/test/manual/web/issue382/issue382.kmn diff --git a/web/testing/issue382/issue382.kmx b/web/src/test/manual/web/issue382/issue382.kmx similarity index 100% rename from web/testing/issue382/issue382.kmx rename to web/src/test/manual/web/issue382/issue382.kmx diff --git a/web/testing/issue382/issue382.kpj b/web/src/test/manual/web/issue382/issue382.kpj similarity index 100% rename from web/testing/issue382/issue382.kpj rename to web/src/test/manual/web/issue382/issue382.kpj diff --git a/web/testing/issue382/issue382.kvk b/web/src/test/manual/web/issue382/issue382.kvk similarity index 100% rename from web/testing/issue382/issue382.kvk rename to web/src/test/manual/web/issue382/issue382.kvk diff --git a/web/testing/issue382/issue382.kvks b/web/src/test/manual/web/issue382/issue382.kvks similarity index 100% rename from web/testing/issue382/issue382.kvks rename to web/src/test/manual/web/issue382/issue382.kvks diff --git a/web/testing/issue53/index.html b/web/src/test/manual/web/issue53/index.html similarity index 77% rename from web/testing/issue53/index.html rename to web/src/test/manual/web/issue53/index.html index 42d6e94c9e..4093fadd48 100644 --- a/web/testing/issue53/index.html +++ b/web/src/test/manual/web/issue53/index.html @@ -2,81 +2,81 @@ - - - + + + - + - - + + KeymanWeb Testing Page - Mismatched Layer Rows - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - - + + - - + +

    KeymanWeb: Tests layering transitions for keyboards with variable layer sizes.

    This test should be run from mobile devices or with Chrome's mobile device emulation settings available within Developer Mode.

    - -
    +

    Type in your language in this text area:

    - +

    or in this input field:

    - +

    Add a keyboard by keyboard name:

    - +

    Add a keyboard by BCP-47 language code:

    Add a keyboard by language name:

    - +

    Remove a keyboard by keyboard name:

    @@ -86,20 +86,20 @@
    - - + * + *** + --> diff --git a/web/testing/issue53/issue53.js b/web/src/test/manual/web/issue53/issue53.js similarity index 100% rename from web/testing/issue53/issue53.js rename to web/src/test/manual/web/issue53/issue53.js diff --git a/web/testing/issue53/layered_debug_keyboard-layout.js b/web/src/test/manual/web/issue53/layered_debug_keyboard-layout.js similarity index 100% rename from web/testing/issue53/layered_debug_keyboard-layout.js rename to web/src/test/manual/web/issue53/layered_debug_keyboard-layout.js diff --git a/web/testing/issue53/layered_debug_keyboard.ico b/web/src/test/manual/web/issue53/layered_debug_keyboard.ico similarity index 100% rename from web/testing/issue53/layered_debug_keyboard.ico rename to web/src/test/manual/web/issue53/layered_debug_keyboard.ico diff --git a/web/testing/issue53/layered_debug_keyboard.js b/web/src/test/manual/web/issue53/layered_debug_keyboard.js similarity index 100% rename from web/testing/issue53/layered_debug_keyboard.js rename to web/src/test/manual/web/issue53/layered_debug_keyboard.js diff --git a/web/testing/issue53/layered_debug_keyboard.kmn b/web/src/test/manual/web/issue53/layered_debug_keyboard.kmn similarity index 100% rename from web/testing/issue53/layered_debug_keyboard.kmn rename to web/src/test/manual/web/issue53/layered_debug_keyboard.kmn diff --git a/web/testing/issue53/layered_debug_keyboard.kpj b/web/src/test/manual/web/issue53/layered_debug_keyboard.kpj similarity index 100% rename from web/testing/issue53/layered_debug_keyboard.kpj rename to web/src/test/manual/web/issue53/layered_debug_keyboard.kpj diff --git a/web/testing/issue5312-touch-alias-optimization/index.html b/web/src/test/manual/web/issue5312-touch-alias-optimization/index.html similarity index 98% rename from web/testing/issue5312-touch-alias-optimization/index.html rename to web/src/test/manual/web/issue5312-touch-alias-optimization/index.html index 91730b0f55..682e279ab6 100644 --- a/web/testing/issue5312-touch-alias-optimization/index.html +++ b/web/src/test/manual/web/issue5312-touch-alias-optimization/index.html @@ -23,7 +23,7 @@ - + - + + - + + - + + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - - + + - +

    KeymanWeb: Light test for touch-based MutationObserver functionality

    - -
    +

    This version is used to test KeymanWeb's ability to cope with page mutations.


    -
    +

    Return to testing home page

    - - + + - - + * + *** + --> diff --git a/web/testing/issue62/issue-62.js b/web/src/test/manual/web/issue62/issue-62.js similarity index 100% rename from web/testing/issue62/issue-62.js rename to web/src/test/manual/web/issue62/issue-62.js diff --git a/web/testing/issue63/index.html b/web/src/test/manual/web/issue63/index.html similarity index 75% rename from web/testing/issue63/index.html rename to web/src/test/manual/web/issue63/index.html index a62b8cade4..43842dc3e9 100644 --- a/web/testing/issue63/index.html +++ b/web/src/test/manual/web/issue63/index.html @@ -2,63 +2,63 @@ - - - + + + - + - - + + KeymanWeb Sample Page - Uncompiled Source - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - - + + - +

    KeymanWeb: Test/stress-test touch-based MutationObserver functionality

    - -
    +

    This version is used to test KeymanWeb's ability to cope with page mutations.

    @@ -68,26 +68,26 @@
    -
    +

    Return to testing home page

    - - + + - - + * + *** + --> diff --git a/web/testing/issue63/issue-29-iframe.html b/web/src/test/manual/web/issue63/issue-29-iframe.html similarity index 100% rename from web/testing/issue63/issue-29-iframe.html rename to web/src/test/manual/web/issue63/issue-29-iframe.html diff --git a/web/testing/issue63/issue-63.js b/web/src/test/manual/web/issue63/issue-63.js similarity index 100% rename from web/testing/issue63/issue-63.js rename to web/src/test/manual/web/issue63/issue-63.js diff --git a/web/testing/issue917-context-and-notany/index.html b/web/src/test/manual/web/issue917-context-and-notany/index.html similarity index 82% rename from web/testing/issue917-context-and-notany/index.html rename to web/src/test/manual/web/issue917-context-and-notany/index.html index b3417047b3..1db3b10c4d 100644 --- a/web/testing/issue917-context-and-notany/index.html +++ b/web/src/test/manual/web/issue917-context-and-notany/index.html @@ -2,38 +2,38 @@ - - - + + + - + - - + + KeymanWeb Testing Page - context() and notany() interaction (#917) - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + + - - + +

    KeymanWeb Sample Page -context() and notany() interaction (#917)

    KeymanWeb did not support notany() and context() together. This keyboard tests various scenarios in the implementation (14.0 min):

    @@ -69,16 +69,16 @@
    - -
    +

    Type in your language in this text area:

    - +

    or in this input field:

    @@ -88,20 +88,20 @@
    - - + * + *** + --> diff --git a/web/testing/issue917-context-and-notany/test_917/HISTORY.md b/web/src/test/manual/web/issue917-context-and-notany/test_917/HISTORY.md similarity index 100% rename from web/testing/issue917-context-and-notany/test_917/HISTORY.md rename to web/src/test/manual/web/issue917-context-and-notany/test_917/HISTORY.md diff --git a/web/testing/issue917-context-and-notany/test_917/LICENSE.md b/web/src/test/manual/web/issue917-context-and-notany/test_917/LICENSE.md similarity index 100% rename from web/testing/issue917-context-and-notany/test_917/LICENSE.md rename to web/src/test/manual/web/issue917-context-and-notany/test_917/LICENSE.md diff --git a/web/testing/issue917-context-and-notany/test_917/README.md b/web/src/test/manual/web/issue917-context-and-notany/test_917/README.md similarity index 100% rename from web/testing/issue917-context-and-notany/test_917/README.md rename to web/src/test/manual/web/issue917-context-and-notany/test_917/README.md diff --git a/web/testing/issue917-context-and-notany/test_917/source/readme.htm b/web/src/test/manual/web/issue917-context-and-notany/test_917/source/readme.htm similarity index 100% rename from web/testing/issue917-context-and-notany/test_917/source/readme.htm rename to web/src/test/manual/web/issue917-context-and-notany/test_917/source/readme.htm diff --git a/web/testing/issue3701/test3701/source/test3701.keyman-touch-layout b/web/src/test/manual/web/issue917-context-and-notany/test_917/source/test_917.keyman-touch-layout similarity index 95% rename from web/testing/issue3701/test3701/source/test3701.keyman-touch-layout rename to web/src/test/manual/web/issue917-context-and-notany/test_917/source/test_917.keyman-touch-layout index 62d8af4917..149069b062 100644 --- a/web/testing/issue3701/test3701/source/test3701.keyman-touch-layout +++ b/web/src/test/manual/web/issue917-context-and-notany/test_917/source/test_917.keyman-touch-layout @@ -1,1316 +1,1316 @@ -{ - "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": [ - { - "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": "50" - }, - { - "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" - }, - { - "text": "", - "width": "10", - "sp": "10" - } - ] - }, - { - "id": 3, - "key": [ - { - "id": "K_SHIFT", - "text": "*Shift*", - "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": "100", - "sp": "1" - } - ] - }, - { - "id": 4, - "key": [ - { - "id": "K_NUMLOCK", - "text": "*123*", - "width": "150", - "sp": "1", - "nextlayer": "numeric" - }, - { - "id": "K_LOPT", - "text": "*Menu*", - "width": "120", - "sp": "1" - }, - { - "id": "K_SPACE", - "text": "", - "width": "610", - "sp": "0" - }, - { - "id": "K_ENTER", - "text": "*Enter*", - "width": "150", - "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": "50" - }, - { - "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" - }, - { - "text": "", - "width": "10", - "sp": "10" - } - ] - }, - { - "id": 3, - "key": [ - { - "id": "K_SHIFT", - "text": "*Shift*", - "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*", - "sp": "1" - } - ] - }, - { - "id": 4, - "key": [ - { - "id": "K_NUMLOCK", - "text": "*123*", - "width": "150", - "sp": "1", - "nextlayer": "numeric" - }, - { - "id": "K_LOPT", - "text": "*Menu*", - "width": "120", - "sp": "1" - }, - { - "id": "K_SPACE", - "text": "", - "width": "610", - "sp": "0" - }, - { - "id": "K_ENTER", - "text": "*Enter*", - "width": "150", - "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", - "layer": "shift", - "text": "$", - "pad": "50" - }, - { - "id": "K_2", - "layer": "shift", - "text": "@" - }, - { - "id": "K_3", - "layer": "shift", - "text": "#" - }, - { - "id": "K_5", - "layer": "shift", - "text": "%" - }, - { - "id": "K_6", - "layer": "shift", - "text": "&" - }, - { - "id": "K_HYPHEN", - "layer": "shift", - "text": "_" - }, - { - "id": "K_EQUAL", - "text": "=", - "layer": "default" - }, - { - "id": "K_BKSLASH", - "layer": "shift", - "text": "|" - }, - { - "id": "K_BKSLASH", - "text": "\\", - "layer": "default" - }, - { - "text": "", - "width": "10", - "sp": "10" - } - ] - }, - { - "id": 3, - "key": [ - { - "id": "K_LBRKT", - "text": "[", - "pad": "110", - "sk": [ - { - "id": "U_00AB", - "text": "\u00AB" - }, - { - "id": "K_COMMA", - "text": "<", - "layer": "shift" - }, - { - "id": "K_LBRKT", - "text": "{", - "layer": "shift" - } - ] - }, - { - "id": "K_9", - "layer": "shift", - "text": "(" - }, - { - "id": "K_0", - "layer": "shift", - "text": ")" - }, - { - "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", - "layer": "shift", - "text": "+" - }, - { - "id": "K_HYPHEN", - "text": "-" - }, - { - "id": "K_8", - "layer": "shift", - "text": "*" - }, - { - "id": "K_SLASH", - "text": "/" - }, - { - "id": "K_BKSP", - "text": "*BkSp*", - "width": "100", - "sp": "1" - } - ] - }, - { - "id": 4, - "key": [ - { - "id": "K_LOWER", - "text": "*abc*", - "width": "150", - "sp": "1", - "nextlayer": "default" - }, - { - "id": "K_LOPT", - "text": "*Menu*", - "width": "120", - "sp": "1" - }, - { - "id": "K_SPACE", - "text": "", - "width": "610", - "sp": "0" - }, - { - "id": "K_ENTER", - "text": "*Enter*", - "width": "150", - "sp": "1" - } - ] - } - ] - } - ] - } -} +{ + "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": [ + { + "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": "50" + }, + { + "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" + }, + { + "text": "", + "width": "10", + "sp": "10" + } + ] + }, + { + "id": 3, + "key": [ + { + "id": "K_SHIFT", + "text": "*Shift*", + "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": "100", + "sp": "1" + } + ] + }, + { + "id": 4, + "key": [ + { + "id": "K_NUMLOCK", + "text": "*123*", + "width": "150", + "sp": "1", + "nextlayer": "numeric" + }, + { + "id": "K_LOPT", + "text": "*Menu*", + "width": "120", + "sp": "1" + }, + { + "id": "K_SPACE", + "text": "", + "width": "610", + "sp": "0" + }, + { + "id": "K_ENTER", + "text": "*Enter*", + "width": "150", + "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": "50" + }, + { + "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" + }, + { + "text": "", + "width": "10", + "sp": "10" + } + ] + }, + { + "id": 3, + "key": [ + { + "id": "K_SHIFT", + "text": "*Shift*", + "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*", + "sp": "1" + } + ] + }, + { + "id": 4, + "key": [ + { + "id": "K_NUMLOCK", + "text": "*123*", + "width": "150", + "sp": "1", + "nextlayer": "numeric" + }, + { + "id": "K_LOPT", + "text": "*Menu*", + "width": "120", + "sp": "1" + }, + { + "id": "K_SPACE", + "text": "", + "width": "610", + "sp": "0" + }, + { + "id": "K_ENTER", + "text": "*Enter*", + "width": "150", + "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", + "layer": "shift", + "text": "$", + "pad": "50" + }, + { + "id": "K_2", + "layer": "shift", + "text": "@" + }, + { + "id": "K_3", + "layer": "shift", + "text": "#" + }, + { + "id": "K_5", + "layer": "shift", + "text": "%" + }, + { + "id": "K_6", + "layer": "shift", + "text": "&" + }, + { + "id": "K_HYPHEN", + "layer": "shift", + "text": "_" + }, + { + "id": "K_EQUAL", + "text": "=", + "layer": "default" + }, + { + "id": "K_BKSLASH", + "layer": "shift", + "text": "|" + }, + { + "id": "K_BKSLASH", + "text": "\\", + "layer": "default" + }, + { + "text": "", + "width": "10", + "sp": "10" + } + ] + }, + { + "id": 3, + "key": [ + { + "id": "K_LBRKT", + "text": "[", + "pad": "110", + "sk": [ + { + "id": "U_00AB", + "text": "\u00AB" + }, + { + "id": "K_COMMA", + "text": "<", + "layer": "shift" + }, + { + "id": "K_LBRKT", + "text": "{", + "layer": "shift" + } + ] + }, + { + "id": "K_9", + "layer": "shift", + "text": "(" + }, + { + "id": "K_0", + "layer": "shift", + "text": ")" + }, + { + "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", + "layer": "shift", + "text": "+" + }, + { + "id": "K_HYPHEN", + "text": "-" + }, + { + "id": "K_8", + "layer": "shift", + "text": "*" + }, + { + "id": "K_SLASH", + "text": "/" + }, + { + "id": "K_BKSP", + "text": "*BkSp*", + "width": "100", + "sp": "1" + } + ] + }, + { + "id": 4, + "key": [ + { + "id": "K_LOWER", + "text": "*abc*", + "width": "150", + "sp": "1", + "nextlayer": "default" + }, + { + "id": "K_LOPT", + "text": "*Menu*", + "width": "120", + "sp": "1" + }, + { + "id": "K_SPACE", + "text": "", + "width": "610", + "sp": "0" + }, + { + "id": "K_ENTER", + "text": "*Enter*", + "width": "150", + "sp": "1" + } + ] + } + ] + } + ] + } +} diff --git a/web/testing/issue917-context-and-notany/test_917/source/test_917.kmn b/web/src/test/manual/web/issue917-context-and-notany/test_917/source/test_917.kmn similarity index 100% rename from web/testing/issue917-context-and-notany/test_917/source/test_917.kmn rename to web/src/test/manual/web/issue917-context-and-notany/test_917/source/test_917.kmn diff --git a/web/testing/issue917-context-and-notany/test_917/source/test_917.kps b/web/src/test/manual/web/issue917-context-and-notany/test_917/source/test_917.kps similarity index 100% rename from web/testing/issue917-context-and-notany/test_917/source/test_917.kps rename to web/src/test/manual/web/issue917-context-and-notany/test_917/source/test_917.kps diff --git a/web/testing/issue917-context-and-notany/test_917/source/test_917.kvks b/web/src/test/manual/web/issue917-context-and-notany/test_917/source/test_917.kvks similarity index 100% rename from web/testing/issue917-context-and-notany/test_917/source/test_917.kvks rename to web/src/test/manual/web/issue917-context-and-notany/test_917/source/test_917.kvks diff --git a/web/testing/issue917-context-and-notany/test_917/source/welcome.htm b/web/src/test/manual/web/issue917-context-and-notany/test_917/source/welcome.htm similarity index 100% rename from web/testing/issue917-context-and-notany/test_917/source/welcome.htm rename to web/src/test/manual/web/issue917-context-and-notany/test_917/source/welcome.htm diff --git a/web/testing/issue917-context-and-notany/test_917/test_917.keyboard_info b/web/src/test/manual/web/issue917-context-and-notany/test_917/test_917.keyboard_info similarity index 100% rename from web/testing/issue917-context-and-notany/test_917/test_917.keyboard_info rename to web/src/test/manual/web/issue917-context-and-notany/test_917/test_917.keyboard_info diff --git a/web/testing/issue917-context-and-notany/test_917/test_917.kpj b/web/src/test/manual/web/issue917-context-and-notany/test_917/test_917.kpj similarity index 100% rename from web/testing/issue917-context-and-notany/test_917/test_917.kpj rename to web/src/test/manual/web/issue917-context-and-notany/test_917/test_917.kpj diff --git a/web/testing/issue920/index.html b/web/src/test/manual/web/issue920/index.html similarity index 75% rename from web/testing/issue920/index.html rename to web/src/test/manual/web/issue920/index.html index 994339d1a2..f58dcfe5e7 100644 --- a/web/testing/issue920/index.html +++ b/web/src/test/manual/web/issue920/index.html @@ -2,38 +2,38 @@ - - - + + + - + - - + + KeymanWeb Issue 920 - deadkeys and multiple groups - Testing - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + + - - + +

    KeymanWeb Sample Page - deadkeys and multiple groups Testing

    See issue #920 for details on what this test is all about. Both ;e and .e should produce ə but ;e uses a deadkey and fails.

    Be sure to reference the developer console for additional feedback.

    - +
    - + * + *** + --> diff --git a/web/testing/issue920/issue920.kpj b/web/src/test/manual/web/issue920/issue920.kpj similarity index 100% rename from web/testing/issue920/issue920.kpj rename to web/src/test/manual/web/issue920/issue920.kpj diff --git a/web/testing/issue920/multigroup.kmn b/web/src/test/manual/web/issue920/multigroup.kmn similarity index 100% rename from web/testing/issue920/multigroup.kmn rename to web/src/test/manual/web/issue920/multigroup.kmn diff --git a/web/testing/issue920/multigroup90.kmn b/web/src/test/manual/web/issue920/multigroup90.kmn similarity index 100% rename from web/testing/issue920/multigroup90.kmn rename to web/src/test/manual/web/issue920/multigroup90.kmn diff --git a/web/testing/keyboard-errors/errorhdr.js b/web/src/test/manual/web/keyboard-errors/errorhdr.js similarity index 100% rename from web/testing/keyboard-errors/errorhdr.js rename to web/src/test/manual/web/keyboard-errors/errorhdr.js diff --git a/web/testing/keyboard-errors/index.html b/web/src/test/manual/web/keyboard-errors/index.html similarity index 71% rename from web/testing/keyboard-errors/index.html rename to web/src/test/manual/web/keyboard-errors/index.html index 913bc484d3..7955f544d3 100644 --- a/web/testing/keyboard-errors/index.html +++ b/web/src/test/manual/web/keyboard-errors/index.html @@ -2,87 +2,87 @@ - - - + + + - + - - + + KeymanWeb Sample Page - Uncompiled Source - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - - + + - - + +

    KeymanWeb Sample Page - Error Testing page

    Pick one of the 'debugging' keyboards to test whether the represented error is handled correctly.

    - -
    +

    Type in your language in this text area:

    - +

    or in this input field:

    - +

    Return to testing home page

    - - + * + *** + --> diff --git a/web/testing/keyboard-errors/timeout.js b/web/src/test/manual/web/keyboard-errors/timeout.js similarity index 100% rename from web/testing/keyboard-errors/timeout.js rename to web/src/test/manual/web/keyboard-errors/timeout.js diff --git a/web/testing/keyboard-errors/unparsable.js b/web/src/test/manual/web/keyboard-errors/unparsable.js similarity index 100% rename from web/testing/keyboard-errors/unparsable.js rename to web/src/test/manual/web/keyboard-errors/unparsable.js diff --git a/web/testing/lao_2008_basic-1.2.js b/web/src/test/manual/web/lao_2008_basic-1.2.js similarity index 100% rename from web/testing/lao_2008_basic-1.2.js rename to web/src/test/manual/web/lao_2008_basic-1.2.js diff --git a/web/testing/mnemonic/index.html b/web/src/test/manual/web/mnemonic/index.html similarity index 70% rename from web/testing/mnemonic/index.html rename to web/src/test/manual/web/mnemonic/index.html index 29ac068a91..65331615aa 100644 --- a/web/testing/mnemonic/index.html +++ b/web/src/test/manual/web/mnemonic/index.html @@ -2,45 +2,45 @@ - - - - + + + + - - + + KeymanWeb Testing Page - Basic Mnemonic Support - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - + + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - + + - + + - + + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - - + + - - + +

    KeymanWeb Sample Page - Platform Testing

    This page is designed to test the Platform statement for consistency. Refer to PR #969. @@ -60,7 +60,7 @@

    Be sure to reference the developer console for additional feedback.


    - + * + *** + --> diff --git a/web/testing/platform/platformtest.js b/web/src/test/manual/web/platform/platformtest.js similarity index 100% rename from web/testing/platform/platformtest.js rename to web/src/test/manual/web/platform/platformtest.js diff --git a/web/testing/platform/utilities.js b/web/src/test/manual/web/platform/utilities.js similarity index 100% rename from web/testing/platform/utilities.js rename to web/src/test/manual/web/platform/utilities.js diff --git a/web/testing/prediction-mtnt/index.html b/web/src/test/manual/web/prediction-mtnt/index.html similarity index 80% rename from web/testing/prediction-mtnt/index.html rename to web/src/test/manual/web/prediction-mtnt/index.html index d66ea6adaf..a056bd87c4 100644 --- a/web/testing/prediction-mtnt/index.html +++ b/web/src/test/manual/web/prediction-mtnt/index.html @@ -2,38 +2,38 @@ - - - + + + - + - - + + KeymanWeb Testing Page - Predictive Text: robust testing - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + + - - + +

    KeymanWeb Sample Page - Predictive Text: robust testing

    This page is set to use a more complete, robust model than the UI-bootstrapping page.

    - -
    +

    Type in your language in this text area:

    - +

    or in this input field:

    @@ -98,20 +98,20 @@
    - - + * + *** + --> diff --git a/web/testing/prediction-mtnt/nrc.en.mtnt.model.js b/web/src/test/manual/web/prediction-mtnt/nrc.en.mtnt.model.js similarity index 99% rename from web/testing/prediction-mtnt/nrc.en.mtnt.model.js rename to web/src/test/manual/web/prediction-mtnt/nrc.en.mtnt.model.js index d088022bb9..f4f3605081 100644 --- a/web/testing/prediction-mtnt/nrc.en.mtnt.model.js +++ b/web/src/test/manual/web/prediction-mtnt/nrc.en.mtnt.model.js @@ -3,42 +3,42 @@ var definitions = { defaults: { version: "1.0.0", - applyCasing: function defaultApplyCasing(casing, text) { - switch (casing) { - case 'lower': - return text.toLowerCase(); - case 'upper': - return text.toUpperCase(); - case 'initial': - var headCode = text.charCodeAt(0); - // The length of the first code unit, as measured in code points. - var headUnitLength = 1; - // Is the first character a high surrogate, indicating possible use of UTF-16 - // surrogate pairs? Also, is the string long enough for there to BE a pair? - if (text.length > 1 && headCode >= 0xD800 && headCode <= 0xDBFF) { - // It's possible, so now we check for low surrogates. - var lowSurrogateCode = text.charCodeAt(1); - if (lowSurrogateCode >= 0xDC00 && lowSurrogateCode <= 0xDFFF) { - // We have a surrogate pair; this pair is the 'first' character. - headUnitLength++; - } - } - // Capitalizes the first code unit of the string, leaving the rest intact. - return text.substring(0, headUnitLength).toUpperCase() // head - uppercased - .concat(text.substring(headUnitLength)); // tail - lowercased - } + applyCasing: function defaultApplyCasing(casing, text) { + switch (casing) { + case 'lower': + return text.toLowerCase(); + case 'upper': + return text.toUpperCase(); + case 'initial': + var headCode = text.charCodeAt(0); + // The length of the first code unit, as measured in code points. + var headUnitLength = 1; + // Is the first character a high surrogate, indicating possible use of UTF-16 + // surrogate pairs? Also, is the string long enough for there to BE a pair? + if (text.length > 1 && headCode >= 0xD800 && headCode <= 0xDBFF) { + // It's possible, so now we check for low surrogates. + var lowSurrogateCode = text.charCodeAt(1); + if (lowSurrogateCode >= 0xDC00 && lowSurrogateCode <= 0xDFFF) { + // We have a surrogate pair; this pair is the 'first' character. + headUnitLength++; + } + } + // Capitalizes the first code unit of the string, leaving the rest intact. + return text.substring(0, headUnitLength).toUpperCase() // head - uppercased + .concat(text.substring(headUnitLength)); // tail - lowercased + } } }, model: { - searchTermToKey: function defaultCasedSearchTermToKey(wordform, applyCasing) { - // While this is a bit WET, as the basic `defaultSearchTermToKey` exists and performs some of - // the same functions, repetition is the easiest way to allow the function to be safely compiled - // with ease by use of `.toString()`. - return Array.from(wordform - .normalize('NFKD') - // Remove any combining diacritics (if input is in NFKD) - .replace(/[\u0300-\u036F]/g, '')) // end of `Array.from` - .map(function (c) { return applyCasing('lower', c); }) - .join(''); + searchTermToKey: function defaultCasedSearchTermToKey(wordform, applyCasing) { + // While this is a bit WET, as the basic `defaultSearchTermToKey` exists and performs some of + // the same functions, repetition is the easiest way to allow the function to be safely compiled + // with ease by use of `.toString()`. + return Array.from(wordform + .normalize('NFKD') + // Remove any combining diacritics (if input is in NFKD) + .replace(/[\u0300-\u036F]/g, '')) // end of `Array.from` + .map(function (c) { return applyCasing('lower', c); }) + .join(''); } }, applyCasing: function(caseToApply, text) { diff --git a/web/testing/prediction-ui/index.html b/web/src/test/manual/web/prediction-ui/index.html similarity index 96% rename from web/testing/prediction-ui/index.html rename to web/src/test/manual/web/prediction-ui/index.html index b83351c30a..3a22ed0a93 100644 --- a/web/testing/prediction-ui/index.html +++ b/web/src/test/manual/web/prediction-ui/index.html @@ -23,7 +23,7 @@ - + - + + - + diff --git a/web/testing/promise-api/promisehdr.js b/web/src/test/manual/web/promise-api/promisehdr.js similarity index 100% rename from web/testing/promise-api/promisehdr.js rename to web/src/test/manual/web/promise-api/promisehdr.js diff --git a/web/testing/promise-api/sil_cameroon_qwerty.js b/web/src/test/manual/web/promise-api/sil_cameroon_qwerty.js similarity index 100% rename from web/testing/promise-api/sil_cameroon_qwerty.js rename to web/src/test/manual/web/promise-api/sil_cameroon_qwerty.js diff --git a/web/testing/regression-tests/.gitignore b/web/src/test/manual/web/regression-tests/.gitignore similarity index 100% rename from web/testing/regression-tests/.gitignore rename to web/src/test/manual/web/regression-tests/.gitignore diff --git a/web/testing/regression-tests/README.md b/web/src/test/manual/web/regression-tests/README.md similarity index 100% rename from web/testing/regression-tests/README.md rename to web/src/test/manual/web/regression-tests/README.md diff --git a/web/testing/regression-tests/index.html b/web/src/test/manual/web/regression-tests/index.html similarity index 96% rename from web/testing/regression-tests/index.html rename to web/src/test/manual/web/regression-tests/index.html index 39b4f9a75c..a2c3864501 100644 --- a/web/testing/regression-tests/index.html +++ b/web/src/test/manual/web/regression-tests/index.html @@ -94,7 +94,7 @@

    Input Receiver

    - + @@ -107,6 +107,7 @@ +

    Return to test-page index.

    \ No newline at end of file diff --git a/web/testing/regression-tests/interactive.js b/web/src/test/manual/web/regression-tests/interactive.js similarity index 100% rename from web/testing/regression-tests/interactive.js rename to web/src/test/manual/web/regression-tests/interactive.js diff --git a/web/testing/regression-tests/karma.conf.js b/web/src/test/manual/web/regression-tests/karma.conf.js similarity index 100% rename from web/testing/regression-tests/karma.conf.js rename to web/src/test/manual/web/regression-tests/karma.conf.js diff --git a/web/testing/regression-tests/node_src/config.js b/web/src/test/manual/web/regression-tests/node_src/config.js similarity index 96% rename from web/testing/regression-tests/node_src/config.js rename to web/src/test/manual/web/regression-tests/node_src/config.js index 3a8318f0b7..8892651f25 100644 --- a/web/testing/regression-tests/node_src/config.js +++ b/web/src/test/manual/web/regression-tests/node_src/config.js @@ -38,7 +38,7 @@ module.exports = { /** * Various relative paths */ - KEYMANWEB_RELATIVE_PATH: 'web/release/unminified/web', + KEYMANWEB_RELATIVE_PATH: 'web/build/app/web/debug', BASE_RELATIVE_PATH: '../../../../', KEYMAN_REPO_BASE_RELATIVE_PATH: '../../../', diff --git a/web/testing/regression-tests/node_src/keyname.js b/web/src/test/manual/web/regression-tests/node_src/keyname.js similarity index 100% rename from web/testing/regression-tests/node_src/keyname.js rename to web/src/test/manual/web/regression-tests/node_src/keyname.js diff --git a/web/testing/regression-tests/node_src/test-host.js b/web/src/test/manual/web/regression-tests/node_src/test-host.js similarity index 100% rename from web/testing/regression-tests/node_src/test-host.js rename to web/src/test/manual/web/regression-tests/node_src/test-host.js diff --git a/web/testing/regression-tests/node_src/util.js b/web/src/test/manual/web/regression-tests/node_src/util.js similarity index 100% rename from web/testing/regression-tests/node_src/util.js rename to web/src/test/manual/web/regression-tests/node_src/util.js diff --git a/web/testing/regression-tests/package.json b/web/src/test/manual/web/regression-tests/package.json similarity index 100% rename from web/testing/regression-tests/package.json rename to web/src/test/manual/web/regression-tests/package.json diff --git a/web/testing/regression-tests/src/known-failures.js b/web/src/test/manual/web/regression-tests/src/known-failures.js similarity index 100% rename from web/testing/regression-tests/src/known-failures.js rename to web/src/test/manual/web/regression-tests/src/known-failures.js diff --git a/web/testing/regression-tests/src/test-runner.js b/web/src/test/manual/web/regression-tests/src/test-runner.js similarity index 100% rename from web/testing/regression-tests/src/test-runner.js rename to web/src/test/manual/web/regression-tests/src/test-runner.js diff --git a/web/testing/regression-tests/src/ui.js b/web/src/test/manual/web/regression-tests/src/ui.js similarity index 100% rename from web/testing/regression-tests/src/ui.js rename to web/src/test/manual/web/regression-tests/src/ui.js diff --git a/web/testing/regression-tests/test-builder.js b/web/src/test/manual/web/regression-tests/test-builder.js similarity index 100% rename from web/testing/regression-tests/test-builder.js rename to web/src/test/manual/web/regression-tests/test-builder.js diff --git a/web/testing/regression-tests/test.html b/web/src/test/manual/web/regression-tests/test.html similarity index 100% rename from web/testing/regression-tests/test.html rename to web/src/test/manual/web/regression-tests/test.html diff --git a/web/testing/regression-tests/test.js b/web/src/test/manual/web/regression-tests/test.js similarity index 100% rename from web/testing/regression-tests/test.js rename to web/src/test/manual/web/regression-tests/test.js diff --git a/web/testing/rotation-events/index.html b/web/src/test/manual/web/rotation-events/index.html similarity index 86% rename from web/testing/rotation-events/index.html rename to web/src/test/manual/web/rotation-events/index.html index f2ba6b4af4..6e884f505a 100644 --- a/web/testing/rotation-events/index.html +++ b/web/src/test/manual/web/rotation-events/index.html @@ -2,28 +2,28 @@ - + KeymanWeb Sample Page - Unminified Source - - + #KeymanWebControl {width:50%;min-width:600px;} + - - + + - - + - + + @@ -47,16 +47,16 @@ var lastW, lastH, lastO; //var lastOSKW, lastOSKH, lastVS; var noRecentChange = 100; - + function doLog(event, onlyIfChanged) { var orient = window.orientation; var orientText = ' w.o='; - + if(orient === undefined) { orient = window.screen.orientation.angle; orientText = ' w.soa='; } - + if(onlyIfChanged) { if(lastW == window.innerWidth && lastH == window.innerHeight && lastO == orient) { if(noRecentChange == 100) { @@ -69,26 +69,26 @@ lastH = window.innerHeight; lastO = orient; } - + e.value = e.value + event + ': w.iw='+window.innerWidth+' w.ih='+window.innerHeight+orientText+orient+'\n'; - + if(event == 'kmw.ri' || event == 'kmw.rh' || event == 'kmw.re') { e.value = e.value + ' osk.w=' + keyman.osk.computedWidth + ' osk.h=' + keyman.osk.computedHeight + ' kmw.vs=' + keyman.util.getViewportScale() + '\n'; } - + e.scrollTop = e.scrollHeight; noRecentChange = 0; } - + window.setInterval(function() { doLog('tick', true); }, 1); - + window.addEventListener('resize', function() { doLog('resize-b', false) }, false); window.addEventListener('resize', function() { doLog('resize-c', false) }, true); window.addEventListener('orientationchange', function() { doLog('orientationchange-b', false) }, false); window.addEventListener('orientationchange', function() { doLog('orientationchange-c', false) }, true); - + var kmw_ri = com.keyman.RotationManager.prototype.initNewRotation; com.keyman.RotationManager.prototype.initNewRotation = function() { doLog('kmw.ri'); diff --git a/web/testing/scrolling/index.html b/web/src/test/manual/web/scrolling/index.html similarity index 95% rename from web/testing/scrolling/index.html rename to web/src/test/manual/web/scrolling/index.html index 6520a448c5..138e5a43c1 100644 --- a/web/testing/scrolling/index.html +++ b/web/src/test/manual/web/scrolling/index.html @@ -24,7 +24,7 @@ - + - + + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - + - + - + + - + - - + +

    KeymanWeb Sample Page - Sentry Setup test host

    - -
    +

    Type in your language in this text area:

    - +

    or in this input field:

    - +

    Add a keyboard by keyboard name:

    - +

    Add a keyboard by BCP-47 language code:

    Add a keyboard by language name:

    - +

    Return to testing home page

    - - + * + *** + --> diff --git a/web/testing/sentry-integration/timeout.js b/web/src/test/manual/web/sentry-integration/timeout.js similarity index 100% rename from web/testing/sentry-integration/timeout.js rename to web/src/test/manual/web/sentry-integration/timeout.js diff --git a/web/testing/sentry-integration/unparsable.js b/web/src/test/manual/web/sentry-integration/unparsable.js similarity index 100% rename from web/testing/sentry-integration/unparsable.js rename to web/src/test/manual/web/sentry-integration/unparsable.js diff --git a/web/testing/spacebar-text/index.html b/web/src/test/manual/web/spacebar-text/index.html similarity index 95% rename from web/testing/spacebar-text/index.html rename to web/src/test/manual/web/spacebar-text/index.html index 0d88b40782..ee1053be0c 100644 --- a/web/testing/spacebar-text/index.html +++ b/web/src/test/manual/web/spacebar-text/index.html @@ -17,7 +17,7 @@ - + - + + - + + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - - + + - - + +

    KeymanWeb Sample Page - Shift Testing

    See issue #978 for details on what this test is all about.

    Be sure to reference the developer console for additional feedback.

    - +
    - + * + *** + --> diff --git a/web/testing/test-updateLayer/rac_balti.js b/web/src/test/manual/web/test-updateLayer/rac_balti.js similarity index 100% rename from web/testing/test-updateLayer/rac_balti.js rename to web/src/test/manual/web/test-updateLayer/rac_balti.js diff --git a/web/testing/test-updateLayer/utilities.js b/web/src/test/manual/web/test-updateLayer/utilities.js similarity index 100% rename from web/testing/test-updateLayer/utilities.js rename to web/src/test/manual/web/test-updateLayer/utilities.js diff --git a/web/testing/test_chirality.js b/web/src/test/manual/web/test_chirality.js similarity index 100% rename from web/testing/test_chirality.js rename to web/src/test/manual/web/test_chirality.js diff --git a/web/testing/unminified - manual.html b/web/src/test/manual/web/unminified - manual.html similarity index 76% rename from web/testing/unminified - manual.html rename to web/src/test/manual/web/unminified - manual.html index 09e39ca797..def037567d 100644 --- a/web/testing/unminified - manual.html +++ b/web/src/test/manual/web/unminified - manual.html @@ -2,38 +2,38 @@ - - - + + + - + - - + + KeymanWeb Sample Page - Unminified Source - - - - - + #KeymanWebControl {width:50%;min-width:600px;} + - + + + - - + + - + + - + - - + +

    KeymanWeb Sample Page - Unminified Source

    - -
    +

    Type in your language in this text area:

    - +

    or in this input field:

    - +

    Add a keyboard by keyboard name:

    - +

    Add a keyboard by BCP-47 language code:

    Add a keyboard by language name:

    - +

    Return to testing home page

    - - + * + *** + --> diff --git a/web/testing/unminified.html b/web/src/test/manual/web/unminified.html similarity index 95% rename from web/testing/unminified.html rename to web/src/test/manual/web/unminified.html index 8cefb8fe60..7f2ab0062d 100644 --- a/web/testing/unminified.html +++ b/web/src/test/manual/web/unminified.html @@ -23,7 +23,7 @@ - + - + - + + - + + - + @@ -90,11 +90,11 @@

    Please ensure that the keyboard(s) being loaded may be referenced at <server-root>/resources/json/keyboards.

    Testing File: - +

    Keyboard Stubs: - +