diff --git a/.github/multi-labeler.yml b/.github/multi-labeler.yml index e5feef3dd9..1278db2a28 100644 --- a/.github/multi-labeler.yml +++ b/.github/multi-labeler.yml @@ -64,4 +64,4 @@ labels: - label: 'cherry-pick' matcher: - title: '🍒' + title: '(🍒|:cherries:)' diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 38e27cad8c..1c8704da25 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -12,7 +12,7 @@ jobs: repo-token: "${{ secrets.GITHUB_TOKEN }}" - name: Update labels based on PR title id: labeler - uses: fuxingloh/multi-labeler@8afa186ed03230c98fe24ebf9fe35093072ad46e + uses: fuxingloh/multi-labeler@8afa186ed03230c98fe24ebf9fe35093072ad46e # v1.4.0 with: github-token: ${{secrets.GITHUB_TOKEN}} config-path: .github/multi-labeler.yml diff --git a/HISTORY.md b/HISTORY.md index 31ad3f474b..e65afc5d9d 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,84 @@ # Keyman Version History +## 15.0.124 alpha 2021-10-04 + +* fix(web): support variable stores with predictive text (#5749) +* fix(windows): handle edge cases using default language (#5709) +* fix(linux): Don't crash with non-keyboard package file (#5755) +* fix(linux): Don't crash displaying keyboard details (#5758) + +## 15.0.123 alpha 2021-10-01 + +* fix(common): Fix cherry-pick labeling (#5782) +* chore(ios,android,windows): Update crowdin strings for Amharic (#5722) + +## 15.0.122 alpha 2021-09-30 + +* fix(developer): move ampersand to shift+7 on touch (#5746) +* feat(windows): Keyman Core integration (#5443) +* chore(windows): Keyman Core UI and Settings (#5769) +* fix(linux): Fix debian package script (#5771) +* docs(mac): Add note about installing with homebrew (#5767) + +## 15.0.121 alpha 2021-09-29 + +* fix(developer): remove empty touch rows on save (#5720) +* chore(common): Check in crowdin strings for Shuwa Latin (#5734) +* chore(windows): fix broken links in help (#5765) + +## 15.0.120 alpha 2021-09-28 + +* fix: help.keyman.com script file cleanup (#5751) +* chore(common): Enhance cherry-pick labeling (#5759) + +## 15.0.119 alpha 2021-09-24 + +* chore(common): support forked repos when triggering test builds (#5738) + +## 15.0.118 alpha 2021-09-23 + +* chore(deps): bump ansi-regex from 5.0.0 to 5.0.1 in /resources/build/version (#5741) +* refactor(web): active element management in relation to OSK display control ️ (#5644) +* refactor(web): osk activation and visibility modeling ️ (#5661) +* chore(android/app): Remove runConfigruations.xml file (#5743) +* feat(web): new OSK type - the inlined OSK (#5665) +* chore(web): inline osk test page (#5728) +* feat(web): enables mouse interactivity for the predictive banner (#5739) +* fix(mac): add support for M1 processor (#5701) + +## 15.0.117 alpha 2021-09-22 + +* fix(developer): run kmlmc from Keyman source path (#5727) + +## 15.0.116 alpha 2021-09-21 + +* fix(common/core): insure list pntr is incremented (#5669) +* chore(common): Check in crowdin strings for Simplified Chinese (#5681) +* fix(web): Null check for calculating globe key position (#5724) + +## 15.0.115 alpha 2021-09-20 + +* chore(common/core): cleanup version headers (#5719) +* refactor(web): OSK modularization - specialized OSKView classes ️ (#5633) +* feat(developer): track changes to option values better in debugger (#5696) +* fix(developer): support chiral modifiers in debugger (#5697) + +## 15.0.114 alpha 2021-09-17 + +* feat(developer): Debugger platform option (#5640) +* feat(developer): Debugger keyboard options (#5647) +* fix(developer): add version info to Core (#5711) +* fix(common/core/web): layer reset on physical keystroke after OSK interaction (#5641) +* fix(ios): prevents installation of packages without JS (#5698) + +## 15.0.113 alpha 2021-09-16 + +* fix(ios): version-tagging for errors logged from the system keyboard (#5693) +* fix(web): spacebar caption when functional layer differs from display layer (#5688) +* refactor(web): OSK modularization - view components, layout cleanup ️ (#5619) +* refactor(web): OSK modularization - common-path code -> OSKView ️ (#5620) +* fix(common/core/web): Remove empty rows in OSK (#5699) + ## 15.0.112 alpha 2021-09-14 * chore(common): Update to Unicode 14.0 (#5686) diff --git a/VERSION.md b/VERSION.md index b4406a9b20..38e11a826f 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -15.0.113 \ No newline at end of file +15.0.125 \ No newline at end of file diff --git a/android/KMAPro/.idea/runConfigurations.xml b/android/KMAPro/.idea/runConfigurations.xml deleted file mode 100644 index e497da9998..0000000000 --- a/android/KMAPro/.idea/runConfigurations.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/AndroidManifest.xml b/android/KMAPro/kMAPro/src/main/AndroidManifest.xml index d06bfc8422..35c4e9338b 100644 --- a/android/KMAPro/kMAPro/src/main/AndroidManifest.xml +++ b/android/KMAPro/kMAPro/src/main/AndroidManifest.xml @@ -1,10 +1,11 @@ - + + - diff --git a/android/KMAPro/kMAPro/src/main/res/values-am-rET/strings.xml b/android/KMAPro/kMAPro/src/main/res/values-am-rET/strings.xml index 817d731403..0ba117dd7c 100644 --- a/android/KMAPro/kMAPro/src/main/res/values-am-rET/strings.xml +++ b/android/KMAPro/kMAPro/src/main/res/values-am-rET/strings.xml @@ -18,6 +18,10 @@ ማሻሻያዎችን ይጫኑ ስሪት %1$s + + ኪይማን የክሮም ስሪትን 57 ወይም አዲስ ይፈልጋል። + + ክሮምን ማዘመን እዚህ ጋር መጻፍ ይጀምሩ … @@ -37,11 +41,11 @@ ኪይማኑን ለሲስተም ኪቦርድ እንዲሆን ያድርጉ - ኪማኑን መደበና የፊደል ገበታ ይሰይሙ + ኪማኑን መደበኛ የፊደል ገበታ ይሰይሙ ተጨማሪ መረጃ - በሚነሳበት ሰአት ይታይ\"%1$s\" + በሚነሳበት ሰአት ይታይ \"%1$s\" የፊደል ገበታውን ሰሌዳ ጥቅሎችን ለመጫን ለኪይማኑ ውጫዊ ማከማቻ ለማንበብ ፈቃድ ይስጡት። @@ -50,13 +54,33 @@ አደረጃጀት - የተጫኑ ቋንዎች (%1$d) + የተጫኑ ቋንቋዎች (%1$d) የተጫኑ ቋንዎች (%1$d) የተጫነ የፊደል ገበታ ወይም መዝገበ ቃላት - የኪማኑን የገጽታ ቋንቋ ይቀይሩ + የገጽታ ቋንቋ + + የቋንቋ ገበታውን ቁመት ማስተካከል + + የስፔስባሩ መግለጫ ጽሁፍ + + የፊደል ገበታ + + ቋንቋ + + ቋንቋና የፊደል ገበታ + + ባዶ + + የፊደል ገበታ ሰሌዳውን በስፔስ ባሩ ላይ አሳይ + + የቋንቋውን ስም በስፔስ ባሩ ላይ አሳይ + + ቋንቋና የፊደል ገበታውን በስፔስ ባሩ ላይ + + የስፔስባሩ መግለጫ ጽሁፍ አታሳይ ሁልጊዜ ባነሩን አሳይ @@ -87,6 +111,12 @@ %1$s የተጨመረ ቋንቋ %2$s ሁሉም ቋንቋዎች ቀደም ሲል ተጭኗል + + የፊደል ገበታ ሰሌዳውን በመጎተት ቁመቱን አስተካክል + + ዲቫይሱን በማሽከርከር ፖርትሬቱንና ላንድስኬፑን አስተካክል + + ወደ ቀደመው ሴቲንግ መልስ ፈልግ ወይም URL ጻፍ diff --git a/android/KMAPro/kMAPro/src/main/res/values-b+shu+latn/strings.xml b/android/KMAPro/kMAPro/src/main/res/values-b+shu+latn/strings.xml new file mode 100644 index 0000000000..2122154ee8 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/res/values-b+shu+latn/strings.xml @@ -0,0 +1,156 @@ + + + + Gassuma + + Web Browser + + Kubural katub + + Ziyada + + Sulal katub + + Khabar + + Miwasa + + Dys shu\'ul aljudad + + Nafar: %1$s + + Keyman bidor nafar hana Chrome 57 walla jadida. + + Saww Chrome eibga jadid + + Abda katub jai… + + + + Kubural katub: %1$d + + Zydal kubural katub + + Angusal kubural katub + + \nAlkatub chatta binchanna\n + + Badiyan + + Dys keyboard ley luggatak + + Dys Keyman eibga system-wide keyboard + + Dys Keyman eibga keyboard altannaf beya + + Ziyada hana khabar + + Waar \"%1$s\" fi bidaya + + Ley dassasan nafar hanal keyboard, ath izin ley Keyman eidis shu\'ul ley bikan tahuth shu\'ul. + + Dakharo izin ley bikan hatathan shu\'ul. Bikun ma nadus nafaral keyboard + + Miwasa + + + Luggat altasso (%1$d) + Luggat altasso (%1$d) + Luggat altasso (%1$d) + Luggat altasso (%1$d) + + + Dyssal Keyboard walla kakkad hana kalimat + + Lugga albiwari + + Abdul tulal keyboard + + Shu\'ul baynatum + + Keyboard + + Lugga + + Lugga + Keyboard + + Mafi shai + + War usumal keyboard faougal bikanal spacebar + + War usumal lugga faougal spacebar + + Lugga bey keyboard faougal spacebar + + Ya eiwari shaykula faougal spacebar + + Matakula waral banner + + Ley eiwasu + + Kan maktul, bil waar eilla waqat dasso kutub abu zan + + Assad ley lazzazan mashakil fyl internet + + Kan mufakka bas biluzzal mashakil ley siyada + + Kan maktul ma biluzzal mashakil + + Dyssa min keyman.com + + Dyssa min local file + + Dyssa min bikan gadey + + Zyd luggat ley keyboard aldassayta + + (min keyboard package) + + Azzul keyboard Package + + Azzul lugga ley %1$s + + Zydal lugga %1$s ley %2$s + + Luggat chatta dakhalo + + Ajubdal keyboard ley badalan tula + + Barrumal shu\'ul ley badalan shaba binshaf + + Eingalab ley shaba gabul + + Fattish walla aktubal URL + + Bookmarks + + Mafi bookmarks + + Dys bookmark + + Title + + Url + + Package %1$s aba ma bidukhul + + Dassasan keyboard package\n%1$s… + + Aba ma bisulla + + Dyssal keyboard + + Dyssal kakkad hana kalimat + + %1$s mi Kayman Package file nadif.\n%2$s\" + + Keyboard package ma leya keyboard hana lammasan ley dassasana + + Mafi kalima han zan jadid ley dassasana + + Mafi kalima han zan jadid walla keyboards ley dassasana + + Keyboard package ma leya lugga almulamma beya ley dassasana + + Mafi/mi nadif metadata fyl package + diff --git a/android/KMAPro/kMAPro/src/main/res/values-zh-rCN/strings.xml b/android/KMAPro/kMAPro/src/main/res/values-zh-rCN/strings.xml new file mode 100644 index 0000000000..124f173d64 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/res/values-zh-rCN/strings.xml @@ -0,0 +1,153 @@ + + + + 分享 + + 网页浏览器 + + 文本大小 + + 更多 + + 清除文本 + + 信息 + + 设置 + + 安装更新 + + 版本: %1$s + + Keyman requires Chrome version 57 or newer. + + Update Chrome + + 开始在这里输入… + + + + 文本大小: %1$d + + 文字大小放大 + + 文本大小小化 + + \n所有文本将被清除\n + + 开始使用 + + 为您的语言加添键盘 + + 启用Keyman作为全系统键盘 + + 设置Keyman键盘为默认键盘 + + 更多信息 + + 启动时显示 \"%1$s\" + + 要安装键盘包,请给予Keyman读取外部存储的权限。 + + 存储权限请求被拒绝。可能无法安装键盘包 + + 设置 + + + 已安装的语言 (%1$d) + + + 安装键盘或词典 + + Display language + + Adjust keyboard height + + Spacebar caption + + Keyboard + + Language + + Language + Keyboard + + Blank + + Show keyboard name on spacebar + + Show language name on spacebar + + Language and keyboard on spacebar + + Do not show caption on spacebar + + 总是显示标签 + + 尚未实现 + + 关闭时,仅在启用预测文本时显示 + + 允许通过网络发送崩溃报告 + + 开启时,崩溃报告将被发送 + + 关闭时,崩溃报告将不会被发送 + + 从 keyman.com 安装 + + 从本地文件安装 + + 从其他设备安装 + + 添加语言到已安装的键盘 + + (从键盘包) + + 选择键盘包 + + 选择 %1$s 的语言 + + 添加语言 %1$s 到 %2$s + + 所有语言已被安装 + + Drag the keyboard to resize the height + + Rotate the device to adjust portrait and landscape + + Reset to Defaults + + 搜索或键入网址 + + 书签 + + 无书签 + + 添加书签 + + 标题 + + 链接 + + 软件包 %1$s 安装失败 + + 正在下载键盘组件\n%1$s… + + 提取失败 + + 安装键盘 + + 安装字典 + + %1$s 不是一个有效的 Keyman 软件包文件。\n%2$s\" + + 键盘包没有需要安装的触摸优化键盘 + + 没有新的预测文本可以安装 + + 没有需要安装的键盘或预测文本 + + 键盘包里没有需要安装的相关语言 + + 软件包中的元数据无效/丢失 + diff --git a/android/KMEA/app/src/main/AndroidManifest.xml b/android/KMEA/app/src/main/AndroidManifest.xml index 2dcde01ccd..9a3d1233a6 100644 --- a/android/KMEA/app/src/main/AndroidManifest.xml +++ b/android/KMEA/app/src/main/AndroidManifest.xml @@ -1,10 +1,12 @@ - + - - - + + + diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/DisplayLanguages.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/DisplayLanguages.java index e5fc703f52..246621ecb0 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/DisplayLanguages.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/DisplayLanguages.java @@ -48,7 +48,9 @@ public class DisplayLanguages { new DisplayLanguageType("de-DE", "German"), new DisplayLanguageType("km-KH", "Khmer"), new DisplayLanguageType("ann", "Obolo"), - new DisplayLanguageType("ff-ZA", "Pulaar-Fulfulde") // or Fulah + new DisplayLanguageType("ff-ZA", "Pulaar-Fulfulde"), // or Fulah + new DisplayLanguageType("shu-latn", "Shuwa (Latin)"), + new DisplayLanguageType("zh-CN", "中文(简体) (Simplified Chinese)") }; return languages; } diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboard.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboard.java index daeb68de0f..d83639a882 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboard.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboard.java @@ -23,9 +23,11 @@ import com.tavultesoft.kmea.util.FileUtils; import com.tavultesoft.kmea.util.KMLog; import com.tavultesoft.kmea.util.KMString; +import android.Manifest; import android.annotation.SuppressLint; import android.content.Context; import android.content.SharedPreferences; +import android.content.pm.PackageManager; import android.content.res.Configuration; import android.graphics.Color; import android.graphics.Rect; @@ -125,7 +127,10 @@ final class KMKeyboard extends WebView { // Normally, this would be true to prevent the WebView from accessing the network. // But this needs to false for sending embedded KMW crash reports to Sentry (keymanapp/keyman#3825) - getSettings().setBlockNetworkLoads(!KMManager.getMaySendCrashReport()); + if (KMManager.hasInternetPermission(context)) { + // Throws SecurityException if INTERNET permission not granted + getSettings().setBlockNetworkLoads(!KMManager.getMaySendCrashReport()); + } getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE); getSettings().setSupportZoom(false); diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMManager.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMManager.java index e8298cd37d..240dc66764 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMManager.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMManager.java @@ -16,12 +16,14 @@ import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; +import android.Manifest; import android.annotation.SuppressLint; import android.app.Dialog; import android.app.KeyguardManager; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; +import android.content.pm.PackageManager; import android.content.res.AssetManager; import android.content.res.Configuration; import android.graphics.Bitmap; @@ -53,6 +55,8 @@ import android.webkit.WebViewClient; import android.widget.FrameLayout; import android.widget.RelativeLayout; +import androidx.core.content.ContextCompat; + import io.sentry.Breadcrumb; import io.sentry.Sentry; import io.sentry.SentryLevel; @@ -720,27 +724,42 @@ public final class KMManager { } } + /** + * Query the AndroidManifest file to see if a permission is granted. + * @param permission - The manifest permission to query + * @return boolean - true if the manifest permission is granted + */ + protected static boolean hasPermission(Context context, String permission) { + // API to check permission depends on Android SDK level + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + return (context.checkSelfPermission(permission) == PackageManager.PERMISSION_GRANTED); + } + + return ContextCompat.checkSelfPermission(context, permission) == PackageManager.PERMISSION_GRANTED; + } + + /** + * Check if KMManager has an active network connection. + * Requires Manifest.permission.ACCESS_NETWORK_STATE to be granted + * @param context - The context + * @return boolean - true if manifest permission ACCESS_NETWORK_STATE is granted and the device + * has an active network connection + */ + @SuppressLint("MissingPermission") public static boolean hasConnection(Context context) { - ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); - - NetworkInfo wifiNetwork = cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI); - if (wifiNetwork != null && wifiNetwork.isConnected()) { - return true; - } - - NetworkInfo mobileNetwork = cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); - if (mobileNetwork != null && mobileNetwork.isConnected()) { - return true; - } - - NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); - if (activeNetwork != null && activeNetwork.isConnected()) { - return true; + if (hasPermission(context, Manifest.permission.ACCESS_NETWORK_STATE)) { + ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); + NetworkInfo networkInfo = cm.getActiveNetworkInfo(); + return networkInfo != null && networkInfo.isConnectedOrConnecting(); } return false; } + public static boolean hasInternetPermission(Context context) { + return hasPermission(context, Manifest.permission.INTERNET); + } + private static void copyAssets(Context context) { AssetManager assetManager = context.getAssets(); try { diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/CloudRepository.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/CloudRepository.java index 18429946e2..5bafb4a2df 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/CloudRepository.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/CloudRepository.java @@ -367,6 +367,9 @@ public class CloudRepository { if(cacheValid && shouldUseMemCache(context)) { return; // isn't null - checked by `shouldUseCache`. + } else if (!KMManager.hasInternetPermission(context) || !KMManager.hasConnection(context)) { + // noop if no internet permission or network connection + return; } // check if cache file is valid diff --git a/android/KMEA/app/src/main/res/values-am-rET/strings.xml b/android/KMEA/app/src/main/res/values-am-rET/strings.xml index 417d02d5b5..49620d7315 100644 --- a/android/KMEA/app/src/main/res/values-am-rET/strings.xml +++ b/android/KMEA/app/src/main/res/values-am-rET/strings.xml @@ -24,6 +24,10 @@ ኪይማኑን ዝጋ + ወደፊት + + የሚቀጥለውን የመቀበያ ዘዴ + ወርዷል ጫን @@ -69,6 +73,8 @@ የእገዛ ፋይልን ለማየት ፋይል ፕሮቫይደሩ ቤተ መጽሐፍት ያስፈልገዋል %1$s የገበታ ሰሌዳ ፋታል ችግር ዝርዝር %1$s:%2$s ለ %3$s ቋንቋ፤ መደበኛ ቋንቋ ጭኗል። + + የፊደል ገበታ ሰሌዳው ችግር %1$s:%2$s ለ %3$s ቋንቋ። ተያያዥነት ያለውን መዝገበ ቃላት ለመጫን እየፈተሸ ነው። diff --git a/android/KMEA/app/src/main/res/values-b+shu+latn/strings.xml b/android/KMEA/app/src/main/res/values-b+shu+latn/strings.xml new file mode 100644 index 0000000000..c6083ef440 --- /dev/null +++ b/android/KMEA/app/src/main/res/values-b+shu+latn/strings.xml @@ -0,0 +1,157 @@ + + + + + + + Keyboard + Keyboards + Keyboards + Keyboards + + + Zyd Keyboard jadid + + Luggat al dakhalo + + %1$s Miwasa + + Zyd + + Wara + + Halla + + Sidda + + Siddal Keyman + + Giddam + + Darb hana dassasan hana giddam + + Dyssa + + Dyssa + + Addarey + + Giddam + + Zayn + + Jadidiye + + Ma gudur wassal server hana Keyman! + + Tador ta chunnal keyboard da wah? + + Tador tadissal nafar hanal keyboard da aljadid wah? + + Tador tadis shu\'ul aljudad layl keyboards wa kakkad hanal kalimat dugut wah? + + Bikan shu\'ulal judad + + Shu\'ul aljudad fyl bikan fi + + %1$s (Shu\'ul aljudad fi) + + Shu\'ul aljudad layl keyboard fi %1$s: %2$s + + Shu\'ul judad layl kakkad hanal kalimat fi %1$s: %2$s + + Nafaral Keyboard + + Bikan hana mi\'awana + + Sulal keyboard + + [jadid]%1$s + + Waral bikan da ley shu\'ul gadey finshan dassasanal \nkeyboard + + Marhaba ley %1$s + + FilProvider library bindawar ley fakkakanal shu\'ul da: %1$s + + Mushkila kabirey bey %1$s:%2$s layl %3$s lugga. Dassasan shabal keyboard hanal gabul. + + Mushkila fyl keyboard %1$s:%2$s layl %3$s lugga. + + Shafiyan kakkad abu kalimat shaba da ley dassasana + + Tador tadis kakkad abu kalimat aljudad wah? + + Mafi kakkad abu kalimat ley dassasana + + Bikanal shu\'ul mafi + + Bikanal dassasan aljudad anbada milabbad + + Alshu\'ul bada dassasana; albarak hawul addarey shiyakay! + + Shafiyan bikanal shu\'ul + + Bada dassasanal keyboard milabbad + + Al keyboard al\'alzalta bada bidukhul; albarak hawula addarey! + + Al keyboard mafi dakhal! + + Kakkad hanal kalimat bada bidukhul milabad + + Kakkad hanal kalimat bada bidukhul; albarak hawula addarey! + + Kakkad hanal kalimat mafi dakhal. + + Aba ma bidukhul + + Aba ma eiwari aldakhal + + Aba ma eilagil bikan albishila! + + "Alshu'ul kurut judad!" + + Wahid walla ziyada hanal shu\'ul aba ma eilbadal layl jadid! + + Bikanal bayan wugi jadid kurut! + + Nafar hana kakkad hanal kalimat + + Sulal kakkad hanal kalimat + + Tador tachunnal kakkad hanal kalimat da wah? + + %1$s al keyboard dakhal + + Abdal miwasa + + Dyssal zan + + Kakkad hana kalimat + + Shyf kakkad hana kalimat alfi + + Kakkad hana kalimat: %1$s + + %1$s kakkad hana kalimat + + + Kakkad hana kalimat dakhal + + + (%1$d keyboard) + (%1$d keyboard) + (%1$d keyboard) + (%1$d keyboards) + + + Hana Gabul + + + + Chinna + + + Assural bikan da ley badalanal keyboard + diff --git a/android/KMEA/app/src/main/res/values-zh-rCN/strings.xml b/android/KMEA/app/src/main/res/values-zh-rCN/strings.xml new file mode 100644 index 0000000000..9dda5734e5 --- /dev/null +++ b/android/KMEA/app/src/main/res/values-zh-rCN/strings.xml @@ -0,0 +1,151 @@ + + + + + + + 键盘 + + + 添加新键盘 + + 已安装的语言 + + %1$s 设置 + + 添加 + + 返回 + + 取消 + + 关闭 + + 关闭 Keyman + + Forward + + Next Input Method + + 下载 + + 安装 + + 稍后再说 + + 下一个 + + 确定 + + 更新 + + 无法连接到 Keyman 服务器! + + 您想要删除此键盘吗? + + 您想要下载此键盘的最新版本吗? + + 您想现在更新键盘和字典吗? + + 资源更新 + + 可用的资源更新 + + %1$s (更新可用) + + %1$s 键盘可用的更新: %2$s + + %1$s 字典可用的更新: %2$s + + 键盘版本 + + 帮助链接 + + 卸载键盘 + + [new] %1$s + + 扫描此代码以在另一台设备上加载此\n键盘 + + 欢迎使用 %1$s + + 需要文件提供者文库来查看帮助文件: %1$s + + %1$s键盘错误:%2$s为%3$s 语言。正在加载默认键盘。 + + Error in keyboard %1$s:%2$s for %3$s language. + + 正在检查相关字典以下载 + + 您想要下载这个字典的最新版本吗? + + 没有可下载的字典 + + 资源目录不可用 + + 目录更新已在后台开始 + + 编目仍在下载,请稍后再试! + + 正在检查资源 + + 键盘下载已在后台开始 + + 选中的键盘已在下载;请稍后再试! + + 键盘下载已完成! + + 字典下载已在后台开始 + + 选中的字典已在下载;请稍后再试! + + 字典下载已完成。 + + 下载失败 + + 无法检索已下载的文件 + + 访问服务器失败! + + "所有资源已是最新版本!" + + 一个或多个资源更新失败! + + 资源更新成功! + + 字典版本 + + 卸载字典 + + 您想要删除这个字典吗? + + %1$s 键盘已安装 + + 启用校正 + + 启用预测 + + 字典 + + 检查可用字典 + + 字典: %1$s + + %1$s 字典 + + + 字典已安装 + + + (%1$d 键盘) + + + 默认区域设置 + + + + 删除 + + + 点击此处更改键盘 + diff --git a/common/core/desktop/build.bat b/common/core/desktop/build.bat index fdcc18a7e6..856db992da 100644 --- a/common/core/desktop/build.bat +++ b/common/core/desktop/build.bat @@ -70,14 +70,7 @@ cd %KEYMAN_ROOT%\common\core\desktop set BUILDTYPE=%2 -if "%3" == "--static" ( - set STATIC_LIBRARY=--default-library static - shift -) else ( - set STATIC_LIBRARY= -) - -echo "Is static build = !STATIC_LIBRARY! (%3)" +set STATIC_LIBRARY=--default-library both if "%3" == "build" ( echo === Calling meson build for Windows !ARCH! !BUILDTYPE! === diff --git a/common/core/desktop/include/keyman/keyboardprocessor.h.in b/common/core/desktop/include/keyman/keyboardprocessor.h similarity index 99% rename from common/core/desktop/include/keyman/keyboardprocessor.h.in rename to common/core/desktop/include/keyman/keyboardprocessor.h index 33b2eef253..43e364aeb3 100644 --- a/common/core/desktop/include/keyman/keyboardprocessor.h.in +++ b/common/core/desktop/include/keyman/keyboardprocessor.h @@ -102,10 +102,7 @@ nothing in that event. #include #include #include - -#define KM_KBP_LIB_CURRENT @lib_curr@ -#define KM_KBP_LIB_AGE @lib_age@ -#define KM_KBP_LIB_REVISION @lib_rev@ +#include #if defined(__cplusplus) extern "C" diff --git a/common/core/desktop/include/keyman/keyboardprocessor_debug.h b/common/core/desktop/include/keyman/keyboardprocessor_debug.h index a800afaef1..380b8ee301 100644 --- a/common/core/desktop/include/keyman/keyboardprocessor_debug.h +++ b/common/core/desktop/include/keyman/keyboardprocessor_debug.h @@ -58,6 +58,16 @@ typedef struct { char16_t character; } km_kbp_state_debug_key_info; +/** + * Option event data. + * + * Used only in event type KM_KBP_DEBUG_SET_OPTION. + */ +typedef struct { + void *store; // LPSTORE + km_kbp_cp value[DEBUG_MAX_CONTEXT]; // value to be saved into the store +} km_kbp_state_debug_kmx_option_info; + /** * KMX processor data for each event. kmx_base.h defines the types that are * passed in here, read only. Warning: context may contain sentinel values @@ -79,6 +89,7 @@ typedef struct { /// the debugger; the debugger uses this to determine when to /// execute the actions when single-stepping. uint16_t first_action; + km_kbp_state_debug_kmx_option_info option; } km_kbp_state_debug_kmx_info; /** @@ -106,6 +117,7 @@ enum km_kbp_debug_type { KM_KBP_DEBUG_NOMATCH_ENTER = 8, KM_KBP_DEBUG_NOMATCH_EXIT = 9, KM_KBP_DEBUG_END = 10, + KM_KBP_DEBUG_SET_OPTION = 11, }; // Flags for KM_KBP_DEBUG_GROUP_EXIT diff --git a/common/core/desktop/include/keyman/keyboardprocessor_version.h.in b/common/core/desktop/include/keyman/keyboardprocessor_version.h.in new file mode 100644 index 0000000000..d434ae4e48 --- /dev/null +++ b/common/core/desktop/include/keyman/keyboardprocessor_version.h.in @@ -0,0 +1,15 @@ +#define km_kbp_version_stringify(x) km_kbp_version_to_string(x) +#define km_kbp_version_to_string(x) #x + +// Product versioning + +#define KM_KBP_VERSION_MAJOR @majorver@ +#define KM_KBP_VERSION_MINOR @minorver@ +#define KM_KBP_VERSION_PATCH @patchver@ +#define KM_KBP_VERSION_STRING km_kbp_version_stringify(@majorver@ ## . ## @minorver@ ## . ## @patchver@ ## .0) + +// API versioning + +#define KM_KBP_LIB_CURRENT @lib_curr@ +#define KM_KBP_LIB_AGE @lib_age@ +#define KM_KBP_LIB_REVISION @lib_rev@ diff --git a/common/core/desktop/include/keyman/meson.build b/common/core/desktop/include/keyman/meson.build index 2b6c5957fd..75d3b75fc2 100644 --- a/common/core/desktop/include/keyman/meson.build +++ b/common/core/desktop/include/keyman/meson.build @@ -7,19 +7,26 @@ # ver = lib_version.split('.') +project_ver = meson.project_version().split('.') cfg = configuration_data() cfg.set('lib_curr', ver[0]) cfg.set('lib_age', ver[1]) cfg.set('lib_rev', ver[2]) +cfg.set('majorver', project_ver[0]) +cfg.set('minorver', project_ver[1]) +cfg.set('patchver', project_ver[2]) configure_file( configuration: cfg, - input: 'keyboardprocessor.h.in', - output: 'keyboardprocessor.h', + input: 'keyboardprocessor_version.h.in', + output: 'keyboardprocessor_version.h', ) -install_headers(join_paths(meson.current_build_dir(), 'keyboardprocessor.h'), - 'keyboardprocessor_vkeys.h', +install_headers('keyboardprocessor.h', 'keyboardprocessor_bits.h', + 'keyboardprocessor_consts.h', + 'keyboardprocessor_debug.h', + 'keyboardprocessor_vkeys.h', + join_paths(meson.current_build_dir(), 'keyboardprocessor_version.h'), subdir: 'keyman') diff --git a/common/core/desktop/meson.build b/common/core/desktop/meson.build index aec0bb12f2..dea4c55703 100644 --- a/common/core/desktop/meson.build +++ b/common/core/desktop/meson.build @@ -9,7 +9,8 @@ project('keyboardprocessor', 'cpp', 'c', version: run_command(find_program('getversion.bat', 'getversion.sh')).stdout().strip(), license: 'MIT', default_options : ['buildtype=release', - 'cpp_std=c++14']) + 'cpp_std=c++14', + 'b_vscrt=static_from_buildtype']) message('meson.project_version(): ' + meson.project_version() + '\n') compiler = meson.get_compiler('cpp') diff --git a/common/core/desktop/src/km_kbp_options_api.cpp b/common/core/desktop/src/km_kbp_options_api.cpp index 1a82877c1c..f95159a8ab 100644 --- a/common/core/desktop/src/km_kbp_options_api.cpp +++ b/common/core/desktop/src/km_kbp_options_api.cpp @@ -25,7 +25,9 @@ km_kbp_options_list_size(km_kbp_option_item const *opts) if (!opts) return 0; auto n = 0; - while (opts->key) ++n; + for (; opts->key; ++opts) { + ++n; + } return n; } diff --git a/common/core/desktop/src/kmx/kmx_debugger.cpp b/common/core/desktop/src/kmx/kmx_debugger.cpp index 73716078e2..9e4518de76 100644 --- a/common/core/desktop/src/kmx/kmx_debugger.cpp +++ b/common/core/desktop/src/kmx/kmx_debugger.cpp @@ -37,6 +37,26 @@ void KMX_DebugItems::push_item( _items->emplace_back(item); } +void KMX_DebugItems::push_set_option( + uint16_t first_action, + LPSTORE option_store, + KMX_WCHAR const * value +) { + _items->assert_push_entry(); + km_kbp_state_debug_item item = {KM_KBP_DEBUG_SET_OPTION, 0}; + item.kmx_info.first_action = first_action; + item.kmx_info.rule = nullptr; + item.kmx_info.group = nullptr; + item.kmx_info.context[0] = 0; + item.key_info.character = 0; + item.key_info.modifier_state = 0; + item.key_info.vk = 0; + item.kmx_info.store_offsets[0] = 0xFFFF; + item.kmx_info.option.store = option_store; + u16ncpy(item.kmx_info.option.value, value, DEBUG_MAX_CONTEXT - 1); + _items->emplace_back(item); +} + void KMX_DebugItems::fill_store_offsets(km_kbp_state_debug_kmx_info *info, PKMX_WORD index_stack) { int i, n; diff --git a/common/core/desktop/src/kmx/kmx_debugger.h b/common/core/desktop/src/kmx/kmx_debugger.h index 8738781176..20006e291c 100644 --- a/common/core/desktop/src/kmx/kmx_debugger.h +++ b/common/core/desktop/src/kmx/kmx_debugger.h @@ -58,6 +58,11 @@ public: PKMX_WCHAR context, PKMX_WORD index_stack ); + void push_set_option( + uint16_t first_action, + LPSTORE option_store, + KMX_WCHAR const * value + ); }; inline diff --git a/common/core/desktop/src/kmx/kmx_file.cpp b/common/core/desktop/src/kmx/kmx_file.cpp index 1a6bdf64f3..dfcac5f890 100644 --- a/common/core/desktop/src/kmx/kmx_file.cpp +++ b/common/core/desktop/src/kmx/kmx_file.cpp @@ -59,7 +59,7 @@ const unsigned long CRCTable[256] = { * and returns the updated value. */ -unsigned long CalculateBufferCRC(unsigned long count, KMX_BYTE *p) +static unsigned long CalculateBufferCRC(unsigned long count, KMX_BYTE *p) { unsigned long temp1; unsigned long temp2; diff --git a/common/core/desktop/src/kmx/kmx_options.cpp b/common/core/desktop/src/kmx/kmx_options.cpp index a4417cb755..446b244091 100644 --- a/common/core/desktop/src/kmx/kmx_options.cpp +++ b/common/core/desktop/src/kmx/kmx_options.cpp @@ -142,15 +142,21 @@ void KMX_Options::Set(int nStoreToSet, std::u16string const & rValueToSet) assert(nStoreToSet >= 0); assert(nStoreToSet < (int) _kp->Keyboard->cxStoreArray); + LPSTORE optionStore = &_kp->Keyboard->dpStoreArray[nStoreToSet]; + auto & rStoreToSetValue = _kp->KeyboardOptions[nStoreToSet].Value; if(rStoreToSetValue) { delete rStoreToSetValue; } + if(m_debug_items) { + m_debug_items->push_set_option(m_actions.Length(), optionStore, rValueToSet.c_str()); + } + rStoreToSetValue = new std::u16string::value_type[rValueToSet.size()+1]; u16cpy(rStoreToSetValue, /*u16len(sp->dpString)+1,*/ rValueToSet.c_str()); - _kp->Keyboard->dpStoreArray[nStoreToSet].dpString = rStoreToSetValue; + optionStore->dpString = rStoreToSetValue; } diff --git a/common/core/desktop/src/kmx/kmx_options.h b/common/core/desktop/src/kmx/kmx_options.h index 21a2873d3c..b32a84e851 100644 --- a/common/core/desktop/src/kmx/kmx_options.h +++ b/common/core/desktop/src/kmx/kmx_options.h @@ -8,6 +8,7 @@ #include "option.hpp" #include "kmx_base.h" +#include "kmx_debugger.h" namespace km { namespace kbp { @@ -21,13 +22,17 @@ class KMX_Options { private: LPINTKEYBOARDINFO _kp; + KMX_DebugItems *m_debug_items; + KMX_Actions& m_actions; void AddOptionsStoresFromXString(PKMX_WCHAR s); int _GetIndex(std::u16string const &key) const; public: - KMX_Options(LPINTKEYBOARDINFO kp) : _kp(kp) {} + KMX_Options(LPINTKEYBOARDINFO kp, KMX_Actions& actions) : _kp(kp), m_actions(actions) { + m_debug_items = nullptr; + } ~KMX_Options(); void Init(std::vector