Skip to content

Commit

Permalink
chore(developer): Merge branch 'master' into test/developer/kmcmplib-…
Browse files Browse the repository at this point in the history
…compiler-unit-tests-3
  • Loading branch information
markcsinclair committed Sep 16, 2024
2 parents 5497e9c + b79277b commit b50a16b
Show file tree
Hide file tree
Showing 15 changed files with 357 additions and 148 deletions.
20 changes: 20 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Keyman Version History

## 18.0.112 alpha 2024-09-14

* chore(deps): bump express from 4.19.2 to 4.20.0 (#12396)

## 18.0.111 alpha 2024-09-13

* chore(common): Update crowdin strings for Italian (#12408)
* fix(common): correct offsets in KMX+ spec (#12350)
* fix(android): Add gating to setLongpressDelay() (#12410)

## 18.0.110 alpha 2024-09-12

* chore(common): Update to Unicode 16.0 (#12393)
* refactor(web): move `common/web/es-bundling``web/src/tools/es-bundling` (#12389)
* refactor(web): move `common/web/eslint``common/tools/eslint` (#12390)
* refactor(web): move sentry-manager → `web/src/engine/sentry-manager` (#12397)
* refactor(web): merge `device-detect` with `web/src/engine/main` (#12399)
* chore(web): allow to run unit tests in vscode test explorer (#12400)
* fix(developer): index() requires comma between parameters in kmcmplib compiler (#12328)

## 18.0.109 alpha 2024-09-11

* chore(common): Update history with 17.0.329 stable (#12394)
Expand Down
2 changes: 1 addition & 1 deletion VERSION.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.0.110
18.0.113
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ public class AdjustLongpressDelayActivity extends BaseActivity {
// Keeps track of the adjusted longpress delay time for saving.
// Internally use milliseconds, but GUI displays seconds
private static int currentDelayTimeMS = KMManager.KMDefault_LongpressDelay; // ms
private static int minLongpressTime = 300; // ms
private static int maxLongpressTime = 1500; // ms
private static int delayTimeIncrement = 200; // ms

/**
Expand Down Expand Up @@ -112,7 +110,7 @@ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
findViewById(R.id.delayTimeDownButton).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (currentDelayTimeMS > minLongpressTime) {
if (currentDelayTimeMS > KMManager.KMMinimum_LongpressDelay) {
currentDelayTimeMS -= delayTimeIncrement;
seekBar.setProgress(delayTimeToProgress());
}
Expand All @@ -122,7 +120,7 @@ public void onClick(View v) {
findViewById(R.id.delayTimeUpButton).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (currentDelayTimeMS < maxLongpressTime) {
if (currentDelayTimeMS < KMManager.KMMaximum_LongpressDelay) {
currentDelayTimeMS += delayTimeIncrement;
seekBar.setProgress(delayTimeToProgress());
}
Expand Down
20 changes: 17 additions & 3 deletions android/KMAPro/kMAPro/src/main/res/values-it-rIT/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?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">Condividi</string>
<!-- Context: Menu Action -->
Expand Down Expand Up @@ -32,6 +33,8 @@
<string name="ic_text_size_up" comment="Make text bigger">Dimensione testo in alto</string>
<!-- Context: Text Size dialog -->
<string name="ic_text_size_down" comment="Make text smaller">Dimensione del testo giù</string>
<!-- Context: Text Size dialog -->
<string name="ic_text_size_slider" comment="Adjust text size">Cursore dimensione testo</string>
<!-- Context: Clear Text dialog -->
<string name="all_text_will_be_cleared" comment="Erase all the text">\nTutto il testo sarà cancellato\n</string>
<!-- Context: Get Started menu -->
Expand All @@ -50,6 +53,7 @@
<string name="request_storage_permission" comment="Request storage permission to access keyboard packages"> Per installare pacchetti di tastiera, consentire a Keyman di leggere la memoria esterna.</string>
<!-- Context: Android Storage Permission -->
<string name="storage_permission_denied" comment="Keyboard package installation may fail since Android storage permission not granted"> La richiesta di autorizzazione all\'archiviazione è stata negata. Potrebbe non essere stato possibile installare il pacchetto tastiera</string>
<string name="storage_permission_denied2" comment="Keyboard package installation failed. Recommend install from local file"> Richiesta di autorizzazione archiviazione non riuscita. Prova Impostazioni Keyman - Installa da file locale</string>
<!-- Context: Keyman Settings menu -->
<string name="keyman_settings" comment="Settings menu title">Impostazioni</string>
<!-- Context: Keyman Settings menu -->
Expand All @@ -64,6 +68,8 @@
<!-- Context: Keyman Settings menu -->
<string name="adjust_keyboard_height" comment="Menu action to adjust keyboard height">Regola altezza tastiera</string>
<!-- Context: Keyman Settings menu -->
<string name="adjust_longpress_delay" comment="Menu action to adjust longpress delay duration">Adjust longpress delay</string>
<!-- Context: Keyman Settings menu -->
<string name="spacebar_caption" comment="Menu action to set the spacebar caption">Didascalia barra spaziatrice</string>
<!-- Context: Keyman Settings menu / Spacebar caption -->
<string name="spacebar_caption_keyboard" comment="Spacebar caption option - keyboard">Keyboard</string>
Expand All @@ -82,7 +88,7 @@
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
<string name="spacebar_caption_hint_blank" comment="Spacebar caption hint - blank">Non mostrare la didascalia sulla barra spaziatrice</string>
<!-- Context: Keyman Settings menu / Haptic feedback -->
<string name="haptic_feedback" comment="haptic feedback on key press">Vibrate when typing</string>
<string name="haptic_feedback" comment="haptic feedback on key press">Vibra durante la digitazione</string>
<!-- Context: Keyman Settings menu -->
<string name="show_banner" comment="text suggestions banner">Mostra sempre il banner</string>
<!-- Context: Keyman Settings menu -->
Expand Down Expand Up @@ -119,6 +125,14 @@
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Ruota il dispositivo per regolare verticale e orizzontale</string>
<!-- Context: Adjust Keyboard Height menu -->
<string name="reset_to_defaults" comment="Button to reset to default heights">Ripristina impostazioni predefinite</string>
<!-- Context: Adjust Longpress Delay Time menu -->
<string name="longpress_delay_time" comment="Current longpress delay time (seconds)">Delay Time: %1$.1f seconds</string>
<!-- Context: Adjust Longpress Delay Time menu -->
<string name="ic_delay_time_up" comment="Make longpress delay longer">Delay time longer</string>
<!-- Context: Adjust Longpress Delay Time menu -->
<string name="ic_delay_time_down" comment="Make longpress delay shorter">Delay time shorter</string>
<!-- Context: Adjust Longpress Delay Time menu -->
<string name="ic_longpress_delay_slider" comment="Adjust longpress delay time">Longpress delay time slider</string>
<!-- Context: Keyman Web Browser -->
<string name="hint_text" comment="Prompt to type in the browser search bar">Cerca o digita URL</string>
<!-- Context: Keyman Web Browser -->
Expand Down Expand Up @@ -154,7 +168,7 @@
<!-- Context: KMP Package strings -->
<string name="invalid_metadata" comment="kmp.json metadata file is invalid or missing in package">Metadati non validi/mancanti nel pacchetto</string>
<!-- Context: KMP Package strings -->
<string name="minimum_keyboard_version_not_supported" comment="Notification when keyboard has functionality not supported by current Keyman"> Keyboard requires a newer version of Keyman</string>
<string name="minimum_keyboard_version_not_supported" comment="Notification when keyboard has functionality not supported by current Keyman"> La tastiera richiede una nuova versione di Keyman</string>
<!-- Context: anywhere -->
<string name="unable_to_open_browser" comment="Notification when a browser activity cannot be launched">Unable to launch web browser</string>
<string name="unable_to_open_browser" comment="Notification when a browser activity cannot be launched">Impossibile avviare il browser web</string>
</resources>
15 changes: 13 additions & 2 deletions android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,11 @@ public enum EnterModeType {
public static final String KMDefault_DictionaryVersion = "0.1.4";
public static final String KMDefault_DictionaryKMP = KMDefault_DictionaryPackageID + FileUtils.MODELPACKAGE;

// Default KeymanWeb longpress delay in milliseconds
// Default KeymanWeb longpress delay constants in milliseconds
public static final int KMDefault_LongpressDelay = 500;
public static final int KMMinimum_LongpressDelay = 300;
public static final int KMMaximum_LongpressDelay = 1500;


// Keyman files
protected static final String KMFilename_KeyboardHtml = "keyboard.html";
Expand Down Expand Up @@ -2097,14 +2100,22 @@ public static int getLongpressDelay() {

/**
* Set the longpress delay (in milliseconds) as a stored preference.
* Valid range is 300 ms to 1500 ms. Returns true if the preference is successfully stored.
* @param longpressDelay - int longpress delay in milliseconds
* @return boolean
*/
public static void setLongpressDelay(int longpressDelay) {
public static boolean setLongpressDelay(int longpressDelay) {
if (longpressDelay < KMMinimum_LongpressDelay || longpressDelay > KMMaximum_LongpressDelay) {
return false;
}

SharedPreferences prefs = appContext.getSharedPreferences(
appContext.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE);
SharedPreferences.Editor editor = prefs.edit();
editor.putInt(KMKey_LongpressDelay, longpressDelay);
editor.commit();

return true;
}

/**
Expand Down
20 changes: 10 additions & 10 deletions android/KMEA/app/src/main/res/values-it-rIT/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<!-- Context: Button label -->
<string name="label_update" comment="Dialog button to update a resource">Aggiorna</string>
<!-- Context: No internet for updates -->
<string name="no_internet_connection" comment="Internet connection missing">No internet connection</string>
<string name="no_internet_connection" comment="Internet connection missing">Nessuna connessione internet</string>
<!-- Context: Keyboard Updates -->
<string name="cannot_connect" comment="Error message when network connection fails">Impossibile connettersi al server Keyman!</string>
<!-- Context: Keyboard Updates -->
Expand Down Expand Up @@ -84,7 +84,7 @@
<string name="fatal_keyboard_error_short" comment="Error in keyboard (keyboard ID::packageID for language)."> Errore nella tastiera %1$s:%2$s per %3$s lingua.</string>
<!-- Context: Query for associated dictionary -->
<string name="query_associated_model" comment="Check if there's an available dictionary to download">Controllo del dizionario associato da scaricare</string>
<string name="cannot_query_associated_model" comment="Cannot reach server to check if there's an available dictionary to download"> Cannot connect to Keyman server to check for associated dictionary to download</string>
<string name="cannot_query_associated_model" comment="Cannot reach server to check if there's an available dictionary to download"> Non è possibile connettersi al server Keyman per verificare dizionari associati da scaricare</string>
<!-- Context: Model Updates -->
<string name="confirm_download_model" comment="Confirmation to download a dictionary update">Vuoi scaricare l\'ultima versione di questo dizionario?</string>
<!-- Context: No associated dictionary found -->
Expand All @@ -107,7 +107,7 @@
<string name="dictionary_download_start_in_background" comment="Notification that a dictionary download has started">Scaricamento del dizionario avviato in background</string>
<!-- Context: Background download messages-->
<string name="dictionary_download_is_running_in_background" comment="Notification that a dictionary download is still running">Il dizionario selezionato è già in download; riprova tra un momento!</string>
<!-- Context: Background download messages-->
<!-- Context: Background download messages. Removed in Keyman 17-->
<string name="dictionary_download_finished" comment="Notification that a dictionary download has finished">Il download del dizionario è terminato.</string>
<!-- Context: Background download messages -->
<string name="download_failed" comment="Notification that a download failed">Download non riuscito</string>
Expand All @@ -119,7 +119,7 @@
<string name="update_check_current" comment="Notification that all resources are up to date">"Tutte le risorse sono aggiornate!"</string>
<!-- Context: General Updates -->
<string name="update_failed" comment="Notification that a resource update failed">Una o più risorse non sono state aggiornate!</string>
<!-- Context: General Updates -->
<!-- Context: General Updates. Removed in Keyman 17 -->
<string name="update_success" comment="Notification that a resource update successfully updated">Risorse aggiornate con successo!</string>
<!-- Context: Model Info -->
<string name="model_version" comment="Title for a dictionary version">Versione dizionario</string>
Expand All @@ -128,24 +128,24 @@
<!-- Context: Model Info -->
<string name="confirm_delete_model" comment="Confirmation to delete a dictionary">Vuoi eliminare questo dizionario?</string>
<!-- Context: Model Deleted -->
<string name="model_deleted" comment="Notification when a dictionary is deleted">Dictionary deleted</string>
<string name="model_deleted" comment="Notification when a dictionary is deleted">Dizionario eliminato</string>
<!-- Context: Language Settings Keyboard install strings -->
<string name="keyboard_install_toast" comment="Notification when a keyboard is installed">%1$s tastiera installata</string>
<!-- Context: Language Settings Keyboard uninstall strings -->
<string name="keyboard_deleted_toast" comment="Notification when a keyboard is deleted">Keyboard deleted</string>
<string name="keyboard_deleted_toast" comment="Notification when a keyboard is deleted">Tastiera eliminata</string>
<!-- Context: Language Settings menu strings -->
<string name="enable_corrections" comment="Enable corrections from the suggestion banner">Abilita correzioni</string>
<!-- Context: Language Settings menu strings -->
<string name="enable_predictions" comment="Enable predictions from the suggestion banner">Abilita previsioni</string>
<!-- Context: Language Settings menu strings -->
<string name="model_label">Dizionario</string>
<plurals name="model_count">
<item quantity="one">Dictionary</item>
<item quantity="other">Dictionaries</item>
<item quantity="one">Dizionario</item>
<item quantity="other">Dizionari</item>
</plurals>
<!-- Context: Language Settings menu substring - Check for available dictionary -->
<string name="check_available_model" comment="Check for available dictionary">Controlla il dizionario disponibile</string>
<string name="check_model_online" comment="Check for dictionaries online">Check for dictionaries online</string>
<string name="check_model_online" comment="Check for dictionaries online">Controlla i dizionari online</string>
<!-- Context: Language Settings menu strings -->
<string name="model_info_header" comment="Dictionary name">Dizionario: %1$s</string>
<!-- Context: Language Settings menu strings -->
Expand All @@ -168,5 +168,5 @@
<!-- Context: Other strings -->
<string name="help_bubble_text">Tocca qui per cambiare la tastiera</string>
<!-- Context: anywhere -->
<string name="unable_to_open_browser" comment="Notification when a browser activity cannot be launched">Unable to launch web browser</string>
<string name="unable_to_open_browser" comment="Notification when a browser activity cannot be launched">Impossibile avviare il browser web</string>
</resources>
2 changes: 1 addition & 1 deletion developer/src/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@keymanapp/developer-utils": "*",
"@sentry/node": "^7.57.0",
"chalk": "^4.1.2",
"express": "^4.19.2",
"express": "^4.20.0",
"multer": "^1.4.5-lts.1",
"ngrok": "^5.0.0-beta.2",
"open": "^8.4.0",
Expand Down
18 changes: 9 additions & 9 deletions docs/file-formats/kmx-plus-file-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ Then for each string:

|| Bits | Name | Description |
|---|------|---------------|-----------------------------------------------|
|16+| 32 | offset | off: Offset to string |
|20+| 32 | length | int: Length of string in UTF-16LE code units |
|12+| 32 | offset | off: Offset to string |
|16+| 32 | length | int: Length of string in UTF-16LE code units |

After the string offset table comes the actual UTF-16LE data. There is a null
(\u0000) after each string, which is _not_ included in the string length.
Expand Down Expand Up @@ -362,9 +362,9 @@ For each element:

|| Bits | Name | Description |
|---|------|---------|------------------------------------------|
|32+| 32 | to | str: to string |
|36+| 32 | id | str: id string |
|40+| 32 | display | str: output display string |
|16+| 32 | to | str: to string |
|20+| 32 | id | str: id string |
|24+| 32 | display | str: output display string |

Either `to` or `id` must be set, not both.
Entries with an `to` field are sorted in a binary codepoint sort on the `to` field,
Expand Down Expand Up @@ -423,8 +423,8 @@ For each flicks in the flick list:
|| Bits | Name | Description |
|---|------|---------------- |----------------------------------------------------------|
| 0+| 32 | count | int: number of flick elements in this flick |
|12+| 32 | flick | int: index into `flick` subtable for first flick element |
|16+| 32 | id | str: flick id |
| 4+| 32 | flick | int: index into `flick` subtable for first flick element |
| 8+| 32 | id | str: flick id |

- `id`: The original string id from XML. This may be 0 to save space (i.e. omit
the string id).
Expand All @@ -440,8 +440,8 @@ For each flick element:

|| Bits | Name | Description |
|---|------|---------------- |----------------------------------------------------------|
| 0+| 32 | directions | list: index into `list` section with direction list |
| 8+| 32 | keyId | str: id of key |
| 0+| 32 | directions | list: index into `list` section with direction sequence |
| 4+| 32 | keyId | str: id of key |

If this section is present, it must have a 'flick element' at position zero with
directions=0, flags=0, and to=0 meaning 'no flick'.
Expand Down
2 changes: 1 addition & 1 deletion ios/engine/KMEI/KeymanEngine/it.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"kmp-error-missing-resource" = "Questo pacchetto non contiene la tastiera o il dizionario richiesto.";

/* Error installing a Keyman package with a version of Keyman that does not support it */
"kmp-error-unsupported-keyman-version" = "This package requires a newer version of Keyman.";
"kmp-error-unsupported-keyman-version" = "Questo pacchetto richiede una nuova versione di Keyman.";

/* Error opening a Keyman package - cannot parse contents */
"kmp-error-no-metadata" = "Questo pacchetto non è stato costruito correttamente - contenuti sconosciuti.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"JOK-JV-n8w.title" = "Indietro";

/* Keyboards button text */
"MPN-9N-wWc.label" = "Keyboards";
"MPN-9N-wWc.label" = "Tastiere";

/* text to explain verbose Console logging option */
"MrI-GM-7d6.title" = "Quando l'opzione di registrazione dettagliata è attiva, Keyman registrerà le azioni che potrebbero aiutare Keyman Supporto diagnosticare un problema. Il programma Console può essere utilizzato per vedere un registro dei messaggi da Keyman. In Console, filtrare per mostrare tutti i messaggi dal processo \"Keyman\". Questo registro può essere esportato e inviato al supporto di Keyman, se necessario.";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Package Information window title */
"F0z-JX-Cv5.title" = "Package Information";
"F0z-JX-Cv5.title" = "Informazioni pacchetto";

/* button text to show Details */
"Fvy-XJ-s38.label" = "Dettagli";
Expand Down
Loading

0 comments on commit b50a16b

Please sign in to comment.