Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(core): merge master into epic/web-core 🎼 #12796

Merged
merged 51 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
2b7ceff
chore(developer): add baseline tests for bcp47 codes to kmc-package
mcdurdin Oct 7, 2024
bf7f4c2
chore(common/web): add initial removeExtension test cases
markcsinclair Nov 27, 2024
66d0587
chore(common/web): Merge branch 'master' into test/common/web/types/9…
markcsinclair Nov 28, 2024
ba44fe6
chore(common/web): Merge branch 'test/common/web/types/9052-unit-test…
markcsinclair Nov 28, 2024
3682766
chore(common/web): add copyright banner
markcsinclair Nov 28, 2024
324c57f
chore(common/web): test Source file extension removal
markcsinclair Nov 28, 2024
1782f8d
chore(common/web): add four test cases for sourceOrBinaryTypeFromFile…
markcsinclair Nov 28, 2024
d08b693
chore(common/web): add four test cases for sourceTypeFromFilename()
markcsinclair Nov 28, 2024
5a56d0f
chore(common/web): add four test cases for binaryTypeFromFilename()
markcsinclair Nov 28, 2024
589698b
chore(common/web): add three test cases for filenameIs()
markcsinclair Nov 28, 2024
920b702
chore(common/web): add five test cases for replaceExtension(), two co…
markcsinclair Nov 28, 2024
9fd2d4a
chore(common/web): add five test cases for fromFilename()
markcsinclair Nov 28, 2024
ed3e93f
chore(common/web): Merge branch 'master' into test/common/web/types/9…
markcsinclair Nov 29, 2024
b923e13
chore(common/web): add blank line at end of file
markcsinclair Nov 29, 2024
01a47c3
feat(developer): support local imports
srl295 Nov 29, 2024
e99f6ac
feat(developer): support local imports in kmc
srl295 Nov 29, 2024
01fed4b
feat(developer): test local imports in kmc-ldml
srl295 Nov 29, 2024
b1b6587
feat(core): test local imports in kmc
srl295 Nov 29, 2024
75d172a
Merge branch 'feat/developer/7394-verify-normalization-epic-ldml' int…
srl295 Dec 2, 2024
48da8fd
Apply suggestions from code review
srl295 Dec 2, 2024
f4f0355
feat(developer): local imports directory fixes
srl295 Dec 2, 2024
15a171f
chore(common/web): Merge branch 'master' into test/common/web/types/9…
markcsinclair Dec 3, 2024
3dd5207
chore(mac): update SIL logo in About window to include Andika glyph
sgschantz Dec 4, 2024
4c3b213
chore(core): remove `km_core_keyboard_load` API
mcdurdin Dec 4, 2024
9a338ab
chore(developer): update per code review
srl295 Dec 4, 2024
7caf607
chore(core): only install node on Windows if not available
ermshiperete Dec 4, 2024
dcc4c2b
Merge branch 'feat/developer/7394-verify-normalization-epic-ldml' int…
srl295 Dec 4, 2024
5ec2ce7
chore: address review comments
mcdurdin Dec 4, 2024
fe65eb2
Merge branch 'master' into chore/core/12497-remove-km_core_keyboard_load
mcdurdin Dec 4, 2024
33b4fa3
change(developer): use full github url in kmc copy parameters
mcdurdin Dec 2, 2024
170282b
chore: address review comments
mcdurdin Dec 4, 2024
4629cd1
chore(mac): draw three-color stripe correctly in About box
sgschantz Dec 5, 2024
389ef7f
chore: rename TestCompilerCallbacks.ts
mcdurdin Dec 5, 2024
fbc3790
chore(core): wait for `nvm use` to finish
ermshiperete Dec 5, 2024
6086249
chore(common/web): Merge branch 'master' into test/common/web/types/9…
markcsinclair Dec 5, 2024
78d9c68
Merge pull request #12716 from keymanapp/test/common/web/types/9052-u…
markcsinclair Dec 5, 2024
6014b2f
auto: increment master version to 18.0.154
keyman-server Dec 5, 2024
51cea11
Merge pull request #12788 from keymanapp/auto/version-master-18.0.154
keyman-server Dec 5, 2024
57b5530
Merge pull request #12750 from keymanapp/feat/developer/10649-local-i…
srl295 Dec 5, 2024
88f20d7
Merge pull request #12769 from keymanapp/chore/core/12497-remove-km_c…
mcdurdin Dec 5, 2024
72d0bac
Merge pull request #12775 from keymanapp/chore/rename-test-callbacks
mcdurdin Dec 5, 2024
9b2c506
chore(android): Update crowdin for Italian
darcywong00 Dec 6, 2024
fbec33f
chore(windows): Update crowdin for Italian
darcywong00 Dec 6, 2024
5081cfe
Merge pull request #12766 from keymanapp/chore/mac/12159-update-logo
sgschantz Dec 6, 2024
2ece804
Merge pull request #12793 from keymanapp/chore/crowdin-it
darcywong00 Dec 6, 2024
7be5c62
Merge pull request #12773 from keymanapp/chore/developer/12746-kmc-co…
mcdurdin Dec 6, 2024
ee46a66
chore(developer): Merge branch 'master' into feat/developer/12012-imp…
mcdurdin Dec 6, 2024
a78f03a
Merge pull request #12506 from keymanapp/feat/developer/12012-improve…
mcdurdin Dec 6, 2024
afa47e0
Update resources/shellHelperFunctions.sh
ermshiperete Dec 6, 2024
a420e7c
Merge pull request #12772 from keymanapp/chore/core/windows
ermshiperete Dec 6, 2024
8252a95
chore: Merge remote-tracking branch 'origin/master' into chore/merge-…
ermshiperete Dec 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Keyman Version History

