mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-09 10:25:32 +00:00
Merge pull request #9643 from keymanapp/chore/merge-master-into-linux-mcompile
chore: merge master into linux-mcompile 🐘
This commit is contained in:
commit
0deff7de3c
232 changed files with 4086 additions and 2971 deletions
2
.github/workflows/deb-packaging.yml
vendored
2
.github/workflows/deb-packaging.yml
vendored
|
|
@ -119,7 +119,7 @@ jobs:
|
|||
path: artifacts
|
||||
|
||||
- name: Build
|
||||
uses: sillsdev/gha-ubuntu-packaging@4f3a013ec28f4defc2b3d6ecb04c98815cd9de25 # v0.9
|
||||
uses: sillsdev/gha-ubuntu-packaging@1f4b7e7eacb8c82a4d874ee2c371b9bfef7e16ea # v1.0
|
||||
with:
|
||||
dist: "${{ matrix.dist }}"
|
||||
platform: "${{ matrix.arch }}"
|
||||
|
|
|
|||
47
HISTORY.md
47
HISTORY.md
|
|
@ -1,5 +1,52 @@
|
|||
# Keyman Version History
|
||||
|
||||
## 17.0.182 alpha 2023-09-28
|
||||
|
||||
* chore(web): builds that output to web/build/publish should also clean it (#9613)
|
||||
* chore(linux): Dynamically choose display number (#9629)
|
||||
* docs(linux): Update sample tasks.json for Linux (#9634)
|
||||
* chore(common): Add Crowdin strings for Mon (#9550)
|
||||
* fix(developer): only include mobile touch platform in basic project (#9549)
|
||||
* fix(windows): fix the ellipsis for longer text on buttons (#9638)
|
||||
|
||||
## 17.0.181 alpha 2023-09-26
|
||||
|
||||
* chore: workaround npm/cli#3466 when bundling internal deps (#9536)
|
||||
* chore(linux): Check and restart background processes (#9608)
|
||||
|
||||
## 17.0.180 alpha 2023-09-25
|
||||
|
||||
* fix(linux): Fix detection of unit tests (#9606)
|
||||
|
||||
## 17.0.179 alpha 2023-09-22
|
||||
|
||||
* chore(resources): ldml: update to keyboard3 (#9588)
|
||||
* change(android,web) Use web-based popup key longpresses (#9591)
|
||||
|
||||
## 17.0.178 alpha 2023-09-21
|
||||
|
||||
* fix(linux): Correctly open files linked from help page (#9601)
|
||||
* chore(linux): Fix bugs, add dependency and update documentation (#9602)
|
||||
|
||||
## 17.0.177 alpha 2023-09-20
|
||||
|
||||
* chore(linux): Add coverage action to `ibus-keyman/build.sh` (#9583)
|
||||
* docs(common): Fix documentation for `builder_describe_internal_dependency` (#9582)
|
||||
|
||||
## 17.0.176 alpha 2023-09-19
|
||||
|
||||
* chore(oem/fv/android): Update Gradle to 7.4 (#9590)
|
||||
* refactor(linux): Rename defines to clarify purpose ️ (#9584)
|
||||
* (#9560)
|
||||
|
||||
## 17.0.175 alpha 2023-09-18
|
||||
|
||||
* chore(linux): Split startup process (#9570)
|
||||
|
||||
## 17.0.174 alpha 2023-09-16
|
||||
|
||||
* refactor(linux): Reformat file (#9569)
|
||||
|
||||
## 17.0.173 alpha 2023-09-13
|
||||
|
||||
* chore(common): Update to Unicode 15.1 (#9555)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
17.0.174
|
||||
17.0.183
|
||||
164
android/KMAPro/kMAPro/src/main/res/values-mnw-rMM/strings.xml
Normal file
164
android/KMAPro/kMAPro/src/main/res/values-mnw-rMM/strings.xml
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- app_name removed in 16.0 beta. Set in build.gradle -->
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_share" comment="Menu action to send text content to another app">ပါ်ပရအ်</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_web" comment="Menu action to open Keyman browser">ဝေက်ဗရဴသာ</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_text_size" comment="Menu action to adjust text size">အဝဲမလိက်</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_overflow" comment="Show additional menu items">ဂၠိုၚ်နူဏံ</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_clear_text" comment="Menu action to erase text">ပလီုလိက်</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_info" comment="Menu action to display Keyman help page">တၚ်နၚ်</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_settings" comment="Menu action to open Settings menu">ဒၞါဲပလေဝ်နာနာ</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_install_updates" comment="Menu notification that keyboard or dictionary updates available">ပ္တိုန်စုတ်က္ဆံၚ်ဂမၠိုၚ်</string>
|
||||
<!-- Context: Title -->
|
||||
<string name="title_version" comment="Title of Keyman for Android version">ပါယှေန်: %1$s</string>
|
||||
<!-- Context: Text label when old Chrome version installed -->
|
||||
<string name="text_require_chrome_57" comment="Banner text when old version of Chrome is installed"> ကဳမာန် ဒးသုၚ်စောဲ Chrome ပါယှေန် ၅၇ အေန်အိုတ်ဟွံသေၚ်မ္ဂး သၠုၚ်နူဂှ်။</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="button_update_chrome" comment="Prompt to upgrade Chrome in the Play Store">သၠုၚ်ပ္တိုန်က္ဆံၚ် Chrome</string>
|
||||
<!-- Context: Textfield prompt (… is the ellipsis character "...") -->
|
||||
<string name="textview_hint" comment="Prompt to start typing">စတက်လိက်ဒၞာဲဏံ…</string>
|
||||
<!-- Context: Splash screen (version/copyright info currently disabled -->
|
||||
<string name="splash_blank" translatable="false" comment="Blank text while version info on splash page is disabled"></string>
|
||||
<!-- Context: Splash screen (version/copyright info currently disabled -->
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="text_size" comment="Current text size (number)">အဝဲမလိက်: %1$d</string>
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="ic_text_size_up" comment="Make text bigger">အဝဲမလိက်လ္တူ</string>
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="ic_text_size_down" comment="Make text smaller">ဗၞတ်ဗ္ၜတ်မလိက်သၟဝ်</string>
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="ic_text_size_slider" comment="Adjust text size">တသောဝ်ဖျေံ အဝဲမလိက်</string>
|
||||
<!-- Context: Clear Text dialog -->
|
||||
<string name="all_text_will_be_cleared" comment="Erase all the text">\nလိက်သီုဖအိုတ်ဂှ် သ္အးထောံရောၚ်\n</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="get_started" comment="Menu for getting started">စတရဴစိုအ်</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="add_a_keyboard" comment="Menu item to add a keyboard">စုတ်ကဳဗုဒ်သွက်ဘာသာမၞးညိ</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="enable_system_keyboard" comment="Menu item to enable Keyman as system keyboard">သ္ပဒတန်ကဳမာန် နကဵု ကဳဗုဒ်အလုံစက်</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="set_keyman_as_default" comment="Menu item to set Keyman as default system keyboard">ကဳမာန်ဂှ် စွံနဒဒှ်ကဳဗုဒ်ပကတိညိ</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="more_info" comment="Open the Keyman for Android help page">တၚ်နၚ်ဂမၠိုၚ်</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="show_get_started" comment="Show the "Get Started" menu on startup">ကာလစပ္တံမ္ဂး ထ္ၜး “%1$s”ညိ</string>
|
||||
<!-- Context: Android Storage Permission -->
|
||||
<string name="request_storage_permission" comment="Request storage permission to access keyboard packages">သွက်ဂွံစုတ်ပက်ကေကဳဗုဒ်ဂမၠိုၚ်ကီု, သွက်ဂွံဗှ်အရာမစွံပ္တန်လဝ်မ္ၚးတအ်မာန်ကီုဂှ် ပံက်ကဵုအခေါၚ် ကဳမာန်ညိ</string>
|
||||
<!-- Context: Android Storage Permission -->
|
||||
<string name="storage_permission_denied" comment="Keyboard package installation may fail since Android storage permission not granted">အခေါၚ်သွက်ဂွံစွံပ္တန်ဂှ် တးပါဲလဝ်ရ။ သွက်ဂွံစုတ်ပက်ကုက်ကဳဗုဒ်လေဝ် လီုအာမာန်ရ။</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="keyman_settings" comment="Settings menu title">ဒၞါဲပလေဝ်နာနာ</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<plurals name="installed_languages">
|
||||
<item quantity="other">အရေဝ်ဘာသာ (%1$d) စုတ်လဝ် တုဲတုဲဂမၠိုၚ်</item>
|
||||
</plurals>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="install_keyboard_or_dictionary" comment="Menu item to install keyboard or dictionary">စုတ် ကဳဗုဒ် ဟွံသေၚ်မ္ဂး အဘိဓာန်</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="change_display_language" comment="Menu action to change interface language">ဘာသာဓမံက်ထ္ၜး</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="adjust_keyboard_height" comment="Menu action to adjust keyboard height">ချိၚ်ဆသမၠုၚ်ကဳဗုဒ်ညိ</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="spacebar_caption" comment="Menu action to set the spacebar caption">က္တိုပ်လိက် Spacebar</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_keyboard" comment="Spacebar caption option - keyboard">ကဳဗုဒ်</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_language" comment="Spacebar caption option - language">အရေဝ်ဘာသာ</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_language_keyboard" comment="Spacebar caption option - language + keyboard">ဘာသာ + ကဳဗုဒ်</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_blank" comment="Spacebar caption option - blank">သၠး</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_keyboard" comment="Spacebar caption hint - keyboard">ပ္ဍဲ spacebar ဂှ် ထ္ၜးယၟုကဳဗုဒ်ညိ</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_language" comment="Spacebar caption hint - language">ပ္ဍဲ spacebar ဂှ် ထ္ၜးယၟုအရေဝ်ဘာသာညိ</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_language_keyboard" comment="Spacebar caption hint - language + keyboard">ကဳဗုဒ် ကေုာံ အရေဝ်ဘာသာ
|
||||
ပ္ဍဲspacebar</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_blank" comment="Spacebar caption hint - blank">လ္ပဓမံက်ထ္ၜးမလိက်ပ္ဍဲspacebarညိ</string>
|
||||
<!-- Context: Keyman Settings menu / Haptic feedback -->
|
||||
<string name="haptic_feedback" comment="haptic feedback on key press">ပ္ဍဲကာလမတက်လိက် ချဳဒတဝ်ညိ</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner" comment="text suggestions banner">ဓမံက်ထ္ၜးbannerလၟိုန်ညိ</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner_on" comment="Description when toggle is on">သွက်ဂွံဓမံက်ရုပ်ရဴ</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner_off" comment="Description when toggle is off">ကၟာတ်လဝ်မ္ဂး မလိက်ချိၚ်ဆလဝ်တံဂှ် ထ္ၜးအဃောပံက်လဝ်ဟေၚ်</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report" comment="permission for sending crash reports">ကဵုအခေါၚ် ပၠံၚ်လိက်စဳရေၚ်လ္တူ အေန်တာနက်ညိ</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report_on" comment="Description when toggle is on">ယဝ်ပံက်လဝ်မ္ဂး လိက်ဒုၚ်စဳရေၚ်ဂှ်ပၠံၚ်ဏာရောၚ်</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report_off" comment="Description when toggle is off">ယဝ်ကၟာတ်လဝ်မ္ဂး လိက်ဒုၚ်စဳရေၚ်ဂှ် ဟွံပၠံၚ်ရ။.</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_keyman_dot_com" comment="Install package from Keyman server">စုတ်နူ keyman.com</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_local_file" comment="Install package file from local device">စုတ်နူ ဝှါၚ် ပ္ဍဲစက်</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_other_device" comment="Scan QR Code">စုတ်နူစက်တၞဟ်ဟ်</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="add_languages_to_installed_keyboard" comment="Install additional languages from a keyboard package">ဂွံစုတ်ကဳဗုဒ်ဂှ် ထပ်စုတ် အရေဝ်ဘာသာဂမၠိုၚ်</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="add_language_subtext" comment="Additional information for adding another language">(နူကဵုပက်ကေ ကဳဗုဒ်)</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="title_select_keyboard_package_list" comment="Select a keyboard package to add languages">ရုဲစှ်ကဳဗုဒ်ပက်ကေ</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="title_select_languages_for_package" comment="Select language names from the keyboard package">ရုဲစှ်အရေဝ်ဘာသာ%1$s</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="added_language_to_keyboard" comment="Notification that a language name is added to a keyboard">စုတ်လဝ်ဘာသာနူ %1$s စိုပ် %2$s တုဲရ</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">စုတ်ဘာသာသီုဖအိုတ်တုဲ</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">သ္ဂောံချိၚ်သမၠုၚ် ကဳဗုဒ်ဂှ် ဂြဲညိ</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">ဂွံချိၚ် လံက်သတိက် လံက်ဇမၠိၚ်ဂှ် ဗဂေတ်ကဵုစက်ပိုဲညိ။</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">ကလေၚ်သ္ပနူပကတိ</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_text" comment="Prompt to type in the browser search bar">ဂၠာဲ ဟွံသေၚ် တက် URL</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="title_bookmarks" comment="Title for bookmarks">သမ္တီမုက်လိက်ဂမၠိုၚ်</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="no_bookmarks" comment="Text when bookmark list is empty">မုက်လိက်သမ္တီလဝ်ဂမၠိုၚ်ဟွံမွဲ</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="add_bookmark" comment="Confirmation to add bookmark">စွံ သမ္တီမုက်လိက်</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_title" comment="Page title for saved bookmark">မာတိကာ</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_url" comment="Page URL for saved bookmark">Url</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="title_package_failed_to_install" comment="Error dialog title when package failed to install">ပက်ကေ %1$s ဂှ် ပ္တိုန်စုတ်ဟွံအံၚ်ဇၞး</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="downloading_keyboard_package" comment="Confirmation to download keyboard package filename">အဃောဂြဲဖျေံဒၟံၚ် ပက်ကေကဳဗုဒ်\n&%1$s…</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="failed_to_extract" comment="Notification that keyboard package failed to unzip">သှ် ဟွံအံၚ်ဇၞး</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="install_keyboard_package" comment="Title to install keyboard package">စုတ်ကဳဗုဒ်</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="install_predictive_text_package" comment="Title to install dictionary package">စုတ်အဘိဓာန်</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="not_valid_package_file" comment="Notification when invalid package file cannot be installed">%1$s ဂှ် ဝှါၚ်ပက်ကေ ကဳမာန် ဟွံသေၚ်ရ။\n%2$s\"</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_new_touch_keyboards_to_install" comment="Notification when no touch-optimized keyboards can be installed">ပက်ကေ ကဳဗုဒ် ဂှ် ကဳဗုဒ် လုက်စုက် သမၠုၚ်လဝ်ကဆံၚ် ဂမၠိုၚ်ဟွံဂွံစုတ်လဝ်ရ။</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_new_predictive_text_to_install" comment="Notification when no dictionaries can be installed">မလိက်ခယျတၟိ ဟွံစုတ်လဝ်ရ။</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_targets_to_install" comment="Notification when a package doesn't contain keyboards or dictionaries">မလိက်ခယျတၟိ ဟွံစုတ်လဝ်ရ။</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_associated_languages" comment="Notification when a keyboard package doesn't contain languages">ပ္ဍဲပက်ကေ ကဳဗုဒ်ဏံ ဘာသာ မဆက်စပ်ဂမၠိုၚ် ဟွံပ္တိုန်စုတ်လဝ်ရ</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="invalid_metadata" comment="kmp.json metadata file is invalid or missing in package">မဳတာဒေတာ ပ္ဍဲပက်ကေဏံ သုၚ်စောဲ ဟွံဂွံ/ကၠေံမံၚ်ရ။</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="minimum_keyboard_version_not_supported" comment="Notification when keyboard has functionality not supported by current Keyman"> ကဳဗုဒ်ဏံ နွံပၟိက်ကု ပါယှေန် ကဳမာန်တၟိ</string>
|
||||
<!-- Context: anywhere -->
|
||||
<string name="unable_to_open_browser" comment="Notification when a browser activity cannot be launched">ပံက် ဝေက်ဗရဴသာဟွံဂွံ</string>
|
||||
</resources>
|
||||
|
|
@ -229,58 +229,12 @@ function updateKMSelectionRange(start, end) {
|
|||
}
|
||||
|
||||
var lastKeyTip = null;
|
||||
function oskCreateKeyPreview(x,y,w,h,t) {
|
||||
if(lastKeyTip &&
|
||||
lastKeyTip.t == t &&
|
||||
lastKeyTip.x == x &&
|
||||
lastKeyTip.y == y &&
|
||||
lastKeyTip.w == w &&
|
||||
lastKeyTip.h == h) {
|
||||
return;
|
||||
}
|
||||
lastKeyTip = {x:x,y:y,w:w,h:h,t:t};
|
||||
|
||||
fragmentToggle = (fragmentToggle + 1) % 100;
|
||||
var div = document.createElement('div');
|
||||
div.innerHTML = t;
|
||||
var dt = div.firstChild.nodeValue;
|
||||
window.location.hash = 'showKeyPreview-'+fragmentToggle+'+x='+x+'+y='+y+'+w='+w+'+h='+h+'+t='+toHex(dt);
|
||||
}
|
||||
|
||||
function oskClearKeyPreview() {
|
||||
lastKeyTip = null;
|
||||
fragmentToggle = (fragmentToggle + 1) % 100;
|
||||
window.location.hash = 'dismissKeyPreview-'+fragmentToggle;
|
||||
}
|
||||
|
||||
function signalHelpBubbleDismissal() {
|
||||
fragmentToggle = (fragmentToggle + 1) % 100;
|
||||
window.location.hash = 'helpBubbleDismissed-'+fragmentToggle;
|
||||
}
|
||||
|
||||
function oskCreatePopup(obj,x,y) {
|
||||
if(obj != null) {
|
||||
var i;
|
||||
var s = '';
|
||||
var shift = false;
|
||||
var keyPos = x.toString() + ',' + y.toString();
|
||||
for(i=0; i<obj.length; i++)
|
||||
{
|
||||
// elementID contains the layer and coreID
|
||||
s=s+obj[i].elementID;
|
||||
if(obj[i].sp == 1 || obj[i].sp == 2) shift = true;
|
||||
if(typeof(obj[i].text) != 'undefined' && obj[i].text != null && obj[i].text != '') s=s+':'+toHex(obj[i].text);
|
||||
if(i < (obj.length -1)) s=s+';'
|
||||
}
|
||||
fragmentToggle=(fragmentToggle+1) % 100;
|
||||
var hash = 'showMore-' + fragmentToggle + '+keyPos=' + keyPos + '+keys=' + s;
|
||||
if(shift) {
|
||||
hash = hash + '+font=' + 'SpecialOSK';
|
||||
}
|
||||
window.location.hash = hash;
|
||||
}
|
||||
}
|
||||
|
||||
function suggestionPopup(obj,custom,x,y,w,h) {
|
||||
if(obj != null) {
|
||||
var s = JSON.stringify(obj);
|
||||
|
|
@ -320,12 +274,6 @@ function showKeyboard() {
|
|||
keyman.refreshOskLayout();
|
||||
}
|
||||
|
||||
function executePopupKey(keyID, keyText) {
|
||||
// KMW only needs keyID to process the popup key. keyText merely logged to console
|
||||
//window.console.log('executePopupKey('+keyID+'); keyText: ' + keyText);
|
||||
keyman.executePopupKey(keyID);
|
||||
}
|
||||
|
||||
// Cannot make it explicitly async / await on API 21.
|
||||
function executeHardwareKeystroke(code, shift, lstates, eventModifiers) {
|
||||
console_debug('executeHardwareKeystroke(code='+code+',shift='+shift+',lstates='+lstates+',eventModifiers='+eventModifiers+')');
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ public class DisplayLanguages {
|
|||
new DisplayLanguageType("ckl-NG", "Kibaku"),
|
||||
new DisplayLanguageType("mfi-NG", "Mandara (Wandala)"),
|
||||
new DisplayLanguageType("mrt-NG", "Marghi"),
|
||||
new DisplayLanguageType("mnw-MM", "မန် (Mon)"),
|
||||
new DisplayLanguageType("nl-NL", "Nederlands (Dutch)"),
|
||||
new DisplayLanguageType("ann", "Obolo"),
|
||||
new DisplayLanguageType("pl-PL", "Polski (Polish)"),
|
||||
|
|
|
|||
|
|
@ -1,111 +0,0 @@
|
|||
/**
|
||||
* Copyright (C) 2017 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.keyman.engine;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.LinearGradient;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Paint.Style;
|
||||
import android.graphics.Path;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.Shader;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
final class KMKeyPreviewView extends View {
|
||||
|
||||
private float density;
|
||||
private float viewWidth, viewHeight;
|
||||
private Paint fillPaint, borderPaint;
|
||||
private int bgColor, bgColor2, borderColor;
|
||||
private float strokeWidth;
|
||||
private float borderRadius;
|
||||
private Path path;
|
||||
private RectF rect;
|
||||
|
||||
public KMKeyPreviewView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
wm.getDefaultDisplay().getMetrics(metrics);
|
||||
density = metrics.density;
|
||||
|
||||
viewWidth = metrics.widthPixels;
|
||||
viewHeight = metrics.heightPixels;
|
||||
borderRadius = 12 * density;
|
||||
strokeWidth = 4.0f;
|
||||
bgColor = context.getResources().getColor(R.color.key_preview_bg);
|
||||
bgColor2 = context.getResources().getColor(R.color.key_preview_bg2);
|
||||
borderColor = context.getResources().getColor(R.color.key_preview_border);
|
||||
|
||||
fillPaint = new Paint();
|
||||
fillPaint.setStyle(Style.FILL);
|
||||
fillPaint.setAlpha(250);
|
||||
fillPaint.setAntiAlias(true);
|
||||
|
||||
borderPaint = new Paint();
|
||||
borderPaint.setStyle(Style.STROKE);
|
||||
borderPaint.setStrokeWidth(strokeWidth);
|
||||
borderPaint.setAntiAlias(true);
|
||||
|
||||
initDraw();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
canvas.drawPath(path, fillPaint);
|
||||
canvas.drawPath(path, borderPaint);
|
||||
}
|
||||
|
||||
public void redraw() {
|
||||
initDraw();
|
||||
this.invalidate();
|
||||
}
|
||||
|
||||
public RectF setKeySize(int width, int height) {
|
||||
RectF viewFrame = new RectF();
|
||||
viewWidth = width * 1.6f;
|
||||
viewHeight = height * 1.6f;
|
||||
viewFrame.set(0, 0, viewWidth, viewHeight);
|
||||
return viewFrame;
|
||||
}
|
||||
|
||||
public void setBackgroundColor(int color) {
|
||||
bgColor = color;
|
||||
}
|
||||
|
||||
public void setBackgroundColor2(int color) {
|
||||
bgColor2 = color;
|
||||
}
|
||||
|
||||
public void setBorderColor(int color) {
|
||||
borderColor = color;
|
||||
}
|
||||
|
||||
private void initDraw() {
|
||||
float midX = viewWidth / 2.0f;
|
||||
float midY = viewHeight - viewHeight / 4.0f;
|
||||
float viewRight = viewWidth - strokeWidth;
|
||||
float viewBottom = viewHeight - strokeWidth;
|
||||
float r = borderRadius - strokeWidth;
|
||||
|
||||
fillPaint.setShader(new LinearGradient(0, midY - strokeWidth, 0, viewBottom, bgColor, bgColor2, Shader.TileMode.CLAMP));
|
||||
borderPaint.setColor(borderColor);
|
||||
|
||||
path = new Path();
|
||||
path.moveTo(viewWidth / 2.0f, strokeWidth);
|
||||
rect = new RectF(strokeWidth, strokeWidth, strokeWidth + r, strokeWidth + r);
|
||||
path.arcTo(rect, 270, -90);
|
||||
path.lineTo(strokeWidth, midY);
|
||||
path.lineTo(midX, viewBottom);
|
||||
path.lineTo(viewRight, midY);
|
||||
rect.set(viewRight - r, strokeWidth, viewRight, strokeWidth + r);
|
||||
path.arcTo(rect, 0, -90);
|
||||
path.close();
|
||||
}
|
||||
}
|
||||
|
|
@ -115,12 +115,6 @@ final class KMKeyboard extends WebView {
|
|||
protected boolean keyboardSet = false;
|
||||
protected boolean keyboardPickerEnabled = true;
|
||||
|
||||
public PopupWindow subKeysWindow = null;
|
||||
public PopupWindow keyPreviewWindow = null;
|
||||
|
||||
public ArrayList<HashMap<String, String>> subKeysList = null;
|
||||
public String[] subKeysWindowPos = {"0", "0"};
|
||||
|
||||
// public something-something for the suggestion.
|
||||
public PopupWindow suggestionMenuWindow = null;
|
||||
public double[] suggestionWindowPos = {0, 0};
|
||||
|
|
@ -268,22 +262,12 @@ final class KMKeyboard extends WebView {
|
|||
|
||||
@Override
|
||||
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
|
||||
if(e2.getY() - e1.getY() < -5) { // TODO: get better threshold value from KMW
|
||||
if (subKeysList != null && (subKeysWindow == null || !subKeysWindow.isShowing())) {
|
||||
showSubKeys(context);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLongPress(MotionEvent event) {
|
||||
// This is also called for banner longpresses! Need a way to differentiate the sources.
|
||||
if (subKeysList != null && (subKeysWindow == null || !subKeysWindow.isShowing())) {
|
||||
showSubKeys(context);
|
||||
return;
|
||||
} else if (KMManager.getGlobeKeyState() == KMManager.GlobeKeyState.GLOBE_KEY_STATE_DOWN) {
|
||||
if (KMManager.getGlobeKeyState() == KMManager.GlobeKeyState.GLOBE_KEY_STATE_DOWN) {
|
||||
KMManager.setGlobeKeyState(KMManager.GlobeKeyState.GLOBE_KEY_STATE_LONGPRESS);
|
||||
KMManager.handleGlobeKeyAction(context, true, keyboardType);
|
||||
return;
|
||||
|
|
@ -353,8 +337,6 @@ final class KMKeyboard extends WebView {
|
|||
}
|
||||
|
||||
public void hideKeyboard() {
|
||||
dismissKeyPreview(0);
|
||||
dismissSubKeysWindow();
|
||||
|
||||
String jsString = "hideKeyboard()";
|
||||
loadJavascript(jsString);
|
||||
|
|
@ -381,23 +363,10 @@ final class KMKeyboard extends WebView {
|
|||
// Come to think of it, I wonder if suggestionMenuWindow was work being done to link with
|
||||
// suggestion banner longpresses - if so, it's not yet ready for proper integration...
|
||||
// and would need its own rung in this if-else ladder.
|
||||
if (subKeysWindow != null && suggestionMenuWindow == null && subKeysWindow.isShowing()) {
|
||||
// Passes KMKeyboard (subclass of WebView)'s touch events off to our subkey window
|
||||
// if active, allowing for smooth, integrated gesture control.
|
||||
subKeysWindow.getContentView().findViewById(R.id.grid).dispatchTouchEvent(event);
|
||||
} else {
|
||||
if (event.getPointerCount() > 1) {
|
||||
// Multiple points touch the screen at the same time, so dismiss any pending subkeys
|
||||
dismissKeyPreview(0);
|
||||
dismissSubKeysWindow();
|
||||
}
|
||||
gestureDetector.onTouchEvent(event);
|
||||
}
|
||||
gestureDetector.onTouchEvent(event);
|
||||
|
||||
if (action == MotionEvent.ACTION_UP) {
|
||||
// Cleanup popups. #6636
|
||||
dismissKeyPreview(0);
|
||||
dismissSubKeysWindow();
|
||||
}
|
||||
|
||||
return super.onTouchEvent(event);
|
||||
|
|
@ -416,23 +385,15 @@ final class KMKeyboard extends WebView {
|
|||
}
|
||||
|
||||
public void onPause() {
|
||||
dismissKeyPreview(0);
|
||||
dismissSubKeysWindow();
|
||||
|
||||
dismissHelpBubble();
|
||||
}
|
||||
|
||||
public void onDestroy() {
|
||||
dismissKeyPreview(0);
|
||||
dismissSubKeysWindow();
|
||||
|
||||
dismissHelpBubble();
|
||||
}
|
||||
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
dismissKeyPreview(0);
|
||||
dismissSubKeysWindow();
|
||||
|
||||
RelativeLayout.LayoutParams params = KMManager.getKeyboardLayoutParams();
|
||||
this.setLayoutParams(params);
|
||||
|
|
@ -450,17 +411,6 @@ final class KMKeyboard extends WebView {
|
|||
}
|
||||
}
|
||||
|
||||
public void dismissSubKeysWindow() {
|
||||
try {
|
||||
if (subKeysWindow != null && subKeysWindow.isShowing()) {
|
||||
subKeysWindow.dismiss();
|
||||
}
|
||||
subKeysList = null;
|
||||
} catch (Exception e) {
|
||||
KMLog.LogException(TAG, "", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void dismissSuggestionMenuWindow() {
|
||||
try {
|
||||
if (suggestionMenuWindow != null && suggestionMenuWindow.isShowing()) {
|
||||
|
|
@ -968,234 +918,6 @@ final class KMKeyboard extends WebView {
|
|||
return;
|
||||
}
|
||||
|
||||
@SuppressLint({"InflateParams", "ClickableViewAccessibility"})
|
||||
private void showSubKeys(Context context) {
|
||||
if (subKeysList == null || subKeysWindow != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
wm.getDefaultDisplay().getMetrics(metrics);
|
||||
float density = metrics.density;
|
||||
|
||||
String[] pos = subKeysWindowPos;
|
||||
int x = (int) (Float.valueOf(pos[0]) * density);
|
||||
int y = (int) (Float.valueOf(pos[1]) * density);
|
||||
|
||||
// Calculate desired size for subkey display, # of rows/cols, etc.
|
||||
int kbWidth = getWidth();
|
||||
float pvWidth, pvHeight;
|
||||
|
||||
float margin = getResources().getDimension(R.dimen.popup_margin);
|
||||
int padding = getResources().getDimensionPixelSize(R.dimen.popup_padding);
|
||||
int rows, columns;
|
||||
float buttonWidth = getResources().getDimension(R.dimen.key_width);
|
||||
float buttonHeight = getResources().getDimension(R.dimen.key_height);
|
||||
float arrowWidth = getResources().getDimension(R.dimen.popup_arrow_width);
|
||||
float arrowHeight = getResources().getDimension(R.dimen.popup_arrow_height);
|
||||
float offset_y = getResources().getDimension(R.dimen.popup_offset_y);
|
||||
|
||||
//int orientation = getResources().getConfiguration().orientation;
|
||||
//columns = (orientation == Configuration.ORIENTATION_PORTRAIT)?6:10;
|
||||
columns = (int) ((getWidth() - margin) / (buttonWidth + margin));
|
||||
int subKeysCount = subKeysList.size();
|
||||
if (subKeysCount <= columns) {
|
||||
rows = 1;
|
||||
pvWidth = (subKeysCount * (buttonWidth + padding)) + 2 * margin + padding;
|
||||
pvHeight = (buttonHeight + padding) + 2 * margin + padding + arrowHeight;
|
||||
} else {
|
||||
rows = (subKeysCount / columns);
|
||||
if (subKeysCount % columns > 0) {
|
||||
rows++;
|
||||
}
|
||||
|
||||
if (subKeysCount % rows == 0) {
|
||||
columns = subKeysCount / rows;
|
||||
} else {
|
||||
int s = (columns * rows - subKeysCount) / 2;
|
||||
columns -= s / (rows - 1);
|
||||
}
|
||||
|
||||
pvWidth = (columns * (buttonWidth + padding)) + 2 * margin + padding;
|
||||
pvHeight = (rows * (buttonHeight + padding)) + 2 * margin + padding + arrowHeight;
|
||||
}
|
||||
|
||||
// Construct from resources.
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
View contentView = inflater.inflate(R.layout.subkeys_popup_layout, null, false);
|
||||
|
||||
// Configure the popover view with desired size and construct its popup "arrow."
|
||||
KMPopoverView popoverView = (KMPopoverView) contentView.findViewById(R.id.kmPopoverView);
|
||||
popoverView.setSize((int) pvWidth, (int) pvHeight);
|
||||
popoverView.setArrowSize(arrowWidth, arrowHeight);
|
||||
|
||||
float px = x - pvWidth / 2.0f;
|
||||
float py = y + offset_y - pvHeight;
|
||||
if (px < 0) {
|
||||
px = 0;
|
||||
} else if ((px + pvWidth) > kbWidth) {
|
||||
px = kbWidth - pvWidth;
|
||||
}
|
||||
|
||||
if (px == 0) {
|
||||
popoverView.setArrowPosX(x);
|
||||
} else if (px == (kbWidth - pvWidth)) {
|
||||
popoverView.setArrowPosX(x - px);
|
||||
} else {
|
||||
popoverView.setArrowPosX(pvWidth / 2.0f);
|
||||
}
|
||||
|
||||
popoverView.redraw();
|
||||
|
||||
// Add needed subkeys to the popup view.
|
||||
GridLayout grid = (GridLayout) contentView.findViewById(R.id.grid);
|
||||
grid.setColumnCount(columns);
|
||||
|
||||
for (int i = 0; i < subKeysCount; i++) {
|
||||
Button button = (Button) inflater.inflate(R.layout.subkey_layout, null);
|
||||
button.setId(i + 1);
|
||||
button.setLayoutParams(new FrameLayout.LayoutParams((int) buttonWidth, (int) buttonHeight));
|
||||
// May as well set them here, keeping them in a closure than a prone-to-change field.
|
||||
// Helps keep things from totally breaking when the event handler triggering subkey menu
|
||||
// generation and the menu's event handler stop talking to each other.
|
||||
final ArrayList<HashMap<String, String>> subkeyList = subKeysList;
|
||||
button.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int index = v.getId() - 1;
|
||||
String keyId = subkeyList.get(index).get("keyId");
|
||||
String keyText = getSubkeyText(keyId, subkeyList.get(index).get("keyText"));
|
||||
String jsFormat = "executePopupKey('%s','%s')";
|
||||
String jsString = KMString.format(jsFormat, keyId, keyText);
|
||||
loadJavascript(jsString);
|
||||
}
|
||||
});
|
||||
button.setClickable(false);
|
||||
|
||||
// Show existing text for subkeys. If subkey text is blank, get from id
|
||||
String kId = subKeysList.get(i).get("keyId");
|
||||
String kText = getSubkeyText(kId, subKeysList.get(i).get("keyText"));
|
||||
String title = convertKeyText(kText);
|
||||
|
||||
// Disable Android's default uppercasing transformation on buttons.
|
||||
button.setTransformationMethod(null);
|
||||
button.setText(title);
|
||||
|
||||
if (!specialOskFont.isEmpty()) {
|
||||
button.setTypeface(KMManager.getFontTypeface(context, specialOSKFontFilename(specialOskFont)));
|
||||
} else {
|
||||
Typeface font = KMManager.getFontTypeface(context, (oskFont != null) ? oskFontFilename() : textFontFilename());
|
||||
if (font != null) {
|
||||
button.setTypeface(font);
|
||||
} else {
|
||||
button.setTypeface(Typeface.SANS_SERIF);
|
||||
}
|
||||
}
|
||||
|
||||
FrameLayout frame = new FrameLayout(context);
|
||||
frame.setPadding(padding, padding, 0, 0);
|
||||
frame.addView(button);
|
||||
grid.addView(frame);
|
||||
}
|
||||
|
||||
grid.setOnTouchListener(new OnTouchListener() {
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
int action = event.getAction();
|
||||
int tx = (int) event.getRawX();
|
||||
int ty = (int) event.getRawY();
|
||||
|
||||
if (action == MotionEvent.ACTION_UP) {
|
||||
int count = ((ViewGroup) v).getChildCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
FrameLayout frame = (FrameLayout) ((ViewGroup) v).getChildAt(i);
|
||||
Button button = (Button) frame.getChildAt(0);
|
||||
if (button.isPressed()) {
|
||||
button.performClick();
|
||||
break;
|
||||
}
|
||||
}
|
||||
dismissSubKeysWindow();
|
||||
return true;
|
||||
} else if (action == MotionEvent.ACTION_MOVE) {
|
||||
int count = ((ViewGroup) v).getChildCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
FrameLayout frame = (FrameLayout) ((ViewGroup) v).getChildAt(i);
|
||||
Button button = (Button) frame.getChildAt(0);
|
||||
int[] pos = new int[2];
|
||||
button.getLocationOnScreen(pos);
|
||||
Rect rect = new Rect();
|
||||
button.getDrawingRect(rect);
|
||||
rect.offset(pos[0], pos[1]);
|
||||
if (rect.contains(tx, ty)) {
|
||||
button.setPressed(true);
|
||||
} else {
|
||||
button.setPressed(false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else if (action == MotionEvent.ACTION_DOWN) {
|
||||
// Must return true if we want the others to properly process if and when this handler
|
||||
// becomes decoupled from the keyboard's touch handler.
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// Now to finalize the actual window.
|
||||
subKeysWindow = new PopupWindow(contentView, (int) pvWidth, (int) pvHeight, false);
|
||||
subKeysWindow.setTouchable(true);
|
||||
subKeysWindow.setOnDismissListener(new OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss() {
|
||||
subKeysList = null;
|
||||
subKeysWindow = null;
|
||||
String jsString = "popupVisible(0)";
|
||||
loadJavascript(jsString);
|
||||
}
|
||||
});
|
||||
|
||||
int posX, posY;
|
||||
if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
int[] kbPos = new int[2];
|
||||
KMKeyboard.this.getLocationOnScreen(kbPos);
|
||||
posX = (int) px;
|
||||
posY = kbPos[1] + (int) py;
|
||||
} else {
|
||||
int[] kbPos = new int[2];
|
||||
KMKeyboard.this.getLocationInWindow(kbPos);
|
||||
posX = (int) px;
|
||||
posY = kbPos[1] + (int) py;
|
||||
}
|
||||
|
||||
dismissHelpBubble();
|
||||
this.setShouldShowHelpBubble(false);
|
||||
dismissKeyPreview(0);
|
||||
//subKeysWindow.setAnimationStyle(R.style.PopupAnim);
|
||||
|
||||
// And now to actually display it.
|
||||
subKeysWindow.showAtLocation(KMKeyboard.this, Gravity.TOP | Gravity.LEFT, posX, posY);
|
||||
String jsString = "popupVisible(1)";
|
||||
loadJavascript(jsString);
|
||||
}
|
||||
|
||||
// Attempt to get the subkey text.
|
||||
// If the subkey popup text is empty, parse the ID
|
||||
private String getSubkeyText(String keyID, String keyText) {
|
||||
String text = keyText;
|
||||
if (text.isEmpty()) {
|
||||
if(keyID.indexOf("U_") != -1 && keyID.indexOf("+") != -1 ) {
|
||||
// Chop off any appended '+____' portion of the key ID.
|
||||
keyID = keyID.substring(0, keyID.indexOf("+"));
|
||||
}
|
||||
text = keyID.replaceAll("U_", "\\\\u");
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Take a font JSON object and adjust to pass to JS
|
||||
* 1. Replace "source" keys for "files" keys
|
||||
|
|
@ -1255,111 +977,6 @@ final class KMKeyboard extends WebView {
|
|||
return null;
|
||||
}
|
||||
|
||||
@SuppressLint("InflateParams")
|
||||
protected void showKeyPreview(Context context, int px, int py, RectF baseKeyFrame, String text) {
|
||||
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
wm.getDefaultDisplay().getMetrics(metrics);
|
||||
float density = metrics.density;
|
||||
|
||||
if (keyPreviewWindow != null && keyPreviewWindow.isShowing()) {
|
||||
View contentView = keyPreviewWindow.getContentView();
|
||||
KMKeyPreviewView keyPreview = (KMKeyPreviewView) contentView.findViewById(R.id.kmKeyPreviewView);
|
||||
TextView textView = (TextView) contentView.findViewById(R.id.textView1);
|
||||
textView.setText(text);
|
||||
Typeface font = KMManager.getFontTypeface(context, (oskFont != null) ? oskFontFilename() : textFontFilename());
|
||||
if (font != null) {
|
||||
textView.setTypeface(font);
|
||||
} else {
|
||||
textView.setTypeface(Typeface.SANS_SERIF);
|
||||
}
|
||||
|
||||
int w = (int)getResources().getDimension(R.dimen.key_width);
|
||||
int h = (int)getResources().getDimension(R.dimen.key_height);
|
||||
RectF frame = keyPreview.setKeySize(w, h);
|
||||
keyPreview.redraw();
|
||||
|
||||
float offset_y = getResources().getDimension(R.dimen.popup_offset_y);
|
||||
int posX, posY;
|
||||
if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
int[] kbPos = new int[2];
|
||||
KMKeyboard.this.getLocationOnScreen(kbPos);
|
||||
posX = (int) (px * density - frame.width() / 2.0f);
|
||||
posY = kbPos[1] + (int) (py * density - frame.height() + offset_y);
|
||||
} else {
|
||||
int[] kbPos = new int[2];
|
||||
KMKeyboard.this.getLocationInWindow(kbPos);
|
||||
posX = (int) (px * density - frame.width() / 2.0f);
|
||||
posY = kbPos[1] + (int) (py * density - frame.height() + offset_y);
|
||||
}
|
||||
|
||||
keyPreviewWindow.update(posX, posY, (int) frame.width(), (int) frame.height());
|
||||
return;
|
||||
}
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
View contentView = inflater.inflate(R.layout.key_preview_layout, null, false);
|
||||
KMKeyPreviewView keyPreview = (KMKeyPreviewView) contentView.findViewById(R.id.kmKeyPreviewView);
|
||||
TextView textView = (TextView) contentView.findViewById(R.id.textView1);
|
||||
textView.setText(text);
|
||||
Typeface font = KMManager.getFontTypeface(context, (oskFont != null) ? oskFontFilename() : textFontFilename());
|
||||
if (font != null) {
|
||||
textView.setTypeface(font);
|
||||
} else {
|
||||
textView.setTypeface(Typeface.SANS_SERIF);
|
||||
}
|
||||
|
||||
int w = (int)getResources().getDimension(R.dimen.key_width);
|
||||
int h = (int)getResources().getDimension(R.dimen.key_height);
|
||||
RectF frame = keyPreview.setKeySize(w, h);
|
||||
keyPreview.redraw();
|
||||
keyPreviewWindow = new PopupWindow(contentView, (int) frame.width(), (int) frame.height(), false);
|
||||
keyPreviewWindow.setTouchable(true);
|
||||
keyPreviewWindow.setOnDismissListener(new OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss() {
|
||||
keyPreviewWindow = null;
|
||||
}
|
||||
});
|
||||
|
||||
float offset_y = getResources().getDimension(R.dimen.popup_offset_y);
|
||||
int posX, posY;
|
||||
if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
int[] kbPos = new int[2];
|
||||
KMKeyboard.this.getLocationOnScreen(kbPos);
|
||||
posX = (int) (px * density - frame.width() / 2.0f);
|
||||
posY = kbPos[1] + (int) (py * density - frame.height() + offset_y);
|
||||
} else {
|
||||
int[] kbPos = new int[2];
|
||||
KMKeyboard.this.getLocationInWindow(kbPos);
|
||||
posX = (int) (px * density - frame.width() / 2.0f);
|
||||
posY = kbPos[1] + (int) (py * density - frame.height() + offset_y);
|
||||
}
|
||||
|
||||
dismissHelpBubble();
|
||||
this.setShouldShowHelpBubble(false);
|
||||
//keyPreviewWindow.setAnimationStyle(R.style.KeyPreviewAnim);
|
||||
if (keyPreviewWindow != null) {
|
||||
keyPreviewWindow.showAtLocation(KMKeyboard.this, Gravity.TOP | Gravity.LEFT, posX, posY);
|
||||
}
|
||||
}
|
||||
|
||||
protected void dismissKeyPreview(long delay) {
|
||||
// dismiss after delay
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
if (keyPreviewWindow != null && keyPreviewWindow.isShowing())
|
||||
keyPreviewWindow.dismiss();
|
||||
} catch (Exception e) {
|
||||
KMLog.LogException(TAG, "", e);
|
||||
}
|
||||
}
|
||||
}, delay);
|
||||
}
|
||||
|
||||
protected void showHelpBubble() {
|
||||
if(keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
return; // Help bubble is disabled for System-wide keyboard
|
||||
|
|
|
|||
|
|
@ -92,10 +92,6 @@ public class KMKeyboardJSHandler {
|
|||
return;
|
||||
}
|
||||
|
||||
if (k.subKeysWindow != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isInappKMTextViewValid(k.keyboardType)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -204,10 +200,6 @@ public class KMKeyboardJSHandler {
|
|||
return;
|
||||
}
|
||||
|
||||
if (k.subKeysWindow != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isInappKMTextViewValid(k.keyboardType)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,78 +163,6 @@ public final class KMKeyboardWebViewClient extends WebViewClient {
|
|||
// 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<HashMap<String, String>>();
|
||||
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<String, String> hashMap = new HashMap<String, String>();
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -2153,15 +2153,6 @@ public final class KMManager {
|
|||
* @param keyboardType KeyboardType KEYBOARD_TYPE_INAPP or KEYBOARD_TYPE_SYSTEM
|
||||
*/
|
||||
public static void handleGlobeKeyAction(Context context, boolean globeKeyDown, KeyboardType keyboardType) {
|
||||
// Clear preview and subkeys
|
||||
if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
InAppKeyboard.dismissKeyPreview(0);
|
||||
InAppKeyboard.dismissSubKeysWindow();
|
||||
} else if (keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
SystemKeyboard.dismissKeyPreview(0);
|
||||
SystemKeyboard.dismissSubKeysWindow();
|
||||
}
|
||||
|
||||
// Update globeKeyState
|
||||
if (globeKeyState != GlobeKeyState.GLOBE_KEY_STATE_LONGPRESS) {
|
||||
globeKeyState = globeKeyDown ? GlobeKeyState.GLOBE_KEY_STATE_DOWN : GlobeKeyState.GLOBE_KEY_STATE_UP;
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<com.keyman.engine.KMKeyPreviewView
|
||||
android:id="@+id/kmKeyPreviewView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="@dimen/preview_padding"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:textSize="32sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#ffffffff" />
|
||||
|
||||
</FrameLayout>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Button xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/subkey_button"
|
||||
style="@style/subkey_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="1dp"
|
||||
android:minWidth="1dp" >
|
||||
|
||||
</Button>
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<com.keyman.engine.KMPopoverView
|
||||
android:id="@+id/kmPopoverView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<GridLayout
|
||||
android:id="@+id/grid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/popup_margin" >
|
||||
|
||||
</GridLayout>
|
||||
|
||||
</FrameLayout>
|
||||
168
android/KMEA/app/src/main/res/values-mnw-rMM/strings.xml
Normal file
168
android/KMEA/app/src/main/res/values-mnw-rMM/strings.xml
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Device type -->
|
||||
<!-- Application name (Keyman Engine for Android) -->
|
||||
<!-- Context: Title for list -->
|
||||
<plurals name="title_keyboards">
|
||||
<item quantity="other">ကဳဗုဒ်</item>
|
||||
</plurals>
|
||||
<!-- Context: Title for list -->
|
||||
<plurals name="title_other_input_methods">
|
||||
<item quantity="other">နဲကဲစုတ်ကဳဗုဒ်တၞဟ်ဟ်</item>
|
||||
</plurals>
|
||||
<!-- Context: Title for list -->
|
||||
<string name="title_add_keyboard" comment="Add a new keyboard">စုတ်ကဳဗုဒ်တၟိ</string>
|
||||
<!-- Context: Title for list -->
|
||||
<string name="title_languages_settings" comment="List of installed languages">ဘာသာစုတ်လဝ်တုဲတုဲဂမၠိုၚ်</string>
|
||||
<!-- Context: Title for list -->
|
||||
<string name="title_language_settings" comment="Keyman Settings for a language">ဒၞါဲပလေဝ်နာနာ %1$s</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="label_add" comment="Button to add an item">ထပ်စုတ်</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="label_back" comment="Button to go back">ကလေၚ်</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="label_cancel" comment="Button to cancel an action">တးပါဲ</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="label_close" comment="Close a dialog">ကၟာတ်</string>
|
||||
<!-- Context: Button label. Removed in Keyman 15 -->
|
||||
<string name="label_close_keyman" comment="Close the Keyman application">ကၟာတ်ကဳမာန်</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="label_forward" comment="Button to go forward">ဆက်အာဂတ</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="label_next_input_method" comment="Switch to next input method (replaces label_close_keyman)">နဲကဲဲကဳဗုဒ်မွဲပၠန်</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="label_download" comment="Button to confirm downloading an item">ဂြဲဖျေံ</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="label_install" comment="Confirmation to install a package">စုတ်</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="label_later" comment="Do an action at a later time">ဂတဏံမှ</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="label_next" comment="Go to the next screen">မွဲပၠန်</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="label_ok" comment="Button to acknowledge a dialog">အဵုခေ</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="label_update" comment="Dialog button to update a resource">ပ္တိုန်က္ဆံၚ်</string>
|
||||
<!-- Context: No internet for updates -->
|
||||
<string name="no_internet_connection" comment="Internet connection missing">ဆက်စၠောံအေန်တာနက်ဟွံဂွံ</string>
|
||||
<!-- Context: Keyboard Updates -->
|
||||
<string name="cannot_connect" comment="Error message when network connection fails">ချိက်စၠောံကဵုသ္ၚိစာတ် Keyman ဟွံဂွံဏီရ!</string>
|
||||
<!-- Context: Keyboard Updates -->
|
||||
<string name="confirm_delete_keyboard" comment="Confirmation to delete a keyboard">မၞးမိက်ဂွံဇိုတ်ပ္တိတ်ထောံ ကောန်ဍေၚ်ဏံဟာ?</string>
|
||||
<!-- Context: Keyboard Updates -->
|
||||
<string name="confirm_download_keyboard" comment="Confirmation to download a keyboard update">မၞးမိက်ဂွံကလောၚ်စုတ်ကေတ်မူလက္ကရဴအိုတ် သွက်ကောန်ဍေၚ်ဏံဟာ?</string>
|
||||
<!-- Context: Keyboard Updates -->
|
||||
<string name="confirm_update" comment="Confirmation to update several resources">မၞးနွံပၟိက်မိက်သ္ဂောံသၠုၚ်ပ္တိုန်မူကု ကောန်ဍေၚ်ဏံကဵုအဘိဓါန်ဂမၠိုၚ်လၟုဟ်ရဟာ?</string>
|
||||
<!-- Context: Keyboard Updates -->
|
||||
<string name="keyboard_updates_channel">သၠုၚ်ကဆံၚ်တမ်ရိုဟ်ဂမၠိုၚ်</string>
|
||||
<!-- Context: Keyboard Updates -->
|
||||
<string name="keyboard_updates_available" comment="Notification when resource updates are available">ကလိဂွံတမ်ရိုဟ်သၠုၚ်ကဆံၚ်ဂမၠိုၚ်မာန်</string>
|
||||
<!-- Context: Keyboard Updates -->
|
||||
<string name="update_available" comment="Currently installed version of a resource with an available update">%1$s (သမၠုၚ်ပ္တိုန်က္ဆံၚ်ဂွံယျ)</string>
|
||||
<!-- Context: Keyboard Updates -->
|
||||
<string name="keyboard_update_message" comment="language name: keyboard name"> ကလိဂွံပ္တိုန်ကဆံၚ် သွက်ကဳဗုဒ် %1$s: %2$s </string>
|
||||
<!-- Context: Keyboard Updates -->
|
||||
<string name="dictionary_update_message">ကလိဂွံပ္တိုန်ကဆံၚ် သွက်အဘိဓာန် %1$s: %2$s </string>
|
||||
<!-- Context: Keyboard Info and Keyboard Settings -->
|
||||
<string name="keyboard_version" comment="Label for keyboard version">ပါယှေန်ကဳဗုဒ်</string>
|
||||
<!-- Context: Keyboard Info and Keyboard Settings -->
|
||||
<string name="help_link" comment="Label for help link">လေက်မရီုဗၚ်</string>
|
||||
<!-- Context: Keyboard Info and Keyboard Settings -->
|
||||
<string name="uninstall_keyboard" comment="Label for uninstalling keyboard">ပ္တိတ်ကဳဗုဒ်</string>
|
||||
<!-- Context: Keyboard Info and Keyboard Settings -->
|
||||
<string name="keyboard_picker_new_keyboard" comment="Mark a language name that's newly installed in keyboard list">%1$s [တၟိ]</string>
|
||||
<!-- Context: Keyboard Info and Keyboard Settings -->
|
||||
<string name="keyboard_qr_code" comment="QR Code description"> ဂွံစုတ်ကဳဗုဒ်ဏံ\nပ္ဍဲစက်တၞဟ်ဟ်ဂှ် သဂေန်ကုက်ဏံညိ</string>
|
||||
<!-- Context: Keyboard Help welcome.htm title -->
|
||||
<string name="welcome_package" comment="Title to welcome.htm page (name and version)">ဒုၚ်တၠုၚ်ဏာ %1$s</string>
|
||||
<!-- Context: Keyboard app doesn't include FileProvider library needed to view help file -->
|
||||
<string name="fileprovider_undefined" comment="FileProvider library needed to view help file"> တၚ်နၚ်လိက် FileProvider မိက်ဂွံဗဵု ဝှါၚ်အရီုဗၚ်: %1$s</string>
|
||||
<!-- Context: Fatal keyboard error. Will load default keyboard -->
|
||||
<string name="fatal_keyboard_error" comment="Fatal keyboard error (keyboard ID::packageID for language). Will load default keyboard"> ကဳဗုဒ်ယောၚ်ယာဇၞော်ဇၞော်နကဵု %1$s:%2$s သွက် ဘာသာ %3$s ။ ဂြဲပ္တိုန်မံၚ် ကဳဗုဒ်ပကတိ။</string>
|
||||
<!-- Context: Fatal keyboard error. -->
|
||||
<string name="fatal_keyboard_error_short" comment="Error in keyboard (keyboard ID::packageID for language)."> တၚ်ယောၚ်ယာ ပ္ဍဲကဳဗုဒ် %1$s:%2$s သွက် ဘာသာ %3$s</string>
|
||||
<!-- Context: Query for associated dictionary -->
|
||||
<string name="query_associated_model" comment="Check if there's an available dictionary to download">စၟဳစၟတ်ဒၟံၚ် အဘိဓာန် မဆက်စပ် သ္ဂောံဂြဲဖျေံ</string>
|
||||
<string name="cannot_query_associated_model" comment="Cannot reach server to check if there's an available dictionary to download"> သ္ဂောံဂြဲဖျေံ အဘိဓာန်မဆက်စပ်တံဂှ် ဆက်စၠောံကု သာပါ ကဳမာန်ဟွံဂွံ</string>
|
||||
<!-- Context: Model Updates -->
|
||||
<string name="confirm_download_model" comment="Confirmation to download a dictionary update">မၞးမိက်ဂွံဂြဲဖျေံမူတၟိသွက်အဘိဓာန်ဏံဟာ?</string>
|
||||
<!-- Context: No associated dictionary found -->
|
||||
<string name="no_associated_model" comment="Confirmation there's no available dictionary to download">တံၚ်ဂြဲလဝ်အဘိဓာန်ဟွံမွဲ</string>
|
||||
<!-- Context: Model Updates -->
|
||||
<string name="catalog_unavailable" comment="Notification that the cloud resource catalog can't be updated">တံရိုဟ်သွက်ဏံဟွံမွဲ</string>
|
||||
<!-- Context: Background download messages-->
|
||||
<string name="catalog_download_start_in_background" comment="Notification that the resource catalog update will begin">ကာတ်တလံက် သၠုၚ်ပ္တိုန်ဒၟံၚ်ကဆံၚ်လက်ကရဴရ</string>
|
||||
<!-- Context: Background download messages-->
|
||||
<string name="catalog_download_is_running_in_background" comment="Notification that the resource catalog update is still downloading"> ဂြဲဖျေံဒၟံၚ်ကာတ်တလံက်ဖိုဟ်၊ မၚ်မွဲလစုတ်တုဲဂ္စါန်မွဲဝါပၠန်ညိ!</string>
|
||||
<!-- Context: Background download messages-->
|
||||
<string name="progress_message_checking_resource_is_running" comment="Progress notification that the check for a resource is still running ">စၟဳစၟတ်သွက်တမ်ရိုဟ်</string>
|
||||
<!-- Context: Background download messages-->
|
||||
<string name="keyboard_download_start_in_background" comment="Notification that a keyboard download has started">ဂြဲဖျေံဒၟံၚ် ကဳဗုဒ် လ္ပါ်လက်ကရဴ</string>
|
||||
<!-- Context: Background download messages-->
|
||||
<string name="keyboard_download_is_running_in_background" comment="Notification that a keyboard download is still running">ကဳဗုဒ်မရုဲလဝ်ဂှ် အဃောဂၠောၚ်ဂြဲဖျေံဒၟံၚ်ရောင်။ မၚ်မွဲချိုန်ခဏတုဲ ဆက်ဂစာန်ပၠန်ညိ!</string>
|
||||
<!-- Context: Background download messages-->
|
||||
<string name="keyboard_download_finished" comment="Notification that a keyboard download has finished">ဂၠောၚ်ဂြဲဖျေံကဳဗုဒ်အာစိုပ်ဒတုဲ!</string>
|
||||
<!-- Context: Background download messages-->
|
||||
<string name="dictionary_download_start_in_background" comment="Notification that a dictionary download has started">ပွမဂြဲဂၠောၚ်ဖျေံဒၟံၚ် အဘိဓာန်ဂှ် ဍေံပ္တံလဝ်ပ္ဍဲလက်ကရဴတေံ</string>
|
||||
<!-- Context: Background download messages-->
|
||||
<string name="dictionary_download_is_running_in_background" comment="Notification that a dictionary download is still running">အဘိဓာန်ရုဲစှ်လဝ်ဂှ် အဃောဂၠောၚ်ဂြဲဖျေံဒၟံၚ်ရောင်။ မၚ်မွဲချိုန်ခဏတုဲ ဆက်ဂစာန်ပၠန်ညိ!</string>
|
||||
<!-- Context: Background download messages-->
|
||||
<string name="dictionary_download_finished" comment="Notification that a dictionary download has finished">ဂၠောၚ်ဂြဲဖျေံအဘိဓာန်အာစိုပ်ဒတုဲ။</string>
|
||||
<!-- Context: Background download messages -->
|
||||
<string name="download_failed" comment="Notification that a download failed">တံၚ်ဂြဲဖျေံဟွံအံၚ်ဇၞး</string>
|
||||
<!-- Context: Background download messages -->
|
||||
<string name="failed_to_retrieve_file" comment="Failed to retrieve downloaded file">ဝှာၚ်မဂၠောၚ်ဂြဲဖျေံလဝ်ဂှ် ကလေၚ်ကေတ်ဟွံဂွံ</string>
|
||||
<!-- Context: General Updates -->
|
||||
<string name="update_check_unavailable" comment="Error message when a Keyman server can't be reached">ဆက်စၠောံကုသာပါဟွံအံၚ်ဇၞး!</string>
|
||||
<!-- Context: General Updates -->
|
||||
<string name="update_check_current" comment="Notification that all resources are up to date">"တံရိုဟ်ဖအိုတ်ဂှ် ဒှ်တၟိရ!"</string>
|
||||
<!-- Context: General Updates -->
|
||||
<string name="update_failed" comment="Notification that a resource update failed">သၠုၚ်ပ္တိုန်ကဆံၚ် တံရိုဟ် မွဲဟွံသေၚ်မွဲ ဟွံအံၚ်ဇၞး!</string>
|
||||
<!-- Context: General Updates -->
|
||||
<string name="update_success" comment="Notification that a resource update successfully updated">သမၠုၚ်ပ္တိုန်ကဆံၚ်တံရိုဟ်အံၚ်ဇၞး!</string>
|
||||
<!-- Context: Model Info -->
|
||||
<string name="model_version" comment="Title for a dictionary version">ပါယှေန်အဘိဓာန်</string>
|
||||
<!-- Context: Model Info -->
|
||||
<string name="uninstall_model" comment="Label to uninstall a dictionary">ပလှ်ပတိတ် အဘိဓာန်</string>
|
||||
<!-- Context: Model Info -->
|
||||
<string name="confirm_delete_model" comment="Confirmation to delete a dictionary">မၞးမိက်ဂွံဇိုတ် အဘိဓာန်ဟာ?</string>
|
||||
<!-- Context: Model Deleted -->
|
||||
<string name="model_deleted" comment="Notification when a dictionary is deleted">ဇိုတ် အဘိဓာန်တုဲ</string>
|
||||
<!-- Context: Language Settings Keyboard install strings -->
|
||||
<string name="keyboard_install_toast" comment="Notification when a keyboard is installed">ကဳဗုဒ် %1$s စုတ်လဝ်တုဲ</string>
|
||||
<!-- Context: Language Settings Keyboard uninstall strings -->
|
||||
<string name="keyboard_deleted_toast" comment="Notification when a keyboard is deleted">ဇိုတ် ကဳဗုဒ်တုဲ</string>
|
||||
<!-- Context: Language Settings menu strings -->
|
||||
<string name="enable_corrections" comment="Enable corrections from the suggestion banner">ပံက် ပလေဝ်ဒါန်</string>
|
||||
<!-- Context: Language Settings menu strings -->
|
||||
<string name="enable_predictions" comment="Enable predictions from the suggestion banner">ပံက် တၚ်ချိၚ်ခယျဂမၠိုၚ်</string>
|
||||
<!-- Context: Language Settings menu strings -->
|
||||
<string name="model_label">အဘိဓာန်</string>
|
||||
<plurals name="model_count">
|
||||
<item quantity="other">အဘိဓာန်</item>
|
||||
</plurals>
|
||||
<!-- Context: Language Settings menu substring - Check for available dictionary -->
|
||||
<string name="check_available_model" comment="Check for available dictionary">စၟဳစၟတ်အဘိဓာန်နွံဟွံမွဲ</string>
|
||||
<string name="check_model_online" comment="Check for dictionaries online">စၟဳစၟတ်အဘိဓာန်အောန်လာၚ်</string>
|
||||
<!-- Context: Language Settings menu strings -->
|
||||
<string name="model_info_header" comment="Dictionary name">အဘိဓာန်: %1$s</string>
|
||||
<!-- Context: Language Settings menu strings -->
|
||||
<string name="model_picker_header" comment="Dictionaries for a specified language">အဘိဓာန် %1$s ဂမၠိုၚ်</string>
|
||||
<!-- Context: Language Settings menu strings -->
|
||||
<!-- Context: Language Settings menu strings -->
|
||||
<string name="model_install_toast" comment="Notification when a dictionary is installed">စုတ် အဘိဓာန်တုဲ</string>
|
||||
<!-- Context: Language Settings menu strings -->
|
||||
<plurals name="keyboard_count">
|
||||
<item quantity="other">(ကဳဗုဒ် %1$d)</item>
|
||||
</plurals>
|
||||
<!-- Context: "Change Display Language" menu -->
|
||||
<string name="default_locale" comment="Use the device's current locale">အရေဝ်ဘာသာပကတိ</string>
|
||||
<!-- Context: Content descriptions -->
|
||||
<!-- Context: Content descriptions -->
|
||||
<!-- Context: Popup menu labels -->
|
||||
<string name="label_delete" comment="Confirmation to delete an item">ပလီု</string>
|
||||
<!-- Context: Shared preferences name -->
|
||||
<!-- Context: Other strings -->
|
||||
<string name="help_bubble_text">မိက်ဂွံသၠာဲ ကဳဗုဒ်မ္ဂး ဍဵုအဏံညိ</string>
|
||||
<!-- Context: anywhere -->
|
||||
<string name="unable_to_open_browser" comment="Notification when a browser activity cannot be launched">ပံက် ဝေက်ဗရဴသာဟွံဂွံ</string>
|
||||
</resources>
|
||||
|
|
@ -6,9 +6,5 @@
|
|||
<color name="popup_bg">#ff282828</color>
|
||||
<color name="popup_bg2">#ff000000</color>
|
||||
<color name="popup_border">#ff282828</color>
|
||||
|
||||
<color name="key_preview_bg">#ff838383</color>
|
||||
<color name="key_preview_bg2">#ff333333</color>
|
||||
<color name="key_preview_border">#ff737373</color>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ builder_parse "$@"
|
|||
function compile_schemas() {
|
||||
# We need the schema files at runtime and bundled, so always copy it for all actions except `clean`
|
||||
local schemas=(
|
||||
"$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard.schema.json"
|
||||
"$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest.schema.json"
|
||||
"$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard3.schema.json"
|
||||
"$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest3.schema.json"
|
||||
"$KEYMAN_ROOT/common/schemas/kvks/kvks.schema.json"
|
||||
"$KEYMAN_ROOT/common/schemas/kpj/kpj.schema.json"
|
||||
"$KEYMAN_ROOT/common/schemas/kpj-9.0/kpj-9.0.schema.json"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export interface LDMLKeyboardTestDataXMLSourceFile {
|
|||
/**
|
||||
* <keyboardTest> -- the root element.
|
||||
*/
|
||||
keyboardTest: LKTKeyboardTest;
|
||||
keyboardTest3: LKTKeyboardTest;
|
||||
}
|
||||
|
||||
export interface LKTKeyboardTest {
|
||||
|
|
|
|||
|
|
@ -39,27 +39,27 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
* @returns true on success, false on failure
|
||||
*/
|
||||
private boxArrays(source: any) : boolean {
|
||||
if (source?.keyboard) {
|
||||
if (!source.keyboard.keys) {
|
||||
source.keyboard.keys = {
|
||||
if (source?.keyboard3) {
|
||||
if (!source.keyboard3.keys) {
|
||||
source.keyboard3.keys = {
|
||||
key: [],
|
||||
flicks: [],
|
||||
};
|
||||
}
|
||||
if (!source.keyboard.keys.import) {
|
||||
source.keyboard.keys.import = [];
|
||||
if (!source.keyboard3.keys.import) {
|
||||
source.keyboard3.keys.import = [];
|
||||
}
|
||||
}
|
||||
boxXmlArray(source?.keyboard, 'layers');
|
||||
boxXmlArray(source?.keyboard?.displays, 'display');
|
||||
boxXmlArray(source?.keyboard?.names, 'name');
|
||||
boxXmlArray(source?.keyboard?.vkeys, 'vkey');
|
||||
boxXmlArray(source?.keyboard?.keys, 'key');
|
||||
boxXmlArray(source?.keyboard?.keys, 'flicks');
|
||||
boxXmlArray(source?.keyboard?.locales, 'locale');
|
||||
boxXmlArray(source?.keyboard, 'transforms');
|
||||
if(source?.keyboard?.layers) {
|
||||
for(let layers of source?.keyboard?.layers) {
|
||||
boxXmlArray(source?.keyboard3, 'layers');
|
||||
boxXmlArray(source?.keyboard3?.displays, 'display');
|
||||
boxXmlArray(source?.keyboard3?.names, 'name');
|
||||
boxXmlArray(source?.keyboard3?.vkeys, 'vkey');
|
||||
boxXmlArray(source?.keyboard3?.keys, 'key');
|
||||
boxXmlArray(source?.keyboard3?.keys, 'flicks');
|
||||
boxXmlArray(source?.keyboard3?.locales, 'locale');
|
||||
boxXmlArray(source?.keyboard3, 'transforms');
|
||||
if(source?.keyboard3?.layers) {
|
||||
for(let layers of source?.keyboard3?.layers) {
|
||||
boxXmlArray(layers, 'layer');
|
||||
if(layers?.layer) {
|
||||
for(let layer of layers?.layer) {
|
||||
|
|
@ -68,18 +68,18 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
}
|
||||
}
|
||||
}
|
||||
if(source?.keyboard?.keys?.flicks) {
|
||||
for(let flicks of source?.keyboard?.keys?.flicks) {
|
||||
if(source?.keyboard3?.keys?.flicks) {
|
||||
for(let flicks of source?.keyboard3?.keys?.flicks) {
|
||||
boxXmlArray(flicks, 'flick');
|
||||
}
|
||||
}
|
||||
if(source?.keyboard?.variables) {
|
||||
boxXmlArray(source?.keyboard?.variables, 'set');
|
||||
boxXmlArray(source?.keyboard?.variables, 'string');
|
||||
boxXmlArray(source?.keyboard?.variables, 'unicodeSet');
|
||||
if(source?.keyboard3?.variables) {
|
||||
boxXmlArray(source?.keyboard3?.variables, 'set');
|
||||
boxXmlArray(source?.keyboard3?.variables, 'string');
|
||||
boxXmlArray(source?.keyboard3?.variables, 'unicodeSet');
|
||||
}
|
||||
if(source?.keyboard?.transforms) {
|
||||
for(let transforms of source.keyboard.transforms) {
|
||||
if(source?.keyboard3?.transforms) {
|
||||
for(let transforms of source.keyboard3.transforms) {
|
||||
boxXmlArray(transforms, 'transformGroup');
|
||||
for (let transformGroup of transforms.transformGroup) {
|
||||
boxXmlArray(transformGroup, 'transform');
|
||||
|
|
@ -208,7 +208,7 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
*/
|
||||
public validate(source: LDMLKeyboardXMLSourceFile | LDMLKeyboardTestDataXMLSourceFile): boolean {
|
||||
const ajv = new Ajv();
|
||||
if(!ajv.validate(Schemas.ldmlKeyboard, source)) {
|
||||
if(!ajv.validate(Schemas.ldmlKeyboard3, source)) {
|
||||
for (let err of ajv.errors) {
|
||||
this.callbacks.reportMessage(CommonTypesMessages.Error_SchemaValidationError({
|
||||
instancePath: err.instancePath,
|
||||
|
|
@ -345,16 +345,16 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
boxTestDataArrays(raw: any) : LDMLKeyboardTestDataXMLSourceFile | null {
|
||||
if (!raw) return null;
|
||||
const a : LDMLKeyboardTestDataXMLSourceFile = {
|
||||
keyboardTest: {
|
||||
conformsTo: raw?.keyboardTest?.$?.conformsTo,
|
||||
keyboardTest3: {
|
||||
conformsTo: raw?.keyboardTest3?.$?.conformsTo,
|
||||
}
|
||||
};
|
||||
|
||||
const $$ : NameAndProps[] = raw?.keyboardTest?.$$;
|
||||
const $$ : NameAndProps[] = raw?.keyboardTest3?.$$;
|
||||
|
||||
this.stuffBoxes(a.keyboardTest, $$, 'info');
|
||||
this.stuffBoxes(a.keyboardTest, $$, 'repertoire', true);
|
||||
this.stuffBoxes(a.keyboardTest, $$, 'tests', true, (o, r) => {
|
||||
this.stuffBoxes(a.keyboardTest3, $$, 'info');
|
||||
this.stuffBoxes(a.keyboardTest3, $$, 'repertoire', true);
|
||||
this.stuffBoxes(a.keyboardTest3, $$, 'tests', true, (o, r) => {
|
||||
// start with basic unpack
|
||||
const tests : LKTTests = LDMLKeyboardXMLSourceFileReader.defaultMapper(o, r);
|
||||
// add ingredients
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export interface LDMLKeyboardXMLSourceFile {
|
|||
/**
|
||||
* <keyboard> -- the root element.
|
||||
*/
|
||||
keyboard: LKKeyboard;
|
||||
keyboard3: LKKeyboard;
|
||||
}
|
||||
|
||||
export interface LKKeyboard {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
import kpj from './schemas/kpj.schema.js';
|
||||
import kpj90 from './schemas/kpj-9.0.schema.js';
|
||||
import kvks from './schemas/kvks.schema.js';
|
||||
import ldmlKeyboard from './schemas/ldml-keyboard.schema.js';
|
||||
import ldmlKeyboardTest from './schemas/ldml-keyboardtest.schema.js';
|
||||
import ldmlKeyboard3 from './schemas/ldml-keyboard3.schema.js';
|
||||
import ldmlKeyboardTest3 from './schemas/ldml-keyboardtest3.schema.js';
|
||||
import displayMap from './schemas/displaymap.schema.js';
|
||||
import touchLayoutClean from './schemas/keyman-touch-layout.clean.spec.js';
|
||||
import touchLayout from './schemas/keyman-touch-layout.spec.js';
|
||||
|
|
@ -12,11 +12,11 @@ const Schemas = {
|
|||
kpj,
|
||||
kpj90,
|
||||
kvks,
|
||||
ldmlKeyboard,
|
||||
ldmlKeyboardTest,
|
||||
ldmlKeyboard3,
|
||||
ldmlKeyboardTest3,
|
||||
displayMap,
|
||||
touchLayoutClean,
|
||||
touchLayout,
|
||||
};
|
||||
|
||||
export default Schemas;
|
||||
export default Schemas;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="und" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="Test Minimal Keyboard" />
|
||||
</names>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="und" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="Test Minimal Keyboard" />
|
||||
|
|
@ -8,4 +8,4 @@
|
|||
<keys>
|
||||
|
||||
</keys>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="und" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="Test Minimal Keyboard" />
|
||||
|
|
@ -8,4 +8,4 @@
|
|||
<keys>
|
||||
<key id="a" to="å"/> <!-- override -->
|
||||
</keys>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="und" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="Test Minimal Keyboard" />
|
||||
|
|
@ -10,4 +10,4 @@
|
|||
<key id="zz" to="zz"/>
|
||||
<key id="hash" to="##"/> <!-- override -->
|
||||
</keys>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd"
|
||||
Disabling doctype for this invalid file, not used by compiler, and avoids complaints in IDEs etc.
|
||||
-->
|
||||
<keyboard locale="mt" conformsTo="nothing-anyone-ever-heard-of"> <!-- invalid -->
|
||||
<keyboard3 locale="mt" conformsTo="nothing-anyone-ever-heard-of"> <!-- invalid -->
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -16,4 +16,4 @@
|
|||
<key id="that" to="ថា" />
|
||||
</keys>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -13,4 +13,4 @@
|
|||
<key id="that" to="ថា" />
|
||||
</keys>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -13,4 +13,4 @@
|
|||
<key id="that" to="ថា" />
|
||||
</keys>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -13,4 +13,4 @@
|
|||
<key id="that" to="ថា" />
|
||||
</keys>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -13,4 +13,4 @@
|
|||
<key id="that" to="ថា" />
|
||||
</keys>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd"
|
||||
DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd"
|
||||
Disabling doctype for this invalid file, not used by compiler, and avoids complaints in IDEs etc.
|
||||
-->
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
</keyboard>
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
</keyboard3>
|
||||
|
|
|
|||
6
common/web/types/test/fixtures/test-fr.xml
vendored
6
common/web/types/test/fixtures/test-fr.xml
vendored
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboardTest SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.dtd">
|
||||
<keyboardTest conformsTo="techpreview">
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="fr-t-k0-azerty.xml" author="Team Keyboard" name="fr-test" />
|
||||
<repertoire name="simple-repertoire" chars="[a b c d e \u{22}]" type="simple" /> <!-- verify that these outputs are all available from simple keys on any layer, for all form factors -->
|
||||
<repertoire name="chars-repertoire" chars="[á é ó]" type="gesture" /> <!-- verify that these outputs are all available from simple or gesture keys on any layer, for touch -->
|
||||
|
|
@ -19,4 +19,4 @@
|
|||
<check result="abc\u0022...stuv" />
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest>
|
||||
</keyboardTest3>
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ export function testReaderCases(cases : CompilationCase[]) {
|
|||
assert.includeDeepMembers(callbacks.messages, testcase.warnings, 'expected warnings to be included');
|
||||
} else if (!expectFailure) {
|
||||
// no warnings, so expect zero messages
|
||||
assert.strictEqual(callbacks.messages.length, 0, 'expected zero messages');
|
||||
assert.deepEqual(callbacks.messages, [], 'expected zero messages');
|
||||
}
|
||||
|
||||
// run the user-supplied callback if any
|
||||
|
|
|
|||
|
|
@ -11,16 +11,16 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
subpath: 'test-fr.xml',
|
||||
callback: (data, source) => {
|
||||
assert.ok(source);
|
||||
assert.ok(source.keyboardTest);
|
||||
assert.equal(source.keyboardTest.conformsTo, constants.cldr_version_latest);
|
||||
assert.ok(source.keyboardTest3);
|
||||
assert.equal(source.keyboardTest3.conformsTo, constants.cldr_version_latest);
|
||||
|
||||
assert.deepEqual(source.keyboardTest.info, {
|
||||
assert.deepEqual(source.keyboardTest3.info, {
|
||||
keyboard: 'fr-t-k0-azerty.xml',
|
||||
author: 'Team Keyboard',
|
||||
name: 'fr-test'
|
||||
});
|
||||
|
||||
assert.sameDeepMembers(source.keyboardTest.repertoire, [
|
||||
assert.sameDeepMembers(source.keyboardTest3.repertoire, [
|
||||
{
|
||||
name: 'simple-repertoire',
|
||||
chars: '[a b c d e \\u{22}]',
|
||||
|
|
@ -29,10 +29,10 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
{ name: 'chars-repertoire', chars: '[á é ó]', type: 'gesture' }
|
||||
]);
|
||||
|
||||
assert.equal(1, source.keyboardTest.tests?.length);
|
||||
assert.equal('key-tests', source.keyboardTest.tests[0].name);
|
||||
assert.equal(1, source.keyboardTest.tests[0].test?.length);
|
||||
const test0 = source.keyboardTest.tests[0].test[0];
|
||||
assert.equal(1, source.keyboardTest3.tests?.length);
|
||||
assert.equal('key-tests', source.keyboardTest3.tests[0].name);
|
||||
assert.equal(1, source.keyboardTest3.tests[0].test?.length);
|
||||
const test0 = source.keyboardTest3.tests[0].test[0];
|
||||
assert.equal('key-test', test0.name);
|
||||
assert.equal('abc\\u0022...', test0.startContext?.to);
|
||||
assert.sameDeepOrderedMembers([
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
{
|
||||
subpath: 'invalid-structure-per-dtd.xml',
|
||||
errors: [CommonTypesMessages.Error_SchemaValidationError({
|
||||
instancePath: '/keyboard',
|
||||
instancePath: '/keyboard3',
|
||||
keyword: 'required',
|
||||
message: `must have required property 'names'`,
|
||||
params: 'missingProperty="names"',
|
||||
|
|
@ -24,7 +24,7 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
{
|
||||
subpath: 'invalid-conforms-to.xml',
|
||||
errors: [CommonTypesMessages.Error_SchemaValidationError({
|
||||
instancePath: '/keyboard/conformsTo',
|
||||
instancePath: '/keyboard3/conformsTo',
|
||||
keyword: 'enum',
|
||||
message: `must be equal to one of the allowed values`,
|
||||
params: 'allowedValues="techpreview"',
|
||||
|
|
@ -33,8 +33,8 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
{
|
||||
subpath: 'import-minimal.xml',
|
||||
callback: (data, source, subpath, callbacks) => {
|
||||
assert.ok(source?.keyboard?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard?.keys.key, ['a', 'b', 'c']);
|
||||
assert.ok(source?.keyboard3?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c']);
|
||||
assert.sameDeepOrderedMembers(k, [
|
||||
{id: 'a', to: 'a'},
|
||||
{id: 'b', to: 'b'},
|
||||
|
|
@ -45,8 +45,8 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
{
|
||||
subpath: 'import-minimal1.xml',
|
||||
callback: (data, source, subpath, callbacks) => {
|
||||
assert.ok(source?.keyboard?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard?.keys.key, ['a', 'b', 'c']);
|
||||
assert.ok(source?.keyboard3?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c']);
|
||||
assert.sameDeepOrderedMembers(k, [
|
||||
{id: 'a', to: 'a'},
|
||||
{id: 'b', to: 'b'},
|
||||
|
|
@ -57,8 +57,8 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
{
|
||||
subpath: 'import-minimal2.xml',
|
||||
callback: (data, source, subpath, callbacks) => {
|
||||
assert.ok(source?.keyboard?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard?.keys.key, ['a', 'b', 'c']);
|
||||
assert.ok(source?.keyboard3?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c']);
|
||||
assert.sameDeepOrderedMembers(k, [
|
||||
{id: 'a', to: 'a'},
|
||||
{id: 'b', to: 'b'},
|
||||
|
|
@ -70,8 +70,8 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
{
|
||||
subpath: 'import-symbols.xml',
|
||||
callback: (data, source, subpath, callbacks) => {
|
||||
assert.ok(source?.keyboard?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard?.keys.key, ['a', 'b', 'c', 'zz', 'hash', 'hyphen']);
|
||||
assert.ok(source?.keyboard3?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c', 'zz', 'hash', 'hyphen']);
|
||||
assert.sameDeepOrderedMembers(k, [
|
||||
{id: 'a', to: 'a'}, // implied
|
||||
{id: 'b', to: 'b'},
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@
|
|||
@@expect-error: This keyboard is invalid, so it will fail to load
|
||||
|
||||
-->
|
||||
<keyboard />
|
||||
<keyboard3 />
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@
|
|||
@@expect:
|
||||
|
||||
-->
|
||||
<keyboard />
|
||||
<keyboard3 />
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboardTest SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.dtd">
|
||||
<keyboardTest conformsTo="techpreview">
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="k_001_tiny.xml" author="srl295" name="k_001_tiny" />
|
||||
<!-- <repertoire chars="[ħ ថា]" type="simple" name="our-little-language" /> TODO-LDML: not working yet -->
|
||||
<repertoire chars="[ħ]" type="simple" name="minus-khmer" />
|
||||
|
|
@ -13,4 +13,4 @@
|
|||
<check result="ħថាħ"/>
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest>
|
||||
</keyboardTest3>
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
@@expected: \u0127\u1790\u17B6\u0127
|
||||
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -26,4 +26,4 @@
|
|||
<row keys="hmaqtugha that" /> <!-- number row -->
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
@@expected: \u0127\u1790\u17B6\u0127\uD83D\uDE40\u0127
|
||||
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -25,4 +25,4 @@
|
|||
<row keys="hmaqtugha that screamcat" /> <!-- number row -->
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
@@expected: qu\u00ea
|
||||
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="en" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -58,4 +58,4 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
<transform from="ab" />
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
@@expected: \u0037\u1790\u17B6\u0127
|
||||
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -29,4 +29,4 @@
|
|||
<row keys="seven eee" /> <!-- number row -->
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
@@expected: \u0061\u0041\u0062\u0063\u0064\u0064\u0065\u0066\u0067\u0067
|
||||
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -42,4 +42,4 @@
|
|||
<row keys="g" /> <!-- K_BKQUOTE -->
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
@@expected: t
|
||||
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="en" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -58,4 +58,4 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
<transform from="ab" />
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboardTest SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.dtd">
|
||||
<keyboardTest conformsTo="techpreview">
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="k_007_transform_rgx.xml" author="Team Keyboard" name="marker" />
|
||||
<tests name="regex-tests">
|
||||
<test name="regex-test-basic">
|
||||
|
|
@ -21,4 +21,4 @@
|
|||
<check result="ayy" />
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest>
|
||||
</keyboardTest3>
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-keyboards.md#element-transform
|
||||
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="en" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -45,4 +45,4 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
<transform from="($[upper])`" to="$[1:lower]"/> <!-- Lowercase (and drop grave): A` » a -->
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ Gets part of the way,
|
|||
Based on mt.xml from CLDR. 'TODO-LDML' denotes modifications.
|
||||
Note this is the 47-key version.
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<!-- remainder entirely from resources/standards-data/ldml-keyboards/techpreview/3.0/mt-t-k0-47key.xml -->
|
||||
<keyboard locale="mt-t-k0-47key" conformsTo="techpreview">
|
||||
<keyboard3 locale="mt-t-k0-47key" conformsTo="techpreview">
|
||||
<locales>
|
||||
<!-- English is also an official language in Malta.-->
|
||||
<locale id="en" />
|
||||
|
|
@ -93,4 +93,4 @@ Gets part of the way,
|
|||
</layer>
|
||||
</layers>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ Exact copy of mt.xml from CLDR, but with:
|
|||
- an updated DTD path
|
||||
- test case
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<locales>
|
||||
<!-- English is also an official language in Malta.-->
|
||||
<locale id="en" />
|
||||
|
|
@ -90,4 +90,4 @@ Exact copy of mt.xml from CLDR, but with:
|
|||
</layer>
|
||||
</layers>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Note: similar to, but slightly ahead of, fr-t-k0-azerty -->
|
||||
<!DOCTYPE keyboardTest SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.dtd">
|
||||
<keyboardTest conformsTo="techpreview">
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="k_020_fr.xml" author="Team Keyboard" name="fr-test-updated" />
|
||||
<repertoire name="simple-repertoire" chars="[a b c d e \u0022]" type="simple" /> <!-- verify that these outputs are all available from simple keys on any layer, for all form factors -->
|
||||
<repertoire name="chars-repertoire" chars="[á é ó]" type="gesture" /> <!-- verify that these outputs are all available from simple or gesture keys on any layer, for touch -->
|
||||
|
|
@ -20,4 +20,4 @@
|
|||
<check result="abc\u0022...stuv" />
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest>
|
||||
</keyboardTest3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Note: similar to, but slightly ahead of, fr-t-k0-azerty -->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="fr-t-k0-azerty" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="fr-t-k0-azerty" conformsTo="techpreview">
|
||||
<locales>
|
||||
<locale id="br" /> <!-- example of including Breton -->
|
||||
</locales>
|
||||
|
|
@ -195,4 +195,4 @@
|
|||
</transformGroup>
|
||||
</transforms>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
@@expected: \u0061
|
||||
-->
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="en" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -23,4 +23,4 @@
|
|||
<row keys="a gap"/>
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
@@keys: [K_BKQUOTE]
|
||||
@@expected: \u0061
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="en" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -26,4 +26,4 @@
|
|||
<row keys="a" /> <!-- number row -->
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
@@expected: \u0061
|
||||
-->
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="en" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -19,4 +19,4 @@
|
|||
</layer>
|
||||
</layers>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboardTest SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.dtd">
|
||||
<keyboardTest conformsTo="techpreview">
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="k_200_reorder_nod_Lana.xml" author="Team Keyboard" name="nod-Lana" />
|
||||
<tests name="reorder-tests">
|
||||
<test name="roast00-orig-emit">
|
||||
|
|
@ -54,4 +54,4 @@
|
|||
<check result="\u1A21\u1A60\u1A45\u1A6B\u1A76" />
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest>
|
||||
</keyboardTest3>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
see https://keyman.com/keyboards/sil_boonkit
|
||||
-->
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="nod" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="nod" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="nod-Lana Test" />
|
||||
|
|
@ -46,4 +46,4 @@
|
|||
<reorder before="\u1A6B" from="\u1A60[\u1A75-\u1A79]\u1A45" order="10 55 10" />
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboardTest SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.dtd">
|
||||
<keyboardTest conformsTo="techpreview">
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="k_210_marker.xml" author="Team Keyboard" name="marker" />
|
||||
<tests name="marker-tests">
|
||||
<test name="marker-test-basic-grave">
|
||||
|
|
@ -43,4 +43,4 @@
|
|||
<check result="é" />
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest>
|
||||
</keyboardTest3>
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
Test Keyboard
|
||||
-->
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="en" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="Marker Test" />
|
||||
|
|
@ -50,4 +50,4 @@
|
|||
<!-- no cleanup for trailing acute -->
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -698,15 +698,15 @@ int LdmlJsonTestSourceFactory::load(const km::kbp::path &compiled, const km::kbp
|
|||
return __LINE__;
|
||||
}
|
||||
|
||||
auto conformsTo = data["/keyboardTest/conformsTo"_json_pointer].get<std::string>();
|
||||
auto conformsTo = data["/keyboardTest3/conformsTo"_json_pointer].get<std::string>();
|
||||
assert_or_return(std::string(LDML_CLDR_VERSION_LATEST) == conformsTo);
|
||||
auto info_keyboard = data["/keyboardTest/info/keyboard"_json_pointer].get<std::string>();
|
||||
auto info_author = data["/keyboardTest/info/author"_json_pointer].get<std::string>();
|
||||
auto info_name = data["/keyboardTest/info/name"_json_pointer].get<std::string>();
|
||||
auto info_keyboard = data["/keyboardTest3/info/keyboard"_json_pointer].get<std::string>();
|
||||
auto info_author = data["/keyboardTest3/info/author"_json_pointer].get<std::string>();
|
||||
auto info_name = data["/keyboardTest3/info/name"_json_pointer].get<std::string>();
|
||||
// TODO-LDML: store these elsewhere?
|
||||
std::cout << "JSON: reading " << info_name << " test of " << info_keyboard << " by " << info_author << std::endl;
|
||||
|
||||
auto all_tests = data["/keyboardTest/tests"_json_pointer];
|
||||
auto all_tests = data["/keyboardTest3/tests"_json_pointer];
|
||||
assert_or_return((!all_tests.empty()) && (all_tests.size() > 0)); // TODO-LDML: can be empty if repertoire only?
|
||||
|
||||
for(auto tests : all_tests) {
|
||||
|
|
@ -724,7 +724,7 @@ int LdmlJsonTestSourceFactory::load(const km::kbp::path &compiled, const km::kbp
|
|||
}
|
||||
|
||||
#if defined(HAVE_ICU4C)
|
||||
auto rep_tests = data["/keyboardTest/repertoire"_json_pointer];
|
||||
auto rep_tests = data["/keyboardTest3/repertoire"_json_pointer];
|
||||
assert_or_return((!rep_tests.empty()) && (rep_tests.size() > 0)); // TODO-LDML: can be empty if tests only?
|
||||
|
||||
for(auto rep : rep_tests) {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ make-kmcomp-install-zip: copy-schemas
|
|||
|
||||
# TODO: are these required?
|
||||
# kpj.schema.json kvks.schema.json \
|
||||
# ldml-keyboard.schema.json ldml-keyboardtest.schema.json \
|
||||
# ldml-keyboard3.schema.json ldml-keyboardtest3.schema.json \
|
||||
|
||||
copy-schemas:
|
||||
copy $(KEYMAN_ROOT)\common\schemas\keyboard_info\keyboard_info.source.json $(DEVELOPER_ROOT)\bin
|
||||
|
|
|
|||
|
|
@ -421,6 +421,17 @@ export class KmnCompiler implements UnicodeSetParser {
|
|||
return Module.kmcmp_testSentry();
|
||||
}
|
||||
|
||||
/** convert `\u{1234}` to `\u1234` etc */
|
||||
public static fixNewPattern(pattern: string) : string {
|
||||
pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{6})\}/g, `\\U00$1`);
|
||||
pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{5})\}/g, `\\U000$1`);
|
||||
pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{4})\}/g, `\\u$1`);
|
||||
pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{3})\}/g, `\\u0$1`);
|
||||
pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{2})\}/g, `\\u00$1`);
|
||||
pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{1})\}/g, `\\u000$1`);
|
||||
return pattern;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pattern UnicodeSet pattern such as `[a-z]`
|
||||
|
|
@ -435,6 +446,8 @@ export class KmnCompiler implements UnicodeSetParser {
|
|||
|
||||
// TODO-LDML: Catch OOM
|
||||
const buf = this.wasmExports.malloc(rangeCount * 2 * Module.HEAPU32.BYTES_PER_ELEMENT);
|
||||
// fix \u1234 pattern format
|
||||
pattern = KmnCompiler.fixNewPattern(pattern);
|
||||
/** If <= 0: return code. If positive: range count */
|
||||
const rc = Module.kmcmp_parseUnicodeSet(pattern, buf, rangeCount * 2);
|
||||
if (rc >= 0) {
|
||||
|
|
@ -459,6 +472,8 @@ export class KmnCompiler implements UnicodeSetParser {
|
|||
/* c8 ignore next 2 */
|
||||
return null;
|
||||
}
|
||||
// fix \u1234 pattern format
|
||||
pattern = KmnCompiler.fixNewPattern(pattern);
|
||||
// call with rangeCount = 0 to invoke in 'preflight' mode.
|
||||
const rc = Module.kmcmp_parseUnicodeSet(pattern, 0, 0);
|
||||
if (rc >= 0) {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,22 @@ import { CompilerMessages } from '../src/compiler/messages.js';
|
|||
import { compilerErrorFormatCode } from '@keymanapp/common-types';
|
||||
|
||||
describe('Compiler UnicodeSet function', function() {
|
||||
it('should fixup "short" \\u{} escapes', function () {
|
||||
assert.equal(KmnCompiler.fixNewPattern(`\\u{A}`), `\\u000A`); // "
|
||||
assert.equal(KmnCompiler.fixNewPattern(`\\u{22}`), `\\u0022`); // "
|
||||
assert.equal(KmnCompiler.fixNewPattern(`\\u{ead}`), `\\u0ead`); // "
|
||||
});
|
||||
it('should fixup \\u1234 format escapes', function() {
|
||||
assert.equal(KmnCompiler.fixNewPattern(`\\u{1234}`), `\\u1234`);
|
||||
assert.equal(KmnCompiler.fixNewPattern(`\\u1234`), `\\u1234`);
|
||||
assert.equal(KmnCompiler.fixNewPattern(`[\\u{1234}-\\u{5678}]`), `[\\u1234-\\u5678]`);
|
||||
assert.equal(KmnCompiler.fixNewPattern(`something else`), `something else`);
|
||||
});
|
||||
it('should fixup supplemental \\u format escapes', function() {
|
||||
assert.equal(KmnCompiler.fixNewPattern(`\\u{1F640}`), `\\U0001F640`);
|
||||
assert.equal(KmnCompiler.fixNewPattern(`\\u{10FFFD}`),`\\U0010FFFD`);
|
||||
});
|
||||
|
||||
it('should start', async function() {
|
||||
const compiler = new KmnCompiler();
|
||||
const callbacks = new TestCompilerCallbacks();
|
||||
|
|
@ -51,6 +67,33 @@ describe('Compiler UnicodeSet function', function() {
|
|||
assert.deepEqual(callbacks.messages, []);
|
||||
assert.equal(len2, set.length);
|
||||
});
|
||||
it('should compile an even more complex uset', async function() {
|
||||
const compiler = new KmnCompiler();
|
||||
const callbacks = new TestCompilerCallbacks();
|
||||
assert(await compiler.init(callbacks));
|
||||
assert(compiler.verifyInitialized());
|
||||
|
||||
const pat = "[\\u{10FFFD}\\u{2019}\\u{22}\\u{a}\\u{ead}\\u{1F640}]";
|
||||
const set = compiler.parseUnicodeSet(pat, 23);
|
||||
|
||||
assert.equal(set.length, 6);
|
||||
// verify we're all single chars
|
||||
for (let i = 0; i<set.length; i++) {
|
||||
assert.equal(set.ranges[i][0], set.ranges[i][1], `Range ${i} should be a single char`);
|
||||
}
|
||||
// check the single char value
|
||||
assert.equal(set.ranges[0][0], 0x000A);
|
||||
assert.equal(set.ranges[1][0], 0x0022);
|
||||
assert.equal(set.ranges[2][0], 0x0EAD);
|
||||
assert.equal(set.ranges[3][0], 0x2019);
|
||||
assert.equal(set.ranges[4][0], 0x1F640);
|
||||
assert.equal(set.ranges[5][0], 0x10FFFD);
|
||||
assert.deepEqual(callbacks.messages, []);
|
||||
callbacks.clear();
|
||||
const len2 = compiler.sizeUnicodeSet(pat);
|
||||
assert.deepEqual(callbacks.messages, []);
|
||||
assert.equal(len2, set.length);
|
||||
});
|
||||
it('should fail in various ways', async function() {
|
||||
const compiler = new KmnCompiler();
|
||||
const callbacks = new TestCompilerCallbacks();
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ export class DispCompiler extends SectionCompiler {
|
|||
const tos = new Set();
|
||||
const ids = new Set();
|
||||
|
||||
if (this.keyboard.displays?.display) {
|
||||
for (const { to, id } of this.keyboard.displays?.display) {
|
||||
if (this.keyboard3.displays?.display) {
|
||||
for (const { to, id } of this.keyboard3.displays?.display) {
|
||||
if ((to && id) || (!to && !id)) {
|
||||
this.callbacks.reportMessage(CompilerMessages.Error_DisplayNeedsToOrId({ to, id }));
|
||||
return false;
|
||||
|
|
@ -57,12 +57,12 @@ export class DispCompiler extends SectionCompiler {
|
|||
let result = new Disp();
|
||||
|
||||
// displayOptions
|
||||
result.baseCharacter = sections.strs.allocAndUnescapeString(this.keyboard.displays?.displayOptions?.baseCharacter);
|
||||
result.baseCharacter = sections.strs.allocAndUnescapeString(this.keyboard3.displays?.displayOptions?.baseCharacter);
|
||||
|
||||
// TODO-LDML: substitute variables!
|
||||
|
||||
// displays
|
||||
result.disps = this.keyboard.displays?.display.map(display => ({
|
||||
result.disps = this.keyboard3.displays?.display.map(display => ({
|
||||
to: sections.strs.allocAndUnescapeString(sections.vars.substituteMarkerString(display.to)),
|
||||
id: sections.strs.allocString(display.id), // not escaped, not substituted
|
||||
display: sections.strs.allocAndUnescapeString(display.display),
|
||||
|
|
|
|||
|
|
@ -73,13 +73,13 @@ export class LdmlKeyboardKeymanWebCompiler {
|
|||
// `${tab}${this.setupDebug()}${nl}` + ? we may use this for modifierBitmask in future
|
||||
// `${tab}this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;${nl}` + ? we probably don't need this, it's for back-compat
|
||||
`${tab}this.KI="${sName}";${nl}` +
|
||||
`${tab}this.KN=${JSON.stringify(source.keyboard.names.name[0])};${nl}` +
|
||||
`${tab}this.KN=${JSON.stringify(source.keyboard3.names.name[0])};${nl}` +
|
||||
`${tab}this.KMINVER=${JSON.stringify(MINIMUM_KMW_VERSION)};${nl}` +
|
||||
`${tab}this.KV=${this.compileVisualKeyboard(source)};${nl}` +
|
||||
`${tab}this.KDU=${displayUnderlying ? '1' : '0'};${nl}` +
|
||||
`${tab}this.KH="";${nl}` + // TODO-LDML: help text not supported
|
||||
`${tab}this.KM=0;${nl}` + // TODO-LDML: mnemonic layout not supported for LDML keyboards
|
||||
`${tab}this.KBVER=${JSON.stringify(source.keyboard.version?.number || '0.0')};${nl}` +
|
||||
`${tab}this.KBVER=${JSON.stringify(source.keyboard3.version?.number || '0.0')};${nl}` +
|
||||
`${tab}this.KMBM=${modifierBitmask};${nl}`;
|
||||
|
||||
if(isRTL) {
|
||||
|
|
@ -111,4 +111,4 @@ export class LdmlKeyboardKeymanWebCompiler {
|
|||
result += `}${nl}`;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,15 +30,15 @@ export class KeysCompiler extends SectionCompiler {
|
|||
* @returns just the non-touch layers.
|
||||
*/
|
||||
public hardwareLayers() {
|
||||
return this.keyboard.layers?.filter(({ form }) => form !== "touch");
|
||||
return this.keyboard3.layers?.filter(({ form }) => form !== "touch");
|
||||
}
|
||||
|
||||
public validate() {
|
||||
let valid = true;
|
||||
|
||||
// general key-level validation here, only of used keys
|
||||
const usedKeys = allUsedKeyIdsInLayers(this.keyboard?.layers);
|
||||
const uniqueKeys = calculateUniqueKeys([...this.keyboard.keys?.key]);
|
||||
const usedKeys = allUsedKeyIdsInLayers(this.keyboard3?.layers);
|
||||
const uniqueKeys = calculateUniqueKeys([...this.keyboard3.keys?.key]);
|
||||
for (let key of uniqueKeys) {
|
||||
const { id, flicks } = key;
|
||||
if (!usedKeys.has(id)) {
|
||||
|
|
@ -48,7 +48,7 @@ export class KeysCompiler extends SectionCompiler {
|
|||
if (!flicks) {
|
||||
continue; // no flicks
|
||||
}
|
||||
const flickEntry = this.keyboard.keys?.flicks?.find(
|
||||
const flickEntry = this.keyboard3.keys?.flicks?.find(
|
||||
(x) => x.id === flicks
|
||||
);
|
||||
if (!flickEntry) {
|
||||
|
|
@ -80,7 +80,7 @@ export class KeysCompiler extends SectionCompiler {
|
|||
|
||||
public compile(sections: DependencySections): Keys {
|
||||
/* c8 ignore next 4 */
|
||||
if (!this.keyboard?.keys?.key && !this.keyboard?.keys?.flicks) {
|
||||
if (!this.keyboard3?.keys?.key && !this.keyboard3?.keys?.flicks) {
|
||||
// short-circuit if no keys or flicks. Doesn't happen in practice due to implied import.
|
||||
return null;
|
||||
}
|
||||
|
|
@ -114,7 +114,7 @@ export class KeysCompiler extends SectionCompiler {
|
|||
}
|
||||
|
||||
public loadFlicks(sections: DependencySections, sect: Keys) {
|
||||
for (let lkflicks of this.keyboard.keys.flicks) {
|
||||
for (let lkflicks of this.keyboard3.keys.flicks) {
|
||||
let flicks: KeysFlicks = new KeysFlicks(
|
||||
sections.strs.allocString(lkflicks.id)
|
||||
);
|
||||
|
|
@ -142,8 +142,8 @@ export class KeysCompiler extends SectionCompiler {
|
|||
}
|
||||
|
||||
public loadKeys(sections: DependencySections, sect: Keys) {
|
||||
const usedKeys = allUsedKeyIdsInLayers(this.keyboard?.layers);
|
||||
const uniqueKeys = calculateUniqueKeys([...this.keyboard.keys?.key]);
|
||||
const usedKeys = allUsedKeyIdsInLayers(this.keyboard3?.layers);
|
||||
const uniqueKeys = calculateUniqueKeys([...this.keyboard3.keys?.key]);
|
||||
|
||||
for (let key of uniqueKeys) {
|
||||
if (!usedKeys.has(key.id)) {
|
||||
|
|
@ -227,7 +227,7 @@ export class KeysCompiler extends SectionCompiler {
|
|||
valid = false;
|
||||
}
|
||||
|
||||
const uniqueKeys = calculateUniqueKeys([...this.keyboard.keys?.key]);
|
||||
const uniqueKeys = calculateUniqueKeys([...this.keyboard3.keys?.key]);
|
||||
if (layer.row.length > keymap.length) {
|
||||
this.callbacks.reportMessage(
|
||||
CompilerMessages.Error_HardwareLayerHasTooManyRows()
|
||||
|
|
@ -300,7 +300,7 @@ export class KeysCompiler extends SectionCompiler {
|
|||
|
||||
// TODO-LDML: we already validated that the key exists, above.
|
||||
// So here we only need the ID?
|
||||
// let keydef = this.keyboard.keys?.key?.find(x => x.id == key);
|
||||
// let keydef = this.keyboard3.keys?.key?.find(x => x.id == key);
|
||||
|
||||
sect.kmap.push({
|
||||
vkey: keymap[y][x],
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export class LayrCompiler extends SectionCompiler {
|
|||
let totalLayerCount = 0;
|
||||
let hardwareLayers = 0;
|
||||
// let touchLayers = 0;
|
||||
this.keyboard.layers?.forEach((layers) => {
|
||||
this.keyboard3.layers?.forEach((layers) => {
|
||||
const { form } = layers;
|
||||
if (form === 'touch') {
|
||||
// touchLayers++;
|
||||
|
|
@ -62,7 +62,7 @@ export class LayrCompiler extends SectionCompiler {
|
|||
public compile(sections: DependencySections): Layr {
|
||||
const sect = new Layr();
|
||||
|
||||
sect.lists = this.keyboard.layers.map((layers) => {
|
||||
sect.lists = this.keyboard3.layers.map((layers) => {
|
||||
const hardware = constants.layr_list_hardware_map.get(layers.form);
|
||||
// Already validated in validate
|
||||
const list: LayrList = {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export class LocaCompiler extends SectionCompiler {
|
|||
|
||||
public validate(): boolean {
|
||||
let valid = true;
|
||||
const locales = this.getLocales(this.keyboard);
|
||||
const locales = this.getLocales(this.keyboard3);
|
||||
for(let tag of locales) {
|
||||
try {
|
||||
new Intl.Locale(tag);
|
||||
|
|
@ -46,7 +46,7 @@ export class LocaCompiler extends SectionCompiler {
|
|||
|
||||
// This also minimizes locales according to Remove Likely Subtags algorithm:
|
||||
// https://www.unicode.org/reports/tr35/#Likely_Subtags
|
||||
const sourceLocales = this.getLocales(this.keyboard);
|
||||
const sourceLocales = this.getLocales(this.keyboard3);
|
||||
const locales = sourceLocales.map((sourceLocale: string) => {
|
||||
const locale = new Intl.Locale(sourceLocale).minimize().toString();
|
||||
if(locale != sourceLocale) {
|
||||
|
|
|
|||
|
|
@ -90,9 +90,6 @@ export class CompilerMessages {
|
|||
|
||||
static Error_InvalidHardware = (o:{form: string}) => m(this.ERROR_InvalidHardware,
|
||||
`layers has invalid value form=${o.form}`);
|
||||
/**
|
||||
* Note: may not hit this due to XML validation.
|
||||
*/
|
||||
static ERROR_InvalidHardware = SevError | 0x0013;
|
||||
|
||||
static Error_InvalidModifier = (o:{layer: string, modifier: string}) => m(this.ERROR_InvalidModifier,
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ export class MetaCompiler extends SectionCompiler {
|
|||
public validate(): boolean {
|
||||
let valid = true;
|
||||
|
||||
valid &&= this.validateNormalization(this.keyboard.info?.normalization);
|
||||
valid &&= this.validateVersion(this.keyboard.version?.number);
|
||||
valid &&= this.validateNormalization(this.keyboard3.info?.normalization);
|
||||
valid &&= this.validateVersion(this.keyboard3.version?.number);
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
|
@ -53,16 +53,16 @@ export class MetaCompiler extends SectionCompiler {
|
|||
|
||||
public compile(sections: DependencySections): Meta {
|
||||
let result = new Meta();
|
||||
result.author = sections.strs.allocString(this.keyboard.info?.author);
|
||||
result.conform = sections.strs.allocString(this.keyboard.conformsTo);
|
||||
result.layout = sections.strs.allocString(this.keyboard.info?.layout);
|
||||
result.normalization = sections.strs.allocString(this.keyboard.info?.normalization);
|
||||
result.indicator = sections.strs.allocString(this.keyboard.info?.indicator);
|
||||
result.version = sections.strs.allocString(this.keyboard.version?.number ?? "0.0.0");
|
||||
result.author = sections.strs.allocString(this.keyboard3.info?.author);
|
||||
result.conform = sections.strs.allocString(this.keyboard3.conformsTo);
|
||||
result.layout = sections.strs.allocString(this.keyboard3.info?.layout);
|
||||
result.normalization = sections.strs.allocString(this.keyboard3.info?.normalization);
|
||||
result.indicator = sections.strs.allocString(this.keyboard3.info?.indicator);
|
||||
result.version = sections.strs.allocString(this.keyboard3.version?.number ?? "0.0.0");
|
||||
result.settings =
|
||||
(this.keyboard.settings?.fallback == "omit" ? KeyboardSettings.fallback : 0) |
|
||||
(this.keyboard.settings?.transformFailure == "omit" ? KeyboardSettings.transformFailure : 0) |
|
||||
(this.keyboard.settings?.transformPartial == "hide" ? KeyboardSettings.transformPartial : 0);
|
||||
(this.keyboard3.settings?.fallback == "omit" ? KeyboardSettings.fallback : 0) |
|
||||
(this.keyboard3.settings?.transformFailure == "omit" ? KeyboardSettings.transformFailure : 0) |
|
||||
(this.keyboard3.settings?.transformPartial == "hide" ? KeyboardSettings.transformPartial : 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ export class NameCompiler extends SectionCompiler {
|
|||
|
||||
public validate(): boolean {
|
||||
let valid = true;
|
||||
valid = (this.keyboard.names?.name?.length ?? 0) > 0;
|
||||
valid = (this.keyboard3.names?.name?.length ?? 0) > 0;
|
||||
return valid;
|
||||
}
|
||||
|
||||
public compile(sections: DependencySections): Name {
|
||||
let result = new Name();
|
||||
result.names = this.keyboard.names?.name?.map(v => sections.strs.allocString(v.value)) ?? [];
|
||||
result.names = this.keyboard3.names?.name?.map(v => sections.strs.allocString(v.value)) ?? [];
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ import { SectionIdent, constants } from '@keymanapp/ldml-keyboard-constants';
|
|||
|
||||
/* istanbul ignore next */
|
||||
export class SectionCompiler {
|
||||
protected readonly keyboard: LDMLKeyboard.LKKeyboard;
|
||||
protected readonly keyboard3: LDMLKeyboard.LKKeyboard;
|
||||
protected readonly callbacks: CompilerCallbacks;
|
||||
|
||||
constructor(source: LDMLKeyboard.LDMLKeyboardXMLSourceFile, callbacks: CompilerCallbacks) {
|
||||
this.keyboard = source.keyboard;
|
||||
this.keyboard3 = source.keyboard3;
|
||||
this.callbacks = callbacks;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export class TouchLayoutCompiler {
|
|||
layer: []
|
||||
};
|
||||
|
||||
for(let layers of source.keyboard.layers) {
|
||||
for(let layers of source.keyboard3.layers) {
|
||||
for(let layer of layers.layer) {
|
||||
const resultLayer = this.compileHardwareLayer(source, result, layer);
|
||||
result.desktop.layer.push(resultLayer);
|
||||
|
|
@ -41,7 +41,7 @@ export class TouchLayoutCompiler {
|
|||
|
||||
const keys = row.keys.split(' ');
|
||||
for(let key of keys) {
|
||||
const keydef = source.keyboard.keys?.key?.find(x => x.id == key);
|
||||
const keydef = source.keyboard3.keys?.key?.find(x => x.id == key);
|
||||
if(keydef) {
|
||||
const fileKey: TouchLayout.TouchLayoutKey = {
|
||||
id: this.translateKeyIdentifierToTouch(keydef.id) as TouchLayout.TouchLayoutKeyId,
|
||||
|
|
@ -106,4 +106,4 @@ export class TouchLayoutCompiler {
|
|||
// Not a standard key
|
||||
return 'T_'+id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export class TransformCompiler<T extends TransformCompilerType, TranBase extends
|
|||
const reportMessage = this.callbacks.reportMessage.bind(this.callbacks);
|
||||
|
||||
let valid = true;
|
||||
const transforms = this?.keyboard?.transforms;
|
||||
const transforms = this?.keyboard3?.transforms;
|
||||
if (transforms) {
|
||||
const types : string[] = transforms.map(({type}) => type);
|
||||
if (!verifyValidAndUnique(types,
|
||||
|
|
@ -167,7 +167,7 @@ export class TransformCompiler<T extends TransformCompilerType, TranBase extends
|
|||
}
|
||||
|
||||
public compile(sections: DependencySections): TranBase {
|
||||
for(let t of this.keyboard.transforms) {
|
||||
for(let t of this.keyboard3.transforms) {
|
||||
if(t.type == this.type) {
|
||||
// compile only the transforms of the correct type
|
||||
return this.compileTransforms(sections, t);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export class VarsCompiler extends SectionCompiler {
|
|||
|
||||
private validateVars(): boolean {
|
||||
let valid = true;
|
||||
const variables = this.keyboard?.variables;
|
||||
const variables = this.keyboard3?.variables;
|
||||
|
||||
if (!variables) {
|
||||
return true; // nothing to check
|
||||
|
|
@ -152,10 +152,10 @@ export class VarsCompiler extends SectionCompiler {
|
|||
let valid = true;
|
||||
|
||||
// call our friends to validate
|
||||
valid = this.validateVarsMarkers(this.keyboard, mt) && valid; // accumulate validity
|
||||
valid = KeysCompiler.validateMarkers(this.keyboard, mt) && valid; // accumulate validity
|
||||
valid = TransformCompiler.validateMarkers(this.keyboard, mt) && valid; // accumulate validity
|
||||
valid = DispCompiler.validateMarkers(this.keyboard, mt) && valid; // accumulate validity
|
||||
valid = this.validateVarsMarkers(this.keyboard3, mt) && valid; // accumulate validity
|
||||
valid = KeysCompiler.validateMarkers(this.keyboard3, mt) && valid; // accumulate validity
|
||||
valid = TransformCompiler.validateMarkers(this.keyboard3, mt) && valid; // accumulate validity
|
||||
valid = DispCompiler.validateMarkers(this.keyboard3, mt) && valid; // accumulate validity
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@ export class VarsCompiler extends SectionCompiler {
|
|||
public compile(sections: DependencySections): Vars {
|
||||
const result = new Vars();
|
||||
|
||||
const variables = this.keyboard?.variables;
|
||||
const variables = this.keyboard3?.variables;
|
||||
// we always have vars, it's depended on by other sections
|
||||
// we already know the variables do not conflict with each other
|
||||
// need to add these one by one, because they depend on each other.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export class LdmlKeyboardVisualKeyboardCompiler {
|
|||
result.header.ansiFont = {...VisualKeyboard.DEFAULT_KVK_FONT};
|
||||
result.header.unicodeFont = {...VisualKeyboard.DEFAULT_KVK_FONT};
|
||||
|
||||
for(let layers of source.keyboard.layers) {
|
||||
for(let layers of source.keyboard3.layers) {
|
||||
for(let layer of layers.layer) {
|
||||
this.compileHardwareLayer(source, result, layer);
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ export class LdmlKeyboardVisualKeyboardCompiler {
|
|||
for(let key of keys) {
|
||||
x++;
|
||||
|
||||
let keydef = source.keyboard.keys?.key?.find(x => x.id == key);
|
||||
let keydef = source.keyboard3.keys?.key?.find(x => x.id == key);
|
||||
|
||||
if (!keydef) {
|
||||
throw Error(`Internal Error: could not find key id="${key}" in layer "${layer.id || '<none>'}", row "${y}"`);
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ export class VkeyCompiler extends SectionCompiler {
|
|||
|
||||
public validate(): boolean {
|
||||
let valid = true;
|
||||
if(this.keyboard.vkeys) {
|
||||
if(this.keyboard3.vkeys) {
|
||||
let from: string[] = [], to: string[] = [];
|
||||
|
||||
this.keyboard.vkeys.vkey.forEach(vk => {
|
||||
this.keyboard3.vkeys.vkey.forEach(vk => {
|
||||
if(LdmlVkeyNames[vk.from] === undefined) {
|
||||
// TODO-LDML: When we do #7135 this may need to change back to an error.
|
||||
this.callbacks.reportMessage(CompilerMessages.Hint_VkeyIsNotValid({vkey: vk.from}));
|
||||
|
|
@ -51,12 +51,12 @@ export class VkeyCompiler extends SectionCompiler {
|
|||
|
||||
public compile(): Vkey {
|
||||
let result = new Vkey();
|
||||
if(!this.keyboard.vkeys) {
|
||||
if(!this.keyboard3.vkeys) {
|
||||
/* c8 ignore next 2 */
|
||||
return result; // not hit due to boxing
|
||||
}
|
||||
|
||||
result.vkeys = this.keyboard.vkeys?.vkey.map(vk => {
|
||||
result.vkeys = this.keyboard3.vkeys?.vkey.map(vk => {
|
||||
return {
|
||||
vkey: LdmlVkeyNames[vk.from],
|
||||
target: LdmlVkeyNames[vk.to]
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
@@keys: [K_Q][K_W][K_Q]
|
||||
@@expected: \u0127\u1790\u17B6\u0127
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<version number="1.0.0" />
|
||||
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
|
@ -65,4 +65,4 @@
|
|||
<transform from="^e" />
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="bksp-minimal" />
|
||||
</names>
|
||||
|
|
@ -13,4 +13,4 @@
|
|||
<transform from="្ម" to="" />
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-escaped" />
|
||||
</names>
|
||||
|
|
@ -11,4 +11,4 @@
|
|||
<display to="\u{65}" display="(e)"/>
|
||||
<displayOptions baseCharacter="\u{78}" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-invalid" />
|
||||
</names>
|
||||
|
|
@ -10,4 +10,4 @@
|
|||
<display to="e" id="e" display="(e)"/> <!-- both to and id -->
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-invalid" />
|
||||
</names>
|
||||
|
|
@ -12,4 +12,4 @@
|
|||
<display id="e" display="(e)"/> <!-- duplicate -->
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-invalid" />
|
||||
</names>
|
||||
|
|
@ -12,4 +12,4 @@
|
|||
<display to="e" display="(e)"/> <!-- duplicate -->
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-invalid" />
|
||||
</names>
|
||||
|
|
@ -10,4 +10,4 @@
|
|||
<display display="(f)"/> <!-- Neither to nor id -->
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-maximal" />
|
||||
</names>
|
||||
|
|
@ -12,4 +12,4 @@
|
|||
<display to="e" display="(e)"/>
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-minimal" />
|
||||
</names>
|
||||
|
||||
<displays />
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-maximal" />
|
||||
</names>
|
||||
|
|
@ -9,4 +9,4 @@
|
|||
<displays>
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-typical" />
|
||||
</names>
|
||||
|
|
@ -9,4 +9,4 @@
|
|||
<displays>
|
||||
<display to="\u{0300}" display="`" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="finl-minimal" />
|
||||
</names>
|
||||
|
|
@ -13,4 +13,4 @@
|
|||
<transform from="xx" to="x" />
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-escaped" /> <!-- see maximal.xml -->
|
||||
</names>
|
||||
|
|
@ -34,4 +34,4 @@
|
|||
<row keys="q w" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-escaped2" />
|
||||
</names>
|
||||
|
|
@ -16,4 +16,4 @@
|
|||
</layer>
|
||||
</layers>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-gap-switch" />
|
||||
</names>
|
||||
|
|
@ -23,4 +23,4 @@
|
|||
<row keys="q w" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-minimal" />
|
||||
</names>
|
||||
|
|
@ -23,4 +23,4 @@
|
|||
<row keys="QQQ WWW" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-minimal" />
|
||||
</names>
|
||||
|
|
@ -19,4 +19,4 @@
|
|||
<row keys="space" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-minimal" />
|
||||
</names>
|
||||
|
|
@ -19,4 +19,4 @@
|
|||
<row keys="space" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-minimal" />
|
||||
</names>
|
||||
|
|
@ -14,4 +14,4 @@
|
|||
</layer>
|
||||
</layers>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-minimal" />
|
||||
</names>
|
||||
|
|
@ -30,4 +30,4 @@
|
|||
<row keys="grave one two three four five six seven eight nine ten eleven minus equal" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-minimal" />
|
||||
</names>
|
||||
|
|
@ -22,4 +22,4 @@
|
|||
<row keys="Q W" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-missing-attrs" />
|
||||
</names>
|
||||
|
|
@ -16,4 +16,4 @@
|
|||
<row keys="Q" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-missing-flick" />
|
||||
</names>
|
||||
|
|
@ -20,4 +20,4 @@
|
|||
<row keys="Q W" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-minimal" />
|
||||
</names>
|
||||
|
|
@ -15,4 +15,4 @@
|
|||
<row keys="foo" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-markers" />
|
||||
</names>
|
||||
|
|
@ -24,6 +24,6 @@
|
|||
<transform from="\m{w}" to="W" /> <!-- to quell marker err -->
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
||||
<!-- you can have any output you want, as long as it's an W ! -->
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue