diff --git a/common/web/types/build.sh b/common/web/types/build.sh index 7dac43dba81..b2ada0ecbc4 100755 --- a/common/web/types/build.sh +++ b/common/web/types/build.sh @@ -93,7 +93,7 @@ function do_test() { #------------------------------------------------------------------------------------------------------------------- -builder_run_action clean rm -rf ./build/ ./tsconfig.tsbuildinfo +builder_run_action clean rm -rf ./build/ ./tsconfig.tsbuildinfo ./src/schemas/ ./node_modules/ ./obj/ builder_run_action configure do_configure builder_run_action build tsc --build builder_run_action test do_test diff --git a/common/web/types/src/package/kmp-json-file.ts b/common/web/types/src/package/kmp-json-file.ts index ae88b5ba3e9..4a1c1c159e4 100644 --- a/common/web/types/src/package/kmp-json-file.ts +++ b/common/web/types/src/package/kmp-json-file.ts @@ -44,7 +44,7 @@ export interface KmpJsonFileInfoItem { export interface KmpJsonFileContentFile { name: string; - description: string; + description?: string; copyLocation?: number; } diff --git a/developer/src/common/web/utils/src/types/kps/kps-file.ts b/developer/src/common/web/utils/src/types/kps/kps-file.ts index 7724f4a6490..aac583e11f3 100644 --- a/developer/src/common/web/utils/src/types/kps/kps-file.ts +++ b/developer/src/common/web/utils/src/types/kps/kps-file.ts @@ -72,11 +72,11 @@ export interface KpsFileContentFiles { export interface KpsFileContentFile { Name: string; /** @deprecated */ - Description: string; + Description?: string; /** @deprecated */ - CopyLocation: string; + CopyLocation?: string; /** @deprecated */ - FileType: string; + FileType?: string; } export interface KpsFileLexicalModel { diff --git a/developer/src/kmc-copy/test/fixtures/expected/gff.ti_er.gff_tigrinya_eritrea/sil.ti_er.my_version.model.kps b/developer/src/kmc-copy/test/fixtures/expected/gff.ti_er.gff_tigrinya_eritrea/sil.ti_er.my_version.model.kps index 07a430f1ad0..81410bf0641 100644 --- a/developer/src/kmc-copy/test/fixtures/expected/gff.ti_er.gff_tigrinya_eritrea/sil.ti_er.my_version.model.kps +++ b/developer/src/kmc-copy/test/fixtures/expected/gff.ti_er.gff_tigrinya_eritrea/sil.ti_er.my_version.model.kps @@ -20,7 +20,7 @@ © 2023 Geʾez Frontier Foundation Geʾez Frontier Foundation 1.0.1 - The Tigrinya-Eritrea lexical model is based on the content found from 131 issues of the Haddas Eritrea (ሓዳስ ኤርትራ) newspaper. + The Tigrinya-Eritrea lexical model is based on the content found from 131 issues of the Haddas Eritrea (ሓዳስ ኤርትራ) newspaper. diff --git a/developer/src/kmc-copy/test/fixtures/expected/kmhmu_2008/kmhmu_2024.kps b/developer/src/kmc-copy/test/fixtures/expected/kmhmu_2008/kmhmu_2024.kps index 4e352d885ca..f2fbce7c92e 100644 --- a/developer/src/kmc-copy/test/fixtures/expected/kmhmu_2008/kmhmu_2024.kps +++ b/developer/src/kmc-copy/test/fixtures/expected/kmhmu_2008/kmhmu_2024.kps @@ -20,7 +20,7 @@ Kmhmu 2008 © 2008-2018 John Durdin - Lao-script Kmhmu language keyboard + Lao-script Kmhmu language keyboard diff --git a/developer/src/kmc-copy/test/fixtures/projects/gff.ti_er.gff_tigrinya_eritrea/source/gff.ti_er.gff_tigrinya_eritrea.model.kps b/developer/src/kmc-copy/test/fixtures/projects/gff.ti_er.gff_tigrinya_eritrea/source/gff.ti_er.gff_tigrinya_eritrea.model.kps index 5e01595a251..6630ce927f5 100644 --- a/developer/src/kmc-copy/test/fixtures/projects/gff.ti_er.gff_tigrinya_eritrea/source/gff.ti_er.gff_tigrinya_eritrea.model.kps +++ b/developer/src/kmc-copy/test/fixtures/projects/gff.ti_er.gff_tigrinya_eritrea/source/gff.ti_er.gff_tigrinya_eritrea.model.kps @@ -20,7 +20,7 @@ © 2023 Geʾez Frontier Foundation Geʾez Frontier Foundation 1.0.1 - The Tigrinya-Eritrea lexical model is based on the content found from 131 issues of the Haddas Eritrea (ሓዳስ ኤርትራ) newspaper. + The Tigrinya-Eritrea lexical model is based on the content found from 131 issues of the Haddas Eritrea (ሓዳስ ኤርትራ) newspaper. diff --git a/developer/src/kmc-copy/test/fixtures/projects/kmhmu_2008/source/kmhmu_2008.kps b/developer/src/kmc-copy/test/fixtures/projects/kmhmu_2008/source/kmhmu_2008.kps index 5c47f473211..1b2688d1002 100644 --- a/developer/src/kmc-copy/test/fixtures/projects/kmhmu_2008/source/kmhmu_2008.kps +++ b/developer/src/kmc-copy/test/fixtures/projects/kmhmu_2008/source/kmhmu_2008.kps @@ -20,7 +20,7 @@ Kmhmu 2008 © 2008-2018 John Durdin - Lao-script Kmhmu language keyboard + Lao-script Kmhmu language keyboard diff --git a/developer/src/kmc-package/src/compiler/kmp-compiler.ts b/developer/src/kmc-package/src/compiler/kmp-compiler.ts index 3b50ee7ca39..5f6de5dc836 100644 --- a/developer/src/kmc-package/src/compiler/kmp-compiler.ts +++ b/developer/src/kmc-package/src/compiler/kmp-compiler.ts @@ -247,8 +247,8 @@ export class KmpCompiler implements KeymanCompiler { kmp.files = kps.Files.File.map((file: KpsFile.KpsFileContentFile) => { return { name: this.normalizePath(file.Name), - description: (file.Description ?? '').trim(), - copyLocation: parseInt(file.CopyLocation, 10) || undefined + description: '', // kmp.json still requires description, but we ignore the input Description field + // note: we no longer emit copyLocation as of 18.0; it was always optional // note: we don't emit fileType as that is not permitted in kmp.json }; }); @@ -270,14 +270,14 @@ export class KmpCompiler implements KeymanCompiler { if(kps.Keyboards && kps.Keyboards.Keyboard) { kmp.files.push({ name: KMP_INF_FILENAME, - description: "Package information" + description: "" }); } // Add the standard kmp.json self-referential to match existing implementations kmp.files.push({ name: KMP_JSON_FILENAME, - description: "Package information (JSON)" + description: "" }); // diff --git a/developer/src/kmc-package/src/compiler/kmp-inf-writer.ts b/developer/src/kmc-package/src/compiler/kmp-inf-writer.ts index 48499e4ac89..037f34f4aee 100644 --- a/developer/src/kmc-package/src/compiler/kmp-inf-writer.ts +++ b/developer/src/kmc-package/src/compiler/kmp-inf-writer.ts @@ -44,7 +44,7 @@ export class KmpInfWriter { for(let i = 0; i < this.data.files.length; i++) { const file = this.data.files[i]; - this.addString(i.toString(), `"${file.description}","${file.name}",${file.copyLocation??0}`); + this.addString(i.toString(), `"${file.description??''}","${file.name}",${file.copyLocation??0}`); } } diff --git a/developer/src/kmc-package/test/fixtures/example.qaa.sencoten/example.qaa.sencoten.model.kmp.intermediate.json b/developer/src/kmc-package/test/fixtures/example.qaa.sencoten/example.qaa.sencoten.model.kmp.intermediate.json index 3a683626fa3..7c9d139bd48 100644 --- a/developer/src/kmc-package/test/fixtures/example.qaa.sencoten/example.qaa.sencoten.model.kmp.intermediate.json +++ b/developer/src/kmc-package/test/fixtures/example.qaa.sencoten/example.qaa.sencoten.model.kmp.intermediate.json @@ -22,10 +22,10 @@ "files": [ { "name": "example.qaa.sencoten.model.js", - "description": "Lexical model example.qaa.sencoten.model.js" + "description": "" }, { - "description": "Package information (JSON)", + "description": "", "name": "kmp.json" } ], diff --git a/developer/src/kmc-package/test/fixtures/khmer_angkor/ref/kmp.json b/developer/src/kmc-package/test/fixtures/khmer_angkor/ref/kmp.json index 1fd94b374ef..93c02734797 100644 --- a/developer/src/kmc-package/test/fixtures/khmer_angkor/ref/kmp.json +++ b/developer/src/kmc-package/test/fixtures/khmer_angkor/ref/kmp.json @@ -30,71 +30,71 @@ "files": [ { "name": "khmer_angkor.js", - "description": "File khmer_angkor.js" + "description": "" }, { "name": "khmer_angkor.kvk", - "description": "File khmer_angkor.kvk" + "description": "" }, { "name": "khmer_angkor.kmx", - "description": "Keyboard Khmer Angkor" + "description": "" }, { "name": "keyboard_layout.png", - "description": "File keyboard_layout.png" + "description": "" }, { "name": "welcome.htm", - "description": "File welcome.htm" + "description": "" }, { "name": "FONTLOG.txt", - "description": "File FONTLOG.txt" + "description": "" }, { "name": "Mondulkiri-R.ttf", - "description": "Font Khmer Mondulkiri" + "description": "" }, { "name": "OFL.txt", - "description": "File OFL.txt" + "description": "" }, { "name": "OFL-FAQ.txt", - "description": "File OFL-FAQ.txt" + "description": "" }, { "name": "KAK_Documentation_EN.pdf", - "description": "File KAK_Documentation_EN.pdf" + "description": "" }, { "name": "KAK_Documentation_KH.pdf", - "description": "File KAK_Documentation_KH.pdf" + "description": "" }, { "name": "readme.htm", - "description": "File readme.htm" + "description": "" }, { "name": "image002.png", - "description": "File image002.png" + "description": "" }, { "name": "khmer_busra_kbd.ttf", - "description": "Font KhmerBusraKbd" + "description": "" }, { "name": "splash.gif", - "description": "File splash.gif" + "description": "" }, { "name": "kmp.inf", - "description": "Package information" + "description": "" }, { "name": "kmp.json", - "description": "Package information (JSON)" + "description": "" } ], "keyboards": [ diff --git a/developer/src/kmc-package/test/fixtures/kmp.json/kmp.json b/developer/src/kmc-package/test/fixtures/kmp.json/kmp.json index 3cff482c0e5..614af5794eb 100644 --- a/developer/src/kmc-package/test/fixtures/kmp.json/kmp.json +++ b/developer/src/kmc-package/test/fixtures/kmp.json/kmp.json @@ -40,59 +40,59 @@ "files": [ { "name": "ahom_star.kvk", - "description": "File ahom_star.kvk" + "description": "" }, { "name": "ahom_star.kmx", - "description": "Keyboard ahom_star" + "description": "" }, { "name": "ahom_star.js", - "description": "File ahom_star.js" + "description": "" }, { "name": "welcome.htm", - "description": "File welcome.htm" + "description": "" }, { "name": "desktop_layout_default.png", - "description": "File desktop_layout_default.png" + "description": "" }, { "name": "desktop_layout_shift.png", - "description": "File desktop_layout_shift.png" + "description": "" }, { "name": "phone_default.png", - "description": "File phone_default.png" + "description": "" }, { "name": "phone_longpress.png", - "description": "File phone_longpress.png" + "description": "" }, { "name": "phone_numeric.png", - "description": "File phone_numeric.png" + "description": "" }, { "name": "phone_shift.png", - "description": "File phone_shift.png" + "description": "" }, { "name": "readme.htm", - "description": "File readme.htm" + "description": "" }, { "name": "NotoSerifAhom-Regular.ttf", - "description": "Font Noto Serif Ahom Regular" + "description": "" }, { "name": "kmp.inf", - "description": "Package information" + "description": "" }, { "name": "kmp.json", - "description": "Package information (JSON)" + "description": "" } ], "keyboards": [ diff --git a/developer/src/kmc-package/test/fixtures/kmp_2.0/kmp.json b/developer/src/kmc-package/test/fixtures/kmp_2.0/kmp.json index 8cc2f03cd69..0fb814ca6d2 100644 --- a/developer/src/kmc-package/test/fixtures/kmp_2.0/kmp.json +++ b/developer/src/kmc-package/test/fixtures/kmp_2.0/kmp.json @@ -32,75 +32,75 @@ "files": [ { "name": "khmer_angkor.js", - "description": "File khmer_angkor.js" + "description": "" }, { "name": "khmer_angkor.kvk", - "description": "File khmer_angkor.kvk" + "description": "" }, { "name": "khmer_angkor.kmx", - "description": "Keyboard Khmer Angkor" + "description": "" }, { "name": "keyboard_layout.png", - "description": "File keyboard_layout.png" + "description": "" }, { "name": "welcome.htm", - "description": "File welcome.htm" + "description": "" }, { "name": "FONTLOG.txt", - "description": "File FONTLOG.txt" + "description": "" }, { "name": "Mondulkiri-R.ttf", - "description": "Font Khmer Mondulkiri" + "description": "" }, { "name": "OFL.txt", - "description": "File OFL.txt" + "description": "" }, { "name": "OFL-FAQ.txt", - "description": "File OFL-FAQ.txt" + "description": "" }, { "name": "KAK_Documentation_EN.pdf", - "description": "File KAK_Documentation_EN.pdf" + "description": "" }, { "name": "KAK_Documentation_KH.pdf", - "description": "File KAK_Documentation_KH.pdf" + "description": "" }, { "name": "readme.htm", - "description": "File readme.htm" + "description": "" }, { "name": "image002.png", - "description": "File image002.png" + "description": "" }, { "name": "khmer_busra_kbd.ttf", - "description": "Font KhmerBusraKbd" + "description": "" }, { - "description": "Font DejaVuSans", + "description": "", "name": "DejaVuSans.ttf" }, { "name": "splash.gif", - "description": "File splash.gif" + "description": "" }, { "name": "kmp.inf", - "description": "Package information" + "description": "" }, { "name": "kmp.json", - "description": "Package information (JSON)" + "description": "" } ], "keyboards": [ diff --git a/developer/src/kmc-package/test/fixtures/withfolders.qaa.sencoten/withfolders.qaa.sencoten.model.kmp.intermediate.json b/developer/src/kmc-package/test/fixtures/withfolders.qaa.sencoten/withfolders.qaa.sencoten.model.kmp.intermediate.json index 9d3de2aa64b..160c7e74b42 100644 --- a/developer/src/kmc-package/test/fixtures/withfolders.qaa.sencoten/withfolders.qaa.sencoten.model.kmp.intermediate.json +++ b/developer/src/kmc-package/test/fixtures/withfolders.qaa.sencoten/withfolders.qaa.sencoten.model.kmp.intermediate.json @@ -22,14 +22,14 @@ "files": [ { "name": "../build/withfolders.qaa.sencoten.model.js", - "description": "Lexical model withfolders.qaa.sencoten.model.js" + "description": "" }, { - "description": "Welcome file", + "description": "", "name": "welcome.htm" }, { - "description": "Package information (JSON)", + "description": "", "name": "kmp.json" } ],