## 18.0.153 alpha 2024-12-05

* feat(developer,common): verify normalization of strings (#12748)
* chore(core): Add link to Keyman Glossary (#12774)
* test(common/web/types): unit tests for file-types (#12716)

## 18.0.152 alpha 2024-12-04

* refactor(mac): pass kmx data blob to keyman core instead of file path (#12760)
Expand Down
2 changes: 1 addition & 1 deletion VERSION.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.0.153
18.0.154
16 changes: 8 additions & 8 deletions android/KMAPro/kMAPro/src/main/res/values-it-rIT/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<!-- 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>
<string name="adjust_longpress_delay" comment="Menu action to adjust longpress delay duration">Regola ritardo pressione prolungata</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 -->
Expand All @@ -89,11 +89,11 @@
<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">Vibra durante la digitazione</string>
<!-- Context: Keyman Settings menu -->
<!-- Context: Keyman Settings menu. Removed in Keyman 18 -->
<string name="show_banner" comment="text suggestions banner">Mostra sempre il banner</string>
<!-- Context: Keyman Settings menu -->
<!-- Context: Keyman Settings menu. Removed in Keyman 18 -->
<string name="show_banner_on" comment="Description when toggle is on">Da attuare</string>
<!-- Context: Keyman Settings menu -->
<!-- Context: Keyman Settings menu. Removed in Keyman 18 -->
<string name="show_banner_off" comment="Description when toggle is off">Quando è spento, mostrato solo quando il testo predittivo è abilitato</string>
<!-- Context: Keyman Settings menu -->
<string name="show_send_crash_report" comment="permission for sending crash reports">Consenti l\'invio di segnalazioni di crash attraverso la rete</string>
Expand Down Expand Up @@ -126,13 +126,13 @@
<!-- 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>
<string name="longpress_delay_time" comment="Current longpress delay time (seconds)">Tempo ritardo: %1$.1f secondi</string>
<!-- Context: Adjust Longpress Delay Time menu -->
<string name="ic_delay_time_up" comment="Make longpress delay longer">Delay time longer</string>
<string name="ic_delay_time_up" comment="Make longpress delay longer">Tempo ritardo maggiore</string>
<!-- Context: Adjust Longpress Delay Time menu -->
<string name="ic_delay_time_down" comment="Make longpress delay shorter">Delay time shorter</string>
<string name="ic_delay_time_down" comment="Make longpress delay shorter">Tempo ritardo minore</string>
<!-- Context: Adjust Longpress Delay Time menu -->
<string name="ic_longpress_delay_slider" comment="Adjust longpress delay time">Longpress delay time slider</string>
<string name="ic_longpress_delay_slider" comment="Adjust longpress delay time">Cursore tempo ritardo pressione prolungata</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
9 changes: 7 additions & 2 deletions android/KMEA/app/src/main/res/values-it-rIT/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,15 @@
<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">Tastiera eliminata</string>
<!-- Context: Language Settings menu strings -->
<!-- Context: Language Settings menu strings. Removed in Keyman 18 -->
<string name="enable_corrections" comment="Enable corrections from the suggestion banner">Abilita correzioni</string>
<!-- Context: Language Settings menu strings -->
<!-- Context: Language Settings menu strings. Removed in Keyman 18 -->
<string name="enable_predictions" comment="Enable predictions from the suggestion banner">Abilita previsioni</string>
<!-- Context: Language Settings menu strings - radio buttons -->
<string name="suggestions_radio_0" comment="Predictions and corrections disabled">Disabilita suggerimenti</string>
<string name="suggestions_radio_1" comment="Suggestions Enabled: Predictions with no corrections">Solo previsioni</string>
<string name="suggestions_radio_2" comment="Suggestions Enabled: Predictions with corrections">Previsioni con correzioni</string>
<string name="suggestions_radio_3" comment="Suggestions Enabled: Predictions with auto-corrections">Previsioni con correzioni automatiche</string>
<!-- Context: Language Settings menu strings -->
<string name="model_label">Dizionario</string>
<plurals name="model_count">
Expand Down
234 changes: 234 additions & 0 deletions common/web/types/tests/util/file-types.tests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*
* Created by Dr Mark C. Sinclair on 2024-11-29
*
* Test code for file-types.ts
*/

import 'mocha';
import { assert } from 'chai';
import {
ALL,
ALL_SOURCE,
ALL_BINARY,
Binary,
fromFilename,
removeExtension,
sourceOrBinaryTypeFromFilename,
sourceTypeFromFilename,
binaryTypeFromFilename,
filenameIs,
replaceExtension,
} from '../../src/util/file-types.js';

describe('Test of File-Types', () => {
describe('Test of fromFilename()', () => {
it('can extract Source file extension', () => {
ALL_SOURCE.forEach((ext) => {
const filename = `file${ext}`;
const actual = fromFilename(filename);
assert.deepEqual(actual, ext);
});
});
it('can extract Binary file extension', () => {
ALL_BINARY.forEach((ext) => {
const filename = `file${ext}`;
const actual = fromFilename(filename);
assert.deepEqual(actual, ext);
});
});
it('can extract unmatched file extension', () => {
const ext = ".cpp";
assert.isFalse((Object.values(ALL_SOURCE) as string[]).includes(ext));
const filename = `file${ext}`;
const actual = fromFilename(filename);
assert.deepEqual(actual, ext);
});
it('returns empty string for no file extension', () => {
const filename = `file`;
const actual = fromFilename(filename);
assert.deepEqual(actual, "");
});
it('can extract upper case file extension', () => {
const ext = ALL_SOURCE[0];
const upperCaseExt = ext.toUpperCase();
const filename = `file${upperCaseExt}`;
const actual = fromFilename(filename);
assert.deepEqual(actual, ext);
});
});
describe('Test of removeExtension()', () => {
it('can remove Source file extension', () => {
ALL_SOURCE.forEach((ext) => {
const filename = `file${ext}`;
const actual = removeExtension(filename);
assert.deepEqual(actual, "file");
});
});
it('can remove Binary file extension', () => {
ALL_BINARY.forEach((ext) => {
const filename = `file${ext}`;
const actual = removeExtension(filename);
assert.deepEqual(actual, "file");
});
});
it('can handle no file extension', () => {
const filename = removeExtension("file");
assert.deepEqual(filename, "file");
});
});
describe('Test of sourceOrBinaryTypeFromFilename()', () => {
it('can extract Source file extension', () => {
ALL_SOURCE.forEach((ext) => {
const filename = `file${ext}`;
const actual = sourceOrBinaryTypeFromFilename(filename);
assert.deepEqual(actual, ext);
});
});
it('can extract Binary file extension', () => {
ALL_BINARY.forEach((ext) => {
const filename = `file${ext}`;
const actual = sourceOrBinaryTypeFromFilename(filename);
assert.deepEqual(actual, ext);
});
});
it('returns null for unmatched file extension', () => {
const ext = ".cpp";
assert.isFalse((Object.values(ALL) as string[]).includes(ext));
const filename = `file${ext}`;
const actual = sourceOrBinaryTypeFromFilename(filename);
assert.isNull(actual);
});
it('can extract upper case file extension', () => {
const ext = ALL[0];
const upperCaseExt = ext.toUpperCase();
const filename = `file${upperCaseExt}`;
const actual = sourceOrBinaryTypeFromFilename(filename);
assert.deepEqual(actual, ext);
});
});
describe('Test of sourceTypeFromFilename()', () => {
it('can extract Source file extension', () => {
ALL_SOURCE.forEach((ext) => {
const filename = `file${ext}`;
const actual = sourceTypeFromFilename(filename);
assert.deepEqual(actual, ext);
});
});
it('returns null for a Binary file extension', () => {
ALL_BINARY.forEach((ext) => {
const filename = `file${ext}`;
const actual = sourceTypeFromFilename(filename);
assert.isNull(actual);
});
});
it('returns null for unmatched file extension', () => {
const ext = ".cpp";
assert.isFalse((Object.values(ALL_SOURCE) as string[]).includes(ext));
const filename = `file${ext}`;
const actual = sourceTypeFromFilename(filename);
assert.isNull(actual);
});
it('can extract upper case file extension', () => {
const ext = ALL_SOURCE[0];
const upperCaseExt = ext.toUpperCase();
const filename = `file${upperCaseExt}`;
const actual = sourceTypeFromFilename(filename);
assert.deepEqual(actual, ext);
});
});
describe('Test of binaryTypeFromFilename()', () => {
it('returns null for a Source file extension', () => {
ALL_SOURCE.forEach((ext) => {
const filename = `file${ext}`;
const actual = binaryTypeFromFilename(filename);
assert.isNull(actual);
});
});
it('can extract Binary file extension', () => {
ALL_BINARY.forEach((ext) => {
const filename = `file${ext}`;
const actual = binaryTypeFromFilename(filename);
assert.deepEqual(actual, ext);
});
});
it('returns null for unmatched file extension', () => {
const ext = ".cpp";
assert.isFalse((Object.values(ALL_BINARY) as string[]).includes(ext));
const filename = `file${ext}`;
const actual = binaryTypeFromFilename(filename);
assert.isNull(actual);
});
it('can extract upper case file extension', () => {
const ext = ALL_BINARY[0];
const upperCaseExt = ext.toUpperCase();
const filename = `file${upperCaseExt}`;
const actual = binaryTypeFromFilename(filename);
assert.deepEqual(actual, ext);
});
});
describe('Test of filenameIs()', () => {
it('can identify Source file extension', () => {
ALL_SOURCE.forEach((ext) => {
const filename = `file${ext}`;
const actual = filenameIs(filename, ext);
assert.isTrue(actual);
});
});
it('can identify Binary file extension', () => {
ALL_BINARY.forEach((ext) => {
const filename = `file${ext}`;
if (ext == Binary.Model) { // Special case for .model.js
const actual = filenameIs(filename, Binary.WebKeyboard);
assert.isFalse(actual);
}
const actual = filenameIs(filename, ext);
assert.isTrue(actual);
});
});
it('can identify upper case file extension', () => {
const ext = ALL[0];
const upperCaseExt = ext.toUpperCase();
const filename = `file${upperCaseExt}`;
const actual = filenameIs(filename, ext);
assert.isTrue(actual);
});
});
describe('Test of replaceExtension()', () => {
it('can replace an extension', () => {
const oldExt = ".cpp";
const newExt = ".js";
const oldFilename = `file${oldExt}`;
const newFilename = `file${newExt}`;
const actual = replaceExtension(oldFilename, oldExt, newExt);
assert.deepEqual(actual, newFilename);
});
it('should return null for incorrect old extension (too short)', () => {
const oldExt = ".ts";
const newExt = ".js";
const oldFilename = `file.c`;
const actual = replaceExtension(oldFilename, oldExt, newExt);
assert.isNull(actual);
});
it('should return null for incorrect old extension (too long)', () => {
const oldExt = ".ts";
const newExt = ".js";
const oldFilename = `file.cpp`;
const actual = replaceExtension(oldFilename, oldExt, newExt);
assert.isNull(actual);
});
// it('should return null for null old extension', () => {
// const newExt = ".js";
// const oldFilename = `file.ts`;
// const actual = replaceExtension(oldFilename, null, newExt);
// assert.isNull(actual);
// });
// it('should return null for null new extension', () => {
// const oldExt = ".ts";
// const oldFilename = `file.ts`;
// const actual = replaceExtension(oldFilename, oldExt, null);
// assert.isNull(actual);
// });
});
});
2 changes: 1 addition & 1 deletion core/docs/api/background.md
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ typedef enum { KM_CORE_FALSE = 0, KM_CORE_TRUE = 1 } km_core_bool;
[km_core_keyboard_attrs]: keyboards#km_core_keyboard_attrs "km_core_keyboard_attrs struct"
[km_core_keyboard_key]: keyboards#km_core_keyboard_key "km_core_keyboard_key struct"
[km_core_keyboard_imx]: keyboards#km_core_keyboard_imx "km_core_keyboard_imx struct"
[km_core_keyboard_load]: keyboards#km_core_keyboard_load "km_core_keyboard_load function"
[km_core_keyboard_load_from_blob]: keyboards#km_core_keyboard_load_from_blob "km_core_keyboard_load_from_blob function"
[km_core_keyboard_dispose]: keyboards#km_core_keyboard_dispose "km_core_keyboard_dispose function"
[km_core_keyboard_get_attrs]: keyboards#km_core_keyboard_get_attrs "km_core_keyboard_get_attrs function"
[km_core_keyboard_get_key_list]: keyboards#km_core_keyboard_get_key_list "km_core_keyboard_get_key_list function"
Expand Down
2 changes: 1 addition & 1 deletion core/docs/api/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ title: Changes - Keyman Core API
[km_core_keyboard_attrs]: keyboards#km_core_keyboard_attrs "km_core_keyboard_attrs struct"
[km_core_keyboard_key]: keyboards#km_core_keyboard_key "km_core_keyboard_key struct"
[km_core_keyboard_imx]: keyboards#km_core_keyboard_imx "km_core_keyboard_imx struct"
[km_core_keyboard_load]: keyboards#km_core_keyboard_load "km_core_keyboard_load function"
[km_core_keyboard_load_from_blob]: keyboards#km_core_keyboard_load_from_blob "km_core_keyboard_load_from_blob function"
[km_core_keyboard_dispose]: keyboards#km_core_keyboard_dispose "km_core_keyboard_dispose function"
[km_core_keyboard_get_attrs]: keyboards#km_core_keyboard_get_attrs "km_core_keyboard_get_attrs function"
[km_core_keyboard_get_key_list]: keyboards#km_core_keyboard_get_key_list "km_core_keyboard_get_key_list function"
Expand Down
2 changes: 1 addition & 1 deletion core/docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Caps Lock.
[km_core_keyboard_attrs]: keyboards#km_core_keyboard_attrs "km_core_keyboard_attrs struct"
[km_core_keyboard_key]: keyboards#km_core_keyboard_key "km_core_keyboard_key struct"
[km_core_keyboard_imx]: keyboards#km_core_keyboard_imx "km_core_keyboard_imx struct"
[km_core_keyboard_load]: keyboards#km_core_keyboard_load "km_core_keyboard_load function"
[km_core_keyboard_load_from_blob]: keyboards#km_core_keyboard_load_from_blob "km_core_keyboard_load_from_blob function"
[km_core_keyboard_dispose]: keyboards#km_core_keyboard_dispose "km_core_keyboard_dispose function"
[km_core_keyboard_get_attrs]: keyboards#km_core_keyboard_get_attrs "km_core_keyboard_get_attrs function"
[km_core_keyboard_get_key_list]: keyboards#km_core_keyboard_get_key_list "km_core_keyboard_get_key_list function"
Expand Down
Loading
Loading